summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-12-22 15:35:16 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-22 23:36:29 +0000
commit0f9f1d79753fda5001618d9eaddbbcd8cfcc75b4 (patch)
treea543bd39b7e96211c1286feef7bec996250eb66f /printing
parente3c0115c83e199cbddf5e4873382f136f353a69e (diff)
downloadchromium_src-0f9f1d79753fda5001618d9eaddbbcd8cfcc75b4.zip
chromium_src-0f9f1d79753fda5001618d9eaddbbcd8cfcc75b4.tar.gz
chromium_src-0f9f1d79753fda5001618d9eaddbbcd8cfcc75b4.tar.bz2
Standardize usage of virtual/override/final specifiers in printing code.
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. Several formatting edits by clang-format were manually reverted, due to mangling of some of the more complicate IPC macros. BUG=417463 Review URL: https://codereview.chromium.org/795043004 Cr-Commit-Position: refs/heads/master@{#309487}
Diffstat (limited to 'printing')
-rw-r--r--printing/printing_context_linux.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h
index d6968d9..611fd56 100644
--- a/printing/printing_context_linux.h
+++ b/printing/printing_context_linux.h
@@ -22,7 +22,7 @@ class PrintDialogGtkInterface;
class PRINTING_EXPORT PrintingContextLinux : public PrintingContext {
public:
explicit PrintingContextLinux(Delegate* delegate);
- virtual ~PrintingContextLinux();
+ ~PrintingContextLinux() override;
// Sets the function that creates the print dialog.
static void SetCreatePrintDialogFunction(
@@ -37,23 +37,22 @@ class PRINTING_EXPORT PrintingContextLinux : public PrintingContext {
void PrintDocument(const MetafilePlayer& metafile);
// PrintingContext implementation.
- virtual void AskUserForSettings(
- int max_pages,
- bool has_selection,
- bool is_scripted,
- const PrintSettingsCallback& callback) override;
- virtual gfx::Size GetPdfPaperSizeDeviceUnits() override;
- virtual Result UseDefaultSettings() override;
- virtual Result UpdatePrinterSettings(bool external_preview,
- bool show_system_dialog) override;
- virtual Result InitWithSettings(const PrintSettings& settings) override;
- virtual Result NewDocument(const base::string16& document_name) override;
- virtual Result NewPage() override;
- virtual Result PageDone() override;
- virtual Result DocumentDone() override;
- virtual void Cancel() override;
- virtual void ReleaseContext() override;
- virtual gfx::NativeDrawingContext context() const override;
+ void AskUserForSettings(int max_pages,
+ bool has_selection,
+ bool is_scripted,
+ const PrintSettingsCallback& callback) override;
+ gfx::Size GetPdfPaperSizeDeviceUnits() override;
+ Result UseDefaultSettings() override;
+ Result UpdatePrinterSettings(bool external_preview,
+ bool show_system_dialog) override;
+ Result InitWithSettings(const PrintSettings& settings) override;
+ Result NewDocument(const base::string16& document_name) override;
+ Result NewPage() override;
+ Result PageDone() override;
+ Result DocumentDone() override;
+ void Cancel() override;
+ void ReleaseContext() override;
+ gfx::NativeDrawingContext context() const override;
private:
base::string16 document_name_;