[go: nahoru, domu]

[cleanup] Wrap comment variable names with backticks in //printing/

The Chromium C++ Dos and Don'ts [1] was changed to encourage wrapping
variable names in comments with backticks (`) instead of pipes (|).

Update all comments in the //printing/ directory so a consistent style
is used.

The update was performed automagically with the following command:

grep -rl '|' --include \*.h --include \*.cc printing/ | \
  xargs perl -i -pe 's/(?<=\W)\||\|(?=\W)/`/g if /^\s*\/\//;'

The above command assumes that the comments of interest only start with
"//" and are not wrapped in "/*...*/".

Meanwhile, fix some old typos caught by tricium.

[1] https://chromium.googlesource.com/chromium/src/+/463a912f0a01a08e6cb9a6f57f6ca0489c99a9fa/styleguide/c++/c++-dos-and-donts.md#comment-style

Change-Id: I7f70e041c7512a5068cbe690b1ef0e3bd1247e5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2849013
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875940}
diff --git a/printing/backend/cups_connection.h b/printing/backend/cups_connection.h
index 14f8fb9..af02dcd 100644
--- a/printing/backend/cups_connection.h
+++ b/printing/backend/cups_connection.h
@@ -43,18 +43,18 @@
   // Returns a vector of all the printers configure on the CUPS server.
   virtual std::vector<std::unique_ptr<CupsPrinter>> GetDests() = 0;
 
-  // Returns a printer for |printer_name| from the connected server.
+  // Returns a printer for `printer_name` from the connected server.
   virtual std::unique_ptr<CupsPrinter> GetPrinter(
       const std::string& printer_name) = 0;
 
-  // Queries CUPS for printer queue status for |printer_ids|.  Populates |jobs|
+  // Queries CUPS for printer queue status for `printer_ids`.  Populates `jobs`
   // with said information with one QueueStatus per printer_id.  Returns true if
-  // all the queries were successful.  In the event of failure, |jobs| will be
+  // all the queries were successful.  In the event of failure, `jobs` will be
   // unchanged.
   virtual bool GetJobs(const std::vector<std::string>& printer_ids,
                        std::vector<QueueStatus>* jobs) = 0;
 
-  // Queries CUPS for printer status for |printer_id|.
+  // Queries CUPS for printer status for `printer_id`.
   // Returns true if the query was successful.
   virtual bool GetPrinterStatus(const std::string& printer_id,
                                 PrinterStatus* printer_status) = 0;
diff --git a/printing/backend/cups_ipp_helper.cc b/printing/backend/cups_ipp_helper.cc
index 971e268..7137f49 100644
--- a/printing/backend/cups_ipp_helper.cc
+++ b/printing/backend/cups_ipp_helper.cc
@@ -185,7 +185,7 @@
       (lower_bound != -1 && upper_bound >= 2) ? upper_bound : 1;
 }
 
-// Reads resolution from |attr| and puts into |size| in dots per inch.
+// Reads resolution from `attr` and puts into `size` in dots per inch.
 base::Optional<gfx::Size> GetResolution(ipp_attribute_t* attr, int i) {
   ipp_res_t units;
   int yres;
@@ -202,8 +202,8 @@
   return {};
 }
 
-// Initializes |printer_info.dpis| with available resolutions and
-// |printer_info.default_dpi| with default resolution provided by |printer|.
+// Initializes `printer_info.dpis` with available resolutions and
+// `printer_info.default_dpi` with default resolution provided by `printer`.
 void ExtractResolutions(const CupsOptionProvider& printer,
                         PrinterSemanticCapsAndDefaults* printer_info) {
   ipp_attribute_t* attr = printer.GetSupportedOptionValues(kIppResolution);
@@ -271,7 +271,7 @@
   return base::Contains(values, kPinEncryptionNone);
 }
 
-// Returns the number of IPP attributes added to |caps| (not necessarily in
+// Returns the number of IPP attributes added to `caps` (not necessarily in
 // 1-to-1 correspondence).
 size_t AddAttributes(const CupsOptionProvider& printer,
                      const char* attr_group_name,
@@ -293,7 +293,7 @@
     }
 
     size_t previous_size = caps->size();
-    // Run the handler that adds items to |caps| based on option type.
+    // Run the handler that adds items to `caps` based on option type.
     it->second.Run(printer, option_name, caps);
     if (caps->size() > previous_size)
       attr_count++;
diff --git a/printing/backend/cups_ipp_helper.h b/printing/backend/cups_ipp_helper.h
index 92681c16..4ee174cd 100644
--- a/printing/backend/cups_ipp_helper.h
+++ b/printing/backend/cups_ipp_helper.h
@@ -18,17 +18,17 @@
 // Smart ptr wrapper for CUPS ipp_t
 using ScopedIppPtr = std::unique_ptr<ipp_t, void (*)(ipp_t*)>;
 
-// Returns the default paper setting for |printer|.
+// Returns the default paper setting for `printer`.
 PrinterSemanticCapsAndDefaults::Paper DefaultPaper(
     const CupsOptionProvider& printer);
 
-// Populates the |printer_info| object with attributes retrived using IPP from
-// |printer|.
+// Populates the `printer_info` object with attributes retrieved using IPP from
+// `printer`.
 PRINTING_EXPORT void CapsAndDefaultsFromPrinter(
     const CupsOptionProvider& printer,
     PrinterSemanticCapsAndDefaults* printer_info);
 
-// Wraps |ipp| in unique_ptr with appropriate deleter
+// Wraps `ipp` in unique_ptr with appropriate deleter
 PRINTING_EXPORT ScopedIppPtr WrapIpp(ipp_t* ipp);
 
 }  // namespace printing
diff --git a/printing/backend/cups_ipp_utils.h b/printing/backend/cups_ipp_utils.h
index 91c54bd..a174c3f 100644
--- a/printing/backend/cups_ipp_utils.h
+++ b/printing/backend/cups_ipp_utils.h
@@ -17,7 +17,7 @@
 
 class CupsConnection;
 
-// Creates a CUPS connection using |print_backend_settings|.
+// Creates a CUPS connection using `print_backend_settings`.
 std::unique_ptr<CupsConnection> CreateConnection(
     const base::Value* print_backend_settings);
 
diff --git a/printing/backend/cups_jobs.cc b/printing/backend/cups_jobs.cc
index 13f745c..5b37925 100644
--- a/printing/backend/cups_jobs.cc
+++ b/printing/backend/cups_jobs.cc
@@ -117,7 +117,7 @@
      kDocumentFormatSupported, kPrinterState, kPrinterStateReasons,
      kPrinterStateMessage}};
 
-// Converts an IPP attribute |attr| to the appropriate JobState enum.
+// Converts an IPP attribute `attr` to the appropriate JobState enum.
 CupsJob::JobState ToJobState(ipp_attribute_t* attr) {
   DCHECK_EQ(IPP_TAG_ENUM, ippGetValueTag(attr));
   int state = ippGetInteger(attr, 0);
@@ -186,7 +186,7 @@
   return kLabelToReason;
 }
 
-// Returns the Reason cooresponding to the string |reason|.  Returns
+// Returns the Reason corresponding to the string `reason`.  Returns
 // UNKOWN_REASON if the string is not recognized.
 PrinterStatus::PrinterReason::Reason ToReason(base::StringPiece reason) {
   const auto& enum_map = GetLabelToReason();
@@ -194,7 +194,7 @@
   return entry != enum_map.end() ? entry->second : PReason::kUnknownReason;
 }
 
-// Returns the Severity cooresponding to |severity|.  Returns UNKNOWN_SEVERITY
+// Returns the Severity corresponding to `severity`.  Returns UNKNOWN_SEVERITY
 // if the strin gis not recognized.
 PSeverity ToSeverity(base::StringPiece severity) {
   if (severity == kSeverityError)
@@ -209,7 +209,7 @@
   return PSeverity::kUnknownSeverity;
 }
 
-// Parses the |reason| string into a PrinterReason.  Splits the string based on
+// Parses the `reason` string into a PrinterReason.  Splits the string based on
 // the last '-' to determine severity.  If a recognized severity is not
 // included, severity is assumed to be ERROR per RFC2911.
 PrinterStatus::PrinterReason ToPrinterReason(base::StringPiece reason) {
@@ -242,7 +242,7 @@
   return parsed;
 }
 
-// Populates |collection| with the collection of strings in |attr|.
+// Populates `collection` with the collection of strings in `attr`.
 void ParseCollection(ipp_attribute_t* attr,
                      std::vector<std::string>* collection) {
   int count = ippGetCount(attr);
@@ -254,8 +254,8 @@
   }
 }
 
-// Parse a field for the CupsJob |job| from IPP attribute |attr| using the
-// attribute name |name|.
+// Parse a field for the CupsJob `job` from IPP attribute `attr` using the
+// attribute name `name`.
 void ParseField(ipp_attribute_t* attr, base::StringPiece name, CupsJob* job) {
   DCHECK(!name.empty());
   if (name == kJobId) {
@@ -276,7 +276,7 @@
   }
 }
 
-// Returns a new CupsJob allocated in |jobs| with |printer_id| populated.
+// Returns a new CupsJob allocated in `jobs` with `printer_id` populated.
 CupsJob* NewJob(const std::string& printer_id, std::vector<CupsJob>* jobs) {
   jobs->emplace_back();
   CupsJob* job = &jobs->back();
@@ -305,7 +305,7 @@
   }
 }
 
-// Extracts PrinterInfo fields from |response| and populates |printer_info|.
+// Extracts PrinterInfo fields from `response` and populates `printer_info`.
 // Returns true if at least printer-make-and-model and ipp-versions-supported
 // were read.
 bool ParsePrinterInfo(ipp_t* response, PrinterInfo* printer_info) {
@@ -355,7 +355,7 @@
   return !printer_info->make_and_model.empty();
 }
 
-// Returns true if |status| represents a complete failure in the IPP request.
+// Returns true if `status` represents a complete failure in the IPP request.
 bool StatusError(ipp_status_e status) {
   return status != IPP_STATUS_OK &&
          status != IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED;
@@ -391,12 +391,12 @@
   }
 }
 
-// Returns an IPP response for a Get-Printer-Attributes request to |http|.  For
-// print servers, |printer_uri| is used as the printer-uri value.
-// |resource_path| specifies the path portion of the server URI.
-// |num_attributes| is the number of attributes in |attributes| which should be
-// a list of IPP attributes.  |status| is updated with status code for the
-// request.  A successful request will have the |status| IPP_STATUS_OK.
+// Returns an IPP response for a Get-Printer-Attributes request to `http`.  For
+// print servers, `printer_uri` is used as the printer-uri value.
+// `resource_path` specifies the path portion of the server URI.
+// `num_attributes` is the number of attributes in `attributes` which should be
+// a list of IPP attributes.  `status` is updated with status code for the
+// request.  A successful request will have the `status` IPP_STATUS_OK.
 ScopedIppPtr GetPrinterAttributes(http_t* http,
                                   const std::string& printer_uri,
                                   const std::string& resource_path,
diff --git a/printing/backend/cups_jobs.h b/printing/backend/cups_jobs.h
index 8b9659c..60b8691 100644
--- a/printing/backend/cups_jobs.h
+++ b/printing/backend/cups_jobs.h
@@ -86,21 +86,21 @@
   PROCESSING  // only jobs that are being processed
 };
 
-// Returns the uri for printer with |id| as served by CUPS. Assumes that |id| is
+// Returns the uri for printer with `id` as served by CUPS. Assumes that `id` is
 // a valid CUPS printer name and performs no error checking or escaping.
 std::string PRINTING_EXPORT PrinterUriFromName(const std::string& id);
 
-// Extracts structured job information from the |response| for |printer_id|.
-// Extracted jobs are added to |jobs|.
+// Extracts structured job information from the `response` for `printer_id`.
+// Extracted jobs are added to `jobs`.
 void ParseJobsResponse(ipp_t* response,
                        const std::string& printer_id,
                        std::vector<CupsJob>* jobs);
 
-// Attempts to extract a PrinterStatus object out of |response|.
+// Attempts to extract a PrinterStatus object out of `response`.
 void ParsePrinterStatus(ipp_t* response, PrinterStatus* printer_status);
 
-// Queries the printer at |address| on |port| with a Get-Printer-Attributes
-// request to populate |printer_info|. If |encrypted| is true, request is made
+// Queries the printer at `address` on `port` with a Get-Printer-Attributes
+// request to populate `printer_info`. If `encrypted` is true, request is made
 // using ipps, otherwise, ipp is used. Returns false if the request failed.
 PrinterQueryResult PRINTING_EXPORT
 GetPrinterInfo(const std::string& address,
@@ -110,17 +110,17 @@
                PrinterInfo* printer_info,
                PrinterStatus* printer_status);
 
-// Attempts to retrieve printer status using connection |http| for |printer_id|.
-// Returns true if succcssful and updates the fields in |printer_status| as
+// Attempts to retrieve printer status using connection `http` for `printer_id`.
+// Returns true if succcssful and updates the fields in `printer_status` as
 // appropriate.  Returns false if the request failed.
 bool GetPrinterStatus(http_t* http,
                       const std::string& printer_id,
                       PrinterStatus* printer_status);
 
-// Attempts to retrieve job information using connection |http| for the printer
-// named |printer_id|.  Retrieves at most |limit| jobs.  If |completed| then
+// Attempts to retrieve job information using connection `http` for the printer
+// named `printer_id`.  Retrieves at most `limit` jobs.  If `completed` then
 // completed jobs are retrieved.  Otherwise, jobs that are currently in progress
-// are retrieved.  Results are added to |jobs| if the operation was successful.
+// are retrieved.  Results are added to `jobs` if the operation was successful.
 bool GetCupsJobs(http_t* http,
                  const std::string& printer_id,
                  int limit,
diff --git a/printing/backend/cups_printer.h b/printing/backend/cups_printer.h
index b4ef824..15e6e217 100644
--- a/printing/backend/cups_printer.h
+++ b/printing/backend/cups_printer.h
@@ -24,22 +24,22 @@
  public:
   virtual ~CupsOptionProvider() = default;
 
-  // Returns the supported ipp attributes for the given |option_name|.
+  // Returns the supported ipp attributes for the given `option_name`.
   // ipp_attribute_t* is owned by CupsOptionProvider.
   virtual ipp_attribute_t* GetSupportedOptionValues(
       const char* option_name) const = 0;
 
-  // Returns supported attribute values for |option_name| where the value can be
-  // convered to a string.
+  // Returns supported attribute values for `option_name` where the value can be
+  // converted to a string.
   virtual std::vector<base::StringPiece> GetSupportedOptionValueStrings(
       const char* option_name) const = 0;
 
-  // Returns the default ipp attributes for the given |option_name|.
+  // Returns the default ipp attributes for the given `option_name`.
   // ipp_attribute_t* is owned by CupsOptionProvider.
   virtual ipp_attribute_t* GetDefaultOptionValue(
       const char* option_name) const = 0;
 
-  // Returns true if the |value| is supported by option |name|.
+  // Returns true if the `value` is supported by option `name`.
   virtual bool CheckOptionSupported(const char* name,
                                     const char* value) const = 0;
 };
@@ -62,7 +62,7 @@
 
   ~CupsPrinter() override = default;
 
-  // Create a printer with a connection defined by |http| and |dest|.
+  // Create a printer with a connection defined by `http` and `dest`.
   static std::unique_ptr<CupsPrinter> Create(http_t* http,
                                              ScopedDestination dest);
 
@@ -82,11 +82,11 @@
   // Lazily initialize dest info as it can require a network call
   virtual bool EnsureDestInfo() const = 0;
 
-  // Populates |basic_info| with the relevant information about the printer
+  // Populates `basic_info` with the relevant information about the printer
   virtual bool ToPrinterInfo(PrinterBasicInfo* basic_info) const = 0;
 
-  // Start a print job.  Writes the id of the started job to |job_id|.  |job_id|
-  // is 0 if there is an error.  |title| is not sent if empty.  |username| is
+  // Start a print job.  Writes the id of the started job to `job_id`.  `job_id`
+  // is 0 if there is an error.  `title` is not sent if empty.  `username` is
   // not sent if empty.  Check availability before using this operation.  Usage
   // on an unavailable printer is undefined.
   virtual ipp_status_t CreateJob(int* job_id,
@@ -94,10 +94,10 @@
                                  const std::string& username,
                                  const std::vector<cups_option_t>& options) = 0;
 
-  // Add a document to a print job.  |job_id| must be non-zero and refer to a
-  // job started with CreateJob.  |docname| will be displayed in print status
-  // if not empty.  |last_doc| should be true if this is the last document for
-  // this print job.  |username| is not sent if empty.  |options| should be IPP
+  // Add a document to a print job.  `job_id` must be non-zero and refer to a
+  // job started with CreateJob.  `docname` will be displayed in print status
+  // if not empty.  `last_doc` should be true if this is the last document for
+  // this print job.  `username` is not sent if empty.  `options` should be IPP
   // key value pairs for the Send-Document operation.
   virtual bool StartDocument(int job_id,
                              const std::string& docname,
@@ -114,17 +114,17 @@
   virtual bool FinishDocument() = 0;
 
   // Close the job.  If the job is not closed, the documents will not be
-  // printed.  |job_id| should match the id from CreateJob.  |username| is not
+  // printed.  `job_id` should match the id from CreateJob.  `username` is not
   // sent if empty.
   virtual ipp_status_t CloseJob(int job_id, const std::string& username) = 0;
 
-  // Cancel the print job |job_id|.  Returns true if the operation succeeded.
+  // Cancel the print job `job_id`.  Returns true if the operation succeeded.
   // Returns false if it failed for any reason.
   virtual bool CancelJob(int job_id) = 0;
 
-  // Queries CUPS for the margins of the media named by |media_id|.
+  // Queries CUPS for the margins of the media named by `media_id`.
   //
-  // A |media_id| is any vendor ID known to CUPS for a given printer.
+  // A `media_id` is any vendor ID known to CUPS for a given printer.
   // Vendor IDs are exemplified by the keys of the big map in
   // print_media_l10n.cc.
   //
diff --git a/printing/backend/ipp_handler_map.h b/printing/backend/ipp_handler_map.h
index 80a64b71..076cd33 100644
--- a/printing/backend/ipp_handler_map.h
+++ b/printing/backend/ipp_handler_map.h
@@ -15,7 +15,7 @@
 
 class CupsOptionProvider;
 
-// Handles IPP attribute, usually by adding 1 or more items to |caps|.
+// Handles IPP attribute, usually by adding 1 or more items to `caps`.
 using AttributeHandler =
     base::RepeatingCallback<void(const CupsOptionProvider& printer,
                                  const char* name,
diff --git a/printing/backend/ipp_handlers.h b/printing/backend/ipp_handlers.h
index 0d8f6e1..d0debc8 100644
--- a/printing/backend/ipp_handlers.h
+++ b/printing/backend/ipp_handlers.h
@@ -42,7 +42,7 @@
                  AdvancedCapabilities* capabilities);
 
 // Attribute that takes subsets of supported integer values.
-// |none_value| is ignored: it's used since IPP doesn't allow empty sets here.
+// `none_value` is ignored: it's used since IPP doesn't allow empty sets here.
 void MultivalueEnumHandler(int none_value,
                            const CupsOptionProvider& printer,
                            const char* attribute_name,
diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h
index 598fc69..57fae55 100644
--- a/printing/backend/print_backend.h
+++ b/printing/backend/print_backend.h
@@ -117,9 +117,9 @@
   bool collate_capable = false;
   bool collate_default = false;
 
-  // If |copies_max| > 1, copies are supported.
-  // If |copies_max| = 1, copies are not supported.
-  // |copies_max| should never be < 1.
+  // If `copies_max` > 1, copies are supported.
+  // If `copies_max` = 1, copies are not supported.
+  // `copies_max` should never be < 1.
   int32_t copies_max = 1;
 
   std::vector<mojom::DuplexMode> duplex_modes;
@@ -179,13 +179,13 @@
   virtual std::string GetDefaultPrinterName() = 0;
 
   // Gets the basic printer info for a specific printer. Implementations must
-  // check |printer_name| validity in the same way as IsValidPrinter().
+  // check `printer_name` validity in the same way as IsValidPrinter().
   virtual bool GetPrinterBasicInfo(const std::string& printer_name,
                                    PrinterBasicInfo* printer_info) = 0;
 
   // Gets the semantic capabilities and defaults for a specific printer.
   // This is usually a lighter implementation than GetPrinterCapsAndDefaults().
-  // Implementations must check |printer_name| validity in the same way as
+  // Implementations must check `printer_name` validity in the same way as
   // IsValidPrinter().
   // NOTE: on some old platforms (WinXP without XPS pack)
   // GetPrinterCapsAndDefaults() will fail, while this function will succeed.
diff --git a/printing/backend/print_backend_consts.cc b/printing/backend/print_backend_consts.cc
index 7497e1c..007c736 100644
--- a/printing/backend/print_backend_consts.cc
+++ b/printing/backend/print_backend_consts.cc
@@ -7,7 +7,7 @@
 #include "printing/backend/print_backend_consts.h"
 
 // TODO(dhoss): Evaluate removing the strings used as keys for
-// |PrinterBasicInfo.options| in favor of fields in PrinterBasicInfo.
+// `PrinterBasicInfo.options` in favor of fields in PrinterBasicInfo.
 const char kCUPSBlocking[] = "cups_blocking";
 const char kCUPSEncryption[] = "cups_encryption";
 const char kCUPSEnterprisePrinter[] = "cupsEnterprisePrinter";
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index c047368c..802dd93 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -263,7 +263,7 @@
 
   HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
 
-  // This call must be made in the same scope as |http| because its destructor
+  // This call must be made in the same scope as `http` because its destructor
   // closes the connection.
   return cupsGetDests2(http.http(), dests);
 }
diff --git a/printing/backend/print_backend_cups_unittest.cc b/printing/backend/print_backend_cups_unittest.cc
index 8be08cd..8a39815 100644
--- a/printing/backend/print_backend_cups_unittest.cc
+++ b/printing/backend/print_backend_cups_unittest.cc
@@ -110,7 +110,7 @@
   EXPECT_FALSE(IsDestTypeEligible(CUPS_PRINTER_DISCOVERED));
   EXPECT_TRUE(IsDestTypeEligible(CUPS_PRINTER_LOCAL));
 
-  // Try combos. |CUPS_PRINTER_LOCAL| has a value of 0, but keep these test
+  // Try combos. `CUPS_PRINTER_LOCAL` has a value of 0, but keep these test
   // cases in the event that the constant values change in CUPS.
   EXPECT_FALSE(IsDestTypeEligible(CUPS_PRINTER_LOCAL | CUPS_PRINTER_FAX));
   EXPECT_FALSE(IsDestTypeEligible(CUPS_PRINTER_LOCAL | CUPS_PRINTER_SCANNER));
diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc
index ed7eccc..b74a3e3d 100644
--- a/printing/backend/print_backend_win.cc
+++ b/printing/backend/print_backend_win.cc
@@ -136,7 +136,7 @@
     default_size.set_height(devmode->dmPaperLength * kToUm);
 
   if (!default_size.IsEmpty()) {
-    // Reset default paper if |dmPaperWidth| or |dmPaperLength| does not
+    // Reset default paper if `dmPaperWidth` or `dmPaperLength` does not
     // match default paper set by.
     if (default_size != caps->default_paper.size_um)
       caps->default_paper = PrinterSemanticCapsAndDefaults::Paper();
diff --git a/printing/backend/printing_restrictions.h b/printing/backend/printing_restrictions.h
index c1c206d..b35d647 100644
--- a/printing/backend/printing_restrictions.h
+++ b/printing/backend/printing_restrictions.h
@@ -38,7 +38,7 @@
 };
 
 // Dictionary key for printing policies.
-// Must coincide with the name of field in |print_preview.Policies| in
+// Must coincide with the name of field in `print_preview.Policies` in
 // chrome/browser/resources/print_preview/data/destination.js
 PRINTING_EXPORT extern const char kAllowedColorModes[];
 PRINTING_EXPORT extern const char kAllowedDuplexModes[];
@@ -56,7 +56,7 @@
   kDisabled = 2,
 };
 
-// Dictionary keys to be used with |kPrintingPaperSizeDefault| policy.
+// Dictionary keys to be used with `kPrintingPaperSizeDefault` policy.
 PRINTING_EXPORT extern const char kPaperSizeName[];
 PRINTING_EXPORT extern const char kPaperSizeNameCustomOption[];
 PRINTING_EXPORT extern const char kPaperSizeCustomSize[];
diff --git a/printing/backend/win_helper.h b/printing/backend/win_helper.h
index b2bd332..1fe6eaa2 100644
--- a/printing/backend/win_helper.h
+++ b/printing/backend/win_helper.h
@@ -174,12 +174,12 @@
                        const std::wstring& printer_name,
                        bool color);
 
-// Creates new DEVMODE. If |in| is not NULL copy settings from there.
+// Creates new DEVMODE. If `in` is not NULL copy settings from there.
 PRINTING_EXPORT std::unique_ptr<DEVMODE, base::FreeDeleter> CreateDevMode(
     HANDLE printer,
     DEVMODE* in);
 
-// Prompts for new DEVMODE. If |in| is not NULL copy settings from there.
+// Prompts for new DEVMODE. If `in` is not NULL copy settings from there.
 PRINTING_EXPORT std::unique_ptr<DEVMODE, base::FreeDeleter> PromptDevMode(
     HANDLE printer,
     const std::wstring& printer_name,
diff --git a/printing/emf_win.h b/printing/emf_win.h
index d2cb3ea2..7688d6a 100644
--- a/printing/emf_win.h
+++ b/printing/emf_win.h
@@ -45,10 +45,10 @@
   void Close();
 
   // Generates a new metafile that will record every GDI command, and will
-  // be saved to |metafile_path|.
+  // be saved to `metafile_path`.
   bool InitToFile(const base::FilePath& metafile_path);
 
-  // Initializes the Emf with the data in |metafile_path|.
+  // Initializes the Emf with the data in `metafile_path`.
   bool InitFromFile(const base::FilePath& metafile_path);
 
   // Metafile methods.
@@ -57,7 +57,7 @@
 
   // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls
   // (since StartPage and EndPage do not work in a metafile DC). Only valid
-  // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are
+  // when hdc_ is non-NULL. `page_size`, `content_area`, and `scale_factor` are
   // ignored.
   void StartPage(const gfx::Size& page_size,
                  const gfx::Rect& content_area,
@@ -139,9 +139,9 @@
   // Iterator type used for iterating the records.
   typedef std::vector<Record>::const_iterator const_iterator;
 
-  // Enumerates the records at construction time. |hdc| and |rect| are
+  // Enumerates the records at construction time. `hdc` and `rect` are
   // both optional at the same time or must both be valid.
-  // Warning: |emf| must be kept valid for the time this object is alive.
+  // Warning: `emf` must be kept valid for the time this object is alive.
   Enumerator(const Emf& emf, HDC hdc, const RECT* rect);
   Enumerator(const Enumerator&) = delete;
   Enumerator& operator=(const Enumerator&) = delete;
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc
index 9f4cdb7..a1a6f03 100644
--- a/printing/emf_win_unittest.cc
+++ b/printing/emf_win_unittest.cc
@@ -70,7 +70,7 @@
 
   // Playback the data.
   Emf emf;
-  // TODO(thestig): Make |data| uint8_t and avoid the base::as_bytes() call.
+  // TODO(thestig): Make `data` uint8_t and avoid the base::as_bytes() call.
   EXPECT_TRUE(emf.InitFromData(base::as_bytes(base::make_span(data))));
   HDC hdc = CreateCompatibleDC(nullptr);
   EXPECT_TRUE(hdc);
@@ -165,7 +165,7 @@
   di.lpszDocName = L"Test Job";
   int job_id = ::StartDoc(dc.Get(), &di);
   Emf emf;
-  // TODO(thestig): Make |data| uint8_t and avoid the base::as_bytes() call.
+  // TODO(thestig): Make `data` uint8_t and avoid the base::as_bytes() call.
   EXPECT_TRUE(emf.InitFromData(base::as_bytes(base::make_span(data))));
   EXPECT_TRUE(emf.SafePlayback(dc.Get()));
   ::EndDoc(dc.Get());
diff --git a/printing/image.h b/printing/image.h
index 0699529..31d4f01 100644
--- a/printing/image.h
+++ b/printing/image.h
@@ -69,7 +69,7 @@
 
   bool LoadPng(const std::string& compressed);
 
-  // Loads the first page from |metafile|.
+  // Loads the first page from `metafile`.
   bool LoadMetafile(const Metafile& metafile);
 
   // Pixel dimensions of the image.
diff --git a/printing/image_mac.cc b/printing/image_mac.cc
index a79eab6..4e4ac55d 100644
--- a/printing/image_mac.cc
+++ b/printing/image_mac.cc
@@ -15,7 +15,7 @@
 namespace printing {
 
 bool Image::LoadMetafile(const Metafile& metafile) {
-  // Load only the first page of |metafile|, just like Windows.
+  // Load only the first page of `metafile`, just like Windows.
   const unsigned int page_number = 1;
   gfx::Rect rect(metafile.GetPageBounds(page_number));
   if (rect.width() < 1 || rect.height() < 1)
diff --git a/printing/image_win.cc b/printing/image_win.cc
index 689fbcc..25bd7ef 100644
--- a/printing/image_win.cc
+++ b/printing/image_win.cc
@@ -32,7 +32,7 @@
     return false;
 
   size_ = rect.size();
-  // The data in this |bitmap| will be tightly-packed 32-bit ARGB data.
+  // The data in this `bitmap` will be tightly-packed 32-bit ARGB data.
   gfx::CreateBitmapV4HeaderForARGB888(rect.width(), rect.height(), &hdr);
   unsigned char* bits = NULL;
   base::win::ScopedBitmap bitmap(
diff --git a/printing/metafile.h b/printing/metafile.h
index c9243d6..58f74bb 100644
--- a/printing/metafile.h
+++ b/printing/metafile.h
@@ -50,9 +50,9 @@
   virtual bool SafePlayback(printing::NativeDrawingContext hdc) const = 0;
 
 #elif defined(OS_MAC)
-  // Renders the given page into |rect| in the given context.
-  // Pages use a 1-based index. |autorotate| determines whether the source PDF
-  // should be autorotated to fit on the destination page. |fit_to_page|
+  // Renders the given page into `rect` in the given context.
+  // Pages use a 1-based index. `autorotate` determines whether the source PDF
+  // should be autorotated to fit on the destination page. `fit_to_page`
   // determines whether the source PDF should be scaled to fit on the
   // destination page.
   virtual bool RenderPage(unsigned int page_number,
@@ -93,12 +93,12 @@
   // rendering resources.
   virtual bool Init() = 0;
 
-  // Initializes the metafile with |data|. Returns true on success.
+  // Initializes the metafile with `data`. Returns true on success.
   // Note: It should only be called from within the browser process.
   virtual bool InitFromData(base::span<const uint8_t> data) = 0;
 
-  // Prepares a context for rendering a new page with the given |page_size|,
-  // |content_area| and a |scale_factor| to use for the drawing. The units are
+  // Prepares a context for rendering a new page with the given `page_size`,
+  // `content_area` and a `scale_factor` to use for the drawing. The units are
   // in points (=1/72 in).
   virtual void StartPage(const gfx::Size& page_size,
                          const gfx::Rect& content_area,
@@ -118,8 +118,8 @@
   // has been called.
   virtual uint32_t GetDataSize() const = 0;
 
-  // Copies the first |dst_buffer_size| bytes of the underlying data stream into
-  // |dst_buffer|. This function should ONLY be called after Close() is invoked.
+  // Copies the first `dst_buffer_size` bytes of the underlying data stream into
+  // `dst_buffer`. This function should ONLY be called after Close() is invoked.
   // Returns true if the copy succeeds.
   virtual bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const = 0;
 
@@ -130,8 +130,8 @@
 
 #if defined(OS_WIN)
   // "Plays" the EMF buffer in a HDC. It is the same effect as calling the
-  // original GDI function that were called when recording the EMF. |rect| is in
-  // "logical units" and is optional. If |rect| is NULL, the natural EMF bounds
+  // original GDI function that were called when recording the EMF. `rect` is in
+  // "logical units" and is optional. If `rect` is NULL, the natural EMF bounds
   // are used.
   // Note: Windows has been known to have stack buffer overflow in its GDI
   // functions, whether used directly or indirectly through precompiled EMF
diff --git a/printing/metafile_skia.cc b/printing/metafile_skia.cc
index 9aff2038..3c71297 100644
--- a/printing/metafile_skia.cc
+++ b/printing/metafile_skia.cc
@@ -141,7 +141,7 @@
   cc::PaintCanvas* canvas = data_->recorder.beginRecording(
       inverse_scale * physical_page_size.width(),
       inverse_scale * physical_page_size.height());
-  // Recording canvas is owned by the |data_->recorder|.  No ref() necessary.
+  // Recording canvas is owned by the `data_->recorder`.  No ref() necessary.
   if (content_area != gfx::Rect(page_size) ||
       page_orientation != mojom::PageOrientation::kUpright) {
     canvas->scale(inverse_scale, inverse_scale);
@@ -211,8 +211,8 @@
                                                data_->typeface_content_info);
       doc = SkMakeMultiPictureDocument(&stream, &procs);
       // It is safe to use base::Unretained(this) because the callback
-      // is only used by |canvas| in the following loop which has shorter
-      // lifetime than |this|.
+      // is only used by `canvas` in the following loop which has shorter
+      // lifetime than `this`.
       custom_callback = base::BindRepeating(
           &MetafileSkia::CustomDataToSkPictureCallback, base::Unretained(this));
       break;
diff --git a/printing/metafile_skia_unittest.cc b/printing/metafile_skia_unittest.cc
index 734d247..519a859 100644
--- a/printing/metafile_skia_unittest.cc
+++ b/printing/metafile_skia_unittest.cc
@@ -128,7 +128,7 @@
     // When the stream is serialized inside FinishFrameContent(), any typeface
     // which is used on any page will be serialized only once by the first
     // page's metafile which needed it.  Any subsequent page that reuses the
-    // same typeface will rely upon |serialize_typeface_ctx| which is used by
+    // same typeface will rely upon `serialize_typeface_ctx` which is used by
     // printing::SerializeOopTypeface() to optimize away the need to resend.
     metafile.UtilizeTypefaceContext(&serialize_typeface_ctx);
 
@@ -162,8 +162,8 @@
     ASSERT_TRUE(metafile_stream);
 
     // Deserialize the stream.  Any given typeface is expected to appear only
-    // once in the stream, so the deserialization context of |typefaces| bundled
-    // with |procs| should be empty the first time through, and afterwards
+    // once in the stream, so the deserialization context of `typefaces` bundled
+    // with `procs` should be empty the first time through, and afterwards
     // there should never be more than the number of unique typefaces we used,
     // regardless of number of pages.
     EXPECT_EQ(typefaces.size(), i ? kNumTypefaces : 0);
diff --git a/printing/nup_parameters.h b/printing/nup_parameters.h
index d4d656d..00df338 100644
--- a/printing/nup_parameters.h
+++ b/printing/nup_parameters.h
@@ -13,7 +13,7 @@
  public:
   NupParameters();
 
-  // Whether or not the input |pages_per_sheet| is a supported N-up value.
+  // Whether or not the input `pages_per_sheet` is a supported N-up value.
   // Supported values are: 1 2 4 6 9 16
   static bool IsSupported(int pages_per_sheet);
 
@@ -22,15 +22,15 @@
   int num_pages_on_x_axis() const { return num_pages_on_x_axis_; }
   int num_pages_on_y_axis() const { return num_pages_on_y_axis_; }
 
-  // Calculates the |num_pages_on_x_axis_|, |num_pages_on_y_axis_| and
-  // |landscape_| based on the input.  |is_source_landscape| is true if the
+  // Calculates the `num_pages_on_x_axis_`, `num_pages_on_y_axis_` and
+  // `landscape_` based on the input.  `is_source_landscape` is true if the
   // source document orientation is landscape.
-  // Callers should check |pages_per_sheet| values with IsSupported() first,
+  // Callers should check `pages_per_sheet` values with IsSupported() first,
   // and only pass in supported values.
   void SetParameters(int pages_per_sheet, bool is_source_landscape);
 
-  // Turns off N-up mode by resetting |num_pages_on_x_axis| = 1,
-  // |num_pages_on_y_axis| = 1, and |landscape_| = false
+  // Turns off N-up mode by resetting `num_pages_on_x_axis` = 1,
+  // `num_pages_on_y_axis` = 1, and `landscape_` = false
   void Clear();
 
  private:
diff --git a/printing/page_number.h b/printing/page_number.h
index d8e0453..4f363a2 100644
--- a/printing/page_number.h
+++ b/printing/page_number.h
@@ -46,10 +46,10 @@
   // The page range to follow.
   const PageRanges* ranges_;
 
-  // The next page to be printed. |kInvalidPageIndex| when not printing.
+  // The next page to be printed. `kInvalidPageIndex` when not printing.
   uint32_t page_number_;
 
-  // The next page to be printed. |kInvalidPageIndex| when not used. Valid only
+  // The next page to be printed. `kInvalidPageIndex` when not used. Valid only
   // if document()->settings().range.empty() is false.
   uint32_t page_range_index_;
 
diff --git a/printing/page_setup.cc b/printing/page_setup.cc
index 06eef369..c00eb62 100644
--- a/printing/page_setup.cc
+++ b/printing/page_setup.cc
@@ -12,13 +12,13 @@
 
 namespace {
 
-// Checks whether |printable_area| can be used to form a valid symmetrical
+// Checks whether `printable_area` can be used to form a valid symmetrical
 // printable area, so that margin_left equals margin_right, and margin_top
 // equals margin_bottom.  For example if
 // printable_area.x() * 2 >= page_size.width(), then the
 // content_width = page_size.width() - 2 * printable_area.x() would be zero or
 // negative, which is invalid.
-// |page_size| is the physical page size that includes margins.
+// `page_size` is the physical page size that includes margins.
 bool IsValidPrintableArea(const gfx::Size& page_size,
                           const gfx::Rect& printable_area) {
   return !printable_area.IsEmpty() && printable_area.x() >= 0 &&
diff --git a/printing/page_setup.h b/printing/page_setup.h
index 4c3fa7ec..b9d02ca 100644
--- a/printing/page_setup.h
+++ b/printing/page_setup.h
@@ -52,10 +52,10 @@
             const gfx::Rect& printable_area,
             int text_height);
 
-  // Use |requested_margins| as long as they fall inside the printable area.
+  // Use `requested_margins` as long as they fall inside the printable area.
   void SetRequestedMargins(const PageMargins& requested_margins);
 
-  // Ignore the printable area, and set the margins to |requested_margins|.
+  // Ignore the printable area, and set the margins to `requested_margins`.
   void ForceRequestedMargins(const PageMargins& requested_margins);
 
   // Flips the orientation of the page and recalculates all page areas.
@@ -68,12 +68,12 @@
   const PageMargins& effective_margins() const { return effective_margins_; }
 
  private:
-  // Store |requested_margins_| and update page setup values.
+  // Store `requested_margins_` and update page setup values.
   void SetRequestedMarginsAndCalculateSizes(
       const PageMargins& requested_margins);
 
   // Calculate overlay_area_, effective_margins_, and content_area_, based on
-  // a constraint of |bounds| and |text_height|.
+  // a constraint of `bounds` and `text_height`.
   void CalculateSizesWithinRect(const gfx::Rect& bounds, int text_height);
 
   // Physical size of the page, including non-printable margins.
@@ -95,7 +95,7 @@
   // Requested margins.
   PageMargins requested_margins_;
 
-  // True when |effective_margins_| respects |printable_area_| else false.
+  // True when `effective_margins_` respects `printable_area_` else false.
   bool forced_margins_;
 
   // Space that must be kept free for the overlays.
diff --git a/printing/pdf_metafile_cg_mac.cc b/printing/pdf_metafile_cg_mac.cc
index e05b7a2..849a8d2 100644
--- a/printing/pdf_metafile_cg_mac.cc
+++ b/printing/pdf_metafile_cg_mac.cc
@@ -22,7 +22,7 @@
 
 namespace {
 
-// Rotate a page by |num_rotations| * 90 degrees, counter-clockwise.
+// Rotate a page by `num_rotations` * 90 degrees, counter-clockwise.
 void RotatePage(CGContextRef context, const CGRect& rect, int num_rotations) {
   switch (num_rotations) {
     case 0:
@@ -144,7 +144,7 @@
   DCHECK(!page_is_open_);
 
 #ifndef NDEBUG
-  // Check that the context will be torn down properly; if it's not, |pdf_data|
+  // Check that the context will be torn down properly; if it's not, `pdf_data`
   // will be incomplete and generate invalid PDF files/documents.
   if (context_.get()) {
     CFIndex extra_retain_count = CFGetRetainCount(context_.get()) - 1;
diff --git a/printing/pdf_metafile_cg_mac.h b/printing/pdf_metafile_cg_mac.h
index 4cf1f67..cfe26e3 100644
--- a/printing/pdf_metafile_cg_mac.h
+++ b/printing/pdf_metafile_cg_mac.h
@@ -49,7 +49,7 @@
                   bool fit_to_page) const override;
 
  private:
-  // Returns a CGPDFDocumentRef version of |pdf_data_|.
+  // Returns a CGPDFDocumentRef version of `pdf_data_`.
   CGPDFDocumentRef GetPDFDocument() const;
 
   // Context for rendering to the pdf.
@@ -58,7 +58,7 @@
   // PDF backing store.
   base::ScopedCFTypeRef<CFMutableDataRef> pdf_data_;
 
-  // Lazily-created CGPDFDocument representation of |pdf_data_|.
+  // Lazily-created CGPDFDocument representation of `pdf_data_`.
   mutable base::ScopedCFTypeRef<CGPDFDocumentRef> pdf_doc_;
 
   // Whether or not a page is currently open.
diff --git a/printing/pdf_metafile_cg_mac_unittest.cc b/printing/pdf_metafile_cg_mac_unittest.cc
index 896e78f..fb8c2816 100644
--- a/printing/pdf_metafile_cg_mac_unittest.cc
+++ b/printing/pdf_metafile_cg_mac_unittest.cc
@@ -173,7 +173,7 @@
 
   // Test browser-side constructor.
   PdfMetafileCg pdf2;
-  // TODO(thestig): Make |buffer| uint8_t and avoid the base::as_bytes() call.
+  // TODO(thestig): Make `buffer` uint8_t and avoid the base::as_bytes() call.
   EXPECT_TRUE(pdf2.InitFromData(base::as_bytes(base::make_span(buffer))));
 
   // Get the first 4 characters from pdf2.
diff --git a/printing/print_dialog_gtk_interface.h b/printing/print_dialog_gtk_interface.h
index 238cf4e..5676f15 100644
--- a/printing/print_dialog_gtk_interface.h
+++ b/printing/print_dialog_gtk_interface.h
@@ -24,18 +24,18 @@
   // Tell the dialog to use the default print setting.
   virtual void UseDefaultSettings() = 0;
 
-  // Updates the dialog to use |settings|. Only used when printing without the
+  // Updates the dialog to use `settings`. Only used when printing without the
   // system print dialog. E.g. for Print Preview.
   virtual void UpdateSettings(std::unique_ptr<PrintSettings> settings) = 0;
 
-  // Shows the dialog and handles the response with |callback|. Only used when
+  // Shows the dialog and handles the response with `callback`. Only used when
   // printing with the native print dialog.
   virtual void ShowDialog(
       gfx::NativeView parent_view,
       bool has_selection,
       PrintingContextLinux::PrintSettingsCallback callback) = 0;
 
-  // Prints the document named |document_name| contained in |metafile|.
+  // Prints the document named `document_name` contained in `metafile`.
   // Called from the print worker thread. Once called, the
   // PrintDialogGtkInterface instance should not be reused.
   virtual void PrintDocument(const MetafilePlayer& metafile,
diff --git a/printing/print_settings.cc b/printing/print_settings.cc
index c22c0502..52ccd8d 100644
--- a/printing/print_settings.cc
+++ b/printing/print_settings.cc
@@ -185,7 +185,7 @@
 
 #if defined(OS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
 std::string GetIppColorModelForModel(mojom::ColorModel color_model) {
-  // Accept |kUnknownColorModel| for consistency with GetColorModelForModel().
+  // Accept `kUnknownColorModel` for consistency with GetColorModelForModel().
   if (color_model == mojom::ColorModel::kUnknownColorModel)
     return CUPS_PRINT_COLOR_MODE_MONOCHROME;
 
diff --git a/printing/print_settings.h b/printing/print_settings.h
index 67fdd163..773c14c7 100644
--- a/printing/print_settings.h
+++ b/printing/print_settings.h
@@ -27,24 +27,24 @@
 
 namespace printing {
 
-// Convert from |color_mode| into a |color_model|.  An invalid |color_mode|
-// will give a result of |mojom::ColorModel::kUnknownColorModel|.
+// Convert from `color_mode` into a `color_model`.  An invalid `color_mode`
+// will give a result of `mojom::ColorModel::kUnknownColorModel`.
 PRINTING_EXPORT mojom::ColorModel ColorModeToColorModel(int color_mode);
 
-// Returns true if |color_model| is color and false if it is B&W.  Callers
-// are not supposed to pass in |mojom::ColorModel::kUnknownColorModel|, but
+// Returns true if `color_model` is color and false if it is B&W.  Callers
+// are not supposed to pass in `mojom::ColorModel::kUnknownColorModel`, but
 // if they do then the result will be base::nullopt.
 PRINTING_EXPORT base::Optional<bool> IsColorModelSelected(
     mojom::ColorModel color_model);
 
 #if defined(USE_CUPS)
-// Get the color model setting name and value for the |color_model|.
+// Get the color model setting name and value for the `color_model`.
 PRINTING_EXPORT void GetColorModelForModel(mojom::ColorModel color_model,
                                            std::string* color_setting_name,
                                            std::string* color_value);
 
 #if defined(OS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
-// Convert from |color_model| to a print-color-mode value from PWG 5100.13.
+// Convert from `color_model` to a print-color-mode value from PWG 5100.13.
 PRINTING_EXPORT std::string GetIppColorModelForModel(
     mojom::ColorModel color_model);
 #endif
@@ -114,7 +114,7 @@
   const RequestedMedia& requested_media() const { return requested_media_; }
 
   // Set printer printable area in in device units.
-  // Some platforms already provide flipped area. Set |landscape_needs_flip|
+  // Some platforms already provide flipped area. Set `landscape_needs_flip`
   // to false on those platforms to avoid double flipping.
   // This method assumes correct DPI is already set.
   void SetPrinterPrintableArea(const gfx::Size& physical_size_device_units,
diff --git a/printing/print_settings_conversion.cc b/printing/print_settings_conversion.cc
index 15e52e7..a866efd 100644
--- a/printing/print_settings_conversion.cc
+++ b/printing/print_settings_conversion.cc
@@ -27,7 +27,7 @@
 
 namespace {
 
-// Note: If this code crashes, then the caller has passed in invalid |settings|.
+// Note: If this code crashes, then the caller has passed in invalid `settings`.
 // Fix the caller, instead of trying to avoid the crash here.
 PageMargins GetCustomMarginsFromJobSettings(const base::Value& settings) {
   PageMargins margins_in_points;
diff --git a/printing/print_settings_conversion.h b/printing/print_settings_conversion.h
index 68b8a61..2a4fe23 100644
--- a/printing/print_settings_conversion.h
+++ b/printing/print_settings_conversion.h
@@ -27,7 +27,7 @@
     const base::Value& job_settings);
 
 // Use for debug only, because output is not completely consistent with format
-// of |PrintSettingsFromJobSettings| input.
+// of `PrintSettingsFromJobSettings` input.
 void PrintSettingsToJobSettingsDebug(const PrintSettings& settings,
                                      base::DictionaryValue* job_settings);
 
diff --git a/printing/print_settings_initializer_win.cc b/printing/print_settings_initializer_win.cc
index fa25ae9..9c1dc4fc9 100644
--- a/printing/print_settings_initializer_win.cc
+++ b/printing/print_settings_initializer_win.cc
@@ -117,7 +117,7 @@
   DCHECK_EQ(GetDeviceCaps(hdc, SCALINGFACTORX), 0);
   DCHECK_EQ(GetDeviceCaps(hdc, SCALINGFACTORY), 0);
 
-  // Initialize |page_setup_device_units_|.
+  // Initialize `page_setup_device_units_`.
   // Blink doesn't support different dpi settings in X and Y axis. However,
   // some printers use them. So, to avoid a bad page calculation, scale page
   // size components based on the dpi in the appropriate dimension.
diff --git a/printing/printed_document.h b/printing/printed_document.h
index 629beff..ec217ed4 100644
--- a/printing/printed_document.h
+++ b/printing/printed_document.h
@@ -112,14 +112,14 @@
   int cookie() const { return immutable_.cookie_; }
 
   // Sets a path where to dump printing output files for debugging. If never
-  // set, no files are generated. |debug_dump_path| must not be empty.
+  // set, no files are generated. `debug_dump_path` must not be empty.
   static void SetDebugDumpPath(const base::FilePath& debug_dump_path);
 
   // Returns true if SetDebugDumpPath() has been called.
   static bool HasDebugDumpPath();
 
-  // Creates debug file name from given |document_name| and |extension|.
-  // |extension| should include the leading dot. e.g. ".pdf"
+  // Creates debug file name from given `document_name` and `extension`.
+  // `extension` should include the leading dot. e.g. ".pdf"
   // Should only be called when debug dumps are enabled.
   static base::FilePath CreateDebugDumpPath(
       const std::u16string& document_name,
diff --git a/printing/printing_context.h b/printing/printing_context.h
index 0a9bf2b3..c8d087c 100644
--- a/printing/printing_context.h
+++ b/printing/printing_context.h
@@ -57,7 +57,7 @@
   // context with the select device settings. The result of the call is returned
   // in the callback. This is necessary for Linux, which only has an
   // asynchronous printing API.
-  // On Android, when |is_scripted| is true, calling it initiates a full
+  // On Android, when `is_scripted` is true, calling it initiates a full
   // printing flow from the framework's PrintManager.
   // (see https://codereview.chromium.org/740983002/)
   virtual void AskUserForSettings(int max_pages,
@@ -76,13 +76,13 @@
   virtual gfx::Size GetPdfPaperSizeDeviceUnits() = 0;
 
   // Updates printer settings.
-  // |external_preview| is true if pdf is going to be opened in external
+  // `external_preview` is true if pdf is going to be opened in external
   // preview. Used by MacOS only now to open Preview.app.
   virtual Result UpdatePrinterSettings(bool external_preview,
                                        bool show_system_dialog,
                                        int page_count) = 0;
 
-  // Updates Print Settings. |job_settings| contains all print job
+  // Updates Print Settings. `job_settings` contains all print job
   // settings information.
   Result UpdatePrintSettings(base::Value job_settings);
 
diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc
index 849335e3..bd49ff9 100644
--- a/printing/printing_context_android.cc
+++ b/printing/printing_context_android.cc
@@ -32,7 +32,7 @@
 
 namespace {
 
-// Sets the page sizes for a |PrintSettings| object.  |width| and |height|
+// Sets the page sizes for a `PrintSettings` object.  `width` and `height`
 // arguments should be in device units.
 void SetSizes(PrintSettings* settings, int dpi, int width, int height) {
   gfx::Size physical_size_device_units(width, height);
diff --git a/printing/printing_context_android.h b/printing/printing_context_android.h
index 11d6c29..a07377a 100644
--- a/printing/printing_context_android.h
+++ b/printing/printing_context_android.h
@@ -30,7 +30,7 @@
 
   // Called when the page is successfully written to a PDF using the file
   // descriptor specified, or when the printing operation failed. On success,
-  // the PDF has |page_count| pages. Non-positive |page_count| indicates
+  // the PDF has `page_count` pages. Non-positive `page_count` indicates
   // failure.
   static void PdfWritingDone(int page_count);
 
@@ -50,7 +50,7 @@
   void ShowSystemDialogDone(JNIEnv* env,
                             const base::android::JavaParamRef<jobject>& obj);
 
-  // Prints the document contained in |metafile|.
+  // Prints the document contained in `metafile`.
   void PrintDocument(const MetafilePlayer& metafile);
 
   // PrintingContext implementation.
diff --git a/printing/printing_context_chromeos.cc b/printing/printing_context_chromeos.cc
index 5db39a0..4c3c028 100644
--- a/printing/printing_context_chromeos.cc
+++ b/printing/printing_context_chromeos.cc
@@ -47,7 +47,7 @@
          base::StartsWith(uri, "usb:") || base::StartsWith(uri, "ippusb:");
 }
 
-// Returns a new char buffer which is a null-terminated copy of |value|.  The
+// Returns a new char buffer which is a null-terminated copy of `value`.  The
 // caller owns the returned string.
 char* DuplicateString(base::StringPiece value) {
   char* dst = new char[value.size() + 1];
@@ -114,20 +114,20 @@
   base::UmaHistogramEnumeration("Printing.CUPS.IppAttributes", it->second);
 }
 
-// Given an integral |value| expressed in PWG units (1/100 mm), returns
+// Given an integral `value` expressed in PWG units (1/100 mm), returns
 // the same value expressed in device units.
 int PwgUnitsToDeviceUnits(int value, float micrometers_per_device_unit) {
   return ConvertUnitDouble(value, micrometers_per_device_unit, 10);
 }
 
-// Given a |media_size|, the specification of the media's |margins|, and
+// Given a `media_size`, the specification of the media's `margins`, and
 // the number of micrometers per device unit, returns the rectangle
 // bounding the apparent printable area of said media.
 gfx::Rect RepresentPrintableArea(const gfx::Size& media_size,
                                  const CupsPrinter::CupsMediaMargins& margins,
                                  float micrometers_per_device_unit) {
   // These values express inward encroachment by margins, away from the
-  // edges of the |media_size|.
+  // edges of the `media_size`.
   int left_bound =
       PwgUnitsToDeviceUnits(margins.left, micrometers_per_device_unit);
   int bottom_bound =
diff --git a/printing/printing_context_chromeos.h b/printing/printing_context_chromeos.h
index 0d3477f..04b9dd3 100644
--- a/printing/printing_context_chromeos.h
+++ b/printing/printing_context_chromeos.h
@@ -53,7 +53,7 @@
   PrintingContextChromeos(Delegate* delegate,
                           std::unique_ptr<CupsConnection> connection);
 
-  // Lazily initializes |printer_|.
+  // Lazily initializes `printer_`.
   Result InitializeDevice(const std::string& device);
 
   const std::unique_ptr<CupsConnection> connection_;
diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc
index 7d1ae78..f3a1805 100644
--- a/printing/printing_context_linux.cc
+++ b/printing/printing_context_linux.cc
@@ -19,8 +19,8 @@
 
 namespace {
 
-// Function pointer for creating print dialogs. |callback| is only used when
-// |show_dialog| is true.
+// Function pointer for creating print dialogs. `callback` is only used when
+// `show_dialog` is true.
 PrintDialogGtkInterface* (*create_dialog_func_)(PrintingContextLinux* context) =
     nullptr;
 
diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h
index 77b73ec..bc96bed1 100644
--- a/printing/printing_context_linux.h
+++ b/printing/printing_context_linux.h
@@ -31,7 +31,7 @@
   static void SetPdfPaperSizeFunction(
       gfx::Size (*get_pdf_paper_size)(PrintingContextLinux* context));
 
-  // Prints the document contained in |metafile|.
+  // Prints the document contained in `metafile`.
   void PrintDocument(const MetafilePlayer& metafile);
 
   // Initializes with predefined settings.
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 00c78a7..6249cfe 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -43,26 +43,26 @@
   printing::NativeDrawingContext context() const override;
 
  private:
-  // Initializes PrintSettings from |print_info_|. This must be called
-  // after changes to |print_info_| in order for the changes to take effect in
+  // Initializes PrintSettings from `print_info_`. This must be called
+  // after changes to `print_info_` in order for the changes to take effect in
   // printing.
   // This function ignores the page range information specified in the print
-  // info object and use |settings_.ranges| instead.
+  // info object and use `settings_.ranges` instead.
   void InitPrintSettingsFromPrintInfo();
 
-  // Returns the set of page ranges constructed from |print_info_|.
+  // Returns the set of page ranges constructed from `print_info_`.
   PageRanges GetPageRangesFromPrintInfo();
 
-  // Updates |print_info_| to use the given printer.
+  // Updates `print_info_` to use the given printer.
   // Returns true if the printer was set.
   bool SetPrinter(const std::string& device_name);
 
-  // Updates |print_info_| page format with paper selected by user. If paper was
+  // Updates `print_info_` page format with paper selected by user. If paper was
   // not selected, default system paper is used.
   // Returns true if the paper was set.
   bool UpdatePageFormatWithPaperInfo();
 
-  // Updates |print_info_| page format with |paper|.
+  // Updates `print_info_` page format with `paper`.
   // Returns true if the paper was set.
   bool UpdatePageFormatWithPaper(PMPaper paper, PMPageFormat page_format);
 
@@ -70,12 +70,12 @@
   // Returns true if the print job destination type is set.
   bool SetPrintPreviewJob();
 
-  // Sets |copies| in PMPrintSettings.
+  // Sets `copies` in PMPrintSettings.
   // Returns true if the number of copies is set.
   bool SetCopiesInPrintSettings(int copies);
 
-  // Sets |collate| in PMPrintSettings.
-  // Returns true if |collate| is set.
+  // Sets `collate` in PMPrintSettings.
+  // Returns true if `collate` is set.
   bool SetCollateInPrintSettings(bool collate);
 
   // Sets orientation in native print info object.
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index f6d936e0..4519103 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -46,7 +46,7 @@
 #if BUILDFLAG(ENABLE_PRINTING)
   return std::make_unique<PrintingContextSystemDialogWin>(delegate);
 #else
-  // The code in printing/ is still built when the GN |enable_basic_printing|
+  // The code in printing/ is still built when the GN `enable_basic_printing`
   // variable is set to false. Just return PrintingContextWin as a dummy
   // context.
   return std::make_unique<PrintingContextWin>(delegate);
diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h
index 1bc1da9..f76c051 100644
--- a/printing/printing_context_win.h
+++ b/printing/printing_context_win.h
@@ -23,7 +23,7 @@
   PrintingContextWin& operator=(const PrintingContextWin&) = delete;
   ~PrintingContextWin() override;
 
-  // Prints the document contained in |metafile|.
+  // Prints the document contained in `metafile`.
   void PrintDocument(const std::wstring& device_name,
                      const MetafileSkia& metafile);
 
diff --git a/printing/printing_context_win_unittest.cc b/printing/printing_context_win_unittest.cc
index 36f06b5d..a6c30af 100644
--- a/printing/printing_context_win_unittest.cc
+++ b/printing/printing_context_win_unittest.cc
@@ -65,7 +65,7 @@
 
  protected:
   // This is a fake PrintDlgEx implementation that sets the right fields in
-  // |lppd| to trigger a bug in older revisions of PrintingContext.
+  // `lppd` to trigger a bug in older revisions of PrintingContext.
   HRESULT ShowPrintDialog(PRINTDLGEX* lppd) override {
     // The interesting bits:
     // Pretend the user hit print
diff --git a/printing/printing_features.cc b/printing/printing_features.cc
index 610375b..6844687 100644
--- a/printing/printing_features.cc
+++ b/printing/printing_features.cc
@@ -26,7 +26,7 @@
                                        base::FEATURE_DISABLED_BY_DEFAULT};
 
 // Use XPS for printing instead of GDI for printing PDF documents. This is
-// independent of |kUseXpsForPrinting|; can use XPS for PDFs even if still using
+// independent of `kUseXpsForPrinting`; can use XPS for PDFs even if still using
 // GDI for modifiable content.
 const base::Feature kUseXpsForPrintingFromPdf{
     "UseXpsForPrintingFromPdf", base::FEATURE_DISABLED_BY_DEFAULT};