summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-04-29 14:45:03 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 21:45:39 +0000
commitbcb225732617dc751c631f20adc6c9507e56cb8c (patch)
tree9bc80a773e14499805d0e262ce3666e2f8fd5a17 /chrome
parent65dc6219e497328d828f790b35d2c0cec287b16e (diff)
downloadchromium_src-bcb225732617dc751c631f20adc6c9507e56cb8c.zip
chromium_src-bcb225732617dc751c631f20adc6c9507e56cb8c.tar.gz
chromium_src-bcb225732617dc751c631f20adc6c9507e56cb8c.tar.bz2
Apply automated fixits for Chrome clang plugin to chrome.
Working on trimming down plugin warnings on the Windows clang build. BUG=467287 NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1109043003 Cr-Commit-Position: refs/heads/master@{#327576}
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chrome_select_file_dialog_factory_win.cc4
-rw-r--r--chrome/browser/component_updater/sw_reporter_installer_win.cc24
-rw-r--r--chrome/browser/diagnostics/diagnostics_writer.cc14
-rw-r--r--chrome/browser/first_run/try_chrome_dialog_view.h2
-rw-r--r--chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc2
-rw-r--r--chrome/browser/google/google_update_win.cc20
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.h6
-rw-r--r--chrome/browser/hang_monitor/hung_window_detector.h4
-rw-r--r--chrome/browser/importer/ie_importer_browsertest_win.cc6
-rw-r--r--chrome/browser/jumplist_win.h2
-rw-r--r--chrome/browser/password_manager/password_store_win.h2
-rw-r--r--chrome/browser/password_manager/password_store_win_unittest.cc4
-rw-r--r--chrome/browser/printing/pdf_to_emf_converter.cc6
-rw-r--r--chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc2
-rw-r--r--chrome/browser/ui/views/message_center/web_notification_tray.h2
-rw-r--r--chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h4
-rw-r--r--chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc8
-rw-r--r--chrome/browser/ui/views/tabs/window_finder_win.cc4
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc6
-rw-r--r--chrome/browser/web_applications/update_shortcut_worker_win.h6
-rw-r--r--chrome/common/multi_process_lock_win.cc6
-rw-r--r--chrome/common/service_process_util_win.cc2
-rw-r--r--chrome/installer/gcapi/gcapi_last_run_test.cc2
-rw-r--r--chrome/installer/mini_installer/mini_string_test.cc6
-rw-r--r--chrome/installer/setup/install_worker_unittest.cc5
-rw-r--r--chrome/installer/util/conditional_work_item_list.h12
-rw-r--r--chrome/installer/util/copy_tree_work_item.h6
-rw-r--r--chrome/installer/util/copy_tree_work_item_unittest.cc6
-rw-r--r--chrome/installer/util/create_dir_work_item.h6
-rw-r--r--chrome/installer/util/create_dir_work_item_unittest.cc4
-rw-r--r--chrome/installer/util/create_reg_key_work_item.h6
-rw-r--r--chrome/installer/util/create_reg_key_work_item_unittest.cc4
-rw-r--r--chrome/installer/util/delete_after_reboot_helper_unittest.cc4
-rw-r--r--chrome/installer/util/delete_reg_key_work_item_unittest.cc2
-rw-r--r--chrome/installer/util/delete_reg_value_work_item.h6
-rw-r--r--chrome/installer/util/delete_reg_value_work_item_unittest.cc4
-rw-r--r--chrome/installer/util/delete_tree_work_item.h6
-rw-r--r--chrome/installer/util/delete_tree_work_item_unittest.cc4
-rw-r--r--chrome/installer/util/duplicate_tree_detector_unittest.cc2
-rw-r--r--chrome/installer/util/google_chrome_binaries_distribution.h10
-rw-r--r--chrome/installer/util/html_dialog.h4
-rw-r--r--chrome/installer/util/html_dialog_impl.cc8
-rw-r--r--chrome/installer/util/installation_validator_unittest.cc2
-rw-r--r--chrome/installer/util/lzma_util_unittest.cc2
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc4
-rw-r--r--chrome/installer/util/move_tree_work_item.h6
-rw-r--r--chrome/installer/util/move_tree_work_item_unittest.cc2
-rw-r--r--chrome/installer/util/product_state_unittest.cc4
-rw-r--r--chrome/installer/util/product_unittest.h8
-rw-r--r--chrome/installer/util/registry_key_backup_unittest.cc2
-rw-r--r--chrome/installer/util/self_reg_work_item.h6
-rw-r--r--chrome/installer/util/set_reg_value_work_item.h6
-rw-r--r--chrome/installer/util/set_reg_value_work_item_unittest.cc4
-rw-r--r--chrome/installer/util/work_item_list.h12
-rw-r--r--chrome/installer/util/work_item_list_unittest.cc6
-rw-r--r--chrome/service/cloud_print/print_system_win.cc6
-rw-r--r--chrome/utility/importer/ie_importer_win.h2
57 files changed, 147 insertions, 168 deletions
diff --git a/chrome/browser/chrome_select_file_dialog_factory_win.cc b/chrome/browser/chrome_select_file_dialog_factory_win.cc
index 40d3baa..98d8a6d 100644
--- a/chrome/browser/chrome_select_file_dialog_factory_win.cc
+++ b/chrome/browser/chrome_select_file_dialog_factory_win.cc
@@ -72,7 +72,7 @@ class GetOpenFileNameClient : public content::UtilityProcessHostClient {
bool OnMessageReceived(const IPC::Message& message) override;
protected:
- virtual ~GetOpenFileNameClient();
+ ~GetOpenFileNameClient() override;
private:
void OnResult(const base::FilePath& directory,
@@ -205,7 +205,7 @@ class GetSaveFileNameClient : public content::UtilityProcessHostClient {
bool OnMessageReceived(const IPC::Message& message) override;
protected:
- virtual ~GetSaveFileNameClient();
+ ~GetSaveFileNameClient() override;
private:
void OnResult(const base::FilePath& path, int one_based_filter_index);
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index 3ba5527..4dddf2e 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -290,23 +290,23 @@ class SwReporterInstallerTraits : public ComponentInstallerTraits {
public:
explicit SwReporterInstallerTraits(PrefService* prefs) : prefs_(prefs) {}
- virtual ~SwReporterInstallerTraits() {}
+ ~SwReporterInstallerTraits() override {}
- virtual bool VerifyInstallation(const base::DictionaryValue& manifest,
- const base::FilePath& dir) const {
+ bool VerifyInstallation(const base::DictionaryValue& manifest,
+ const base::FilePath& dir) const override {
return base::PathExists(dir.Append(kSwReporterExeName));
}
- virtual bool CanAutoUpdate() const { return true; }
+ bool CanAutoUpdate() const override { return true; }
- virtual bool OnCustomInstall(const base::DictionaryValue& manifest,
- const base::FilePath& install_dir) {
+ bool OnCustomInstall(const base::DictionaryValue& manifest,
+ const base::FilePath& install_dir) override {
return true;
}
- virtual void ComponentReady(const base::Version& version,
- const base::FilePath& install_dir,
- scoped_ptr<base::DictionaryValue> manifest) {
+ void ComponentReady(const base::Version& version,
+ const base::FilePath& install_dir,
+ scoped_ptr<base::DictionaryValue> manifest) override {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ReportVersionWithUma(version);
@@ -352,11 +352,11 @@ class SwReporterInstallerTraits : public ComponentInstallerTraits {
}
}
- virtual base::FilePath GetBaseDirectory() const { return install_dir(); }
+ base::FilePath GetBaseDirectory() const override { return install_dir(); }
- virtual void GetHash(std::vector<uint8_t>* hash) const { GetPkHash(hash); }
+ void GetHash(std::vector<uint8_t>* hash) const override { GetPkHash(hash); }
- virtual std::string GetName() const { return "Software Reporter Tool"; }
+ std::string GetName() const override { return "Software Reporter Tool"; }
static base::FilePath install_dir() {
// The base directory on windows looks like:
diff --git a/chrome/browser/diagnostics/diagnostics_writer.cc b/chrome/browser/diagnostics/diagnostics_writer.cc
index 835c24f..f219812 100644
--- a/chrome/browser/diagnostics/diagnostics_writer.cc
+++ b/chrome/browser/diagnostics/diagnostics_writer.cc
@@ -67,22 +67,18 @@ class WinConsole : public SimpleConsole {
::AllocConsole();
}
- virtual ~WinConsole() {
- ::FreeConsole();
- }
+ ~WinConsole() override { ::FreeConsole(); }
- virtual bool Init() {
- return SetIOHandles();
- }
+ bool Init() override { return SetIOHandles(); }
- virtual bool Write(const base::string16& txt) {
+ bool Write(const base::string16& txt) override {
DWORD sz = txt.size();
return (TRUE == ::WriteConsoleW(std_out_, txt.c_str(), sz, &sz, NULL));
}
// Reads a string from the console. Internally it is limited to 256
// characters.
- virtual void OnQuit() {
+ void OnQuit() override {
// Block here so the user can see the results.
SetColor(SimpleConsole::DEFAULT);
Write(L"Press [enter] to continue\n");
@@ -92,7 +88,7 @@ class WinConsole : public SimpleConsole {
}
// Sets the foreground and background color.
- virtual bool SetColor(Color color) {
+ bool SetColor(Color color) override {
uint16 color_combo = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
FOREGROUND_INTENSITY;
switch (color) {
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.h b/chrome/browser/first_run/try_chrome_dialog_view.h
index 48ed058..5a0de80 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view.h
+++ b/chrome/browser/first_run/try_chrome_dialog_view.h
@@ -85,7 +85,7 @@ class TryChromeDialogView : public views::ButtonListener,
private:
explicit TryChromeDialogView(size_t flavor);
- virtual ~TryChromeDialogView();
+ ~TryChromeDialogView() override;
Result ShowModal(const ActiveModalDialogListener& listener);
diff --git a/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc
index 17778bf..aafa507 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc
+++ b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc
@@ -29,7 +29,7 @@ public:
}
protected:
- virtual void SetUpCommandLine(base::CommandLine* command_line) {
+ void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitchASCII(switches::kTryChromeAgain, "10001");
}
};
diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc
index 791279a..1e0d1b9 100644
--- a/chrome/browser/google/google_update_win.cc
+++ b/chrome/browser/google/google_update_win.cc
@@ -173,16 +173,16 @@ class GoogleUpdateJobObserver : public CComObjectRootEx<CComSingleThreadModel>,
private:
// IJobObserver:
- STDMETHOD(OnShow)();
- STDMETHOD(OnCheckingForUpdate)();
- STDMETHOD(OnUpdateAvailable)(const TCHAR* version_string);
- STDMETHOD(OnWaitingToDownload)();
- STDMETHOD(OnDownloading)(int time_remaining_ms, int pos);
- STDMETHOD(OnWaitingToInstall)();
- STDMETHOD(OnInstalling)();
- STDMETHOD(OnPause)();
- STDMETHOD(OnComplete)(LegacyCompletionCodes code, const TCHAR* text);
- STDMETHOD(SetEventSink)(IProgressWndEvents* event_sink);
+ STDMETHOD(OnShow)() override;
+ STDMETHOD(OnCheckingForUpdate)() override;
+ STDMETHOD(OnUpdateAvailable)(const TCHAR* version_string) override;
+ STDMETHOD(OnWaitingToDownload)() override;
+ STDMETHOD(OnDownloading)(int time_remaining_ms, int pos) override;
+ STDMETHOD(OnWaitingToInstall)() override;
+ STDMETHOD(OnInstalling)() override;
+ STDMETHOD(OnPause)() override;
+ STDMETHOD(OnComplete)(LegacyCompletionCodes code, const TCHAR* text) override;
+ STDMETHOD(SetEventSink)(IProgressWndEvents* event_sink) override;
// The task runner associated with the thread in which the job runs.
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.h b/chrome/browser/hang_monitor/hung_plugin_action.h
index 5ad00bb..bc38ef5 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.h
+++ b/chrome/browser/hang_monitor/hung_plugin_action.h
@@ -21,9 +21,9 @@ class HungPluginAction : public HungWindowDetector::HungWindowNotification {
HungPluginAction();
~HungPluginAction();
// HungWindowNotification implementation
- virtual bool OnHungWindowDetected(HWND hung_window,
- HWND top_level_window,
- ActionOnHungWindow* action);
+ bool OnHungWindowDetected(HWND hung_window,
+ HWND top_level_window,
+ ActionOnHungWindow* action) override;
protected:
void OnWindowResponsive(HWND window);
diff --git a/chrome/browser/hang_monitor/hung_window_detector.h b/chrome/browser/hang_monitor/hung_window_detector.h
index 5cf8b7e..4404cec 100644
--- a/chrome/browser/hang_monitor/hung_window_detector.h
+++ b/chrome/browser/hang_monitor/hung_window_detector.h
@@ -48,7 +48,7 @@ class HungWindowDetector : public WorkerThreadTicker::Callback {
// Note that the Initialize method needs to be called to initiate monitoring
// of hung windows.
explicit HungWindowDetector(HungWindowNotification* notification);
- ~HungWindowDetector();
+ ~HungWindowDetector() override;
// This method initialized the monitoring of hung windows. All descendant
// windows of the passed-in top-level window which belong to a thread
@@ -62,7 +62,7 @@ class HungWindowDetector : public WorkerThreadTicker::Callback {
int message_response_timeout);
// Implementation of the WorkerThreadTicker::Callback interface
- virtual void OnTick();
+ void OnTick() override;
private:
// Helper function that checks whether the specified child window is hung.
diff --git a/chrome/browser/importer/ie_importer_browsertest_win.cc b/chrome/browser/importer/ie_importer_browsertest_win.cc
index 828f9d1..9872017 100644
--- a/chrome/browser/importer/ie_importer_browsertest_win.cc
+++ b/chrome/browser/importer/ie_importer_browsertest_win.cc
@@ -347,7 +347,7 @@ class TestObserver : public ProfileWriter,
favicon_count_ += usage.size();
}
- virtual void AddIE7PasswordInfo(const IE7PasswordInfo& info) {
+ void AddIE7PasswordInfo(const IE7PasswordInfo& info) override {
// This function also gets called for the IEImporter test. Ignore.
if (ie_version_ == IE7) {
EXPECT_EQ(L"Test1", info.url_hash);
@@ -357,13 +357,13 @@ class TestObserver : public ProfileWriter,
}
}
- virtual void AddHomepage(const GURL& homepage) {
+ void AddHomepage(const GURL& homepage) override {
EXPECT_EQ(homepage.spec(), "http://www.test.com/");
++homepage_count_;
}
private:
- ~TestObserver() {}
+ ~TestObserver() override {}
size_t bookmark_count_;
size_t history_count_;
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index cd46088..72b6d02 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -86,7 +86,7 @@ class JumpList : public TabRestoreServiceObserver,
friend struct content::BrowserThread::DeleteOnThread<
content::BrowserThread::UI>;
friend class base::DeleteHelper<JumpList>;
- virtual ~JumpList();
+ ~JumpList() override;
// Creates a ShellLinkItem object from a tab (or a window) and add it to the
// given list.
diff --git a/chrome/browser/password_manager/password_store_win.h b/chrome/browser/password_manager/password_store_win.h
index bfa8c83..00ab273 100644
--- a/chrome/browser/password_manager/password_store_win.h
+++ b/chrome/browser/password_manager/password_store_win.h
@@ -38,7 +38,7 @@ class PasswordStoreWin : public password_manager::PasswordStoreDefault {
private:
class DBHandler;
- virtual ~PasswordStoreWin();
+ ~PasswordStoreWin() override;
// Invoked from Shutdown, but run on the DB thread.
void ShutdownOnDBThread();
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 1abeb39..f46823f 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -114,7 +114,7 @@ class PasswordStoreWinTest : public testing::Test {
return true;
}
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(db_thread_.Start());
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -134,7 +134,7 @@ class PasswordStoreWinTest : public testing::Test {
wds_->Init();
}
- virtual void TearDown() {
+ void TearDown() override {
if (store_.get())
store_->Shutdown();
wds_->ShutdownOnUIThread();
diff --git a/chrome/browser/printing/pdf_to_emf_converter.cc b/chrome/browser/printing/pdf_to_emf_converter.cc
index 0e22cca..f7bfceb 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -61,7 +61,7 @@ class LazyEmf : public MetafilePlayer {
public:
LazyEmf(const scoped_refptr<RefCountedTempDir>& temp_dir, ScopedTempFile file)
: temp_dir_(temp_dir), file_(file.Pass()) {}
- virtual ~LazyEmf() { Close(); }
+ ~LazyEmf() override { Close(); }
bool SafePlayback(HDC hdc) const override;
bool SaveTo(base::File* file) const override;
@@ -142,7 +142,7 @@ class PdfToEmfUtilityProcessHostClient
ScopedTempFile emf_;
};
- virtual ~PdfToEmfUtilityProcessHostClient();
+ ~PdfToEmfUtilityProcessHostClient() override;
bool Send(IPC::Message* msg);
@@ -181,7 +181,7 @@ class PdfToEmfConverterImpl : public PdfToEmfConverter {
public:
PdfToEmfConverterImpl();
- virtual ~PdfToEmfConverterImpl();
+ ~PdfToEmfConverterImpl() override;
void Start(const scoped_refptr<base::RefCountedMemory>& data,
const PdfRenderSettings& conversion_settings,
diff --git a/chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc b/chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc
index 7205f9e..9f0e8e0 100644
--- a/chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc
+++ b/chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc
@@ -178,7 +178,7 @@ void CALLBACK WinAccessibilityEventMonitor::WinEventHookThunk(
class NavigationAccessibilityTest : public InProcessBrowserTest {
protected:
NavigationAccessibilityTest() {}
- virtual ~NavigationAccessibilityTest() {}
+ ~NavigationAccessibilityTest() override {}
void SendKeyPress(ui::KeyboardCode key) {
gfx::NativeWindow native_window = browser()->window()->GetNativeWindow();
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.h b/chrome/browser/ui/views/message_center/web_notification_tray.h
index e08984c..e9fcc565 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.h
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.h
@@ -71,7 +71,7 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate,
// This shows a platform-specific balloon informing the user of the existence
// of the message center in the status tray area.
- void DisplayFirstRunBalloon();
+ void DisplayFirstRunBalloon() override;
void EnforceStatusIconVisible();
#endif
diff --git a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h
index 42ec2c0..78327f9 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h
+++ b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h
@@ -72,10 +72,10 @@ class StatusTrayStateChangerWin : public INotificationCB,
// entry in Explorer's list of notification area icons, and ever time
// one of them changes, until UnregisterCallback is called or |this|
// is destroyed.
- virtual HRESULT STDMETHODCALLTYPE Notify(ULONG, NOTIFYITEM*);
+ HRESULT STDMETHODCALLTYPE Notify(ULONG, NOTIFYITEM*) override;
protected:
- virtual ~StatusTrayStateChangerWin();
+ ~StatusTrayStateChangerWin() override;
private:
friend class StatusTrayStateChangerWinTest;
diff --git a/chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc b/chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc
index 450d371..babdfca 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc
+++ b/chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc
@@ -21,7 +21,7 @@ class FakeStatusTrayStateChangerProxy : public StatusTrayStateChangerProxy {
FakeStatusTrayStateChangerProxy()
: enqueue_called_(false), icon_id_(0), window_(NULL) {}
- virtual void EnqueueChange(UINT icon_id, HWND window) {
+ void EnqueueChange(UINT icon_id, HWND window) override {
enqueue_called_ = true;
icon_id_ = icon_id;
window_ = window;
@@ -44,10 +44,8 @@ class FakeStatusIconObserver : public StatusIconObserver {
FakeStatusIconObserver()
: balloon_clicked_(false),
status_icon_click_count_(0) {}
- virtual void OnStatusIconClicked() {
- ++status_icon_click_count_;
- }
- virtual void OnBalloonClicked() { balloon_clicked_ = true; }
+ void OnStatusIconClicked() override { ++status_icon_click_count_; }
+ void OnBalloonClicked() override { balloon_clicked_ = true; }
bool balloon_clicked() const { return balloon_clicked_; }
size_t status_icon_click_count() const {
return status_icon_click_count_;
diff --git a/chrome/browser/ui/views/tabs/window_finder_win.cc b/chrome/browser/ui/views/tabs/window_finder_win.cc
index 33d401f0..d2cf4db 100644
--- a/chrome/browser/ui/views/tabs/window_finder_win.cc
+++ b/chrome/browser/ui/views/tabs/window_finder_win.cc
@@ -72,7 +72,7 @@ class TopMostFinder : public BaseWindowFinder {
return finder.is_top_most_;
}
- virtual bool ShouldStopIterating(HWND hwnd) {
+ bool ShouldStopIterating(HWND hwnd) override {
if (hwnd == target_) {
// Window is topmost, stop iterating.
is_top_most_ = true;
@@ -176,7 +176,7 @@ class LocalProcessWindowFinder : public BaseWindowFinder {
}
protected:
- virtual bool ShouldStopIterating(HWND hwnd) {
+ bool ShouldStopIterating(HWND hwnd) override {
RECT r;
if (IsWindowVisible(hwnd) && GetWindowRect(hwnd, &r) &&
PtInRect(&r, screen_loc_.ToPOINT())) {
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index 39f10ae..e101888 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -80,10 +80,10 @@ class ConflictsDOMHandler : public WebUIMessageHandler,
public content::NotificationObserver {
public:
ConflictsDOMHandler() {}
- virtual ~ConflictsDOMHandler() {}
+ ~ConflictsDOMHandler() override {}
// WebUIMessageHandler implementation.
- virtual void RegisterMessages();
+ void RegisterMessages() override;
// Callback for the "requestModuleList" message.
void HandleRequestModuleList(const base::ListValue* args);
@@ -93,7 +93,7 @@ class ConflictsDOMHandler : public WebUIMessageHandler,
void Observe(int type,
const content::NotificationSource& source,
- const content::NotificationDetails& details);
+ const content::NotificationDetails& details) override;
content::NotificationRegistrar registrar_;
diff --git a/chrome/browser/web_applications/update_shortcut_worker_win.h b/chrome/browser/web_applications/update_shortcut_worker_win.h
index 825a3ea..b56b2ed 100644
--- a/chrome/browser/web_applications/update_shortcut_worker_win.h
+++ b/chrome/browser/web_applications/update_shortcut_worker_win.h
@@ -31,9 +31,9 @@ class UpdateShortcutWorker : public content::NotificationObserver {
private:
// Overridden from content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details);
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Downloads icon via the FaviconDriver.
void DownloadIcon();
diff --git a/chrome/common/multi_process_lock_win.cc b/chrome/common/multi_process_lock_win.cc
index 31922b2..74c7b3e 100644
--- a/chrome/common/multi_process_lock_win.cc
+++ b/chrome/common/multi_process_lock_win.cc
@@ -12,13 +12,13 @@ class MultiProcessLockWin : public MultiProcessLock {
public:
explicit MultiProcessLockWin(const std::string& name) : name_(name) { }
- virtual ~MultiProcessLockWin() {
+ ~MultiProcessLockWin() override {
if (event_.Get() != NULL) {
Unlock();
}
}
- virtual bool TryLock() {
+ bool TryLock() override {
if (event_.Get() != NULL) {
DLOG(ERROR) << "MultiProcessLock is already locked - " << name_;
return true;
@@ -40,7 +40,7 @@ class MultiProcessLockWin : public MultiProcessLock {
}
}
- virtual void Unlock() {
+ void Unlock() override {
if (event_.Get() == NULL) {
DLOG(ERROR) << "Over-unlocked MultiProcessLock - " << name_;
return;
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc
index 5e27584..6aac388 100644
--- a/chrome/common/service_process_util_win.cc
+++ b/chrome/common/service_process_util_win.cc
@@ -62,7 +62,7 @@ class ServiceProcessTerminateMonitor
}
// base::ObjectWatcher::Delegate implementation.
- virtual void OnObjectSignaled(HANDLE object) {
+ void OnObjectSignaled(HANDLE object) override {
if (!terminate_task_.is_null()) {
terminate_task_.Run();
terminate_task_.Reset();
diff --git a/chrome/installer/gcapi/gcapi_last_run_test.cc b/chrome/installer/gcapi/gcapi_last_run_test.cc
index 85e7eed..665d437 100644
--- a/chrome/installer/gcapi/gcapi_last_run_test.cc
+++ b/chrome/installer/gcapi/gcapi_last_run_test.cc
@@ -24,7 +24,7 @@ using base::win::RegKey;
class GCAPILastRunTest : public ::testing::Test {
protected:
- void SetUp() {
+ void SetUp() override {
// Override keys - this is undone during destruction.
override_manager_.OverrideRegistry(HKEY_CURRENT_USER);
diff --git a/chrome/installer/mini_installer/mini_string_test.cc b/chrome/installer/mini_installer/mini_string_test.cc
index 67b11f9..e83f165 100644
--- a/chrome/installer/mini_installer/mini_string_test.cc
+++ b/chrome/installer/mini_installer/mini_string_test.cc
@@ -15,10 +15,8 @@ using mini_installer::StackString;
namespace {
class MiniInstallerStringTest : public testing::Test {
protected:
- virtual void SetUp() {
- }
- virtual void TearDown() {
- }
+ void SetUp() override {}
+ void TearDown() override {}
};
}
diff --git a/chrome/installer/setup/install_worker_unittest.cc b/chrome/installer/setup/install_worker_unittest.cc
index d47f042..9cd28f0 100644
--- a/chrome/installer/setup/install_worker_unittest.cc
+++ b/chrome/installer/setup/install_worker_unittest.cc
@@ -166,7 +166,7 @@ class MockInstallerState : public InstallerState {
class InstallWorkerTest : public testing::Test {
public:
- virtual void SetUp() {
+ void SetUp() override {
current_version_.reset(new Version("1.0.0.0"));
new_version_.reset(new Version("42.0.0.0"));
@@ -186,8 +186,7 @@ class InstallWorkerTest : public testing::Test {
temp_dir_ = base::FilePath(L"C:\\UnlikelyPath\\Temp\\chrome_123");
}
- virtual void TearDown() {
- }
+ void TearDown() override {}
void MaybeAddBinariesToInstallationState(
bool system_level,
diff --git a/chrome/installer/util/conditional_work_item_list.h b/chrome/installer/util/conditional_work_item_list.h
index 97cdd7a..ae5cdc9 100644
--- a/chrome/installer/util/conditional_work_item_list.h
+++ b/chrome/installer/util/conditional_work_item_list.h
@@ -15,15 +15,15 @@
class ConditionalWorkItemList : public WorkItemList {
public:
explicit ConditionalWorkItemList(Condition* condition);
- virtual ~ConditionalWorkItemList();
+ ~ConditionalWorkItemList() override;
// If condition_->ShouldRun() returns true, then execute the items in this
// list and return true iff they all succeed. If condition_->ShouldRun()
// returns false, does nothing and returns true.
- virtual bool Do();
+ bool Do() override;
// Does a rollback of the items (if any) that were run in Do.
- virtual void Rollback();
+ void Rollback() override;
protected:
// Pointer to a Condition that is used to determine whether to run this
@@ -38,7 +38,7 @@ class ConditionRunIfFileExists : public WorkItem::Condition {
public:
explicit ConditionRunIfFileExists(const base::FilePath& key_path)
: key_path_(key_path) {}
- bool ShouldRun() const;
+ bool ShouldRun() const override;
private:
base::FilePath key_path_;
@@ -49,9 +49,9 @@ class ConditionRunIfFileExists : public WorkItem::Condition {
class Not : public WorkItem::Condition {
public:
explicit Not(WorkItem::Condition* original_condition);
- ~Not();
+ ~Not() override;
- bool ShouldRun() const;
+ bool ShouldRun() const override;
private:
scoped_ptr<WorkItem::Condition> original_condition_;
diff --git a/chrome/installer/util/copy_tree_work_item.h b/chrome/installer/util/copy_tree_work_item.h
index af01cf5..9aa426a 100644
--- a/chrome/installer/util/copy_tree_work_item.h
+++ b/chrome/installer/util/copy_tree_work_item.h
@@ -25,11 +25,11 @@
// losing ACLs or other metadata in the case of a rollback.
class CopyTreeWorkItem : public WorkItem {
public:
- virtual ~CopyTreeWorkItem();
+ ~CopyTreeWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/copy_tree_work_item_unittest.cc b/chrome/installer/util/copy_tree_work_item_unittest.cc
index 035696c..35cc3af 100644
--- a/chrome/installer/util/copy_tree_work_item_unittest.cc
+++ b/chrome/installer/util/copy_tree_work_item_unittest.cc
@@ -21,14 +21,12 @@ namespace {
class CopyTreeWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
}
- virtual void TearDown() {
- logging::CloseLogFile();
- }
+ void TearDown() override { logging::CloseLogFile(); }
// the path to temporary directory used to contain the test operations
base::ScopedTempDir test_dir_;
diff --git a/chrome/installer/util/create_dir_work_item.h b/chrome/installer/util/create_dir_work_item.h
index 83d3d05..217196d 100644
--- a/chrome/installer/util/create_dir_work_item.h
+++ b/chrome/installer/util/create_dir_work_item.h
@@ -14,15 +14,15 @@
// It also creates all necessary intermediate paths if they do not exist.
class CreateDirWorkItem : public WorkItem {
public:
- virtual ~CreateDirWorkItem();
+ ~CreateDirWorkItem() override;
- virtual bool Do();
+ bool Do() override;
// Rollback tries to remove all directories created along the path.
// If the leaf directory or one of the intermediate directories are not
// empty, the non-empty directory and its parent directories will not be
// removed.
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/create_dir_work_item_unittest.cc b/chrome/installer/util/create_dir_work_item_unittest.cc
index 22213d6..07ce874 100644
--- a/chrome/installer/util/create_dir_work_item_unittest.cc
+++ b/chrome/installer/util/create_dir_work_item_unittest.cc
@@ -16,9 +16,7 @@
namespace {
class CreateDirWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
- ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- }
+ void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
base::ScopedTempDir temp_dir_;
};
diff --git a/chrome/installer/util/create_reg_key_work_item.h b/chrome/installer/util/create_reg_key_work_item.h
index 455cb4b..a55d941 100644
--- a/chrome/installer/util/create_reg_key_work_item.h
+++ b/chrome/installer/util/create_reg_key_work_item.h
@@ -16,11 +16,11 @@
// It also creates all necessary intermediate keys if they do not exist.
class CreateRegKeyWorkItem : public WorkItem {
public:
- virtual ~CreateRegKeyWorkItem();
+ ~CreateRegKeyWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/create_reg_key_work_item_unittest.cc b/chrome/installer/util/create_reg_key_work_item_unittest.cc
index 6b4bc15..888a0dc 100644
--- a/chrome/installer/util/create_reg_key_work_item_unittest.cc
+++ b/chrome/installer/util/create_reg_key_work_item_unittest.cc
@@ -20,7 +20,7 @@ wchar_t test_root[] = L"TmpTmp";
class CreateRegKeyWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
// Create a temporary key for testing
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
key.DeleteKey(test_root);
@@ -28,7 +28,7 @@ class CreateRegKeyWorkItemTest : public testing::Test {
ASSERT_EQ(ERROR_SUCCESS, key.Create(HKEY_CURRENT_USER, test_root,
KEY_READ));
}
- virtual void TearDown() {
+ void TearDown() override {
logging::CloseLogFile();
// Clean up the temporary key
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
diff --git a/chrome/installer/util/delete_after_reboot_helper_unittest.cc b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
index b6f5046..f0acaca 100644
--- a/chrome/installer/util/delete_after_reboot_helper_unittest.cc
+++ b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
@@ -22,7 +22,7 @@ namespace {
// your PendingFileRenameOperations value.
class DeleteAfterRebootHelperTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
// Create a temporary directory for testing and fill it with some files.
base::CreateNewTempDirectory(base::FilePath::StringType(), &temp_dir_);
base::CreateTemporaryFileInDir(temp_dir_, &temp_file_);
@@ -36,7 +36,7 @@ class DeleteAfterRebootHelperTest : public testing::Test {
GetPendingMovesValue(&original_pending_moves_);
}
}
- virtual void TearDown() {
+ void TearDown() override {
// Delete the temporary directory if it's still there.
base::DeleteFile(temp_dir_, true);
diff --git a/chrome/installer/util/delete_reg_key_work_item_unittest.cc b/chrome/installer/util/delete_reg_key_work_item_unittest.cc
index 5e8c435..e02b7f5 100644
--- a/chrome/installer/util/delete_reg_key_work_item_unittest.cc
+++ b/chrome/installer/util/delete_reg_key_work_item_unittest.cc
@@ -20,7 +20,7 @@ class DeleteRegKeyWorkItemTest : public testing::Test {
logging::CloseLogFile();
}
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(test_data_.Initialize(HKEY_CURRENT_USER, L"SOFTWARE\\TmpTmp"));
}
diff --git a/chrome/installer/util/delete_reg_value_work_item.h b/chrome/installer/util/delete_reg_value_work_item.h
index 582d3bd..f1bd50a 100644
--- a/chrome/installer/util/delete_reg_value_work_item.h
+++ b/chrome/installer/util/delete_reg_value_work_item.h
@@ -16,11 +16,11 @@
// key exists.
class DeleteRegValueWorkItem : public WorkItem {
public:
- virtual ~DeleteRegValueWorkItem();
+ ~DeleteRegValueWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/delete_reg_value_work_item_unittest.cc b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
index 839fd72..bf24bba 100644
--- a/chrome/installer/util/delete_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
@@ -23,7 +23,7 @@ const wchar_t kNameDword[] = L"name_dword";
class DeleteRegValueWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
// Create a temporary key for testing
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
key.DeleteKey(kTestRoot);
@@ -31,7 +31,7 @@ class DeleteRegValueWorkItemTest : public testing::Test {
ASSERT_EQ(ERROR_SUCCESS,
key.Create(HKEY_CURRENT_USER, kTestRoot, KEY_READ));
}
- virtual void TearDown() {
+ void TearDown() override {
logging::CloseLogFile();
// Clean up the temporary key
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
diff --git a/chrome/installer/util/delete_tree_work_item.h b/chrome/installer/util/delete_tree_work_item.h
index e3c2bd5..e233af51 100644
--- a/chrome/installer/util/delete_tree_work_item.h
+++ b/chrome/installer/util/delete_tree_work_item.h
@@ -19,11 +19,11 @@
// specified, deletion will be performed only if all key files are not in use.
class DeleteTreeWorkItem : public WorkItem {
public:
- virtual ~DeleteTreeWorkItem();
+ ~DeleteTreeWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/delete_tree_work_item_unittest.cc b/chrome/installer/util/delete_tree_work_item_unittest.cc
index 75493fd..48f321f 100644
--- a/chrome/installer/util/delete_tree_work_item_unittest.cc
+++ b/chrome/installer/util/delete_tree_work_item_unittest.cc
@@ -20,9 +20,7 @@ namespace {
class DeleteTreeWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
- ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- }
+ void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
// The temporary directory used to contain the test operations.
base::ScopedTempDir temp_dir_;
diff --git a/chrome/installer/util/duplicate_tree_detector_unittest.cc b/chrome/installer/util/duplicate_tree_detector_unittest.cc
index 65bb06e..c9b50e8 100644
--- a/chrome/installer/util/duplicate_tree_detector_unittest.cc
+++ b/chrome/installer/util/duplicate_tree_detector_unittest.cc
@@ -18,7 +18,7 @@ namespace {
class DuplicateTreeDetectorTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(temp_source_dir_.CreateUniqueTempDir());
ASSERT_TRUE(temp_dest_dir_.CreateUniqueTempDir());
}
diff --git a/chrome/installer/util/google_chrome_binaries_distribution.h b/chrome/installer/util/google_chrome_binaries_distribution.h
index 805ba50..46fd43f 100644
--- a/chrome/installer/util/google_chrome_binaries_distribution.h
+++ b/chrome/installer/util/google_chrome_binaries_distribution.h
@@ -11,13 +11,13 @@
class GoogleChromeBinariesDistribution : public ChromiumBinariesDistribution {
public:
- virtual base::string16 GetDisplayName();
+ base::string16 GetDisplayName() override;
- virtual base::string16 GetShortcutName(ShortcutType shortcut_type);
+ base::string16 GetShortcutName(ShortcutType shortcut_type) override;
- virtual void UpdateInstallStatus(bool system_install,
- installer::ArchiveType archive_type,
- installer::InstallStatus install_status);
+ void UpdateInstallStatus(bool system_install,
+ installer::ArchiveType archive_type,
+ installer::InstallStatus install_status) override;
protected:
friend class BrowserDistribution;
diff --git a/chrome/installer/util/html_dialog.h b/chrome/installer/util/html_dialog.h
index c6d6a58..d885c23 100644
--- a/chrome/installer/util/html_dialog.h
+++ b/chrome/installer/util/html_dialog.h
@@ -88,8 +88,8 @@ class EulaHTMLDialog {
private:
class Customizer : public HTMLDialog::CustomizationCallback {
public:
- virtual void OnBeforeCreation(wchar_t** extra);
- virtual void OnBeforeDisplay(void* window);
+ void OnBeforeCreation(wchar_t** extra) override;
+ void OnBeforeDisplay(void* window) override;
};
HTMLDialog* dialog_;
diff --git a/chrome/installer/util/html_dialog_impl.cc b/chrome/installer/util/html_dialog_impl.cc
index 2df4447..679aa74 100644
--- a/chrome/installer/util/html_dialog_impl.cc
+++ b/chrome/installer/util/html_dialog_impl.cc
@@ -46,17 +46,15 @@ class HTMLDialogWin : public HTMLDialog {
mshtml_ = LoadLibrary(L"MSHTML.DLL");
}
- virtual DialogResult ShowModal(void* parent_window,
- CustomizationCallback* callback) {
+ DialogResult ShowModal(void* parent_window,
+ CustomizationCallback* callback) override {
int result = HTML_DLG_DECLINE;
if (!InternalDoDialog(callback, &result))
return HTML_DLG_ERROR;
return static_cast<DialogResult>(result);
}
- virtual std::wstring GetExtraResult() {
- return extra_result_;
- }
+ std::wstring GetExtraResult() override { return extra_result_; }
private:
bool InternalDoDialog(CustomizationCallback* callback, int* result);
diff --git a/chrome/installer/util/installation_validator_unittest.cc b/chrome/installer/util/installation_validator_unittest.cc
index ae015ff..65b9756 100644
--- a/chrome/installer/util/installation_validator_unittest.cc
+++ b/chrome/installer/util/installation_validator_unittest.cc
@@ -277,7 +277,7 @@ class InstallationValidatorTest
Channel channel,
Vehicle vehicle,
FakeInstallationState* state);
- virtual void TearDown();
+ void TearDown() override;
static logging::LogMessageHandlerFunction old_log_message_handler_;
static ValidationErrorRecipient* validation_error_recipient_;
diff --git a/chrome/installer/util/lzma_util_unittest.cc b/chrome/installer/util/lzma_util_unittest.cc
index ac4c4c6..05a8cb1 100644
--- a/chrome/installer/util/lzma_util_unittest.cc
+++ b/chrome/installer/util/lzma_util_unittest.cc
@@ -15,7 +15,7 @@ namespace {
class LzmaUtilTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_dir_));
data_dir_ = data_dir_.AppendASCII("installer");
ASSERT_TRUE(base::PathExists(data_dir_));
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 02bb393..31f839b 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -19,11 +19,11 @@
namespace {
class MasterPreferencesTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(base::CreateTemporaryFile(&prefs_file_));
}
- virtual void TearDown() {
+ void TearDown() override {
EXPECT_TRUE(base::DeleteFile(prefs_file_, false));
}
diff --git a/chrome/installer/util/move_tree_work_item.h b/chrome/installer/util/move_tree_work_item.h
index 371182d..eea5cda 100644
--- a/chrome/installer/util/move_tree_work_item.h
+++ b/chrome/installer/util/move_tree_work_item.h
@@ -20,11 +20,11 @@
// hierarchy is moved back.
class MoveTreeWorkItem : public WorkItem {
public:
- virtual ~MoveTreeWorkItem();
+ ~MoveTreeWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/move_tree_work_item_unittest.cc b/chrome/installer/util/move_tree_work_item_unittest.cc
index 3198ffe..09da22eb 100644
--- a/chrome/installer/util/move_tree_work_item_unittest.cc
+++ b/chrome/installer/util/move_tree_work_item_unittest.cc
@@ -20,7 +20,7 @@
namespace {
class MoveTreeWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(temp_from_dir_.CreateUniqueTempDir());
ASSERT_TRUE(temp_to_dir_.CreateUniqueTempDir());
}
diff --git a/chrome/installer/util/product_state_unittest.cc b/chrome/installer/util/product_state_unittest.cc
index 64848e51..5a2de671 100644
--- a/chrome/installer/util/product_state_unittest.cc
+++ b/chrome/installer/util/product_state_unittest.cc
@@ -24,8 +24,8 @@ class ProductStateTest : public testing::Test {
static void SetUpTestCase();
static void TearDownTestCase();
- virtual void SetUp();
- virtual void TearDown();
+ void SetUp() override;
+ void TearDown() override;
void ApplyUninstallCommand(const wchar_t* exe_path, const wchar_t* args);
void MinimallyInstallProduct(const wchar_t* version);
diff --git a/chrome/installer/util/product_unittest.h b/chrome/installer/util/product_unittest.h
index 4d1ccaa..ad8a64a 100644
--- a/chrome/installer/util/product_unittest.h
+++ b/chrome/installer/util/product_unittest.h
@@ -13,16 +13,16 @@
class TestWithTempDir : public testing::Test {
protected:
- virtual void SetUp();
- virtual void TearDown();
+ void SetUp() override;
+ void TearDown() override;
base::ScopedTempDir test_dir_;
};
class TestWithTempDirAndDeleteTempOverrideKeys : public TestWithTempDir {
protected:
- virtual void SetUp();
- virtual void TearDown();
+ void SetUp() override;
+ void TearDown() override;
};
#endif // CHROME_INSTALLER_UTIL_PRODUCT_UNITTEST_H_
diff --git a/chrome/installer/util/registry_key_backup_unittest.cc b/chrome/installer/util/registry_key_backup_unittest.cc
index 32bedb4..2c2c7f9 100644
--- a/chrome/installer/util/registry_key_backup_unittest.cc
+++ b/chrome/installer/util/registry_key_backup_unittest.cc
@@ -20,7 +20,7 @@ class RegistryKeyBackupTest : public testing::Test {
logging::CloseLogFile();
}
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(test_data_.Initialize(HKEY_CURRENT_USER, L"SOFTWARE\\TmpTmp"));
destination_path_.assign(test_data_.base_path()).append(L"\\Destination");
}
diff --git a/chrome/installer/util/self_reg_work_item.h b/chrome/installer/util/self_reg_work_item.h
index 8b816c8..544621c 100644
--- a/chrome/installer/util/self_reg_work_item.h
+++ b/chrome/installer/util/self_reg_work_item.h
@@ -13,10 +13,10 @@
// Registers or unregisters the DLL at the given path.
class SelfRegWorkItem : public WorkItem {
public:
- virtual ~SelfRegWorkItem();
+ ~SelfRegWorkItem() override;
- virtual bool Do();
- virtual void Rollback();
+ bool Do() override;
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/set_reg_value_work_item.h b/chrome/installer/util/set_reg_value_work_item.h
index 16e6279..0c4d0c8 100644
--- a/chrome/installer/util/set_reg_value_work_item.h
+++ b/chrome/installer/util/set_reg_value_work_item.h
@@ -17,11 +17,11 @@
// exists.
class SetRegValueWorkItem : public WorkItem {
public:
- virtual ~SetRegValueWorkItem();
+ ~SetRegValueWorkItem() override;
- virtual bool Do();
+ bool Do() override;
- virtual void Rollback();
+ void Rollback() override;
private:
friend class WorkItem;
diff --git a/chrome/installer/util/set_reg_value_work_item_unittest.cc b/chrome/installer/util/set_reg_value_work_item_unittest.cc
index 9f76111..163f888 100644
--- a/chrome/installer/util/set_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/set_reg_value_work_item_unittest.cc
@@ -27,7 +27,7 @@ const DWORD dword2 = 1;
class SetRegValueWorkItemTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
// Create a temporary key for testing
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
key.DeleteKey(kTestRoot);
@@ -35,7 +35,7 @@ class SetRegValueWorkItemTest : public testing::Test {
ASSERT_EQ(ERROR_SUCCESS,
key.Create(HKEY_CURRENT_USER, kTestRoot, KEY_READ));
}
- virtual void TearDown() {
+ void TearDown() override {
logging::CloseLogFile();
// Clean up the temporary key
RegKey key(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS);
diff --git a/chrome/installer/util/work_item_list.h b/chrome/installer/util/work_item_list.h
index f00295a..74c0562 100644
--- a/chrome/installer/util/work_item_list.h
+++ b/chrome/installer/util/work_item_list.h
@@ -25,14 +25,14 @@ class FilePath;
// The WorkItems are executed in the same order as they are added to the list.
class WorkItemList : public WorkItem {
public:
- virtual ~WorkItemList();
+ ~WorkItemList() override;
// Execute the WorkItems in the same order as they are added to the list.
// It aborts as soon as one WorkItem fails.
- virtual bool Do();
+ bool Do() override;
// Rollback the WorkItems in the reverse order as they are executed.
- virtual void Rollback();
+ void Rollback() override;
// Add a WorkItem to the list.
// A WorkItem can only be added to the list before the list's DO() is called.
@@ -160,15 +160,15 @@ class WorkItemList : public WorkItem {
// Also, as the class name suggests, Rollback is not possible.
class NoRollbackWorkItemList : public WorkItemList {
public:
- virtual ~NoRollbackWorkItemList();
+ ~NoRollbackWorkItemList() override;
// Execute the WorkItems in the same order as they are added to the list.
// If a WorkItem fails, the function will return failure but all other
// WorkItems will still be executed.
- virtual bool Do();
+ bool Do() override;
// No-op.
- virtual void Rollback();
+ void Rollback() override;
};
#endif // CHROME_INSTALLER_UTIL_WORK_ITEM_LIST_H_
diff --git a/chrome/installer/util/work_item_list_unittest.cc b/chrome/installer/util/work_item_list_unittest.cc
index 230d028..1a2eb3d 100644
--- a/chrome/installer/util/work_item_list_unittest.cc
+++ b/chrome/installer/util/work_item_list_unittest.cc
@@ -26,14 +26,12 @@ const wchar_t kName[] = L"name";
class WorkItemListTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER);
}
- virtual void TearDown() {
- logging::CloseLogFile();
- }
+ void TearDown() override { logging::CloseLogFile(); }
base::ScopedTempDir temp_dir_;
registry_util::RegistryOverrideManager registry_override_manager_;
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 6aed0ba..9c03956 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -37,9 +37,7 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate {
: delegate_(NULL),
did_signal_(false) {
}
- ~PrintSystemWatcherWin() {
- Stop();
- }
+ ~PrintSystemWatcherWin() override { Stop(); }
class Delegate {
public:
@@ -87,7 +85,7 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate {
}
// base::ObjectWatcher::Delegate method
- virtual void OnObjectSignaled(HANDLE object) {
+ void OnObjectSignaled(HANDLE object) override {
crash_keys::ScopedPrinterInfo crash_key(printer_info_);
DWORD change = 0;
FindNextPrinterChangeNotification(object, &change, NULL, NULL);
diff --git a/chrome/utility/importer/ie_importer_win.h b/chrome/utility/importer/ie_importer_win.h
index 08f6995..1d38034 100644
--- a/chrome/utility/importer/ie_importer_win.h
+++ b/chrome/utility/importer/ie_importer_win.h
@@ -43,7 +43,7 @@ class IEImporter : public Importer {
FRIEND_TEST_ALL_PREFIXES(ImporterTest, IEImporter);
- virtual ~IEImporter();
+ ~IEImporter() override;
void ImportFavorites();