summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 16:50:19 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 23:50:39 +0000
commitdf7e44a77c954eacf31c9388b0b1edb86811c963 (patch)
tree83bb513d537fdbfe50d5caca8d9d10b304b755b9
parentbf634aa33aa21ce25ef680bca6305b9ad64acfbc (diff)
downloadchromium_src-df7e44a77c954eacf31c9388b0b1edb86811c963.zip
chromium_src-df7e44a77c954eacf31c9388b0b1edb86811c963.tar.gz
chromium_src-df7e44a77c954eacf31c9388b0b1edb86811c963.tar.bz2
Standardize usage of virtual/override/final in chrome/browser/printing/
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. BUG=417463 R=vitalybuka@chromium.org Review URL: https://codereview.chromium.org/668093002 Cr-Commit-Position: refs/heads/master@{#300570}
-rw-r--r--chrome/browser/printing/background_printing_manager.cc4
-rw-r--r--chrome/browser/printing/background_printing_manager.h8
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service.h2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h6
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc2
-rw-r--r--chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc14
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc6
-rw-r--r--chrome/browser/printing/print_dialog_cloud_internal.h35
-rw-r--r--chrome/browser/printing/print_job.h18
-rw-r--r--chrome/browser/printing/print_job_manager.h8
-rw-r--r--chrome/browser/printing/print_job_unittest.cc31
-rw-r--r--chrome/browser/printing/print_job_worker.cc6
-rw-r--r--chrome/browser/printing/print_preview_context_menu_observer.h6
-rw-r--r--chrome/browser/printing/print_preview_dialog_controller.cc21
-rw-r--r--chrome/browser/printing/print_preview_dialog_controller.h8
-rw-r--r--chrome/browser/printing/print_preview_dialog_controller_browsertest.cc21
-rw-r--r--chrome/browser/printing/print_preview_message_handler.h4
-rw-r--r--chrome/browser/printing/print_preview_pdf_generated_browsertest.cc13
-rw-r--r--chrome/browser/printing/print_preview_test.cc16
-rw-r--r--chrome/browser/printing/print_preview_test.h2
-rw-r--r--chrome/browser/printing/print_view_manager.h6
-rw-r--r--chrome/browser/printing/print_view_manager_base.h19
-rw-r--r--chrome/browser/printing/printer_query.h12
-rw-r--r--chrome/browser/printing/printing_message_filter.h9
24 files changed, 125 insertions, 152 deletions
diff --git a/chrome/browser/printing/background_printing_manager.cc b/chrome/browser/printing/background_printing_manager.cc
index 3a891bc..daa8402 100644
--- a/chrome/browser/printing/background_printing_manager.cc
+++ b/chrome/browser/printing/background_printing_manager.cc
@@ -27,8 +27,8 @@ class BackgroundPrintingManager::Observer
Observer(BackgroundPrintingManager* manager, WebContents* web_contents);
private:
- virtual void RenderProcessGone(base::TerminationStatus status) override;
- virtual void WebContentsDestroyed() override;
+ void RenderProcessGone(base::TerminationStatus status) override;
+ void WebContentsDestroyed() override;
BackgroundPrintingManager* manager_;
};
diff --git a/chrome/browser/printing/background_printing_manager.h b/chrome/browser/printing/background_printing_manager.h
index 3899dbb..fdcc952 100644
--- a/chrome/browser/printing/background_printing_manager.h
+++ b/chrome/browser/printing/background_printing_manager.h
@@ -31,7 +31,7 @@ class BackgroundPrintingManager : public base::NonThreadSafe,
typedef std::map<content::WebContents*, Observer*> WebContentsObserverMap;
BackgroundPrintingManager();
- virtual ~BackgroundPrintingManager();
+ ~BackgroundPrintingManager() override;
// Takes ownership of |preview_dialog| and deletes it when |preview_dialog|
// finishes printing. This removes |preview_dialog| from its ConstrainedDialog
@@ -46,9 +46,9 @@ class BackgroundPrintingManager : public base::NonThreadSafe,
private:
// content::NotificationObserver overrides:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Schedule deletion of |preview_contents|.
void DeletePreviewContents(content::WebContents* preview_contents);
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
index cef60be..6f4b7dc 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
@@ -31,7 +31,7 @@ struct CloudPrintProxyInfo;
class CloudPrintProxyService : public KeyedService {
public:
explicit CloudPrintProxyService(Profile* profile);
- virtual ~CloudPrintProxyService();
+ ~CloudPrintProxyService() override;
typedef base::Callback<void(const std::vector<std::string>&)>
PrintersCallback;
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
index d8c6877..c14e04d 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
@@ -27,12 +27,12 @@ class CloudPrintProxyServiceFactory : public BrowserContextKeyedServiceFactory {
friend struct DefaultSingletonTraits<CloudPrintProxyServiceFactory>;
CloudPrintProxyServiceFactory();
- virtual ~CloudPrintProxyServiceFactory();
+ ~CloudPrintProxyServiceFactory() override;
// BrowserContextKeyedServiceFactory:
- virtual KeyedService* BuildServiceInstanceFor(
+ KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
- virtual bool ServiceIsNULLWhileTesting() const override;
+ bool ServiceIsNULLWhileTesting() const override;
};
#endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_FACTORY_H_
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
index db8129e..b0d6613 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
@@ -183,7 +183,7 @@ class TestCloudPrintProxyService : public CloudPrintProxyService {
base::RunLoop().RunUntilIdle();
}
- virtual ServiceProcessControl* GetServiceProcessControl() override {
+ ServiceProcessControl* GetServiceProcessControl() override {
return &process_control_;
}
MockServiceProcessControl* GetMockServiceProcessControl() {
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
index 1ffdd53..c3bfbeb 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -89,9 +89,7 @@ void ShutdownTask() {
class TestStartupClientChannelListener : public IPC::Listener {
public:
- virtual bool OnMessageReceived(const IPC::Message& message) override {
- return false;
- }
+ bool OnMessageReceived(const IPC::Message& message) override { return false; }
};
} // namespace
@@ -99,7 +97,7 @@ class TestStartupClientChannelListener : public IPC::Listener {
class TestServiceProcess : public ServiceProcess {
public:
TestServiceProcess() { }
- virtual ~TestServiceProcess() { }
+ ~TestServiceProcess() override {}
bool Initialize(base::MessageLoopForUI* message_loop,
ServiceProcessState* state);
@@ -316,13 +314,11 @@ class CloudPrintProxyPolicyStartupTest : public base::MultiProcessTest,
void ShutdownAndWaitForExitWithTimeout(base::ProcessHandle handle);
// IPC::Listener implementation
- virtual bool OnMessageReceived(const IPC::Message& message) override {
- return false;
- }
- virtual void OnChannelConnected(int32 peer_pid) override;
+ bool OnMessageReceived(const IPC::Message& message) override { return false; }
+ void OnChannelConnected(int32 peer_pid) override;
// MultiProcessTest implementation.
- virtual CommandLine MakeCmdLine(const std::string& procname) override;
+ CommandLine MakeCmdLine(const std::string& procname) override;
bool LaunchBrowser(const CommandLine& command_line, Profile* profile) {
int return_code = 0;
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 5aa77ae..b5d49f0 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -143,7 +143,7 @@ class SignInObserver : public content::WebContentsObserver {
private:
// Overridden from content::WebContentsObserver:
- virtual void DidNavigateMainFrame(
+ void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) override {
if (IsSimilarUrl(params.url, cloud_print_url_)) {
@@ -154,9 +154,7 @@ class SignInObserver : public content::WebContentsObserver {
}
}
- virtual void WebContentsDestroyed() override {
- delete this;
- }
+ void WebContentsDestroyed() override { delete this; }
void OnSignIn() {
callback_.Run();
diff --git a/chrome/browser/printing/print_dialog_cloud_internal.h b/chrome/browser/printing/print_dialog_cloud_internal.h
index e904113..eae8384 100644
--- a/chrome/browser/printing/print_dialog_cloud_internal.h
+++ b/chrome/browser/printing/print_dialog_cloud_internal.h
@@ -99,15 +99,15 @@ class CloudPrintFlowHandler : public content::WebUIMessageHandler,
const base::string16& print_job_title,
const base::string16& print_ticket,
const std::string& file_type);
- virtual ~CloudPrintFlowHandler();
+ ~CloudPrintFlowHandler() override;
// WebUIMessageHandler implementation.
- virtual void RegisterMessages() override;
+ void RegisterMessages() override;
// content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Callbacks from the page.
void HandleShowDebugger(const base::ListValue* args);
@@ -152,22 +152,21 @@ class CloudPrintWebDialogDelegate : public ui::WebDialogDelegate {
const base::string16& print_job_title,
const base::string16& print_ticket,
const std::string& file_type);
- virtual ~CloudPrintWebDialogDelegate();
+ ~CloudPrintWebDialogDelegate() override;
// ui::WebDialogDelegate implementation:
- virtual ui::ModalType GetDialogModalType() const override;
- virtual base::string16 GetDialogTitle() const override;
- virtual GURL GetDialogContentURL() const override;
- virtual void GetWebUIMessageHandlers(
+ ui::ModalType GetDialogModalType() const override;
+ base::string16 GetDialogTitle() const override;
+ GURL GetDialogContentURL() const override;
+ void GetWebUIMessageHandlers(
std::vector<content::WebUIMessageHandler*>* handlers) const override;
- virtual void GetDialogSize(gfx::Size* size) const override;
- virtual std::string GetDialogArgs() const override;
- virtual void OnDialogClosed(const std::string& json_retval) override;
- virtual void OnCloseContents(content::WebContents* source,
- bool* out_close_dialog) override;
- virtual bool ShouldShowDialogTitle() const override;
- virtual bool HandleContextMenu(
- const content::ContextMenuParams& params) override;
+ void GetDialogSize(gfx::Size* size) const override;
+ std::string GetDialogArgs() const override;
+ void OnDialogClosed(const std::string& json_retval) override;
+ void OnCloseContents(content::WebContents* source,
+ bool* out_close_dialog) override;
+ bool ShouldShowDialogTitle() const override;
+ bool HandleContextMenu(const content::ContextMenuParams& params) override;
private:
friend class ::CloudPrintWebDialogDelegateTest;
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index ae22e98..c468bbd 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -49,16 +49,16 @@ class PrintJob : public PrintJobWorkerOwner,
int page_count);
// content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// PrintJobWorkerOwner implementation.
- virtual void GetSettingsDone(const PrintSettings& new_settings,
- PrintingContext::Result result) override;
- virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override;
- virtual const PrintSettings& settings() const override;
- virtual int cookie() const override;
+ void GetSettingsDone(const PrintSettings& new_settings,
+ PrintingContext::Result result) override;
+ PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override;
+ const PrintSettings& settings() const override;
+ int cookie() const override;
// Starts the actual printing. Signals the worker that it should begin to
// spool as soon as data is available.
@@ -98,7 +98,7 @@ class PrintJob : public PrintJobWorkerOwner,
#endif // OS_WIN
protected:
- virtual ~PrintJob();
+ ~PrintJob() override;
private:
// Updates document_ to a new instance.
diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h
index 32d5b30..22c72bb 100644
--- a/chrome/browser/printing/print_job_manager.h
+++ b/chrome/browser/printing/print_job_manager.h
@@ -58,15 +58,15 @@ class PrintQueriesQueue : public base::RefCountedThreadSafe<PrintQueriesQueue> {
class PrintJobManager : public content::NotificationObserver {
public:
PrintJobManager();
- virtual ~PrintJobManager();
+ ~PrintJobManager() override;
// On browser quit, we should wait to have the print job finished.
void Shutdown();
// content::NotificationObserver
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Returns queries queue. Never returns NULL. Must be called on Browser UI
// Thread. Reference could be stored and used from any thread.
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 118c4b1..b514682 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -19,9 +19,7 @@ namespace {
class TestSource : public printing::PrintedPagesSource {
public:
- virtual base::string16 RenderSourceName() override {
- return base::string16();
- }
+ base::string16 RenderSourceName() override { return base::string16(); }
};
class TestPrintJobWorker : public printing::PrintJobWorker {
@@ -35,12 +33,11 @@ class TestPrintJobWorker : public printing::PrintJobWorker {
class TestOwner : public printing::PrintJobWorkerOwner {
public:
- virtual void GetSettingsDone(
- const printing::PrintSettings& new_settings,
- printing::PrintingContext::Result result) override {
+ void GetSettingsDone(const printing::PrintSettings& new_settings,
+ printing::PrintingContext::Result result) override {
EXPECT_FALSE(true);
}
- virtual printing::PrintJobWorker* DetachWorker(
+ printing::PrintJobWorker* DetachWorker(
printing::PrintJobWorkerOwner* new_owner) override {
// We're screwing up here since we're calling worker from the main thread.
// That's fine for testing. It is actually simulating PrinterQuery behavior.
@@ -50,15 +47,11 @@ class TestOwner : public printing::PrintJobWorkerOwner {
settings_ = worker->printing_context()->settings();
return worker;
}
- virtual const printing::PrintSettings& settings() const override {
- return settings_;
- }
- virtual int cookie() const override {
- return 42;
- }
+ const printing::PrintSettings& settings() const override { return settings_; }
+ int cookie() const override { return 42; }
private:
- virtual ~TestOwner() {}
+ ~TestOwner() override {}
printing::PrintSettings settings_;
};
@@ -68,18 +61,16 @@ class TestPrintJob : public printing::PrintJob {
explicit TestPrintJob(volatile bool* check) : check_(check) {
}
private:
- virtual ~TestPrintJob() {
- *check_ = true;
- }
+ ~TestPrintJob() override { *check_ = true; }
volatile bool* check_;
};
class TestPrintNotifObserv : public content::NotificationObserver {
public:
// content::NotificationObserver
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override {
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override {
ADD_FAILURE();
}
};
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 2313d6a..ee8cdde 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -39,10 +39,10 @@ void HoldRefCallback(const scoped_refptr<printing::PrintJobWorkerOwner>& owner,
class PrintingContextDelegate : public PrintingContext::Delegate {
public:
PrintingContextDelegate(int render_process_id, int render_view_id);
- virtual ~PrintingContextDelegate();
+ ~PrintingContextDelegate() override;
- virtual gfx::NativeView GetParentView() override;
- virtual std::string GetAppLocale() override;
+ gfx::NativeView GetParentView() override;
+ std::string GetAppLocale() override;
private:
int render_process_id_;
diff --git a/chrome/browser/printing/print_preview_context_menu_observer.h b/chrome/browser/printing/print_preview_context_menu_observer.h
index aaf10fd..e1a11ef 100644
--- a/chrome/browser/printing/print_preview_context_menu_observer.h
+++ b/chrome/browser/printing/print_preview_context_menu_observer.h
@@ -16,11 +16,11 @@ class WebContents;
class PrintPreviewContextMenuObserver : public RenderViewContextMenuObserver {
public:
explicit PrintPreviewContextMenuObserver(content::WebContents* contents);
- virtual ~PrintPreviewContextMenuObserver();
+ ~PrintPreviewContextMenuObserver() override;
// RenderViewContextMenuObserver implementation.
- virtual bool IsCommandIdSupported(int command_id) override;
- virtual bool IsCommandIdEnabled(int command_id) override;
+ bool IsCommandIdSupported(int command_id) override;
+ bool IsCommandIdEnabled(int command_id) override;
private:
bool IsPrintPreviewDialog();
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc
index 3f3e94f..9a93111 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -69,19 +69,18 @@ void EnableInternalPDFPluginForContents(WebContents* preview_dialog) {
class PrintPreviewDialogDelegate : public ui::WebDialogDelegate {
public:
explicit PrintPreviewDialogDelegate(WebContents* initiator);
- virtual ~PrintPreviewDialogDelegate();
+ ~PrintPreviewDialogDelegate() override;
- virtual ui::ModalType GetDialogModalType() const override;
- virtual base::string16 GetDialogTitle() const override;
- virtual GURL GetDialogContentURL() const override;
- virtual void GetWebUIMessageHandlers(
+ ui::ModalType GetDialogModalType() const override;
+ base::string16 GetDialogTitle() const override;
+ GURL GetDialogContentURL() const override;
+ void GetWebUIMessageHandlers(
std::vector<WebUIMessageHandler*>* handlers) const override;
- virtual void GetDialogSize(gfx::Size* size) const override;
- virtual std::string GetDialogArgs() const override;
- virtual void OnDialogClosed(const std::string& json_retval) override;
- virtual void OnCloseContents(WebContents* source,
- bool* out_close_dialog) override;
- virtual bool ShouldShowDialogTitle() const override;
+ void GetDialogSize(gfx::Size* size) const override;
+ std::string GetDialogArgs() const override;
+ void OnDialogClosed(const std::string& json_retval) override;
+ void OnCloseContents(WebContents* source, bool* out_close_dialog) override;
+ bool ShouldShowDialogTitle() const override;
private:
WebContents* initiator_;
diff --git a/chrome/browser/printing/print_preview_dialog_controller.h b/chrome/browser/printing/print_preview_dialog_controller.h
index ecd2ead..493e1c2 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.h
+++ b/chrome/browser/printing/print_preview_dialog_controller.h
@@ -62,9 +62,9 @@ class PrintPreviewDialogController
base::Callback<void(content::WebContents*)> callback);
// content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Returns true if |contents| is a print preview dialog.
static bool IsPrintPreviewDialog(content::WebContents* contents);
@@ -88,7 +88,7 @@ class PrintPreviewDialogController
typedef std::map<content::WebContents*, content::WebContents*>
PrintPreviewDialogMap;
- virtual ~PrintPreviewDialogController();
+ ~PrintPreviewDialogController() override;
// Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when
// the initiator renderer crashed.
diff --git a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
index 4871112..facedba 100644
--- a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
@@ -25,7 +25,7 @@ class RequestPrintPreviewObserver : public WebContentsObserver {
explicit RequestPrintPreviewObserver(WebContents* dialog)
: WebContentsObserver(dialog) {
}
- virtual ~RequestPrintPreviewObserver() {}
+ ~RequestPrintPreviewObserver() override {}
void set_quit_closure(const base::Closure& quit_closure) {
quit_closure_ = quit_closure;
@@ -33,7 +33,7 @@ class RequestPrintPreviewObserver : public WebContentsObserver {
private:
// content::WebContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) override {
+ bool OnMessageReceived(const IPC::Message& message) override {
IPC_BEGIN_MESSAGE_MAP(RequestPrintPreviewObserver, message)
IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview,
OnRequestPrintPreview)
@@ -57,7 +57,7 @@ class PrintPreviewDialogClonedObserver : public WebContentsObserver {
explicit PrintPreviewDialogClonedObserver(WebContents* dialog)
: WebContentsObserver(dialog) {
}
- virtual ~PrintPreviewDialogClonedObserver() {}
+ ~PrintPreviewDialogClonedObserver() override {}
RequestPrintPreviewObserver* request_preview_dialog_observer() {
return request_preview_dialog_observer_.get();
@@ -65,9 +65,8 @@ class PrintPreviewDialogClonedObserver : public WebContentsObserver {
private:
// content::WebContentsObserver implementation.
- virtual void DidCloneToNewWebContents(
- WebContents* old_web_contents,
- WebContents* new_web_contents) override {
+ void DidCloneToNewWebContents(WebContents* old_web_contents,
+ WebContents* new_web_contents) override {
request_preview_dialog_observer_.reset(
new RequestPrintPreviewObserver(new_web_contents));
}
@@ -83,15 +82,13 @@ class PrintPreviewDialogDestroyedObserver : public WebContentsObserver {
: WebContentsObserver(dialog),
dialog_destroyed_(false) {
}
- virtual ~PrintPreviewDialogDestroyedObserver() {}
+ ~PrintPreviewDialogDestroyedObserver() override {}
bool dialog_destroyed() const { return dialog_destroyed_; }
private:
// content::WebContentsObserver implementation.
- virtual void WebContentsDestroyed() override {
- dialog_destroyed_ = true;
- }
+ void WebContentsDestroyed() override { dialog_destroyed_ = true; }
bool dialog_destroyed_;
@@ -121,7 +118,7 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
}
private:
- virtual void SetUpOnMainThread() override {
+ void SetUpOnMainThread() override {
WebContents* first_tab =
browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(first_tab);
@@ -139,7 +136,7 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
ASSERT_NE(first_tab, initiator_);
}
- virtual void TearDownOnMainThread() override {
+ void TearDownOnMainThread() override {
cloned_tab_observer_.reset();
initiator_ = NULL;
}
diff --git a/chrome/browser/printing/print_preview_message_handler.h b/chrome/browser/printing/print_preview_message_handler.h
index ad72e87..e91dc3d 100644
--- a/chrome/browser/printing/print_preview_message_handler.h
+++ b/chrome/browser/printing/print_preview_message_handler.h
@@ -33,10 +33,10 @@ class PrintPreviewMessageHandler
: public content::WebContentsObserver,
public content::WebContentsUserData<PrintPreviewMessageHandler> {
public:
- virtual ~PrintPreviewMessageHandler();
+ ~PrintPreviewMessageHandler() override;
// content::WebContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
private:
explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
diff --git a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
index bd93dc2..646f954e 100644
--- a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
+++ b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
@@ -118,7 +118,7 @@ class PrintPreviewObserver : public WebContentsObserver {
failed_setting_("None"),
pdf_file_save_path_(pdf_file_save_path) {}
- virtual ~PrintPreviewObserver() {}
+ ~PrintPreviewObserver() override {}
// Sets closure for the observer so that it can end the loop.
void set_quit_closure(const base::Closure &closure) {
@@ -130,7 +130,7 @@ class PrintPreviewObserver : public WebContentsObserver {
base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_);
}
- virtual bool OnMessageReceived(const IPC::Message& message) override {
+ bool OnMessageReceived(const IPC::Message& message) override {
IPC_BEGIN_MESSAGE_MAP(PrintPreviewObserver, message)
IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPreviewPageCount,
OnDidGetPreviewPageCount)
@@ -222,7 +222,7 @@ class PrintPreviewObserver : public WebContentsObserver {
explicit UIDoneLoadingMessageHandler(PrintPreviewObserver* observer)
: observer_(observer) {}
- virtual ~UIDoneLoadingMessageHandler() {}
+ ~UIDoneLoadingMessageHandler() override {}
// When a setting has been set succesfully, this is called and the observer
// is told to send the next setting to be set.
@@ -242,7 +242,7 @@ class PrintPreviewObserver : public WebContentsObserver {
// successfully set and its effects have been finalized.
// 'UIFailedLoadingForTest' is sent when the setting could not be set. This
// causes the browser test to fail.
- virtual void RegisterMessages() override {
+ void RegisterMessages() override {
web_ui()->RegisterMessageCallback(
"UILoadedForTest",
base::Bind(&UIDoneLoadingMessageHandler::HandleDone,
@@ -277,9 +277,8 @@ class PrintPreviewObserver : public WebContentsObserver {
ui->web_ui()->CallJavascriptFunction("onEnableManipulateSettingsForTest");
}
- virtual void DidCloneToNewWebContents(
- WebContents* old_web_contents,
- WebContents* new_web_contents) override {
+ void DidCloneToNewWebContents(WebContents* old_web_contents,
+ WebContents* new_web_contents) override {
Observe(new_web_contents);
}
diff --git a/chrome/browser/printing/print_preview_test.cc b/chrome/browser/printing/print_preview_test.cc
index 1ebfd13..3d9c1a5 100644
--- a/chrome/browser/printing/print_preview_test.cc
+++ b/chrome/browser/printing/print_preview_test.cc
@@ -26,7 +26,7 @@ class PrintPreviewTestBrowserWindow
PrintPreviewTestBrowserWindow() {}
// BrowserWindow overrides
- virtual WebContentsModalDialogHost* GetWebContentsModalDialogHost() override {
+ WebContentsModalDialogHost* GetWebContentsModalDialogHost() override {
return this;
}
@@ -34,23 +34,19 @@ class PrintPreviewTestBrowserWindow
// The web contents modal dialog must be parented to *something*; use the
// WebContents window since there is no true browser window for unit tests.
- virtual gfx::NativeView GetHostView() const override {
+ gfx::NativeView GetHostView() const override {
return FindBrowser()->tab_strip_model()->GetActiveWebContents()->
GetNativeView();
}
- virtual gfx::Point GetDialogPosition(const gfx::Size& size) override {
+ gfx::Point GetDialogPosition(const gfx::Size& size) override {
return gfx::Point();
}
- virtual gfx::Size GetMaximumDialogSize() override {
- return gfx::Size();
- }
+ gfx::Size GetMaximumDialogSize() override { return gfx::Size(); }
- virtual void AddObserver(
- ModalDialogHostObserver* observer) override {}
- virtual void RemoveObserver(
- ModalDialogHostObserver* observer) override {}
+ void AddObserver(ModalDialogHostObserver* observer) override {}
+ void RemoveObserver(ModalDialogHostObserver* observer) override {}
private:
Browser* FindBrowser() const {
diff --git a/chrome/browser/printing/print_preview_test.h b/chrome/browser/printing/print_preview_test.h
index 1932c875..2a843c4 100644
--- a/chrome/browser/printing/print_preview_test.h
+++ b/chrome/browser/printing/print_preview_test.h
@@ -16,7 +16,7 @@ class PrintPreviewTest : public BrowserWithTestWindowTest {
virtual void SetUp() override;
// Create a browser window to provide parenting for web contents modal dialog.
- virtual BrowserWindow* CreateBrowserWindow() override;
+ BrowserWindow* CreateBrowserWindow() override;
private:
DISALLOW_COPY_AND_ASSIGN(PrintPreviewTest);
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index c1b12cc..444f003 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -20,7 +20,7 @@ class PrintViewManagerObserver;
class PrintViewManager : public PrintViewManagerBase,
public content::WebContentsUserData<PrintViewManager> {
public:
- virtual ~PrintViewManager();
+ ~PrintViewManager() override;
#if !defined(DISABLE_BASIC_PRINTING)
// Same as PrintNow(), but for the case where a user prints with the system
@@ -53,11 +53,11 @@ class PrintViewManager : public PrintViewManagerBase,
void set_observer(PrintViewManagerObserver* observer);
// content::WebContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
// content::WebContentsObserver implementation.
// Terminates or cancels the print job if one was pending.
- virtual void RenderProcessGone(base::TerminationStatus status) override;
+ void RenderProcessGone(base::TerminationStatus status) override;
private:
explicit PrintViewManager(content::WebContents* web_contents);
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 7e1cee5..85738c4 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -33,7 +33,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
public PrintedPagesSource,
public content::WebContentsObserver {
public:
- virtual ~PrintViewManagerBase();
+ ~PrintViewManagerBase() override;
#if !defined(DISABLE_BASIC_PRINTING)
// Prints the current document immediately. Since the rendering is
@@ -46,7 +46,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
void UpdateScriptedPrintingBlocked();
// PrintedPagesSource implementation.
- virtual base::string16 RenderSourceName() override;
+ base::string16 RenderSourceName() override;
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);
@@ -55,26 +55,25 @@ class PrintViewManagerBase : public content::NotificationObserver,
bool PrintNowInternal(IPC::Message* message);
// Terminates or cancels the print job if one was pending.
- virtual void RenderProcessGone(base::TerminationStatus status) override;
+ void RenderProcessGone(base::TerminationStatus status) override;
// content::WebContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
// IPC Message handlers.
virtual void OnPrintingFailed(int cookie);
private:
// content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// content::WebContentsObserver implementation.
- virtual void DidStartLoading(
- content::RenderViewHost* render_view_host) override;
+ void DidStartLoading(content::RenderViewHost* render_view_host) override;
// Cancels the print job.
- virtual void NavigationStopped() override;
+ void NavigationStopped() override;
// IPC Message handlers.
void OnDidGetPrintedPagesCount(int cookie, int number_pages);
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h
index 9fd9a82..dcabfdd 100644
--- a/chrome/browser/printing/printer_query.h
+++ b/chrome/browser/printing/printer_query.h
@@ -32,11 +32,11 @@ class PrinterQuery : public PrintJobWorkerOwner {
PrinterQuery(int render_process_id, int render_view_id);
// PrintJobWorkerOwner implementation.
- virtual void GetSettingsDone(const PrintSettings& new_settings,
- PrintingContext::Result result) override;
- virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override;
- virtual const PrintSettings& settings() const override;
- virtual int cookie() const override;
+ void GetSettingsDone(const PrintSettings& new_settings,
+ PrintingContext::Result result) override;
+ PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override;
+ const PrintSettings& settings() const override;
+ int cookie() const override;
// Initializes the printing context. It is fine to call this function multiple
// times to reinitialize the settings. |web_contents_observer| can be queried
@@ -65,7 +65,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
bool is_valid() const;
private:
- virtual ~PrinterQuery();
+ ~PrinterQuery() override;
// Lazy create the worker thread. There is one worker thread per print job.
void StartWorker(const base::Closure& callback);
diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h
index b160cce..80ed60b 100644
--- a/chrome/browser/printing/printing_message_filter.h
+++ b/chrome/browser/printing/printing_message_filter.h
@@ -40,13 +40,12 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
PrintingMessageFilter(int render_process_id, Profile* profile);
// content::BrowserMessageFilter methods.
- virtual void OverrideThreadForMessage(
- const IPC::Message& message,
- content::BrowserThread::ID* thread) override;
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ void OverrideThreadForMessage(const IPC::Message& message,
+ content::BrowserThread::ID* thread) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
private:
- virtual ~PrintingMessageFilter();
+ ~PrintingMessageFilter() override;
#if defined(OS_WIN)
// Used to pass resulting EMF from renderer to browser in printing.