[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/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.