diff options
172 files changed, 527 insertions, 466 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc index 87d5f89..292a69b 100644 --- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc @@ -52,7 +52,7 @@ class TestProvider : public AutocompleteProvider { } virtual void Start(const AutocompleteInput& input, - bool minimal_changes); + bool minimal_changes) OVERRIDE; void set_listener(AutocompleteProviderListener* listener) { listener_ = listener; @@ -192,7 +192,7 @@ class AutocompleteProviderTest : public testing::Test, // content::NotificationObserver virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; MessageLoopForUI message_loop_; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/autocomplete/history_contents_provider_unittest.cc b/chrome/browser/autocomplete/history_contents_provider_unittest.cc index de0fcc6..e17aa6e 100644 --- a/chrome/browser/autocomplete/history_contents_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_contents_provider_unittest.cc @@ -116,7 +116,7 @@ class HistoryContentsProviderTest : public testing::Test, class HistoryContentsProviderBodyOnlyTest : public HistoryContentsProviderTest { protected: - virtual bool BodyOnly() { return true; } + virtual bool BodyOnly() OVERRIDE { return true; } }; TEST_F(HistoryContentsProviderTest, Body) { diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc index 9a47822..966220b 100644 --- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc @@ -104,8 +104,8 @@ class HistoryQuickProviderTest : public testing::Test, std::set<std::string> matches_; }; - void SetUp(); - void TearDown(); + virtual void SetUp(); + virtual void TearDown(); virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); diff --git a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc index 6b0f255..8c7d878 100644 --- a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc +++ b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc @@ -142,8 +142,8 @@ class ShortcutsProviderTest : public testing::Test, std::set<std::string> matches_; }; - void SetUp(); - void TearDown(); + virtual void SetUp(); + virtual void TearDown(); // Fills test data into the provider. void FillData(TestShortcutInfo* db, size_t db_size); diff --git a/chrome/browser/autofill/autocomplete_history_manager_unittest.cc b/chrome/browser/autofill/autocomplete_history_manager_unittest.cc index 846a54a..3a8f6c85 100644 --- a/chrome/browser/autofill/autocomplete_history_manager_unittest.cc +++ b/chrome/browser/autofill/autocomplete_history_manager_unittest.cc @@ -179,7 +179,10 @@ class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager { : AutocompleteHistoryManager(web_contents, profile, wds.Pass()) {} // Intentionally swallow the message. - virtual bool Send(IPC::Message* message) { delete message; return true; } + virtual bool Send(IPC::Message* message) OVERRIDE { + delete message; + return true; + } }; } // namespace diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc index ab41c34..40fd1a4 100644 --- a/chrome/browser/autofill/autofill_browsertest.cc +++ b/chrome/browser/autofill/autofill_browsertest.cc @@ -96,7 +96,7 @@ class WindowedPersonalDataManagerObserver content::NotificationService::AllSources()); } - ~WindowedPersonalDataManagerObserver() { + virtual ~WindowedPersonalDataManagerObserver() { if (!infobar_service_) return; diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc index 0141830..36747ea 100644 --- a/chrome/browser/autofill/autofill_metrics_unittest.cc +++ b/chrome/browser/autofill/autofill_metrics_unittest.cc @@ -190,7 +190,7 @@ class TestAutofillManager : public AutofillManager { set_metric_logger(new MockAutofillMetrics); } - virtual bool IsAutofillEnabled() const { return autofill_enabled_; } + virtual bool IsAutofillEnabled() const OVERRIDE { return autofill_enabled_; } void set_autofill_enabled(bool autofill_enabled) { autofill_enabled_ = autofill_enabled; diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc index c92616e..e7e67f7 100644 --- a/chrome/browser/background/background_contents_service_unittest.cc +++ b/chrome/browser/background/background_contents_service_unittest.cc @@ -26,8 +26,8 @@ class BackgroundContentsServiceTest : public testing::Test { public: BackgroundContentsServiceTest() {} - ~BackgroundContentsServiceTest() {} - void SetUp() { + virtual ~BackgroundContentsServiceTest() {} + virtual void SetUp() { command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); } @@ -75,7 +75,7 @@ class MockBackgroundContents : public BackgroundContents { content::Source<Profile>(profile_), content::Details<BackgroundContents>(this)); } - virtual const GURL& GetURL() const { return url_; } + virtual const GURL& GetURL() const OVERRIDE { return url_; } void MockClose(Profile* profile) { content::NotificationService::current()->Notify( @@ -85,7 +85,7 @@ class MockBackgroundContents : public BackgroundContents { delete this; } - ~MockBackgroundContents() { + virtual ~MockBackgroundContents() { content::NotificationService::current()->Notify( chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED, content::Source<Profile>(profile_), diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc index f160a30..a671f0e 100644 --- a/chrome/browser/background/background_mode_manager_unittest.cc +++ b/chrome/browser/background/background_mode_manager_unittest.cc @@ -20,8 +20,8 @@ class BackgroundModeManagerTest : public testing::Test { public: BackgroundModeManagerTest() : profile_manager_(TestingBrowserProcess::GetGlobal()) {} - ~BackgroundModeManagerTest() {} - void SetUp() { + virtual ~BackgroundModeManagerTest() {} + virtual void SetUp() { command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); ASSERT_TRUE(profile_manager_.SetUp()); } diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc index 7f8b4f5..282141b 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc @@ -129,7 +129,7 @@ class BookmarksObserver : public BookmarksExportObserver { DCHECK(loop); } - virtual void OnExportFinished() { + virtual void OnExportFinished() OVERRIDE { loop_->Quit(); } diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc index 46781e6..59741be 100644 --- a/chrome/browser/bookmarks/bookmark_model_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc @@ -150,7 +150,7 @@ class BookmarkModelTest : public testing::Test, ClearCounts(); } - void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE { + virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE { // We never load from the db, so that this should never get invoked. NOTREACHED(); } diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc index e982fed..6704bc1 100644 --- a/chrome/browser/browser_keyevents_browsertest.cc +++ b/chrome/browser/browser_keyevents_browsertest.cc @@ -108,7 +108,7 @@ class TestFinishObserver : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); content::Details<DomOperationNotificationDetails> dom_op_details(details); // We might receive responses for other script execution, but we only diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc index 0b31e21..4570995 100644 --- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc @@ -149,7 +149,7 @@ class AwaitCompletionHelper : public BrowsingDataRemover::Observer { protected: // BrowsingDataRemover::Observer implementation. - virtual void OnBrowsingDataRemoverDone() { + virtual void OnBrowsingDataRemoverDone() OVERRIDE { Notify(); } @@ -515,7 +515,7 @@ class BrowsingDataRemoverTest : public testing::Test, virtual ~BrowsingDataRemoverTest() { } - void TearDown() { + virtual void TearDown() { // TestingProfile contains a DOMStorageContext. BrowserContext's destructor // posts a message to the WEBKIT thread to delete some of its member // variables. We need to ensure that the profile is destroyed, and that diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index 280a3cf..648f27d 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc @@ -691,9 +691,9 @@ class CaptivePortalObserver : public content::NotificationObserver { private: // Records results and exits the message loop, if needed. - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details); + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Number of times OnPortalResult has been called since construction. int num_results_received_; diff --git a/chrome/browser/captive_portal/captive_portal_service_unittest.cc b/chrome/browser/captive_portal/captive_portal_service_unittest.cc index 5febd62..193ec9b 100644 --- a/chrome/browser/captive_portal/captive_portal_service_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_service_unittest.cc @@ -51,9 +51,9 @@ class CaptivePortalObserver : public content::NotificationObserver { int num_results_received() const { return num_results_received_; } private: - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { ASSERT_EQ(type, chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT); ASSERT_EQ(profile_, content::Source<Profile>(source).ptr()); diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index a91f40d..55077b6 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -566,7 +566,7 @@ class LoadCompleteListener : public content::NotificationObserver { // content::NotificationObserver implementation. virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); startup_metric_utils::OnInitialPageLoadComplete(); delete this; diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc index 8507592..9c712d2 100644 --- a/chrome/browser/chrome_browser_main_posix.cc +++ b/chrome/browser/chrome_browser_main_posix.cc @@ -155,7 +155,7 @@ class ShutdownDetector : public base::PlatformThread::Delegate { public: explicit ShutdownDetector(int shutdown_fd); - virtual void ThreadMain(); + virtual void ThreadMain() OVERRIDE; private: const int shutdown_fd_; diff --git a/chrome/browser/chrome_switches_browsertest.cc b/chrome/browser/chrome_switches_browsertest.cc index 82af672..859b1d6 100644 --- a/chrome/browser/chrome_switches_browsertest.cc +++ b/chrome/browser/chrome_switches_browsertest.cc @@ -16,7 +16,7 @@ class HostRulesTest : public InProcessBrowserTest { protected: HostRulesTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { ASSERT_TRUE(test_server()->Start()); // Map all hosts to our local server. diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.cc b/chrome/browser/component_updater/test/component_updater_service_unittest.cc index 6db95a9..6f6aedd 100644 --- a/chrome/browser/component_updater/test/component_updater_service_unittest.cc +++ b/chrome/browser/component_updater/test/component_updater_service_unittest.cc @@ -170,11 +170,11 @@ class ComponentUpdaterTest : public testing::Test { net::URLFetcher::SetEnableInterceptionForTests(true); } - ~ComponentUpdaterTest() { + virtual ~ComponentUpdaterTest() { net::URLFetcher::SetEnableInterceptionForTests(false); } - void TearDown() { + virtual void TearDown() { xmlCleanupGlobals(); } diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc index f6304a1..9a9c738 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.cc +++ b/chrome/browser/content_settings/content_settings_default_provider.cc @@ -69,11 +69,11 @@ class DefaultRuleIterator : public RuleIterator { value_.reset(value->DeepCopy()); } - bool HasNext() const { + virtual bool HasNext() const OVERRIDE { return value_.get() != NULL; } - Rule Next() { + virtual Rule Next() OVERRIDE { DCHECK(value_.get()); return Rule(ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), diff --git a/chrome/browser/content_settings/content_settings_default_provider_unittest.cc b/chrome/browser/content_settings/content_settings_default_provider_unittest.cc index 9db61172..cb92744 100644 --- a/chrome/browser/content_settings/content_settings_default_provider_unittest.cc +++ b/chrome/browser/content_settings/content_settings_default_provider_unittest.cc @@ -24,7 +24,7 @@ class DefaultProviderTest : public testing::Test { : ui_thread_(BrowserThread::UI, &message_loop_), provider_(profile_.GetPrefs(), false) { } - ~DefaultProviderTest() { + virtual ~DefaultProviderTest() { provider_.ShutdownOnUIThread(); } diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc index eced832..3b2ce7e 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc +++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc @@ -39,7 +39,7 @@ class DeadlockCheckerThread : public base::PlatformThread::Delegate { explicit DeadlockCheckerThread(PrefProvider* provider) : provider_(provider) {} - virtual void ThreadMain() { + virtual void ThreadMain() OVERRIDE { bool got_lock = provider_->lock_.Try(); EXPECT_TRUE(got_lock); if (got_lock) diff --git a/chrome/browser/content_settings/content_settings_rule_unittest.cc b/chrome/browser/content_settings/content_settings_rule_unittest.cc index c6d3816..8bdc967 100644 --- a/chrome/browser/content_settings/content_settings_rule_unittest.cc +++ b/chrome/browser/content_settings/content_settings_rule_unittest.cc @@ -19,11 +19,11 @@ class ListIterator : public RuleIterator { virtual ~ListIterator() {} - virtual bool HasNext() const { + virtual bool HasNext() const OVERRIDE { return !rules_.empty(); } - virtual Rule Next() { + virtual Rule Next() OVERRIDE { EXPECT_FALSE(rules_.empty()); // |front()| returns a reference but we're going to discard the object // referred to; force copying here. diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc index 00623e0..6d12e4d 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc @@ -28,11 +28,11 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { content::ContextMenuParams params) : RenderViewContextMenu(web_contents, params) { } - virtual void PlatformInit() { } - virtual void PlatformCancel() { } + virtual void PlatformInit() OVERRIDE { } + virtual void PlatformCancel() OVERRIDE { } virtual bool GetAcceleratorForCommandId( int command_id, - ui::Accelerator* accelerator) { + ui::Accelerator* accelerator) OVERRIDE { return false; } diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index 5db5eca..72a39f3 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc @@ -70,19 +70,19 @@ class FakeURLRequestJobFactory : public net::URLRequestJobFactory { net::NetworkDelegate* network_delegate) const OVERRIDE { return NULL; } - net::URLRequestJob* MaybeCreateJobWithProtocolHandler( + virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( const std::string& scheme, net::URLRequest* request, net::NetworkDelegate* network_delegate) const OVERRIDE { return NULL; } - net::URLRequestJob* MaybeInterceptRedirect( + virtual net::URLRequestJob* MaybeInterceptRedirect( const GURL& location, net::URLRequest* request, net::NetworkDelegate* network_delegate) const OVERRIDE { return NULL; } - net::URLRequestJob* MaybeInterceptResponse( + virtual net::URLRequestJob* MaybeInterceptResponse( net::URLRequest* request, net::NetworkDelegate* network_delegate) const OVERRIDE { return NULL; @@ -124,31 +124,33 @@ class FakeDelegate : public ProtocolHandlerRegistry::Delegate { public: FakeDelegate() : force_os_failure_(false) {} virtual ~FakeDelegate() { } - virtual void RegisterExternalHandler(const std::string& protocol) { + virtual void RegisterExternalHandler(const std::string& protocol) OVERRIDE { ASSERT_TRUE( registered_protocols_.find(protocol) == registered_protocols_.end()); registered_protocols_.insert(protocol); } - virtual void DeregisterExternalHandler(const std::string& protocol) { + virtual void DeregisterExternalHandler(const std::string& protocol) OVERRIDE { registered_protocols_.erase(protocol); } virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( ShellIntegration::DefaultWebClientObserver* observer, - const std::string& protocol); + const std::string& protocol) OVERRIDE; virtual ProtocolHandlerRegistry::DefaultClientObserver* CreateShellObserver( - ProtocolHandlerRegistry* registry); + ProtocolHandlerRegistry* registry) OVERRIDE; - virtual void RegisterWithOSAsDefaultClient(const std::string& protocol, - ProtocolHandlerRegistry* reg) { + virtual void RegisterWithOSAsDefaultClient( + const std::string& protocol, + ProtocolHandlerRegistry* reg) OVERRIDE { ProtocolHandlerRegistry::Delegate::RegisterWithOSAsDefaultClient(protocol, reg); ASSERT_FALSE(IsFakeRegisteredWithOS(protocol)); } - virtual bool IsExternalHandlerRegistered(const std::string& protocol) { + virtual bool IsExternalHandlerRegistered( + const std::string& protocol) OVERRIDE { return registered_protocols_.find(protocol) != registered_protocols_.end(); } @@ -186,7 +188,7 @@ class FakeClientObserver delegate_(registry_delegate) {} virtual void SetDefaultWebClientUIState( - ShellIntegration::DefaultWebClientUIState state) { + ShellIntegration::DefaultWebClientUIState state) OVERRIDE { ProtocolHandlerRegistry::DefaultClientObserver::SetDefaultWebClientUIState( state); if (state == ShellIntegration::STATE_IS_DEFAULT) { @@ -255,7 +257,7 @@ class NotificationCounter : public content::NotificationObserver { void Clear() { events_ = 0; } virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { ++events_; } @@ -278,7 +280,7 @@ class QueryProtocolHandlerOnChange virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { std::vector<std::string> output; local_registry_->GetRegisteredProtocols(&output); called_ = true; @@ -298,7 +300,7 @@ class QueryProtocolHandlerOnChange class TestMessageLoop : public MessageLoop { public: TestMessageLoop() : MessageLoop(MessageLoop::TYPE_DEFAULT) {} - ~TestMessageLoop() {} + virtual ~TestMessageLoop() {} virtual bool IsType(MessageLoop::Type type) const OVERRIDE { switch (type) { case MessageLoop::TYPE_UI: diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc index c77e5f5..b157f6d 100644 --- a/chrome/browser/devtools/devtools_file_helper.cc +++ b/chrome/browser/devtools/devtools_file_helper.cc @@ -83,18 +83,20 @@ class SelectFileDialog : public ui::SelectFileDialog::Listener, } // ui::SelectFileDialog::Listener implementation. - virtual void FileSelected(const FilePath& path, int index, void* params) { + virtual void FileSelected(const FilePath& path, + int index, + void* params) OVERRIDE { selected_callback_.Run(path); Release(); // Balanced in ::Show. } virtual void MultiFilesSelected(const std::vector<FilePath>& files, - void* params) { + void* params) OVERRIDE { Release(); // Balanced in ::Show. NOTREACHED() << "Should not be able to select multiple files"; } - virtual void FileSelectionCanceled(void* params) { + virtual void FileSelectionCanceled(void* params) OVERRIDE { canceled_callback_.Run(); Release(); // Balanced in ::Show. } diff --git a/chrome/browser/devtools/devtools_sanity_browsertest.cc b/chrome/browser/devtools/devtools_sanity_browsertest.cc index 97162ca..f6eefc0 100644 --- a/chrome/browser/devtools/devtools_sanity_browsertest.cc +++ b/chrome/browser/devtools/devtools_sanity_browsertest.cc @@ -60,7 +60,7 @@ class BrowserClosedObserver : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { MessageLoopForUI::current()->Quit(); } @@ -241,9 +241,9 @@ class DevToolsExtensionTest : public DevToolsSanityTest, return true; } - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { switch (type) { case chrome::NOTIFICATION_EXTENSION_LOADED: case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: @@ -260,7 +260,7 @@ class DevToolsExtensionTest : public DevToolsSanityTest, class DevToolsExperimentalExtensionTest : public DevToolsExtensionTest { public: - void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); } }; diff --git a/chrome/browser/diagnostics/diagnostics_main.cc b/chrome/browser/diagnostics/diagnostics_main.cc index cc6ab83..cb44bc0 100644 --- a/chrome/browser/diagnostics/diagnostics_main.cc +++ b/chrome/browser/diagnostics/diagnostics_main.cc @@ -139,24 +139,24 @@ class PosixConsole : public SimpleConsole { public: PosixConsole() : use_color_(false) { } - virtual bool Init() { + virtual bool Init() OVERRIDE { // Technically, we should also check the terminal capabilities before using // color, but in practice this is unlikely to be an issue. use_color_ = isatty(STDOUT_FILENO); return true; } - virtual bool Write(const std::wstring& text) { + virtual bool Write(const std::wstring& text) OVERRIDE { printf("%s", base::SysWideToNativeMB(text).c_str()); return true; } - virtual void OnQuit() { + virtual void OnQuit() OVERRIDE { // The "press enter to continue" prompt isn't very unixy, so only do that on // Windows. } - virtual bool SetColor(Color color) { + virtual bool SetColor(Color color) OVERRIDE { if (!use_color_) return false; @@ -292,19 +292,21 @@ class TestController : public DiagnosticsModel::Observer { } // Next four are overridden from DiagnosticsModel::Observer. - virtual void OnProgress(int id, int percent, DiagnosticsModel* model) { + virtual void OnProgress(int id, + int percent, + DiagnosticsModel* model) OVERRIDE { } - virtual void OnSkipped(int id, DiagnosticsModel* model) { + virtual void OnSkipped(int id, DiagnosticsModel* model) OVERRIDE { // TODO(cpu): display skipped tests. } - virtual void OnFinished(int id, DiagnosticsModel* model) { + virtual void OnFinished(int id, DiagnosticsModel* model) OVERRIDE { // As each test completes we output the results. ShowResult(&model->GetTest(id)); } - virtual void OnDoneAll(DiagnosticsModel* model) { + virtual void OnDoneAll(DiagnosticsModel* model) OVERRIDE { if (writer_->failures() > 0) { writer_->WriteInfoText(base::StringPrintf( "DONE. %d failure(s)\n\n", writer_->failures())); diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc index 8182514..382bc81 100644 --- a/chrome/browser/diagnostics/diagnostics_model.cc +++ b/chrome/browser/diagnostics/diagnostics_model.cc @@ -35,19 +35,19 @@ class DiagnosticsModelImpl : public DiagnosticsModel { DiagnosticsModelImpl() : tests_run_(0) { } - ~DiagnosticsModelImpl() { + virtual ~DiagnosticsModelImpl() { STLDeleteElements(&tests_); } - virtual int GetTestRunCount() { + virtual int GetTestRunCount() OVERRIDE { return tests_run_; } - virtual int GetTestAvailableCount() { + virtual int GetTestAvailableCount() OVERRIDE { return tests_.size(); } - virtual void RunAll(DiagnosticsModel::Observer* observer) { + virtual void RunAll(DiagnosticsModel::Observer* observer) OVERRIDE { size_t test_count = tests_.size(); for (size_t ix = 0; ix != test_count; ++ix) { bool do_next = RunTest(tests_[ix], observer, ix); @@ -58,7 +58,7 @@ class DiagnosticsModelImpl : public DiagnosticsModel { observer->OnDoneAll(this); } - virtual TestInfo& GetTest(size_t id) { + virtual TestInfo& GetTest(size_t id) OVERRIDE { return *tests_[id]; } diff --git a/chrome/browser/diagnostics/diagnostics_model_unittest.cc b/chrome/browser/diagnostics/diagnostics_model_unittest.cc index 823ef9d..e362cd4 100644 --- a/chrome/browser/diagnostics/diagnostics_model_unittest.cc +++ b/chrome/browser/diagnostics/diagnostics_model_unittest.cc @@ -5,6 +5,7 @@ #include "chrome/browser/diagnostics/diagnostics_model.h" #include "base/command_line.h" +#include "base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" // Basic harness to adquire and release the Diagnostic model object. @@ -40,16 +41,18 @@ class UTObserver: public DiagnosticsModel::Observer { id_of_failed_stop_test(-1) { } - virtual void OnProgress(int id, int percent, DiagnosticsModel* model) { + virtual void OnProgress(int id, + int percent, + DiagnosticsModel* model) OVERRIDE { EXPECT_TRUE(model != NULL); ++progress_called_; } - virtual void OnSkipped(int id, DiagnosticsModel* model) { + virtual void OnSkipped(int id, DiagnosticsModel* model) OVERRIDE { EXPECT_TRUE(model != NULL); } - virtual void OnFinished(int id, DiagnosticsModel* model) { + virtual void OnFinished(int id, DiagnosticsModel* model) OVERRIDE { EXPECT_TRUE(model != NULL); ++finished_; if (model->GetTest(id).GetResult() == DiagnosticsModel::TEST_FAIL_STOP) { @@ -58,7 +61,7 @@ class UTObserver: public DiagnosticsModel::Observer { } } - virtual void OnDoneAll(DiagnosticsModel* model) { + virtual void OnDoneAll(DiagnosticsModel* model) OVERRIDE { done_ = true; EXPECT_TRUE(model != NULL); } diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index 64d9756..2e67f03 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -45,9 +45,9 @@ class OperatingSystemTest : public DiagnosticTest { public: OperatingSystemTest() : DiagnosticTest(ASCIIToUTF16("Operating System")) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { #if defined(OS_WIN) base::win::Version version = base::win::GetVersion(); if ((version < base::win::VERSION_XP) || @@ -75,9 +75,9 @@ class ConflictingDllsTest : public DiagnosticTest { public: ConflictingDllsTest() : DiagnosticTest(ASCIIToUTF16("Conflicting modules")) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { #if defined(OS_WIN) EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); model->set_limited_mode(true); @@ -131,9 +131,9 @@ class InstallTypeTest : public DiagnosticTest { InstallTypeTest() : DiagnosticTest(ASCIIToUTF16("Install Type")), user_level_(false) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { #if defined(OS_WIN) FilePath chrome_exe; if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { @@ -163,9 +163,9 @@ class VersionTest : public DiagnosticTest { public: VersionTest() : DiagnosticTest(ASCIIToUTF16("Browser Version")) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { chrome::VersionInfo version_info; if (!version_info.is_valid()) { RecordFailure(ASCIIToUTF16("No Version")); @@ -223,9 +223,9 @@ class PathTest : public DiagnosticTest { : DiagnosticTest(ASCIIToUTF16(path_info.test_name)), path_info_(path_info) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { if (!g_install_type) { RecordStopFailure(ASCIIToUTF16("dependency failure")); return false; @@ -288,9 +288,9 @@ class DiskSpaceTest : public DiagnosticTest { public: DiskSpaceTest() : DiagnosticTest(ASCIIToUTF16("Disk Space")) {} - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { FilePath data_dir; if (!PathService::Get(chrome::DIR_USER_DATA, &data_dir)) return false; @@ -319,9 +319,9 @@ class JSONTest : public DiagnosticTest { : DiagnosticTest(name), path_(path), max_file_size_(max_file_size) { } - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { if (!file_util::PathExists(path_)) { RecordFailure(ASCIIToUTF16("File not found")); return true; diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc index dc0d07f..3333ee3 100644 --- a/chrome/browser/diagnostics/sqlite_diagnostics.cc +++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc @@ -32,9 +32,9 @@ class SqliteIntegrityTest : public DiagnosticTest { db_path_(profile_relative_db_path) { } - virtual int GetId() { return 0; } + virtual int GetId() OVERRIDE { return 0; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { + virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE { FilePath path = GetUserDefaultProfileDir(); path = path.Append(db_path_); if (!file_util::PathExists(path)) { diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 4744499..da3836e 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -144,15 +144,20 @@ class MockAbortExtensionInstallPrompt : public ExtensionInstallPrompt { } // Simulate a user abort on an extension installation. - virtual void ConfirmInstall(Delegate* delegate, - const Extension* extension, - const ShowDialogCallback& show_dialog_callback) { + virtual void ConfirmInstall( + Delegate* delegate, + const Extension* extension, + const ShowDialogCallback& show_dialog_callback) OVERRIDE { delegate->InstallUIAbort(true); MessageLoopForUI::current()->Quit(); } - virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {} - virtual void OnInstallFailure(const extensions::CrxInstallerError& error) {} + virtual void OnInstallSuccess(const Extension* extension, + SkBitmap* icon) OVERRIDE { + } + virtual void OnInstallFailure( + const extensions::CrxInstallerError& error) OVERRIDE { + } }; // Mock that simulates a permissions dialog where the user allows @@ -164,14 +169,19 @@ class MockAutoConfirmExtensionInstallPrompt : public ExtensionInstallPrompt { : ExtensionInstallPrompt(web_contents) {} // Proceed without confirmation prompt. - virtual void ConfirmInstall(Delegate* delegate, - const Extension* extension, - const ShowDialogCallback& show_dialog_callback) { + virtual void ConfirmInstall( + Delegate* delegate, + const Extension* extension, + const ShowDialogCallback& show_dialog_callback) OVERRIDE { delegate->InstallUIProceed(); } - virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {} - virtual void OnInstallFailure(const extensions::CrxInstallerError& error) {} + virtual void OnInstallSuccess(const Extension* extension, + SkBitmap* icon) OVERRIDE { + } + virtual void OnInstallFailure( + const extensions::CrxInstallerError& error) OVERRIDE { + } }; static DownloadManager* DownloadManagerForBrowser(Browser* browser) { @@ -187,9 +197,9 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { virtual ~TestRenderViewContextMenu() {} private: - virtual void PlatformInit() {} - virtual void PlatformCancel() {} - virtual bool GetAcceleratorForCommandId(int, ui::Accelerator*) { + virtual void PlatformInit() OVERRIDE {} + virtual void PlatformCancel() OVERRIDE {} + virtual bool GetAcceleratorForCommandId(int, ui::Accelerator*) OVERRIDE { return false; } diff --git a/chrome/browser/download/download_request_infobar_delegate_unittest.cc b/chrome/browser/download/download_request_infobar_delegate_unittest.cc index aefeef0..8b73a3f 100644 --- a/chrome/browser/download/download_request_infobar_delegate_unittest.cc +++ b/chrome/browser/download/download_request_infobar_delegate_unittest.cc @@ -16,8 +16,8 @@ class MockTabDownloadState : public DownloadRequestLimiter::TabDownloadState { virtual ~MockTabDownloadState(); // DownloadRequestLimiter::TabDownloadState - virtual void Cancel(); - virtual void Accept(); + virtual void Cancel() OVERRIDE; + virtual void Accept() OVERRIDE; ConfirmInfoBarDelegate* infobar() { return infobar_.get(); } void delete_infobar_delegate() { infobar_.reset(); } diff --git a/chrome/browser/download/download_request_limiter_unittest.cc b/chrome/browser/download/download_request_limiter_unittest.cc index 8e69957..a449af2 100644 --- a/chrome/browser/download/download_request_limiter_unittest.cc +++ b/chrome/browser/download/download_request_limiter_unittest.cc @@ -93,7 +93,7 @@ class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness { DownloadRequestLimiterTest* test) : test_(test) { } - virtual bool ShouldAllowDownload() { + virtual bool ShouldAllowDownload() OVERRIDE { return test_->ShouldAllowDownload(); } diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 272ac27..8b44cdb 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -86,7 +86,7 @@ class DownloadPersistedObserver : public DownloadHistory::Observer { } virtual void OnDownloadStored(DownloadItem* item, - const history::DownloadRow& info) { + const history::DownloadRow& info) OVERRIDE { persisted_ = filter_.Run(item, info); if (persisted_ && waiting_) MessageLoopForUI::current()->Quit(); @@ -123,10 +123,10 @@ class DownloadRemovedObserver : public DownloadPersistedObserver { } virtual void OnDownloadStored(DownloadItem* item, - const history::DownloadRow& info) { + const history::DownloadRow& info) OVERRIDE { } - virtual void OnDownloadsRemoved(const DownloadHistory::IdSet& ids) { + virtual void OnDownloadsRemoved(const DownloadHistory::IdSet& ids) OVERRIDE { removed_ = ids.find(download_id_) != ids.end(); if (removed_ && waiting_) MessageLoopForUI::current()->Quit(); @@ -195,7 +195,7 @@ class DownloadItemCreatedObserver : public DownloadManager::Observer { manager->AddObserver(this); } - ~DownloadItemCreatedObserver() { + virtual ~DownloadItemCreatedObserver() { if (manager_) manager_->RemoveObserver(this); } @@ -284,13 +284,13 @@ class SavePageBrowserTest : public InProcessBrowserTest { virtual ~SavePageBrowserTest(); protected: - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir_)); ASSERT_TRUE(save_dir_.CreateUniqueTempDir()); InProcessBrowserTest::SetUp(); } - void SetUpOnMainThread() OVERRIDE { + virtual void SetUpOnMainThread() OVERRIDE { browser()->profile()->GetPrefs()->SetFilePath( prefs::kDownloadDefaultDirectory, save_dir_.path()); BrowserThread::PostTask( diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc index e0b9e02..a48542e 100644 --- a/chrome/browser/errorpage_browsertest.cc +++ b/chrome/browser/errorpage_browsertest.cc @@ -69,7 +69,7 @@ class ErrorPageTest : public InProcessBrowserTest { } protected: - void SetUpOnMainThread() OVERRIDE { + virtual void SetUpOnMainThread() OVERRIDE { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); diff --git a/chrome/browser/external_extension_browsertest.cc b/chrome/browser/external_extension_browsertest.cc index 65dd884..a724213 100644 --- a/chrome/browser/external_extension_browsertest.cc +++ b/chrome/browser/external_extension_browsertest.cc @@ -34,7 +34,7 @@ class SearchProviderTest : public InProcessBrowserTest { protected: SearchProviderTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { ASSERT_TRUE(test_server()->Start()); // Map all hosts to our local server. diff --git a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc index 7651629..faf5704 100644 --- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc +++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc @@ -46,14 +46,14 @@ class FakeExternalProtocolHandlerDelegate virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( ShellIntegration::DefaultWebClientObserver* observer, - const std::string& protocol) { + const std::string& protocol) OVERRIDE { return new FakeExternalProtocolHandlerWorker(observer, protocol, os_state_); } virtual ExternalProtocolHandler::BlockState GetBlockState( - const std::string& scheme) { return block_state_; } + const std::string& scheme) OVERRIDE { return block_state_; } - virtual void BlockRequest() { + virtual void BlockRequest() OVERRIDE { ASSERT_TRUE(block_state_ == ExternalProtocolHandler::BLOCK || os_state_ == ShellIntegration::IS_DEFAULT); has_blocked_ = true; @@ -61,19 +61,19 @@ class FakeExternalProtocolHandlerDelegate virtual void RunExternalProtocolDialog(const GURL& url, int render_process_host_id, - int routing_id) { + int routing_id) OVERRIDE { ASSERT_EQ(block_state_, ExternalProtocolHandler::UNKNOWN); ASSERT_NE(os_state_, ShellIntegration::IS_DEFAULT); has_prompted_ = true; } - virtual void LaunchUrlWithoutSecurityCheck(const GURL& url) { + virtual void LaunchUrlWithoutSecurityCheck(const GURL& url) OVERRIDE { ASSERT_EQ(block_state_, ExternalProtocolHandler::DONT_BLOCK); ASSERT_NE(os_state_, ShellIntegration::IS_DEFAULT); has_launched_ = true; } - virtual void FinishedProcessingCheck() { + virtual void FinishedProcessingCheck() OVERRIDE { MessageLoop::current()->Quit(); } diff --git a/chrome/browser/fast_shutdown_browsertest.cc b/chrome/browser/fast_shutdown_browsertest.cc index 9b30c42..bab4848 100644 --- a/chrome/browser/fast_shutdown_browsertest.cc +++ b/chrome/browser/fast_shutdown_browsertest.cc @@ -25,7 +25,7 @@ class FastShutdown : public InProcessBrowserTest { FastShutdown() { } - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kDisablePopupBlocking); } diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc index 445c168..d3d3e27 100644 --- a/chrome/browser/favicon/favicon_handler_unittest.cc +++ b/chrome/browser/favicon/favicon_handler_unittest.cc @@ -171,19 +171,19 @@ class TestFaviconHandlerDelegate : public FaviconHandlerDelegate { : web_contents_(web_contents) { } - virtual NavigationEntry* GetActiveEntry() { + virtual NavigationEntry* GetActiveEntry() OVERRIDE { ADD_FAILURE() << "TestFaviconHandlerDelegate::GetActiveEntry() " << "should never be called in tests."; return NULL; } - virtual int StartDownload(const GURL& url, int image_size) { + virtual int StartDownload(const GURL& url, int image_size) OVERRIDE { ADD_FAILURE() << "TestFaviconHandlerDelegate::StartDownload() " << "should never be called in tests."; return -1; } - virtual void NotifyFaviconUpdated() { + virtual void NotifyFaviconUpdated() OVERRIDE { web_contents_->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TAB); } @@ -223,7 +223,7 @@ class TestFaviconHandler : public FaviconHandler { return download_handler_.get(); } - virtual NavigationEntry* GetEntry() { + virtual NavigationEntry* GetEntry() OVERRIDE { return entry_.get(); } diff --git a/chrome/browser/feedback/feedback_util.cc b/chrome/browser/feedback/feedback_util.cc index 27d372e..262b9cd 100644 --- a/chrome/browser/feedback/feedback_util.cc +++ b/chrome/browser/feedback/feedback_util.cc @@ -106,7 +106,7 @@ class FeedbackUtil::PostCleanup : public net::URLFetcherDelegate { post_body_(post_body), previous_delay_(previous_delay) { } // Overridden from net::URLFetcherDelegate. - virtual void OnURLFetchComplete(const net::URLFetcher* source); + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; protected: virtual ~PostCleanup() {} diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index f4a8386..059112d 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -90,7 +90,7 @@ class FirstRunDelayedTasks : public content::NotificationObserver { private: // Private ctor forces it to be created only in the heap. - ~FirstRunDelayedTasks() {} + virtual ~FirstRunDelayedTasks() {} // The extension work is to basically trigger an extension update check. // If the extension specified in the master pref is older than the live diff --git a/chrome/browser/fullscreen_gtk.cc b/chrome/browser/fullscreen_gtk.cc index 93e20ee..2835132 100644 --- a/chrome/browser/fullscreen_gtk.cc +++ b/chrome/browser/fullscreen_gtk.cc @@ -60,7 +60,7 @@ class WindowManagerWindowFinder : public ui::EnumerateWindowsDelegate { XID window() const { return window_; } protected: - virtual bool ShouldStopIterating(XID window) { + virtual bool ShouldStopIterating(XID window) OVERRIDE { if (ui::PropertyExists(window, "WM_STATE")) { window_ = window; return true; @@ -82,7 +82,7 @@ class TopMostWindowFinder : public ui::EnumerateWindowsDelegate { XID top_most_window() const { return top_most_window_; } protected: - virtual bool ShouldStopIterating(XID window) { + virtual bool ShouldStopIterating(XID window) OVERRIDE { if (!ui::IsWindowVisible(window)) return false; if (ui::PropertyExists(window, "WM_STATE")) { diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc index 180e30ae..f7871a86 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc @@ -52,7 +52,7 @@ class ClosedDelegateTracker : public content::NotificationObserver { // content::NotificationObserver: virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; size_t size() const { return removed_infobar_delegates_.size(); diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index d3964f7..a3c4dcd 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -80,7 +80,7 @@ class IFrameLoader : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { if (type == content::NOTIFICATION_LOAD_STOP) { navigation_completed_ = true; } else if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) { @@ -156,7 +156,7 @@ class GeolocationNotificationObserver : public content::NotificationObserver { // content::NotificationObserver virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) { infobar_ = content::Details<InfoBarAddedDetails>(details).ptr(); ASSERT_TRUE(infobar_->GetIcon()); @@ -211,12 +211,12 @@ class GeolocationBrowserTest : public InProcessBrowserTest { started_test_server_(false) {} // InProcessBrowserTest - virtual void SetUpOnMainThread() { + virtual void SetUpOnMainThread() OVERRIDE { ui_test_utils::OverrideGeolocation(fake_latitude_, fake_longitude_); } // InProcessBrowserTest - virtual void TearDownInProcessBrowserTestFixture() { + virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { LOG(WARNING) << "TearDownInProcessBrowserTestFixture. Test Finished."; } diff --git a/chrome/browser/geolocation/geolocation_infobar_queue_controller_unittest.cc b/chrome/browser/geolocation/geolocation_infobar_queue_controller_unittest.cc index 1c2d0df..9449df0 100644 --- a/chrome/browser/geolocation/geolocation_infobar_queue_controller_unittest.cc +++ b/chrome/browser/geolocation/geolocation_infobar_queue_controller_unittest.cc @@ -60,7 +60,7 @@ class ObservationCountingQueueController : // GeolocationInfoBarQueueController virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; static void NotifyPermissionSet(const GeolocationPermissionRequestID& id, const GURL& requesting_frame, diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc index 15bba46..8b511ee 100644 --- a/chrome/browser/google/google_url_tracker_unittest.cc +++ b/chrome/browser/google/google_url_tracker_unittest.cc @@ -73,7 +73,7 @@ class TestNotificationObserver : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; bool notified() const { return notified_; } void clear_notified() { notified_ = false; } diff --git a/chrome/browser/gpu/chrome_gpu_util.cc b/chrome/browser/gpu/chrome_gpu_util.cc index 0d0f6b0b..fccdc45 100644 --- a/chrome/browser/gpu/chrome_gpu_util.cc +++ b/chrome/browser/gpu/chrome_gpu_util.cc @@ -57,7 +57,7 @@ class BrowserMonitor : public chrome::BrowserListObserver { BrowserMonitor() : num_browsers_(0), installed_(false) { } - ~BrowserMonitor() { + virtual ~BrowserMonitor() { } // BrowserListObserver implementation. diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc index 317fd99..836043a 100644 --- a/chrome/browser/history/expire_history_backend.cc +++ b/chrome/browser/history/expire_history_backend.cc @@ -48,7 +48,7 @@ const int kEarlyExpirationAdvanceDays = 3; class AllVisitsReader : public ExpiringVisitsReader { public: virtual bool Read(Time end_time, HistoryDatabase* db, - VisitVector* visits, int max_visits) const { + VisitVector* visits, int max_visits) const OVERRIDE { DCHECK(db) << "must have a database to operate upon"; DCHECK(visits) << "visit vector has to exist in order to populate it"; @@ -68,7 +68,7 @@ class AllVisitsReader : public ExpiringVisitsReader { class AutoSubframeVisitsReader : public ExpiringVisitsReader { public: virtual bool Read(Time end_time, HistoryDatabase* db, - VisitVector* visits, int max_visits) const { + VisitVector* visits, int max_visits) const OVERRIDE { DCHECK(db) << "must have a database to operate upon"; DCHECK(visits) << "visit vector has to exist in order to populate it"; diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc index 5912024..cb18bd9 100644 --- a/chrome/browser/history/expire_history_backend_unittest.cc +++ b/chrome/browser/history/expire_history_backend_unittest.cc @@ -127,7 +127,7 @@ class ExpireHistoryTest : public testing::Test, NotificationList notifications_; private: - void SetUp() { + virtual void SetUp() { ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); FilePath history_name = path().Append(kHistoryFile); @@ -157,7 +157,7 @@ class ExpireHistoryTest : public testing::Test, top_sites_ = profile_.GetTopSites(); } - void TearDown() { + virtual void TearDown() { top_sites_ = NULL; ClearLastNotifications(); @@ -171,8 +171,9 @@ class ExpireHistoryTest : public testing::Test, } // BroadcastNotificationDelegate implementation. - void BroadcastNotifications(int type, - HistoryDetails* details_deleted) { + virtual void BroadcastNotifications( + int type, + HistoryDetails* details_deleted) OVERRIDE { // This gets called when there are notifications to broadcast. Instead, we // store them so we can tell that the correct notifications were sent. notifications_.push_back(std::make_pair(type, details_deleted)); diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc index 29ee9f3..be34d0f 100644 --- a/chrome/browser/history/history_browsertest.cc +++ b/chrome/browser/history/history_browsertest.cc @@ -43,11 +43,11 @@ class WaitForHistoryTask : public HistoryDBTask { WaitForHistoryTask() {} virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) { + history::HistoryDatabase* db) OVERRIDE { return true; } - virtual void DoneRunOnMainThread() { + virtual void DoneRunOnMainThread() OVERRIDE { MessageLoop::current()->Quit(); } diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc index f940743..5449c7f 100644 --- a/chrome/browser/history/history_unittest.cc +++ b/chrome/browser/history/history_unittest.cc @@ -106,7 +106,7 @@ class HistoryBackendDBTest : public HistoryUnitTestBase { HistoryBackendDBTest() : db_(NULL) { } - ~HistoryBackendDBTest() { + virtual ~HistoryBackendDBTest() { } protected: @@ -564,7 +564,7 @@ class HistoryTest : public testing::Test { query_url_success_(false) { } - ~HistoryTest() { + virtual ~HistoryTest() { } void OnSegmentUsageAvailable(CancelableRequestProvider::Handle handle, @@ -1189,11 +1189,12 @@ class HistoryDBTaskImpl : public HistoryDBTask { HistoryDBTaskImpl() : invoke_count(0), done_invoked(false) {} - virtual bool RunOnDBThread(HistoryBackend* backend, HistoryDatabase* db) { + virtual bool RunOnDBThread(HistoryBackend* backend, + HistoryDatabase* db) OVERRIDE { return (++invoke_count == kWantInvokeCount); } - virtual void DoneRunOnMainThread() { + virtual void DoneRunOnMainThread() OVERRIDE { done_invoked = true; MessageLoop::current()->Quit(); } diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc index 3b7e0e68..e0590e3 100644 --- a/chrome/browser/history/in_memory_url_index_unittest.cc +++ b/chrome/browser/history/in_memory_url_index_unittest.cc @@ -385,7 +385,7 @@ void InMemoryURLIndexTest::ExpectPrivateDataEqual( class LimitedInMemoryURLIndexTest : public InMemoryURLIndexTest { protected: - FilePath::StringType TestDBName() const; + virtual FilePath::StringType TestDBName() const OVERRIDE; }; FilePath::StringType LimitedInMemoryURLIndexTest::TestDBName() const { diff --git a/chrome/browser/history/multipart_browsertest.cc b/chrome/browser/history/multipart_browsertest.cc index 2e40265..2c6d0ae7 100644 --- a/chrome/browser/history/multipart_browsertest.cc +++ b/chrome/browser/history/multipart_browsertest.cc @@ -19,8 +19,9 @@ class MultipartResponseTest : public InProcessBrowserTest, MultipartResponseTest() : did_navigate_any_frame_count_(0), update_history_count_(0) {} - void DidNavigateAnyFrame(const content::LoadCommittedDetails& details, - const content::FrameNavigateParams& params) { + virtual void DidNavigateAnyFrame( + const content::LoadCommittedDetails& details, + const content::FrameNavigateParams& params) OVERRIDE { did_navigate_any_frame_count_++; if (params.should_update_history) update_history_count_++; diff --git a/chrome/browser/history/scored_history_match_unittest.cc b/chrome/browser/history/scored_history_match_unittest.cc index 77def64..35d512d 100644 --- a/chrome/browser/history/scored_history_match_unittest.cc +++ b/chrome/browser/history/scored_history_match_unittest.cc @@ -276,7 +276,7 @@ class BookmarkServiceMock : public BookmarkService { virtual ~BookmarkServiceMock() {} // Returns true if the given |url| is the same as |url_|. - bool IsBookmarked(const GURL& url) OVERRIDE; + virtual bool IsBookmarked(const GURL& url) OVERRIDE; // Required but unused. virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE {} diff --git a/chrome/browser/history/shortcuts_backend_unittest.cc b/chrome/browser/history/shortcuts_backend_unittest.cc index 2a5e120..7cf24c4 100644 --- a/chrome/browser/history/shortcuts_backend_unittest.cc +++ b/chrome/browser/history/shortcuts_backend_unittest.cc @@ -33,8 +33,8 @@ class ShortcutsBackendTest : public testing::Test, load_notified_(false), changed_notified_(false) {} - void SetUp(); - void TearDown(); + virtual void SetUp(); + virtual void TearDown(); virtual void OnShortcutsLoaded() OVERRIDE; virtual void OnShortcutsChanged() OVERRIDE; diff --git a/chrome/browser/history/shortcuts_database_unittest.cc b/chrome/browser/history/shortcuts_database_unittest.cc index 23b9049..a46346a 100644 --- a/chrome/browser/history/shortcuts_database_unittest.cc +++ b/chrome/browser/history/shortcuts_database_unittest.cc @@ -42,8 +42,8 @@ struct ShortcutsDatabaseTestInfo { class ShortcutsDatabaseTest : public testing::Test { public: - void SetUp(); - void TearDown(); + virtual void SetUp(); + virtual void TearDown(); void ClearDB(); size_t CountRecords() const; diff --git a/chrome/browser/history/text_database_manager_unittest.cc b/chrome/browser/history/text_database_manager_unittest.cc index 9316729..a14e051 100644 --- a/chrome/browser/history/text_database_manager_unittest.cc +++ b/chrome/browser/history/text_database_manager_unittest.cc @@ -51,11 +51,11 @@ class InMemDB : public URLDatabase, public VisitDatabase { CreateURLTable(false); InitVisitTable(); } - ~InMemDB() { + virtual ~InMemDB() { } private: - virtual sql::Connection& GetDB() { return db_; } + virtual sql::Connection& GetDB() OVERRIDE { return db_; } sql::Connection db_; @@ -157,10 +157,10 @@ class TextDatabaseManagerTest : public testing::Test { } protected: - void SetUp() { + virtual void SetUp() { } - void TearDown() { + virtual void TearDown() { file_util::Delete(dir_, true); } diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc index a25bc78..7161844 100644 --- a/chrome/browser/history/text_database_unittest.cc +++ b/chrome/browser/history/text_database_unittest.cc @@ -88,7 +88,7 @@ class TextDatabaseTest : public PlatformTest { TextDatabaseTest() {} protected: - void SetUp() { + virtual void SetUp() { PlatformTest::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc index 2ba29df..a2524b8 100644 --- a/chrome/browser/history/thumbnail_database_unittest.cc +++ b/chrome/browser/history/thumbnail_database_unittest.cc @@ -55,7 +55,7 @@ class ThumbnailDatabaseTest : public testing::Test { public: ThumbnailDatabaseTest() { } - ~ThumbnailDatabaseTest() { + virtual ~ThumbnailDatabaseTest() { } protected: @@ -89,7 +89,7 @@ class IconMappingMigrationTest : public HistoryUnitTestBase { public: IconMappingMigrationTest() { } - ~IconMappingMigrationTest() { + virtual ~IconMappingMigrationTest() { } protected: diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc index d4d3779..565259d 100644 --- a/chrome/browser/history/top_sites.cc +++ b/chrome/browser/history/top_sites.cc @@ -121,7 +121,7 @@ class LoadThumbnailsFromHistoryTask : public HistoryDBTask { } virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) { + history::HistoryDatabase* db) OVERRIDE { // Get the most visited urls. backend->QueryMostVisitedURLsImpl(result_count_, kDaysOfHistory, @@ -139,7 +139,7 @@ class LoadThumbnailsFromHistoryTask : public HistoryDBTask { return true; } - virtual void DoneRunOnMainThread() { + virtual void DoneRunOnMainThread() OVERRIDE { top_sites_->FinishHistoryMigration(data_); } diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc index ffcc9a1..fa824a8 100644 --- a/chrome/browser/history/top_sites_unittest.cc +++ b/chrome/browser/history/top_sites_unittest.cc @@ -52,11 +52,12 @@ class WaitForHistoryTask : public HistoryDBTask { public: WaitForHistoryTask() {} - virtual bool RunOnDBThread(HistoryBackend* backend, HistoryDatabase* db) { + virtual bool RunOnDBThread(HistoryBackend* backend, + HistoryDatabase* db) OVERRIDE { return true; } - virtual void DoneRunOnMainThread() { + virtual void DoneRunOnMainThread() OVERRIDE { MessageLoop::current()->Quit(); } @@ -362,7 +363,7 @@ class TopSitesMigrationTest : public TopSitesTest { } // Returns true if history and top sites should be created in SetUp. - virtual bool CreateHistoryAndTopSites() { + virtual bool CreateHistoryAndTopSites() OVERRIDE { return false; } diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc index c16ae01..e93536d 100644 --- a/chrome/browser/history/url_database_unittest.cc +++ b/chrome/browser/history/url_database_unittest.cc @@ -41,13 +41,13 @@ class URLDatabaseTest : public testing::Test, protected: // Provided for URL/VisitDatabase. - virtual sql::Connection& GetDB() { + virtual sql::Connection& GetDB() OVERRIDE { return db_; } private: // Test setup. - void SetUp() { + virtual void SetUp() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); FilePath db_file = temp_dir_.path().AppendASCII("URLTest.db"); @@ -59,7 +59,7 @@ class URLDatabaseTest : public testing::Test, InitKeywordSearchTermsTable(); CreateKeywordSearchTermsIndices(); } - void TearDown() { + virtual void TearDown() { db_.Close(); } diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc index 88745cb..caf10dd 100644 --- a/chrome/browser/history/visit_database_unittest.cc +++ b/chrome/browser/history/visit_database_unittest.cc @@ -45,7 +45,7 @@ class VisitDatabaseTest : public PlatformTest, private: // Test setup. - void SetUp() { + virtual void SetUp() { PlatformTest::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); FilePath db_file = temp_dir_.path().AppendASCII("VisitTest.db"); @@ -57,13 +57,13 @@ class VisitDatabaseTest : public PlatformTest, CreateMainURLIndex(); InitVisitTable(); } - void TearDown() { + virtual void TearDown() { db_.Close(); PlatformTest::TearDown(); } // Provided for URL/VisitDatabase. - virtual sql::Connection& GetDB() { + virtual sql::Connection& GetDB() OVERRIDE { return db_; } diff --git a/chrome/browser/history/visit_filter_unittest.cc b/chrome/browser/history/visit_filter_unittest.cc index a3f5aef..bc0b7b2 100644 --- a/chrome/browser/history/visit_filter_unittest.cc +++ b/chrome/browser/history/visit_filter_unittest.cc @@ -28,8 +28,8 @@ class VisitFilterTest : public testing::Test { VisitFilterTest(); protected: - void SetUp(); - void TearDown(); + virtual void SetUp(); + virtual void TearDown(); }; VisitFilterTest::VisitFilterTest() { diff --git a/chrome/browser/importer/firefox_importer_unittest.cc b/chrome/browser/importer/firefox_importer_unittest.cc index c0f0ba1..7ec2f21 100644 --- a/chrome/browser/importer/firefox_importer_unittest.cc +++ b/chrome/browser/importer/firefox_importer_unittest.cc @@ -141,16 +141,16 @@ class FirefoxObserver : public ProfileWriter, EXPECT_EQ(arraysize(kFirefox2Keywords), keyword_count_); } - virtual bool BookmarkModelIsLoaded() const { + virtual bool BookmarkModelIsLoaded() const OVERRIDE { // Profile is ready for writing. return true; } - virtual bool TemplateURLServiceIsLoaded() const { + virtual bool TemplateURLServiceIsLoaded() const OVERRIDE { return true; } - virtual void AddPasswordForm(const content::PasswordForm& form) { + virtual void AddPasswordForm(const content::PasswordForm& form) OVERRIDE { PasswordInfo p = kFirefox2Passwords[password_count_]; EXPECT_EQ(p.origin, form.origin.spec()); EXPECT_EQ(p.realm, form.signon_realm); @@ -164,7 +164,7 @@ class FirefoxObserver : public ProfileWriter, } virtual void AddHistoryPage(const history::URLRows& page, - history::VisitSource visit_source) { + history::VisitSource visit_source) OVERRIDE { ASSERT_EQ(1U, page.size()); EXPECT_EQ("http://en-us.www.mozilla.com/", page[0].url().spec()); EXPECT_EQ(ASCIIToUTF16("Firefox Updated"), page[0].title()); @@ -182,7 +182,7 @@ class FirefoxObserver : public ProfileWriter, } virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, - bool unique_on_host_and_path) { + bool unique_on_host_and_path) OVERRIDE { for (size_t i = 0; i < template_urls.size(); ++i) { // The order might not be deterministic, look in the expected list for // that template URL. @@ -201,11 +201,12 @@ class FirefoxObserver : public ProfileWriter, } } - void AddFavicons(const std::vector<history::ImportedFaviconUsage>& favicons) { + virtual void AddFavicons( + const std::vector<history::ImportedFaviconUsage>& favicons) OVERRIDE { } private: - ~FirefoxObserver() {} + virtual ~FirefoxObserver() {} size_t bookmark_count_; size_t history_count_; @@ -286,16 +287,16 @@ class Firefox3Observer : public ProfileWriter, EXPECT_EQ(arraysize(kFirefox3Keywords), keyword_count_); } - virtual bool BookmarkModelIsLoaded() const { + virtual bool BookmarkModelIsLoaded() const OVERRIDE { // Profile is ready for writing. return true; } - virtual bool TemplateURLServiceIsLoaded() const { + virtual bool TemplateURLServiceIsLoaded() const OVERRIDE { return true; } - virtual void AddPasswordForm(const content::PasswordForm& form) { + virtual void AddPasswordForm(const content::PasswordForm& form) OVERRIDE { PasswordInfo p = kFirefox3Passwords[password_count_]; EXPECT_EQ(p.origin, form.origin.spec()); EXPECT_EQ(p.realm, form.signon_realm); @@ -309,7 +310,7 @@ class Firefox3Observer : public ProfileWriter, } virtual void AddHistoryPage(const history::URLRows& page, - history::VisitSource visit_source) { + history::VisitSource visit_source) OVERRIDE { ASSERT_EQ(3U, page.size()); EXPECT_EQ("http://www.google.com/", page[0].url().spec()); EXPECT_EQ(ASCIIToUTF16("Google"), page[0].title()); @@ -331,8 +332,8 @@ class Firefox3Observer : public ProfileWriter, } } - void AddKeywords(ScopedVector<TemplateURL> template_urls, - bool unique_on_host_and_path) { + virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, + bool unique_on_host_and_path) OVERRIDE { for (size_t i = 0; i < template_urls.size(); ++i) { // The order might not be deterministic, look in the expected list for // that template URL. @@ -351,11 +352,12 @@ class Firefox3Observer : public ProfileWriter, } } - void AddFavicons(const std::vector<history::ImportedFaviconUsage>& favicons) { + virtual void AddFavicons( + const std::vector<history::ImportedFaviconUsage>& favicons) OVERRIDE { } private: - ~Firefox3Observer() {} + virtual ~Firefox3Observer() {} size_t bookmark_count_; size_t history_count_; diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index 3371bc1..5bcf30c 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -35,7 +35,7 @@ class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { // TemplateURLParser::ParameterFilter method. virtual bool KeepParameter(const std::string& key, - const std::string& value) { + const std::string& value) OVERRIDE { std::string low_value = StringToLowerASCII(value); if (low_value.find("mozilla") != std::string::npos || low_value.find("firefox") != std::string::npos || diff --git a/chrome/browser/infobars/infobars_browsertest.cc b/chrome/browser/infobars/infobars_browsertest.cc index f23f60a..e99764b 100644 --- a/chrome/browser/infobars/infobars_browsertest.cc +++ b/chrome/browser/infobars/infobars_browsertest.cc @@ -23,7 +23,7 @@ class InfoBarsTest : public InProcessBrowserTest { public: InfoBarsTest() {} - void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitchASCII( switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); } diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index 7f64072..18f4bdd 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -33,7 +33,7 @@ class InstantLoaderUserData : public base::SupportsUserData::Data { InstantLoader* loader() const { return loader_; } private: - ~InstantLoaderUserData() {} + virtual ~InstantLoaderUserData() {} InstantLoader* const loader_; diff --git a/chrome/browser/intents/native_services_browsertest.cc b/chrome/browser/intents/native_services_browsertest.cc index 0daa02f..55f3dbd 100644 --- a/chrome/browser/intents/native_services_browsertest.cc +++ b/chrome/browser/intents/native_services_browsertest.cc @@ -127,7 +127,7 @@ class TestSelectFileDialogFactory : public ui::SelectFileDialogFactory { public: virtual ui::SelectFileDialog* Create( ui::SelectFileDialog::Listener* listener, - ui::SelectFilePolicy* policy) { + ui::SelectFilePolicy* policy) OVERRIDE { return TestSelectFileDialog::Create(listener, policy); } }; diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc index 5ed96ca..f2663b5 100644 --- a/chrome/browser/intents/web_intents_registry.cc +++ b/chrome/browser/intents/web_intents_registry.cc @@ -175,7 +175,7 @@ class WebIntentsRegistry::QueryAdapter : public WebDataServiceConsumer { registry_->TrackQuery(this); } - void OnWebDataServiceRequestDone( + virtual void OnWebDataServiceRequestDone( WebDataService::Handle h, const WDTypedResult* result) OVERRIDE { diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 38f4da4..e909db1 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -251,7 +251,7 @@ class IOThread::LoggingNetworkChangeObserver net::NetworkChangeNotifier::AddNetworkChangeObserver(this); } - ~LoggingNetworkChangeObserver() { + virtual ~LoggingNetworkChangeObserver() { net::NetworkChangeNotifier::RemoveIPAddressObserver(this); net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc index c588019..b094ec6 100644 --- a/chrome/browser/jankometer.cc +++ b/chrome/browser/jankometer.cc @@ -66,7 +66,7 @@ class JankWatchdog : public base::Watchdog { virtual ~JankWatchdog() {} - virtual void Alarm() { + virtual void Alarm() OVERRIDE { // Put break point here if you want to stop threads and look at what caused // the jankiness. alarm_count_++; @@ -257,7 +257,7 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>, private: friend class base::RefCountedThreadSafe<IOJankObserver>; - ~IOJankObserver() {} + virtual ~IOJankObserver() {} JankObserverHelper helper_; @@ -337,7 +337,7 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>, virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE { } #elif defined(TOOLKIT_GTK) - virtual void WillProcessEvent(GdkEvent* event) { + virtual void WillProcessEvent(GdkEvent* event) OVERRIDE { if (!helper_.MessageWillBeMeasured()) return; // TODO(evanm): we want to set queueing_time_ using @@ -348,7 +348,7 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>, helper_.StartProcessingTimers(queueing_time); } - virtual void DidProcessEvent(GdkEvent* event) { + virtual void DidProcessEvent(GdkEvent* event) OVERRIDE { helper_.EndProcessingTimers(); } #endif @@ -356,7 +356,7 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>, private: friend class base::RefCountedThreadSafe<UIJankObserver>; - ~UIJankObserver() {} + virtual ~UIJankObserver() {} JankObserverHelper helper_; diff --git a/chrome/browser/logging_chrome_browsertest.cc b/chrome/browser/logging_chrome_browsertest.cc index cf155d0..0a809db 100644 --- a/chrome/browser/logging_chrome_browsertest.cc +++ b/chrome/browser/logging_chrome_browsertest.cc @@ -72,7 +72,7 @@ class RendererCrashTest : public InProcessBrowserTest, virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { content::RenderProcessHost::RendererClosedDetails* process_details = content::Details< content::RenderProcessHost::RendererClosedDetails>( diff --git a/chrome/browser/media/chrome_webrtc_browsertest.cc b/chrome/browser/media/chrome_webrtc_browsertest.cc index 8be533c..5265140 100644 --- a/chrome/browser/media/chrome_webrtc_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_browsertest.cc @@ -40,17 +40,17 @@ class WebrtcBrowserTest : public InProcessBrowserTest { public: WebrtcBrowserTest() : peerconnection_server_(0) {} - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { RunPeerConnectionServer(); InProcessBrowserTest::SetUp(); } - void TearDown() OVERRIDE { + virtual void TearDown() OVERRIDE { ShutdownPeerConnectionServer(); InProcessBrowserTest::TearDown(); } - void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { // TODO(phoglund): check that user actually has the requisite devices and // print a nice message if not; otherwise the test just times out which can // be confusing. diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc index 63ab427..3560dc1 100644 --- a/chrome/browser/media_gallery/media_file_system_registry.cc +++ b/chrome/browser/media_gallery/media_file_system_registry.cc @@ -107,7 +107,7 @@ class RPHReferenceManager : public content::NotificationObserver { : no_references_callback_(no_references_callback) { } - ~RPHReferenceManager() { + virtual ~RPHReferenceManager() { Reset(); } diff --git a/chrome/browser/media_gallery/media_gallery_database_unittest.cc b/chrome/browser/media_gallery/media_gallery_database_unittest.cc index fab14e7..a26b86f 100644 --- a/chrome/browser/media_gallery/media_gallery_database_unittest.cc +++ b/chrome/browser/media_gallery/media_gallery_database_unittest.cc @@ -19,13 +19,13 @@ class MediaGalleryDatabaseTest : public testing::Test, MediaGalleryDatabaseTest() { } protected: - virtual sql::Connection& GetDB() { + virtual sql::Connection& GetDB() OVERRIDE { return db_; } private: // Test setup. - void SetUp() { + virtual void SetUp() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); base::FilePath db_file = temp_dir_.path().AppendASCII("MediaGalleryTest.db"); @@ -36,7 +36,7 @@ class MediaGalleryDatabaseTest : public testing::Test, ASSERT_EQ(sql::INIT_OK, InitInternal(&db_)); } - void TearDown() { + virtual void TearDown() { db_.Close(); } diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index be0574e..8858606 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -423,12 +423,12 @@ class MetricsMemoryDetails : public MemoryDetails { explicit MetricsMemoryDetails(const base::Closure& callback) : callback_(callback) {} - virtual void OnDetailsAvailable() { + virtual void OnDetailsAvailable() OVERRIDE { MessageLoop::current()->PostTask(FROM_HERE, callback_); } private: - ~MetricsMemoryDetails() {} + virtual ~MetricsMemoryDetails() {} base::Closure callback_; DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index c0b7616..043dfce 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -812,7 +812,7 @@ class StartupWatchDogThread : public base::Watchdog { // Alarm is called if the time expires after an Arm() without someone calling // Disarm(). When Alarm goes off, in release mode we get the crash dump // without crashing and in debug mode we break into the debugger. - virtual void Alarm() { + virtual void Alarm() OVERRIDE { #ifndef NDEBUG DCHECK(false); #else @@ -836,7 +836,7 @@ class ShutdownWatchDogThread : public base::Watchdog { // Alarm is called if the time expires after an Arm() without someone calling // Disarm(). We crash the browser if this method is called. - virtual void Alarm() { + virtual void Alarm() OVERRIDE { CHECK(false); } diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc index d39e23c..c5e1ad6 100644 --- a/chrome/browser/metrics/thread_watcher_unittest.cc +++ b/chrome/browser/metrics/thread_watcher_unittest.cc @@ -117,32 +117,32 @@ class CustomThreadWatcher : public ThreadWatcher { return old_state; } - void ActivateThreadWatching() { + virtual void ActivateThreadWatching() OVERRIDE { State old_state = UpdateState(ACTIVATED); EXPECT_EQ(old_state, INITIALIZED); ThreadWatcher::ActivateThreadWatching(); } - void DeActivateThreadWatching() { + virtual void DeActivateThreadWatching() OVERRIDE { State old_state = UpdateState(DEACTIVATED); EXPECT_TRUE(old_state == ACTIVATED || old_state == SENT_PING || old_state == RECEIVED_PONG); ThreadWatcher::DeActivateThreadWatching(); } - void PostPingMessage() { + virtual void PostPingMessage() OVERRIDE { State old_state = UpdateState(SENT_PING); EXPECT_TRUE(old_state == ACTIVATED || old_state == RECEIVED_PONG); ThreadWatcher::PostPingMessage(); } - void OnPongMessage(uint64 ping_sequence_number) { + virtual void OnPongMessage(uint64 ping_sequence_number) OVERRIDE { State old_state = UpdateState(RECEIVED_PONG); EXPECT_TRUE(old_state == SENT_PING || old_state == DEACTIVATED); ThreadWatcher::OnPongMessage(ping_sequence_number); } - void OnCheckResponsiveness(uint64 ping_sequence_number) { + virtual void OnCheckResponsiveness(uint64 ping_sequence_number) OVERRIDE { ThreadWatcher::OnCheckResponsiveness(ping_sequence_number); { base::AutoLock auto_lock(custom_lock_); @@ -297,7 +297,7 @@ class ThreadWatcherTest : public ::testing::Test { } } - ~ThreadWatcherTest() { + virtual ~ThreadWatcherTest() { ThreadWatcherList::DeleteAll(); io_watcher_ = NULL; webkit_watcher_ = NULL; diff --git a/chrome/browser/metrics/variations/resource_request_allowed_notifier_unittest.cc b/chrome/browser/metrics/variations/resource_request_allowed_notifier_unittest.cc index ba8800f..f75f59d 100644 --- a/chrome/browser/metrics/variations/resource_request_allowed_notifier_unittest.cc +++ b/chrome/browser/metrics/variations/resource_request_allowed_notifier_unittest.cc @@ -56,7 +56,7 @@ class ResourceRequestAllowedNotifierTest #endif resource_request_allowed_notifier_.Init(this); } - ~ResourceRequestAllowedNotifierTest() { } + virtual ~ResourceRequestAllowedNotifierTest() { } bool was_notified() const { return was_notified_; } diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 0b27350..e81eeda 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -385,7 +385,7 @@ class NaClProcessHost::NaClGdbWatchDelegate fd_write_(fd_write), reply_(reply) {} - ~NaClGdbWatchDelegate() { + virtual ~NaClGdbWatchDelegate() { if (HANDLE_EINTR(close(fd_read_)) != 0) DLOG(ERROR) << "close(fd_read_) failed"; if (HANDLE_EINTR(close(fd_write_)) != 0) diff --git a/chrome/browser/nacl_host/nacl_validation_cache_unittest.cc b/chrome/browser/nacl_host/nacl_validation_cache_unittest.cc index 2b1cdd6..43f425d 100644 --- a/chrome/browser/nacl_host/nacl_validation_cache_unittest.cc +++ b/chrome/browser/nacl_host/nacl_validation_cache_unittest.cc @@ -20,7 +20,7 @@ class NaClValidationCacheTest : public ::testing::Test { NaClValidationCache cache1; NaClValidationCache cache2; - void SetUp() { + virtual void SetUp() { // The compiler chokes if std::string(key1) is passed directly as an arg. std::string key(key1); cache1.SetValidationCacheKey(key); diff --git a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc index e4109c2..9be03c0 100644 --- a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc +++ b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc @@ -17,7 +17,7 @@ class NaClGdbDebugStubTest : public PPAPINaClNewlibTest { NaClGdbDebugStubTest() { } - void SetUpCommandLine(CommandLine* command_line) OVERRIDE; + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; void StartTestScript(base::ProcessHandle* test_process, std::string test_name, int debug_stub_port); diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc index 579e4cd..22e6d23 100644 --- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc +++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc @@ -22,7 +22,7 @@ class NaClGdbTest : public PPAPINaClNewlibTest { NaClGdbTest() { } - void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { PPAPINaClNewlibTest::SetUpCommandLine(command_line); FilePath mock_nacl_gdb; diff --git a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc index d7bebeb..7494f69 100644 --- a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc +++ b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc @@ -144,7 +144,7 @@ class MockReporter : public ChromeFraudulentCertificateReporter { virtual void SendReport( const std::string& hostname, const net::SSLInfo& ssl_info, - bool sni_available) { + bool sni_available) OVERRIDE { DCHECK(!hostname.empty()); DCHECK(ssl_info.is_valid()); ChromeFraudulentCertificateReporter::SendReport(hostname, ssl_info, diff --git a/chrome/browser/net/chrome_net_log_unittest.cc b/chrome/browser/net/chrome_net_log_unittest.cc index 4f89f7d..83beb08 100644 --- a/chrome/browser/net/chrome_net_log_unittest.cc +++ b/chrome/browser/net/chrome_net_log_unittest.cc @@ -17,7 +17,7 @@ class CountingObserver : public net::NetLog::ThreadSafeObserver { public: CountingObserver() : count_(0) {} - ~CountingObserver() { + virtual ~CountingObserver() { if (net_log()) net_log()->RemoveThreadSafeObserver(this); } @@ -76,7 +76,7 @@ class ChromeNetLogTestThread : public base::SimpleThread { class AddEventsTestThread : public ChromeNetLogTestThread { public: AddEventsTestThread() {} - ~AddEventsTestThread() {} + virtual ~AddEventsTestThread() {} private: virtual void RunTestThread() OVERRIDE { @@ -92,7 +92,7 @@ class AddRemoveObserverTestThread : public ChromeNetLogTestThread { public: AddRemoveObserverTestThread() {} - ~AddRemoveObserverTestThread() { + virtual ~AddRemoveObserverTestThread() { EXPECT_TRUE(!observer_.net_log()); } diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc index 5707a5d..55714c0 100644 --- a/chrome/browser/net/connection_tester.cc +++ b/chrome/browser/net/connection_tester.cc @@ -321,8 +321,9 @@ class ConnectionTester::TestRunner : public net::URLRequest::Delegate { void Run(const Experiment& experiment); // Overridden from net::URLRequest::Delegate: - virtual void OnResponseStarted(net::URLRequest* request); - virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); + virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; + virtual void OnReadCompleted(net::URLRequest* request, + int bytes_read) OVERRIDE; // TODO(eroman): handle cases requiring authentication. private: diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc index 5dd61c1..308e511 100644 --- a/chrome/browser/net/connection_tester_unittest.cc +++ b/chrome/browser/net/connection_tester_unittest.cc @@ -37,22 +37,22 @@ class ConnectionTesterDelegate : public ConnectionTester::Delegate { completed_connection_test_suite_count_(0) { } - virtual void OnStartConnectionTestSuite() { + virtual void OnStartConnectionTestSuite() OVERRIDE { start_connection_test_suite_count_++; } virtual void OnStartConnectionTestExperiment( - const ConnectionTester::Experiment& experiment) { + const ConnectionTester::Experiment& experiment) OVERRIDE { start_connection_test_experiment_count_++; } virtual void OnCompletedConnectionTestExperiment( const ConnectionTester::Experiment& experiment, - int result) { + int result) OVERRIDE { completed_connection_test_experiment_count_++; } - virtual void OnCompletedConnectionTestSuite() { + virtual void OnCompletedConnectionTestSuite() OVERRIDE { completed_connection_test_suite_count_++; MessageLoop::current()->Quit(); } diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc index 34a2491..a51630f 100644 --- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc +++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc @@ -44,16 +44,18 @@ class TestProxyConfigService : public net::ProxyConfigService { } private: - virtual void AddObserver(net::ProxyConfigService::Observer* observer) { + virtual void AddObserver( + net::ProxyConfigService::Observer* observer) OVERRIDE { observers_.AddObserver(observer); } - virtual void RemoveObserver(net::ProxyConfigService::Observer* observer) { + virtual void RemoveObserver( + net::ProxyConfigService::Observer* observer) OVERRIDE { observers_.RemoveObserver(observer); } virtual net::ProxyConfigService::ConfigAvailability GetLatestProxyConfig( - net::ProxyConfig* config) { + net::ProxyConfig* config) OVERRIDE { *config = config_; return availability_; } diff --git a/chrome/browser/net/ssl_config_service_manager_pref.cc b/chrome/browser/net/ssl_config_service_manager_pref.cc index db0d009..3e8718e 100644 --- a/chrome/browser/net/ssl_config_service_manager_pref.cc +++ b/chrome/browser/net/ssl_config_service_manager_pref.cc @@ -109,7 +109,7 @@ class SSLConfigServicePref : public net::SSLConfigService { SSLConfigServicePref() {} // Store SSL config settings in |config|. Must only be called from IO thread. - virtual void GetSSLConfig(net::SSLConfig* config); + virtual void GetSSLConfig(net::SSLConfig* config) OVERRIDE; private: // Allow the pref watcher to update our internal state. @@ -152,7 +152,7 @@ class SSLConfigServiceManagerPref // Register local_state SSL preferences. static void RegisterPrefs(PrefRegistrySimple* registry); - virtual net::SSLConfigService* Get(); + virtual net::SSLConfigService* Get() OVERRIDE; private: // Callback for preference changes. This will post the changes to the IO diff --git a/chrome/browser/net/transport_security_persister_unittest.cc b/chrome/browser/net/transport_security_persister_unittest.cc index 79e7f54..81edf7d 100644 --- a/chrome/browser/net/transport_security_persister_unittest.cc +++ b/chrome/browser/net/transport_security_persister_unittest.cc @@ -26,7 +26,7 @@ class TransportSecurityPersisterTest : public testing::Test { test_io_thread_(content::BrowserThread::IO, &message_loop_) { } - ~TransportSecurityPersisterTest() { + virtual ~TransportSecurityPersisterTest() { message_loop_.RunUntilIdle(); } diff --git a/chrome/browser/page_cycler/page_cycler_browsertest.cc b/chrome/browser/page_cycler/page_cycler_browsertest.cc index eead9fd..15f9ad1 100644 --- a/chrome/browser/page_cycler/page_cycler_browsertest.cc +++ b/chrome/browser/page_cycler/page_cycler_browsertest.cc @@ -109,7 +109,7 @@ class PageCyclerBrowserTest : public content::NotificationObserver, // content::NotificationObserver. virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { switch (type) { case chrome::NOTIFICATION_BROWSER_CLOSED: MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc index cb0ec28..f07555f 100644 --- a/chrome/browser/password_manager/password_store_x_unittest.cc +++ b/chrome/browser/password_manager/password_store_x_unittest.cc @@ -100,56 +100,63 @@ class DBThreadObserverHelper class FailingBackend : public PasswordStoreX::NativeBackend { public: - virtual bool Init() { return true; } + virtual bool Init() OVERRIDE { return true; } - virtual bool AddLogin(const PasswordForm& form) { return false; } - virtual bool UpdateLogin(const PasswordForm& form) { return false; } - virtual bool RemoveLogin(const PasswordForm& form) { return false; } + virtual bool AddLogin(const PasswordForm& form) OVERRIDE { return false; } + virtual bool UpdateLogin(const PasswordForm& form) OVERRIDE { return false; } + virtual bool RemoveLogin(const PasswordForm& form) OVERRIDE { return false; } - virtual bool RemoveLoginsCreatedBetween(const base::Time& delete_begin, - const base::Time& delete_end) { + virtual bool RemoveLoginsCreatedBetween( + const base::Time& delete_begin, + const base::Time& delete_end) OVERRIDE { return false; } - virtual bool GetLogins(const PasswordForm& form, PasswordFormList* forms) { + virtual bool GetLogins(const PasswordForm& form, + PasswordFormList* forms) OVERRIDE { return false; } virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, const base::Time& get_end, - PasswordFormList* forms) { + PasswordFormList* forms) OVERRIDE { return false; } - virtual bool GetAutofillableLogins(PasswordFormList* forms) { return false; } - virtual bool GetBlacklistLogins(PasswordFormList* forms) { return false; } + virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE { + return false; + } + virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE { + return false; + } }; class MockBackend : public PasswordStoreX::NativeBackend { public: - virtual bool Init() { return true; } + virtual bool Init() OVERRIDE { return true; } - virtual bool AddLogin(const PasswordForm& form) { + virtual bool AddLogin(const PasswordForm& form) OVERRIDE { all_forms_.push_back(form); return true; } - virtual bool UpdateLogin(const PasswordForm& form) { + virtual bool UpdateLogin(const PasswordForm& form) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (CompareForms(all_forms_[i], form, true)) all_forms_[i] = form; return true; } - virtual bool RemoveLogin(const PasswordForm& form) { + virtual bool RemoveLogin(const PasswordForm& form) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (CompareForms(all_forms_[i], form, false)) erase(i--); return true; } - virtual bool RemoveLoginsCreatedBetween(const base::Time& delete_begin, - const base::Time& delete_end) { + virtual bool RemoveLoginsCreatedBetween( + const base::Time& delete_begin, + const base::Time& delete_end) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) { if (delete_begin <= all_forms_[i].date_created && (delete_end.is_null() || all_forms_[i].date_created < delete_end)) @@ -158,7 +165,8 @@ class MockBackend : public PasswordStoreX::NativeBackend { return true; } - virtual bool GetLogins(const PasswordForm& form, PasswordFormList* forms) { + virtual bool GetLogins(const PasswordForm& form, + PasswordFormList* forms) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (all_forms_[i].signon_realm == form.signon_realm) forms->push_back(new PasswordForm(all_forms_[i])); @@ -167,7 +175,7 @@ class MockBackend : public PasswordStoreX::NativeBackend { virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, const base::Time& get_end, - PasswordFormList* forms) { + PasswordFormList* forms) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (get_begin <= all_forms_[i].date_created && (get_end.is_null() || all_forms_[i].date_created < get_end)) @@ -175,14 +183,14 @@ class MockBackend : public PasswordStoreX::NativeBackend { return true; } - virtual bool GetAutofillableLogins(PasswordFormList* forms) { + virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (!all_forms_[i].blacklisted_by_user) forms->push_back(new PasswordForm(all_forms_[i])); return true; } - virtual bool GetBlacklistLogins(PasswordFormList* forms) { + virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE { for (size_t i = 0; i < all_forms_.size(); ++i) if (all_forms_[i].blacklisted_by_user) forms->push_back(new PasswordForm(all_forms_[i])); diff --git a/chrome/browser/performance_monitor/database_unittest.cc b/chrome/browser/performance_monitor/database_unittest.cc index 71b4690..100a435 100644 --- a/chrome/browser/performance_monitor/database_unittest.cc +++ b/chrome/browser/performance_monitor/database_unittest.cc @@ -90,7 +90,7 @@ class TestingClock : public Database::Clock { : counter_(other.counter_) { } virtual ~TestingClock() {} - base::Time GetTime() { + virtual base::Time GetTime() OVERRIDE { return base::Time::FromInternalValue(++counter_); } private: @@ -107,7 +107,7 @@ class PerformanceMonitorDatabaseEventTest : public ::testing::Test { db_->set_clock(scoped_ptr<Database::Clock>(clock_)); } - void SetUp() { + virtual void SetUp() { ASSERT_TRUE(db_.get()); PopulateDB(); } @@ -160,7 +160,7 @@ class PerformanceMonitorDatabaseMetricTest : public ::testing::Test { activity_ = std::string("A"); } - void SetUp() { + virtual void SetUp() { ASSERT_TRUE(db_.get()); PopulateDB(); } diff --git a/chrome/browser/policy/config_dir_policy_loader_unittest.cc b/chrome/browser/policy/config_dir_policy_loader_unittest.cc index 835aabe..d4a0c2e 100644 --- a/chrome/browser/policy/config_dir_policy_loader_unittest.cc +++ b/chrome/browser/policy/config_dir_policy_loader_unittest.cc @@ -170,7 +170,7 @@ INSTANTIATE_TEST_CASE_P( // Some tests that exercise special functionality in ConfigDirPolicyLoader. class ConfigDirPolicyLoaderTest : public PolicyTestBase { protected: - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { PolicyTestBase::SetUp(); harness_.SetUp(); } diff --git a/chrome/browser/policy/device_management_service_browsertest.cc b/chrome/browser/policy/device_management_service_browsertest.cc index 4826f63..50b54cb 100644 --- a/chrome/browser/policy/device_management_service_browsertest.cc +++ b/chrome/browser/policy/device_management_service_browsertest.cc @@ -54,7 +54,7 @@ class CannedResponseInterceptor { class Delegate : public net::URLRequestJobFactory::ProtocolHandler { public: explicit Delegate(const GURL& service_url) : service_url_(service_url) {} - ~Delegate() {} + virtual ~Delegate() {} void Register() { net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( diff --git a/chrome/browser/policy/device_status_collector_browsertest.cc b/chrome/browser/policy/device_status_collector_browsertest.cc index fc2ae01..d95b55b 100644 --- a/chrome/browser/policy/device_status_collector_browsertest.cc +++ b/chrome/browser/policy/device_status_collector_browsertest.cc @@ -160,7 +160,7 @@ class DeviceStatusCollectorTest : public testing::Test { RestartStatusCollector(); } - ~DeviceStatusCollectorTest() { + virtual ~DeviceStatusCollectorTest() { // Finish pending tasks. content::BrowserThread::GetBlockingPool()->FlushForTesting(); message_loop_.RunUntilIdle(); diff --git a/chrome/browser/policy/proxy_policy_provider_unittest.cc b/chrome/browser/policy/proxy_policy_provider_unittest.cc index e8de15f..099678e 100644 --- a/chrome/browser/policy/proxy_policy_provider_unittest.cc +++ b/chrome/browser/policy/proxy_policy_provider_unittest.cc @@ -20,7 +20,7 @@ class ProxyPolicyProviderTest : public testing::Test { proxy_provider_.AddObserver(&observer_); } - ~ProxyPolicyProviderTest() { + virtual ~ProxyPolicyProviderTest() { proxy_provider_.RemoveObserver(&observer_); proxy_provider_.Shutdown(); mock_provider_.Shutdown(); diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc index 2f50c47..ae4ff2a 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc +++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc @@ -90,13 +90,13 @@ class AutocompleteActionPredictorTest : public testing::Test { predictor_(new AutocompleteActionPredictor(profile_.get())) { } - ~AutocompleteActionPredictorTest() { + virtual ~AutocompleteActionPredictorTest() { predictor_.reset(NULL); profile_.reset(NULL); loop_.RunUntilIdle(); } - void SetUp() { + virtual void SetUp() { CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kPrerenderFromOmnibox, switches::kPrerenderFromOmniboxSwitchValueEnabled); @@ -110,7 +110,7 @@ class AutocompleteActionPredictorTest : public testing::Test { ASSERT_TRUE(db_id_cache()->empty()); } - void TearDown() { + virtual void TearDown() { profile_->DestroyHistoryService(); predictor_->Shutdown(); } diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc index b12a308..891b70c 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc +++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc @@ -74,9 +74,9 @@ class MockResourcePrefetchPredictorTables class ResourcePrefetchPredictorTest : public testing::Test { public: ResourcePrefetchPredictorTest(); - ~ResourcePrefetchPredictorTest(); - void SetUp() OVERRIDE; - void TearDown() OVERRIDE; + virtual ~ResourcePrefetchPredictorTest(); + virtual void SetUp() OVERRIDE; + virtual void TearDown() OVERRIDE; protected: void AddUrlToHistory(const std::string& url, int visit_count) { diff --git a/chrome/browser/predictors/resource_prefetcher_unittest.cc b/chrome/browser/predictors/resource_prefetcher_unittest.cc index e2c3a88..9d5ef5a 100644 --- a/chrome/browser/predictors/resource_prefetcher_unittest.cc +++ b/chrome/browser/predictors/resource_prefetcher_unittest.cc @@ -74,7 +74,7 @@ class TestResourcePrefetcherDelegate : public ResourcePrefetcher::Delegate { class ResourcePrefetcherTest : public testing::Test { public: ResourcePrefetcherTest(); - ~ResourcePrefetcherTest(); + virtual ~ResourcePrefetcherTest(); protected: typedef ResourcePrefetcher::Request Request; diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc index 9950316..5f44b0a 100644 --- a/chrome/browser/prefs/pref_service.cc +++ b/chrome/browser/prefs/pref_service.cc @@ -30,7 +30,7 @@ class ReadErrorHandler : public PersistentPrefStore::ReadErrorDelegate { ReadErrorHandler(base::Callback<void(PersistentPrefStore::PrefReadError)> cb) : callback_(cb) {} - virtual void OnError(PersistentPrefStore::PrefReadError error) { + virtual void OnError(PersistentPrefStore::PrefReadError error) OVERRIDE { callback_.Run(error); } diff --git a/chrome/browser/prefs/scoped_user_pref_update_unittest.cc b/chrome/browser/prefs/scoped_user_pref_update_unittest.cc index 05e9c84..e248819 100644 --- a/chrome/browser/prefs/scoped_user_pref_update_unittest.cc +++ b/chrome/browser/prefs/scoped_user_pref_update_unittest.cc @@ -15,7 +15,7 @@ using testing::Mock; class ScopedUserPrefUpdateTest : public testing::Test { public: ScopedUserPrefUpdateTest() : observer_(&prefs_) {} - ~ScopedUserPrefUpdateTest() {} + virtual ~ScopedUserPrefUpdateTest() {} protected: virtual void SetUp() { diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc index 10019ed..418b465 100644 --- a/chrome/browser/prerender/prerender_browsertest.cc +++ b/chrome/browser/prerender/prerender_browsertest.cc @@ -528,7 +528,7 @@ class FakeSafeBrowsingService : public SafeBrowsingService { protected: virtual ~FakeSafeBrowsingService() { } - virtual SafeBrowsingDatabaseManager* CreateDatabaseManager() { + virtual SafeBrowsingDatabaseManager* CreateDatabaseManager() OVERRIDE { fake_database_manager_ = new FakeSafeBrowsingDatabaseManager(this); return fake_database_manager_; } diff --git a/chrome/browser/prerender/prerender_unittest.cc b/chrome/browser/prerender/prerender_unittest.cc index 7d05f49..a8f56cb 100644 --- a/chrome/browser/prerender/prerender_unittest.cc +++ b/chrome/browser/prerender/prerender_unittest.cc @@ -290,7 +290,7 @@ class PrerenderTest : public testing::Test { switches::kPrerenderFromOmniboxSwitchValueEnabled); } - ~PrerenderTest() { + virtual ~PrerenderTest() { prerender_link_manager_->OnChannelClosing(kDefaultChildId); prerender_link_manager_->Shutdown(); prerender_manager_->Shutdown(); 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 b7b969b..58bda54 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 @@ -169,7 +169,7 @@ class TestCloudPrintProxyService : public CloudPrintProxyService { explicit TestCloudPrintProxyService(Profile* profile) : CloudPrintProxyService(profile) { } - virtual ServiceProcessControl* GetServiceProcessControl() { + virtual 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 321cc4d..fc488bb 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 @@ -80,7 +80,9 @@ void ShutdownTask() { class TestStartupClientChannelListener : public IPC::Listener { public: - virtual bool OnMessageReceived(const IPC::Message& message) { return false; } + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { + return false; + } }; } // namespace @@ -283,7 +285,7 @@ class CloudPrintProxyPolicyStartupTest : public base::MultiProcessTest, public IPC::Listener { public: CloudPrintProxyPolicyStartupTest(); - ~CloudPrintProxyPolicyStartupTest(); + virtual ~CloudPrintProxyPolicyStartupTest(); virtual void SetUp(); base::MessageLoopProxy* IOMessageLoopProxy() { @@ -295,8 +297,10 @@ class CloudPrintProxyPolicyStartupTest : public base::MultiProcessTest, void ShutdownAndWaitForExitWithTimeout(base::ProcessHandle handle); // IPC::Listener implementation - virtual bool OnMessageReceived(const IPC::Message& message) { return false; } - virtual void OnChannelConnected(int32 peer_pid); + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { + return false; + } + virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; // MultiProcessTest implementation. virtual CommandLine MakeCmdLine(const std::string& procname, diff --git a/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc b/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc index 50bdd75..a4d1c56 100644 --- a/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc +++ b/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc @@ -78,7 +78,7 @@ class SimpleTestJob : public net::URLRequestTestJob { TestData::GetInstance()->GetTestData(), true) {} - virtual void GetResponseInfo(net::HttpResponseInfo* info) { + virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE { net::URLRequestTestJob::GetResponseInfo(info); if (request_->url().SchemeIsSecure()) { // Make up a fake certificate for this response since we don't have @@ -98,7 +98,7 @@ class SimpleTestJob : public net::URLRequestTestJob { } private: - ~SimpleTestJob() {} + virtual ~SimpleTestJob() {} }; class TestController { @@ -159,7 +159,7 @@ class PrintDialogCloudTest : public InProcessBrowserTest { public: AutoQuitDelegate() {} - virtual void OnResponseCompleted(net::URLRequest* request) { + virtual void OnResponseCompleted(net::URLRequest* request) OVERRIDE { BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure()); } diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc index b9d5f47..f42a729 100644 --- a/chrome/browser/printing/print_job_unittest.cc +++ b/chrome/browser/printing/print_job_unittest.cc @@ -31,12 +31,13 @@ class TestPrintJobWorker : public printing::PrintJobWorker { class TestOwner : public printing::PrintJobWorkerOwner { public: - virtual void GetSettingsDone(const printing::PrintSettings& new_settings, - printing::PrintingContext::Result result) { + virtual void GetSettingsDone( + const printing::PrintSettings& new_settings, + printing::PrintingContext::Result result) OVERRIDE { EXPECT_FALSE(true); } virtual printing::PrintJobWorker* DetachWorker( - printing::PrintJobWorkerOwner* new_owner) { + 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. TestPrintJobWorker* worker(new TestPrintJobWorker(new_owner)); @@ -45,14 +46,14 @@ class TestOwner : public printing::PrintJobWorkerOwner { settings_ = worker->printing_context()->settings(); return worker; } - virtual MessageLoop* message_loop() { + virtual MessageLoop* message_loop() OVERRIDE { EXPECT_FALSE(true); return NULL; } - virtual const printing::PrintSettings& settings() const { + virtual const printing::PrintSettings& settings() const OVERRIDE { return settings_; } - virtual int cookie() const { + virtual int cookie() const OVERRIDE { return 42; } @@ -67,7 +68,7 @@ class TestPrintJob : public printing::PrintJob { explicit TestPrintJob(volatile bool* check) : check_(check) { } private: - ~TestPrintJob() { + virtual ~TestPrintJob() { *check_ = true; } volatile bool* check_; @@ -78,7 +79,7 @@ class TestPrintNotifObserv : public content::NotificationObserver { // content::NotificationObserver virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { ADD_FAILURE(); } }; diff --git a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc index b231d103..71d9628 100644 --- a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc +++ b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc @@ -24,7 +24,7 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest { PrintPreviewDialogControllerBrowserTest() {} virtual ~PrintPreviewDialogControllerBrowserTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { #if !defined(GOOGLE_CHROME_BUILD) command_line->AppendSwitch(switches::kEnablePrintPreview); #endif diff --git a/chrome/browser/process_singleton_browsertest.cc b/chrome/browser/process_singleton_browsertest.cc index 556a4bab..9ba9c03 100644 --- a/chrome/browser/process_singleton_browsertest.cc +++ b/chrome/browser/process_singleton_browsertest.cc @@ -138,7 +138,7 @@ class ProcessSingletonTest : public InProcessBrowserTest { EXPECT_TRUE(temp_profile_dir_.CreateUniqueTempDir()); } - void SetUp() { + virtual void SetUp() { // Start the threads and create the starters. for (size_t i = 0; i < kNbThreads; ++i) { chrome_starter_threads_[i].reset(new base::Thread("ChromeStarter")); @@ -148,7 +148,7 @@ class ProcessSingletonTest : public InProcessBrowserTest { } } - void TearDown() { + virtual void TearDown() { // Stop the threads. for (size_t i = 0; i < kNbThreads; ++i) chrome_starter_threads_[i]->Stop(); @@ -168,7 +168,7 @@ class ProcessSingletonTest : public InProcessBrowserTest { explicit ProcessTreeFilter(base::ProcessId parent_pid) { ancestor_pids_.insert(parent_pid); } - virtual bool Includes(const base::ProcessEntry & entry) const { + virtual bool Includes(const base::ProcessEntry & entry) const OVERRIDE { if (ancestor_pids_.find(entry.parent_pid()) != ancestor_pids_.end()) { ancestor_pids_.insert(entry.pid()); return true; diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc index 583f4bf..3ad97d9 100644 --- a/chrome/browser/process_singleton_linux.cc +++ b/chrome/browser/process_singleton_linux.cc @@ -435,8 +435,8 @@ class ProcessSingleton::LinuxWatcher } // MessageLoopForIO::Watcher impl. - virtual void OnFileCanReadWithoutBlocking(int fd); - virtual void OnFileCanWriteWithoutBlocking(int fd) { + virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; + virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { // SocketReader only watches for accept (read) events. NOTREACHED(); } @@ -494,14 +494,14 @@ class ProcessSingleton::LinuxWatcher SocketReader* reader); // MessageLoopForIO::Watcher impl. These run on the IO thread. - virtual void OnFileCanReadWithoutBlocking(int fd); - virtual void OnFileCanWriteWithoutBlocking(int fd) { + virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; + virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { // ProcessSingleton only watches for accept (read) events. NOTREACHED(); } // MessageLoop::DestructionObserver - virtual void WillDestroyCurrentMessageLoop() { + virtual void WillDestroyCurrentMessageLoop() OVERRIDE { fd_watcher_.StopWatchingFileDescriptor(); } diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc index af37bd2..ce72d61 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl.cc +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc @@ -454,7 +454,7 @@ class GuestSessionProfile : public OffTheRecordProfileImpl { : OffTheRecordProfileImpl(real_profile) { } - virtual void InitChromeOSPreferences() { + virtual void InitChromeOSPreferences() OVERRIDE { chromeos_preferences_.reset(new chromeos::Preferences()); chromeos_preferences_->Init(GetPrefs()); } diff --git a/chrome/browser/profiles/profile_dependency_manager_unittest.cc b/chrome/browser/profiles/profile_dependency_manager_unittest.cc index 3a113ea..2537adc 100644 --- a/chrome/browser/profiles/profile_dependency_manager_unittest.cc +++ b/chrome/browser/profiles/profile_dependency_manager_unittest.cc @@ -42,12 +42,12 @@ class TestService : public ProfileKeyedServiceFactory { } virtual ProfileKeyedService* BuildServiceInstanceFor( - Profile* profile) const { + Profile* profile) const OVERRIDE { ADD_FAILURE() << "This isn't part of the tests!"; return NULL; } - virtual void ProfileShutdown(Profile* profile) { + virtual void ProfileShutdown(Profile* profile) OVERRIDE { fill_on_shutdown_->push_back(name_); } diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index 0f8e06c..37b24d5 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc @@ -107,7 +107,7 @@ class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { virtual void OnCookieChanged( const net::CanonicalCookie& cookie, bool removed, - net::CookieMonster::Delegate::ChangeCause cause) { + net::CookieMonster::Delegate::ChangeCause cause) OVERRIDE { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&ChromeCookieMonsterDelegate::OnCookieChangedAsyncHelper, diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc index 7d7daa2..5aad785 100644 --- a/chrome/browser/safe_browsing/malware_details.cc +++ b/chrome/browser/safe_browsing/malware_details.cc @@ -39,10 +39,10 @@ MalwareDetailsFactory* MalwareDetails::factory_ = NULL; class MalwareDetailsFactoryImpl : public MalwareDetailsFactory { public: - MalwareDetails* CreateMalwareDetails( + virtual MalwareDetails* CreateMalwareDetails( SafeBrowsingUIManager* ui_manager, WebContents* web_contents, - const SafeBrowsingUIManager::UnsafeResource& unsafe_resource) { + const SafeBrowsingUIManager::UnsafeResource& unsafe_resource) OVERRIDE { return new MalwareDetails(ui_manager, web_contents, unsafe_resource); } diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc index 302ad11..cf54beb 100644 --- a/chrome/browser/safe_browsing/malware_details_unittest.cc +++ b/chrome/browser/safe_browsing/malware_details_unittest.cc @@ -154,7 +154,8 @@ class MockSafeBrowsingUIManager : public SafeBrowsingUIManager { : SafeBrowsingUIManager(NULL) {} // When the MalwareDetails is done, this is called. - virtual void SendSerializedMalwareDetails(const std::string& serialized) { + virtual void SendSerializedMalwareDetails( + const std::string& serialized) OVERRIDE { DVLOG(1) << "SendSerializedMalwareDetails"; // Notify WaitForSerializedReport. BrowserThread::PostTask(BrowserThread::IO, diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index 02f6272..2918edb 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc @@ -124,10 +124,11 @@ static base::LazyInstance<SafeBrowsingBlockingPage::UnsafeResourceMap> class SafeBrowsingBlockingPageFactoryImpl : public SafeBrowsingBlockingPageFactory { public: - SafeBrowsingBlockingPage* CreateSafeBrowsingPage( + virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( SafeBrowsingUIManager* ui_manager, WebContents* web_contents, - const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) { + const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) + OVERRIDE { // Only do the trial if the interstitial is for a single malware or // phishing resource, the multi-threat interstitial has not been updated to // V2 yet. diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc index cd7d950..940ae06 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc @@ -58,7 +58,7 @@ class FakeSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager { // Otherwise it returns false, and "client" is called asynchronously with the // result when it is ready. // Overrides SafeBrowsingDatabaseManager::CheckBrowseUrl. - virtual bool CheckBrowseUrl(const GURL& gurl, Client* client) { + virtual bool CheckBrowseUrl(const GURL& gurl, Client* client) OVERRIDE { if (badurls[gurl.spec()] == SB_THREAT_TYPE_SAFE) return true; @@ -97,7 +97,8 @@ class FakeSafeBrowsingUIManager : public SafeBrowsingUIManager { SafeBrowsingUIManager(service) { } // Overrides SafeBrowsingUIManager - virtual void SendSerializedMalwareDetails(const std::string& serialized) { + virtual void SendSerializedMalwareDetails( + const std::string& serialized) OVERRIDE { reports_.push_back(serialized); // Notify the UI thread that we got a report. BrowserThread::PostTask( @@ -265,7 +266,7 @@ class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPageV2 { malware_details_proceed_delay_ms_ = 100; } - ~TestSafeBrowsingBlockingPage() { + virtual ~TestSafeBrowsingBlockingPage() { if (!wait_for_delete_) return; @@ -287,7 +288,7 @@ class TestSafeBrowsingBlockingPageFactory : public SafeBrowsingBlockingPageFactory { public: TestSafeBrowsingBlockingPageFactory() { } - ~TestSafeBrowsingBlockingPageFactory() { } + virtual ~TestSafeBrowsingBlockingPageFactory() { } virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( SafeBrowsingUIManager* delegate, diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc index f960d35..21b3999 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc @@ -69,7 +69,8 @@ class TestSafeBrowsingUIManager: public SafeBrowsingUIManager { : SafeBrowsingUIManager(service) { } - virtual void SendSerializedMalwareDetails(const std::string& serialized) { + virtual void SendSerializedMalwareDetails( + const std::string& serialized) OVERRIDE { details_.push_back(serialized); } @@ -87,12 +88,13 @@ class TestSafeBrowsingBlockingPageFactory : public SafeBrowsingBlockingPageFactory { public: TestSafeBrowsingBlockingPageFactory() { } - ~TestSafeBrowsingBlockingPageFactory() { } + virtual ~TestSafeBrowsingBlockingPageFactory() { } virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( SafeBrowsingUIManager* manager, WebContents* web_contents, - const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) { + const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) + OVERRIDE { // TODO(mattm): remove this when SafeBrowsingBlockingPageV2 supports // multi-threat warnings. if (unsafe_resources.size() == 1 && diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc index e74528a..8dd2f55 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database.cc @@ -314,7 +314,7 @@ class SafeBrowsingDatabaseFactoryImpl : public SafeBrowsingDatabaseFactory { bool enable_download_protection, bool enable_client_side_whitelist, bool enable_download_whitelist, - bool enable_extension_blacklist) { + bool enable_extension_blacklist) OVERRIDE { return new SafeBrowsingDatabaseNew( new SafeBrowsingStoreFile, enable_download_protection ? new SafeBrowsingStoreFile : NULL, diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index fdb291c..ad0bfd3 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -130,7 +130,7 @@ SafeBrowsingServiceFactory* SafeBrowsingService::factory_ = NULL; // don't leak it. class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory { public: - virtual SafeBrowsingService* CreateSafeBrowsingService() { + virtual SafeBrowsingService* CreateSafeBrowsingService() OVERRIDE { return new SafeBrowsingService(); } diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc index 2a373e9..8c1edca 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc @@ -70,10 +70,10 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase { virtual ~TestSafeBrowsingDatabase() {} // Initializes the database with the given filename. - virtual void Init(const FilePath& filename) {} + virtual void Init(const FilePath& filename) OVERRIDE {} // Deletes the current database and creates a new one. - virtual bool ResetDatabase() { + virtual bool ResetDatabase() OVERRIDE { badurls_.clear(); return true; } @@ -85,14 +85,15 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase { std::string* matching_list, std::vector<SBPrefix>* prefix_hits, std::vector<SBFullHashResult>* full_hits, - base::Time last_update) { + base::Time last_update) OVERRIDE { std::vector<GURL> urls(1, url); return ContainsUrl(safe_browsing_util::kMalwareList, safe_browsing_util::kPhishingList, urls, prefix_hits, full_hits); } - virtual bool ContainsDownloadUrl(const std::vector<GURL>& urls, - std::vector<SBPrefix>* prefix_hits) { + virtual bool ContainsDownloadUrl( + const std::vector<GURL>& urls, + std::vector<SBPrefix>* prefix_hits) OVERRIDE { std::vector<SBFullHashResult> full_hits; bool found = ContainsUrl(safe_browsing_util::kBinUrlList, safe_browsing_util::kBinHashList, @@ -102,16 +103,17 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase { DCHECK_LE(1U, prefix_hits->size()); return true; } - virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix) { + virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix) OVERRIDE { return download_digest_prefix_.count(prefix) > 0; } - virtual bool ContainsCsdWhitelistedUrl(const GURL& url) { + virtual bool ContainsCsdWhitelistedUrl(const GURL& url) OVERRIDE { return true; } - virtual bool ContainsDownloadWhitelistedString(const std::string& str) { + virtual bool ContainsDownloadWhitelistedString( + const std::string& str) OVERRIDE { return true; } - virtual bool ContainsDownloadWhitelistedUrl(const GURL& url) { + virtual bool ContainsDownloadWhitelistedUrl(const GURL& url) OVERRIDE { return true; } virtual bool ContainsExtensionPrefixes( @@ -119,22 +121,23 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase { std::vector<SBPrefix>* prefix_hits) OVERRIDE { return true; } - virtual bool UpdateStarted(std::vector<SBListChunkRanges>* lists) { + virtual bool UpdateStarted(std::vector<SBListChunkRanges>* lists) OVERRIDE { ADD_FAILURE() << "Not implemented."; return false; } virtual void InsertChunks(const std::string& list_name, - const SBChunkList& chunks) { + const SBChunkList& chunks) OVERRIDE { ADD_FAILURE() << "Not implemented."; } - virtual void DeleteChunks(const std::vector<SBChunkDelete>& chunk_deletes) { + virtual void DeleteChunks( + const std::vector<SBChunkDelete>& chunk_deletes) OVERRIDE { ADD_FAILURE() << "Not implemented."; } - virtual void UpdateFinished(bool update_succeeded) { + virtual void UpdateFinished(bool update_succeeded) OVERRIDE { ADD_FAILURE() << "Not implemented."; } virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes, - const std::vector<SBFullHashResult>& full_hits) { + const std::vector<SBFullHashResult>& full_hits) OVERRIDE { // Do nothing for the cache. } @@ -203,7 +206,7 @@ class TestSafeBrowsingDatabaseFactory : public SafeBrowsingDatabaseFactory { bool enable_download_protection, bool enable_client_side_whitelist, bool enable_download_whitelist, - bool enable_extension_blacklist) { + bool enable_extension_blacklist) OVERRIDE { db_ = new TestSafeBrowsingDatabase(); return db_; } @@ -226,7 +229,7 @@ class TestProtocolManager : public SafeBrowsingProtocolManager { create_count_++; } - ~TestProtocolManager() { + virtual ~TestProtocolManager() { delete_count_++; } @@ -869,7 +872,7 @@ class SafeBrowsingDatabaseManagerCookieTest : public InProcessBrowserTest { public: SafeBrowsingDatabaseManagerCookieTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { // We need to start the test server to get the host&port in the url. ASSERT_TRUE(test_server()->Start()); @@ -885,7 +888,7 @@ class SafeBrowsingDatabaseManagerCookieTest : public InProcessBrowserTest { command_line->AppendSwitchASCII(switches::kSbURLPrefix, url_prefix.spec()); } - virtual bool SetUpUserDataDirectory() { + virtual bool SetUpUserDataDirectory() OVERRIDE { FilePath cookie_path(SafeBrowsingService::GetCookieFilePathForTesting()); EXPECT_FALSE(file_util::PathExists(cookie_path)); @@ -930,7 +933,7 @@ class SafeBrowsingDatabaseManagerCookieTest : public InProcessBrowserTest { return InProcessBrowserTest::SetUpUserDataDirectory(); } - virtual void TearDownInProcessBrowserTestFixture() { + virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); sql::Connection db; @@ -950,12 +953,12 @@ class SafeBrowsingDatabaseManagerCookieTest : public InProcessBrowserTest { EXPECT_FALSE(smt.Step()); } - virtual void SetUpOnMainThread() { + virtual void SetUpOnMainThread() OVERRIDE { sb_service_ = g_browser_process->safe_browsing_service(); ASSERT_TRUE(sb_service_ != NULL); } - virtual void CleanUpOnMainThread() { + virtual void CleanUpOnMainThread() OVERRIDE { sb_service_ = NULL; } diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index d0d6d46..6f5098a 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -401,7 +401,7 @@ class SafeBrowsingServerTestHelper } // Callback for URLFetcher. - virtual void OnURLFetchComplete(const net::URLFetcher* source) { + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { source->GetResponseAsString(&response_data_); response_status_ = source->GetStatus().status(); StopUILoop(); diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc index f75e110..a77921a 100644 --- a/chrome/browser/search_engines/search_provider_install_data.cc +++ b/chrome/browser/search_engines/search_provider_install_data.cc @@ -105,7 +105,7 @@ class GoogleURLObserver : public content::NotificationObserver { // Implementation of content::NotificationObserver. virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; private: virtual ~GoogleURLObserver() {} diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc index 63ae8cc..ce73e21 100644 --- a/chrome/browser/search_engines/template_url_fetcher.cc +++ b/chrome/browser/search_engines/template_url_fetcher.cc @@ -44,12 +44,12 @@ class TemplateURLFetcher::RequestDelegate // content::NotificationObserver: virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; // net::URLFetcherDelegate: // If data contains a valid OSDD, a TemplateURL is created and added to // the TemplateURLService. - virtual void OnURLFetchComplete(const net::URLFetcher* source); + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // URL of the OSDD. GURL url() const { return osdd_url_; } diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc index 4cc4ed2..e792840 100644 --- a/chrome/browser/search_engines/template_url_parser_unittest.cc +++ b/chrome/browser/search_engines/template_url_parser_unittest.cc @@ -18,7 +18,7 @@ class ParamFilterImpl : public TemplateURLParser::ParameterFilter { public: ParamFilterImpl(std::string name_str, std::string value_str); - ~ParamFilterImpl(); + virtual ~ParamFilterImpl(); virtual bool KeepParameter(const std::string& key, const std::string& value) OVERRIDE; @@ -50,7 +50,7 @@ bool ParamFilterImpl::KeepParameter(const std::string& key, class TemplateURLParserTest : public testing::Test { protected: TemplateURLParserTest(); - ~TemplateURLParserTest(); + virtual ~TemplateURLParserTest(); virtual void SetUp() OVERRIDE; diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc index 9b79e54..64c519f 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -103,7 +103,7 @@ class TestingTemplateURLService : public TemplateURLService { protected: virtual void SetKeywordSearchTermsForURL(const TemplateURL* t_url, const GURL& url, - const string16& term) { + const string16& term) OVERRIDE { search_term_ = term; } diff --git a/chrome/browser/service/service_process_control_browsertest.cc b/chrome/browser/service/service_process_control_browsertest.cc index 451ccd4..4c5bb8d 100644 --- a/chrome/browser/service/service_process_control_browsertest.cc +++ b/chrome/browser/service/service_process_control_browsertest.cc @@ -19,7 +19,7 @@ class ServiceProcessControlBrowserTest ServiceProcessControlBrowserTest() : service_process_handle_(base::kNullProcessHandle) { } - ~ServiceProcessControlBrowserTest() { + virtual ~ServiceProcessControlBrowserTest() { base::CloseProcessHandle(service_process_handle_); service_process_handle_ = base::kNullProcessHandle; } diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc index cef949f..007f543 100644 --- a/chrome/browser/sessions/better_session_restore_browsertest.cc +++ b/chrome/browser/sessions/better_session_restore_browsertest.cc @@ -365,7 +365,7 @@ IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PostWithPassword) { class RestartTest : public BetterSessionRestoreTest { public: RestartTest() { } - ~RestartTest() { } + virtual ~RestartTest() { } protected: void Restart() { // Simluate restarting the browser, but let the test exit peacefully. diff --git a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc index e323866..c39742a 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc @@ -46,7 +46,7 @@ class PersistentTabRestoreTimeFactory : public TabRestoreService::TimeFactory { virtual ~PersistentTabRestoreTimeFactory() {} - virtual base::Time TimeNow() { + virtual base::Time TimeNow() OVERRIDE { return time_; } @@ -65,7 +65,7 @@ class PersistentTabRestoreServiceTest : public ChromeRenderViewHostTestHarness { " (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19"; } - ~PersistentTabRestoreServiceTest() { + virtual ~PersistentTabRestoreServiceTest() { } protected: diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index d248a6a..ba25a03 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -649,7 +649,7 @@ class SessionRestoreImpl : public content::NotificationObserver { DCHECK(synchronous_); } - ~SessionRestoreImpl() { + virtual ~SessionRestoreImpl() { STLDeleteElements(&windows_); active_session_restorers->erase(this); @@ -663,7 +663,7 @@ class SessionRestoreImpl : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { switch (type) { case chrome::NOTIFICATION_BROWSER_CLOSED: delete this; diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc index d638b76..b4529fb 100644 --- a/chrome/browser/sessions/session_service_unittest.cc +++ b/chrome/browser/sessions/session_service_unittest.cc @@ -61,9 +61,9 @@ class SessionServiceTest : public BrowserWithTestWindowTest, } // Upon notification, increment the sync_save_count variable - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED); sync_save_count_++; } diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index 8dbb3e7..13b28ef 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -41,7 +41,7 @@ class MockEnvironment : public base::Environment { variables_[name] = value; } - virtual bool GetVar(const char* variable_name, std::string* result) { + virtual bool GetVar(const char* variable_name, std::string* result) OVERRIDE { if (ContainsKey(variables_, variable_name)) { *result = variables_[variable_name]; return true; @@ -50,12 +50,13 @@ class MockEnvironment : public base::Environment { return false; } - virtual bool SetVar(const char* variable_name, const std::string& new_value) { + virtual bool SetVar(const char* variable_name, + const std::string& new_value) OVERRIDE { ADD_FAILURE(); return false; } - virtual bool UnSetVar(const char* variable_name) { + virtual bool UnSetVar(const char* variable_name) OVERRIDE { ADD_FAILURE(); return false; } diff --git a/chrome/browser/signin/signin_global_error_unittest.cc b/chrome/browser/signin/signin_global_error_unittest.cc index 01728c4..b0f28b7 100644 --- a/chrome/browser/signin/signin_global_error_unittest.cc +++ b/chrome/browser/signin/signin_global_error_unittest.cc @@ -17,7 +17,7 @@ class SigninGlobalErrorTest : public testing::Test { public: - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { // Create a signed-in profile. profile_.reset(new TestingProfile()); diff --git a/chrome/browser/speech/speech_recognition_bubble_browsertest.cc b/chrome/browser/speech/speech_recognition_bubble_browsertest.cc index f211846..edc5160 100644 --- a/chrome/browser/speech/speech_recognition_bubble_browsertest.cc +++ b/chrome/browser/speech/speech_recognition_bubble_browsertest.cc @@ -14,9 +14,10 @@ class SpeechRecognitionBubbleTest : public SpeechRecognitionBubbleDelegate, public InProcessBrowserTest { public: // SpeechRecognitionBubble::Delegate methods. - virtual void InfoBubbleButtonClicked(SpeechRecognitionBubble::Button button) { + virtual void InfoBubbleButtonClicked( + SpeechRecognitionBubble::Button button) OVERRIDE { } - virtual void InfoBubbleFocusChanged() {} + virtual void InfoBubbleFocusChanged() OVERRIDE {} protected: }; diff --git a/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc b/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc index 91312be..1311630 100644 --- a/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc +++ b/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc @@ -63,10 +63,10 @@ class MockSpeechRecognitionBubble : public SpeechRecognitionBubbleBase { return type_; } - virtual void Show() {} - virtual void Hide() {} - virtual void UpdateLayout() {} - virtual void UpdateImage() {} + virtual void Show() OVERRIDE {} + virtual void Hide() OVERRIDE {} + virtual void UpdateLayout() OVERRIDE {} + virtual void UpdateImage() OVERRIDE {} private: static BubbleType type_; @@ -89,13 +89,14 @@ class SpeechRecognitionBubbleControllerTest test_fixture_ = this; } - ~SpeechRecognitionBubbleControllerTest() { + virtual ~SpeechRecognitionBubbleControllerTest() { test_fixture_ = NULL; } // SpeechRecognitionBubbleControllerDelegate methods. - virtual void InfoBubbleButtonClicked(int session_id, - SpeechRecognitionBubble::Button button) { + virtual void InfoBubbleButtonClicked( + int session_id, + SpeechRecognitionBubble::Button button) OVERRIDE { VLOG(1) << "Received InfoBubbleButtonClicked for button " << button; EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (button == SpeechRecognitionBubble::BUTTON_CANCEL) { @@ -106,7 +107,7 @@ class SpeechRecognitionBubbleControllerTest message_loop()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); } - virtual void InfoBubbleFocusChanged(int session_id) { + virtual void InfoBubbleFocusChanged(int session_id) OVERRIDE { VLOG(1) << "Received InfoBubbleFocusChanged"; EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); focus_changed_ = true; diff --git a/chrome/browser/speech/tts_controller_unittest.cc b/chrome/browser/speech/tts_controller_unittest.cc index 5fc945f..98e7f7b 100644 --- a/chrome/browser/speech/tts_controller_unittest.cc +++ b/chrome/browser/speech/tts_controller_unittest.cc @@ -17,21 +17,21 @@ class DummyTtsPlatformImpl : public TtsPlatformImpl { public: DummyTtsPlatformImpl() {} virtual ~DummyTtsPlatformImpl() {} - virtual bool PlatformImplAvailable() { return true; } + virtual bool PlatformImplAvailable() OVERRIDE { return true; } virtual bool Speak( int utterance_id, const std::string& utterance, const std::string& lang, - const UtteranceContinuousParameters& params) { + const UtteranceContinuousParameters& params) OVERRIDE { return true; } - virtual bool IsSpeaking() { return false; } - virtual bool StopSpeaking() { return true; } - virtual bool SendsEvent(TtsEventType event_type) { return false; } - virtual std::string gender() { return std::string(); } - virtual std::string error() { return std::string(); } - virtual void clear_error() {} - virtual void set_error(const std::string& error) {} + virtual bool IsSpeaking() OVERRIDE { return false; } + virtual bool StopSpeaking() OVERRIDE { return true; } + virtual bool SendsEvent(TtsEventType event_type) OVERRIDE { return false; } + virtual std::string gender() OVERRIDE { return std::string(); } + virtual std::string error() OVERRIDE { return std::string(); } + virtual void clear_error() OVERRIDE {} + virtual void set_error(const std::string& error) OVERRIDE {} }; // Subclass of TtsController with a public ctor and dtor. diff --git a/chrome/browser/speech/tts_extension_loader_chromeos.cc b/chrome/browser/speech/tts_extension_loader_chromeos.cc index 7a0f49c..38b6799 100644 --- a/chrome/browser/speech/tts_extension_loader_chromeos.cc +++ b/chrome/browser/speech/tts_extension_loader_chromeos.cc @@ -39,15 +39,15 @@ class TtsExtensionLoaderChromeOsFactory : public ProfileKeyedServiceFactory { ProfileDependencyManager::GetInstance()) {} - ~TtsExtensionLoaderChromeOsFactory() {} + virtual ~TtsExtensionLoaderChromeOsFactory() {} - bool ServiceRedirectedInIncognito() const OVERRIDE { + virtual bool ServiceRedirectedInIncognito() const OVERRIDE { // If given an incognito profile (including the Chrome OS login // profile), share the service with the original profile. return true; } - ProfileKeyedService* BuildServiceInstanceFor(Profile* profile) const + virtual ProfileKeyedService* BuildServiceInstanceFor(Profile* profile) const OVERRIDE { return new TtsExtensionLoaderChromeOs(profile); } diff --git a/chrome/browser/speech/tts_linux.cc b/chrome/browser/speech/tts_linux.cc index 2113d36..0a3d849 100644 --- a/chrome/browser/speech/tts_linux.cc +++ b/chrome/browser/speech/tts_linux.cc @@ -21,15 +21,15 @@ const char kNotSupportedError[] = class TtsPlatformImplLinux : public TtsPlatformImpl { public: - virtual bool PlatformImplAvailable(); + virtual bool PlatformImplAvailable() OVERRIDE; virtual bool Speak( int utterance_id, const std::string& utterance, const std::string& lang, - const UtteranceContinuousParameters& params); - virtual bool StopSpeaking(); - virtual bool IsSpeaking(); - virtual bool SendsEvent(TtsEventType event_type); + const UtteranceContinuousParameters& params) OVERRIDE; + virtual bool StopSpeaking() OVERRIDE; + virtual bool IsSpeaking() OVERRIDE; + virtual bool SendsEvent(TtsEventType event_type) OVERRIDE; void OnSpeechEvent(SPDNotificationType type); // Get the single instance of this class. diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc index 60ed3d5..49851b1 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc @@ -57,13 +57,13 @@ class SpellcheckCustomDictionaryTest : public testing::Test { profile_(new TestingProfile) { } - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { // Use SetTestingFactoryAndUse to force creation and initialization. SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse( profile_.get(), &BuildSpellcheckService); } - void TearDown() OVERRIDE { + virtual void TearDown() OVERRIDE { MessageLoop::current()->RunUntilIdle(); } diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc index 18491d8..5b2e6dc 100644 --- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc @@ -29,13 +29,13 @@ class SpellcheckServiceTest : public testing::Test { profile_(new TestingProfile()) { } - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { // Use SetTestingFactoryAndUse to force creation and initialization. SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse( profile_.get(), &BuildSpellcheckService); } - void TearDown() OVERRIDE { + virtual void TearDown() OVERRIDE { MessageLoop::current()->RunUntilIdle(); } diff --git a/chrome/browser/spellchecker/spelling_service_client_unittest.cc b/chrome/browser/spellchecker/spelling_service_client_unittest.cc index 405dc8b..54bba5c 100644 --- a/chrome/browser/spellchecker/spelling_service_client_unittest.cc +++ b/chrome/browser/spellchecker/spelling_service_client_unittest.cc @@ -162,7 +162,7 @@ class TestingSpellingServiceClient : public SpellingServiceClient { } private: - virtual net::URLFetcher* CreateURLFetcher(const GURL& url) { + virtual net::URLFetcher* CreateURLFetcher(const GURL& url) OVERRIDE { EXPECT_EQ("https://www.googleapis.com/rpc", url.spec()); fetcher_ = new TestSpellingURLFetcher(0, url, this, request_type_, request_text_, @@ -189,7 +189,7 @@ class SpellingServiceClientTest : public testing::Test { SpellingServiceClientTest() {} virtual ~SpellingServiceClientTest() {} - void SetUp() OVERRIDE { + virtual void SetUp() OVERRIDE { } void OnTextCheckComplete(int tag, diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index 843e70d..db6a24d 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -71,7 +71,7 @@ class ProvisionalLoadWaiter : public content::WebContentsObserver { content::RunMessageLoop(); } - void DidFailProvisionalLoad( + virtual void DidFailProvisionalLoad( int64 frame_id, bool is_main_frame, const GURL& validated_url, @@ -106,7 +106,7 @@ class SSLUITest : public InProcessBrowserTest { SSLOptions(SSLOptions::CERT_EXPIRED), net::GetWebSocketTestDataDirectory()) {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { // Browser will both run and display insecure content. command_line->AppendSwitch(switches::kAllowRunningInsecureContent); // Use process-per-site so that navigating to a same-site page in a @@ -311,7 +311,7 @@ class SSLUITestBlock : public SSLUITest { SSLUITestBlock() : SSLUITest() {} // Browser will neither run nor display insecure content. - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kNoDisplayingInsecureContent); } }; diff --git a/chrome/browser/ssl/ssl_tab_helper.cc b/chrome/browser/ssl/ssl_tab_helper.cc index ca76dec..1835621 100644 --- a/chrome/browser/ssl/ssl_tab_helper.cc +++ b/chrome/browser/ssl/ssl_tab_helper.cc @@ -144,7 +144,7 @@ class SSLTabHelper::SSLAddCertData // content::NotificationObserver: virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); + const content::NotificationDetails& details) OVERRIDE; InfoBarService* infobar_service_; InfoBarDelegate* infobar_delegate_; diff --git a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc index 87f25db..8a3964b 100644 --- a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc @@ -43,7 +43,8 @@ class TestAppNotificationDataTypeController manager_(new extensions::AppNotificationManager(profile_)) { } - virtual extensions::AppNotificationManager* GetAppNotificationManager() { + virtual extensions::AppNotificationManager* + GetAppNotificationManager() OVERRIDE { return manager_.get(); } diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc index fa15913..f78d5e4 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc @@ -46,10 +46,10 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController { profile, sync_service), mock_(mock) {} - virtual syncer::ModelType type() const { return syncer::BOOKMARKS; } + virtual syncer::ModelType type() const OVERRIDE { return syncer::BOOKMARKS; } private: - virtual void CreateSyncComponents() { + virtual void CreateSyncComponents() OVERRIDE { ProfileSyncComponentsFactory::SyncComponents sync_components = profile_sync_factory_-> CreateBookmarkSyncComponents(sync_service_, this); @@ -59,21 +59,22 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController { // We mock the following methods because their default implementations do // nothing, but we still want to make sure they're called appropriately. - virtual bool StartModels() { + virtual bool StartModels() OVERRIDE { return mock_->StartModels(); } - virtual void CleanUpState() { + virtual void CleanUpState() OVERRIDE { mock_->CleanUpState(); } virtual void RecordUnrecoverableError( const tracked_objects::Location& from_here, - const std::string& message) { + const std::string& message) OVERRIDE { mock_->RecordUnrecoverableError(from_here, message); } - virtual void RecordAssociationTime(base::TimeDelta time) { + virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE { mock_->RecordAssociationTime(time); } - virtual void RecordStartFailure(DataTypeController::StartResult result) { + virtual void RecordStartFailure( + DataTypeController::StartResult result) OVERRIDE { mock_->RecordStartFailure(result); } private: diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc index 40b8dd1..b24c10d 100644 --- a/chrome/browser/sync/glue/history_model_worker.cc +++ b/chrome/browser/sync/glue/history_model_worker.cc @@ -24,7 +24,7 @@ class WorkerTask : public HistoryDBTask { : work_(work), done_(done), error_(error) {} virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) { + history::HistoryDatabase* db) OVERRIDE { *error_ = work_.Run(); done_->Signal(); return true; @@ -32,7 +32,7 @@ class WorkerTask : public HistoryDBTask { // Since the DoWorkAndWaitUntilDone() is syncronous, we don't need to run any // code asynchronously on the main thread after completion. - virtual void DoneRunOnMainThread() {} + virtual void DoneRunOnMainThread() OVERRIDE {} protected: virtual ~WorkerTask() {} diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc index 001790c..f9a8d50 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc @@ -61,8 +61,8 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController { sync_service), mock_(mock) {} - virtual syncer::ModelType type() const { return syncer::BOOKMARKS; } - virtual syncer::ModelSafeGroup model_safe_group() const { + virtual syncer::ModelType type() const OVERRIDE { return syncer::BOOKMARKS; } + virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE { return syncer::GROUP_DB; } @@ -93,13 +93,14 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController { } virtual void RecordUnrecoverableError( const tracked_objects::Location& from_here, - const std::string& message) { + const std::string& message) OVERRIDE { mock_->RecordUnrecoverableError(from_here, message); } - virtual void RecordAssociationTime(base::TimeDelta time) { + virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE { mock_->RecordAssociationTime(time); } - virtual void RecordStartFailure(DataTypeController::StartResult result) { + virtual void RecordStartFailure( + DataTypeController::StartResult result) OVERRIDE { mock_->RecordStartFailure(result); } private: diff --git a/chrome/browser/sync/glue/session_model_associator_unittest.cc b/chrome/browser/sync/glue/session_model_associator_unittest.cc index 09ed462..3ab3c71 100644 --- a/chrome/browser/sync/glue/session_model_associator_unittest.cc +++ b/chrome/browser/sync/glue/session_model_associator_unittest.cc @@ -187,9 +187,9 @@ class SyncRefreshListener : public content::NotificationObserver { content::NotificationService::AllSources()); } - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { if (type == chrome::NOTIFICATION_SYNC_REFRESH_LOCAL) { notified_of_refresh_ = true; } diff --git a/chrome/browser/sync/glue/synced_device_tracker_unittest.cc b/chrome/browser/sync/glue/synced_device_tracker_unittest.cc index 297982c..9465a30 100644 --- a/chrome/browser/sync/glue/synced_device_tracker_unittest.cc +++ b/chrome/browser/sync/glue/synced_device_tracker_unittest.cc @@ -21,9 +21,9 @@ namespace browser_sync { class SyncedDeviceTrackerTest : public ::testing::Test { protected: SyncedDeviceTrackerTest() : transaction_count_baseline_(0) { } - ~SyncedDeviceTrackerTest() { } + virtual ~SyncedDeviceTrackerTest() { } - void SetUp() { + virtual void SetUp() { test_user_share_.SetUp(); syncer::TestUserShare::CreateRoot(syncer::DEVICE_INFO, user_share()); @@ -38,7 +38,7 @@ class SyncedDeviceTrackerTest : public ::testing::Test { synced_device_tracker_->Start(NULL, user_share()); } - void TearDown() { + virtual void TearDown() { synced_device_tracker_.reset(); test_user_share_.TearDown(); } diff --git a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc index b3a01c8..91d7370 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc @@ -72,7 +72,7 @@ class TestTypedUrlModelAssociator : public TypedUrlModelAssociator { : TypedUrlModelAssociator(&mock_, NULL, NULL), startup_(startup), aborted_(aborted) {} - virtual bool IsAbortPending() { + virtual bool IsAbortPending() OVERRIDE { // Let the main thread know that we've been started up, and block until // they've called Abort(). startup_->Signal(); diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc index ca438ee..996688f 100644 --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc @@ -365,7 +365,7 @@ class ProfileSyncServiceAutofillTest const syncer::DataTypeAssociationStats& association_stats) OVERRIDE { association_stats_ = association_stats; } - virtual void OnConfigureComplete() { + virtual void OnConfigureComplete() OVERRIDE { // Do nothing. } diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc index 25bd86d..f5af4eb 100644 --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc @@ -236,7 +236,7 @@ class ExtensiveChangesBookmarkModelObserver : public BaseBookmarkModelObserver { ++completed_count_; } - void BookmarkModelChanged() {} + virtual void BookmarkModelChanged() OVERRIDE {} int get_started() const { return started_count_; diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc index cb8c46a..fc9969e 100644 --- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc @@ -100,10 +100,10 @@ class ProfileSyncServicePreferenceTest // DataTypeDebugInfoListener implementation. virtual void OnDataTypeAssociationComplete( - const syncer::DataTypeAssociationStats& association_stats) { + const syncer::DataTypeAssociationStats& association_stats) OVERRIDE { association_stats_ = association_stats; } - virtual void OnConfigureComplete() { + virtual void OnConfigureComplete() OVERRIDE { // Do nothing. } diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc index 271c7e7..5fb4092 100644 --- a/chrome/browser/sync/profile_sync_service_session_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc @@ -208,9 +208,9 @@ class ProfileSyncServiceSessionTest content::NotificationService::AllSources()); } - void Observe(int type, + virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { switch (type) { case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED: notified_of_update_ = true; diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index 01c2618..8987e8b 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -151,7 +151,7 @@ class ProfileSyncServiceStartupCrosTest : public ProfileSyncServiceStartupTest { true); } protected: - virtual void CreateSyncService() { + virtual void CreateSyncService() OVERRIDE { sync_ = static_cast<TestProfileSyncService*>( ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( profile_.get(), BuildCrosService)); diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc index 14c50fe..072fc76 100644 --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc @@ -115,7 +115,7 @@ class TestTypedUrlModelAssociator : public TypedUrlModelAssociator { protected: // Don't clear error stats - that way we can verify their values in our // tests. - virtual void ClearErrorStats() {} + virtual void ClearErrorStats() OVERRIDE {} }; void RunOnDBThreadCallback(HistoryBackend* backend, diff --git a/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc index c5f568f..cbc57b4 100644 --- a/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc +++ b/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc @@ -107,7 +107,7 @@ class LocalFileSyncServiceTest protected: LocalFileSyncServiceTest() : num_changes_(0) {} - ~LocalFileSyncServiceTest() {} + virtual ~LocalFileSyncServiceTest() {} virtual void SetUp() OVERRIDE { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); @@ -147,7 +147,7 @@ class LocalFileSyncServiceTest } // LocalChangeObserver overrides. - virtual void OnLocalChangeAvailable(int64 num_changes) { + virtual void OnLocalChangeAvailable(int64 num_changes) OVERRIDE { num_changes_ = num_changes; } @@ -572,7 +572,7 @@ TEST_F(LocalFileSyncServiceTest, RecordFakeChange) { class OriginChangeMapTest : public testing::Test { protected: OriginChangeMapTest() {} - ~OriginChangeMapTest() {} + virtual ~OriginChangeMapTest() {} bool NextOriginToProcess(GURL* origin) { return map_.NextOriginToProcess(origin); diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc index 329f324..c24d68e 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc @@ -116,7 +116,7 @@ ACTION_P3(MockSyncOperationCallback, status, url, operation_type) { class SyncFileSystemServiceTest : public testing::Test { protected: SyncFileSystemServiceTest() {} - ~SyncFileSystemServiceTest() {} + virtual ~SyncFileSystemServiceTest() {} virtual void SetUp() OVERRIDE { thread_helper_.SetUp(); diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc index 2681226..5e6c1f7 100644 --- a/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc +++ b/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc @@ -147,7 +147,7 @@ class RemovableDeviceNotificationsLinuxTestWrapper // Avoids code deleting the object while there are references to it. // Aside from the base::RefCountedThreadSafe friend class, any attempts to // call this dtor will result in a compile-time error. - ~RemovableDeviceNotificationsLinuxTestWrapper() {} + virtual ~RemovableDeviceNotificationsLinuxTestWrapper() {} virtual void OnFilePathChanged(const base::FilePath& path, bool error) OVERRIDE { diff --git a/chrome/browser/system_monitor/removable_storage_notifications_unittest.cc b/chrome/browser/system_monitor/removable_storage_notifications_unittest.cc index 5194f3e..40d6931 100644 --- a/chrome/browser/system_monitor/removable_storage_notifications_unittest.cc +++ b/chrome/browser/system_monitor/removable_storage_notifications_unittest.cc @@ -16,7 +16,7 @@ class TestStorageNotifications : public RemovableStorageNotifications { TestStorageNotifications() { } - ~TestStorageNotifications() {} + virtual ~TestStorageNotifications() {} virtual bool GetDeviceInfoForPath( const base::FilePath& path, diff --git a/chrome/browser/task_manager/task_manager_unittest.cc b/chrome/browser/task_manager/task_manager_unittest.cc index c313db6..bfacdd3 100644 --- a/chrome/browser/task_manager/task_manager_unittest.cc +++ b/chrome/browser/task_manager/task_manager_unittest.cc @@ -36,8 +36,8 @@ class TestResource : public TaskManager::Resource { virtual string16 GetProfileName() const OVERRIDE { return ASCIIToUTF16("test profile"); } - virtual gfx::ImageSkia GetIcon() const { return gfx::ImageSkia(); } - virtual base::ProcessHandle GetProcess() const { + virtual gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); } + virtual base::ProcessHandle GetProcess() const OVERRIDE { return base::GetCurrentProcessHandle(); } virtual int GetUniqueChildProcessId() const OVERRIDE { @@ -45,10 +45,10 @@ class TestResource : public TaskManager::Resource { // but for testing purposes it shouldn't make difference. return static_cast<int>(base::GetCurrentProcId()); } - virtual Type GetType() const { return RENDERER; } - virtual bool SupportNetworkUsage() const { return false; } - virtual void SetSupportNetworkUsage() { NOTREACHED(); } - virtual void Refresh() { refresh_called_ = true; } + virtual Type GetType() const OVERRIDE { return RENDERER; } + virtual bool SupportNetworkUsage() const OVERRIDE { return false; } + virtual void SetSupportNetworkUsage() OVERRIDE { NOTREACHED(); } + virtual void Refresh() OVERRIDE { refresh_called_ = true; } bool refresh_called() const { return refresh_called_; } void set_refresh_called(bool refresh_called) { refresh_called_ = refresh_called; diff --git a/chrome/browser/themes/theme_service_unittest.cc b/chrome/browser/themes/theme_service_unittest.cc index 81514ef..3799a35 100644 --- a/chrome/browser/themes/theme_service_unittest.cc +++ b/chrome/browser/themes/theme_service_unittest.cc @@ -35,7 +35,7 @@ class ThemeServiceTest : public ExtensionServiceTestBase { return extension; } - void SetUp() { + virtual void SetUp() { InitializeEmptyExtensionService(); } }; diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index 2f84f1e..4465703 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -155,7 +155,7 @@ class ThemeSyncableServiceTest : public testing::Test { file_thread_(BrowserThread::FILE, &loop_), fake_theme_service_(NULL) {} - ~ThemeSyncableServiceTest() {} + virtual ~ThemeSyncableServiceTest() {} virtual void SetUp() { profile_.reset(new TestingProfile); diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc index 0c764b5..0ae4a17 100644 --- a/chrome/browser/translate/translate_manager_browsertest.cc +++ b/chrome/browser/translate/translate_manager_browsertest.cc @@ -73,7 +73,7 @@ class NavEntryCommittedObserver : public content::NotificationObserver { virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) { + const content::NotificationDetails& details) OVERRIDE { DCHECK(type == content::NOTIFICATION_NAV_ENTRY_COMMITTED); details_ = *(content::Details<content::LoadCommittedDetails>(details).ptr()); @@ -342,11 +342,11 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { return menu_model_.GetIndexOfCommandId(id) != -1; } - virtual void PlatformInit() { } - virtual void PlatformCancel() { } + virtual void PlatformInit() OVERRIDE { } + virtual void PlatformCancel() OVERRIDE { } virtual bool GetAcceleratorForCommandId( int command_id, - ui::Accelerator* accelerator) { return false; } + ui::Accelerator* accelerator) OVERRIDE { return false; } private: TestRenderViewContextMenu(WebContents* web_contents, diff --git a/chrome/browser/unload_browsertest.cc b/chrome/browser/unload_browsertest.cc index 19e1c61..75c2a68 100644 --- a/chrome/browser/unload_browsertest.cc +++ b/chrome/browser/unload_browsertest.cc @@ -109,7 +109,7 @@ const std::string CLOSE_TAB_WHEN_OTHER_TAB_HAS_LISTENER = class UnloadTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { const testing::TestInfo* const test_info = testing::UnitTest::GetInstance()->current_test_info(); if (strcmp(test_info->name(), diff --git a/chrome/browser/usb/usb_service.cc b/chrome/browser/usb/usb_service.cc index ad66f5e..21e2e33 100644 --- a/chrome/browser/usb/usb_service.cc +++ b/chrome/browser/usb/usb_service.cc @@ -32,7 +32,7 @@ class UsbEventHandler : public base::PlatformThread::Delegate { virtual ~UsbEventHandler() {} - virtual void ThreadMain() { + virtual void ThreadMain() OVERRIDE { base::PlatformThread::SetName("UsbEventHandler"); DLOG(INFO) << "UsbEventHandler started."; diff --git a/chrome/browser/web_resource/json_asynchronous_unpacker.cc b/chrome/browser/web_resource/json_asynchronous_unpacker.cc index 44dcbbc..441c864 100644 --- a/chrome/browser/web_resource/json_asynchronous_unpacker.cc +++ b/chrome/browser/web_resource/json_asynchronous_unpacker.cc @@ -31,7 +31,7 @@ class JSONAsynchronousUnpackerImpl got_response_(false) { } - void Start(const std::string& json_data) { + virtual void Start(const std::string& json_data) OVERRIDE { AddRef(); // balanced in Cleanup. // TODO(willchan): Look for a better signal of whether we're in a unit test diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc index 4477001..87d0813 100644 --- a/chrome/browser/webdata/web_data_service_unittest.cc +++ b/chrome/browser/webdata/web_data_service_unittest.cc @@ -58,7 +58,7 @@ class AutofillDBThreadObserverHelper : public DBThreadObserverHelper { protected: virtual ~AutofillDBThreadObserverHelper() {} - virtual void RegisterObservers() { + virtual void RegisterObservers() OVERRIDE { registrar_.Add(&observer_, chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED, content::NotificationService::AllSources()); @@ -163,8 +163,9 @@ static void WaitUntilCalled() { // quits UI message loop when callback is invoked. class WebIntentsConsumer : public WebDataServiceConsumer { public: - virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, - const WDTypedResult* result) { + virtual void OnWebDataServiceRequestDone( + WebDataService::Handle h, + const WDTypedResult* result) OVERRIDE { services_.clear(); if (result) { DCHECK(result->GetType() == WEB_INTENTS_RESULT); @@ -185,8 +186,9 @@ class WebIntentsConsumer : public WebDataServiceConsumer { // quits UI message loop when callback is invoked. class WebIntentsDefaultsConsumer : public WebDataServiceConsumer { public: - virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, - const WDTypedResult* result) { + virtual void OnWebDataServiceRequestDone( + WebDataService::Handle h, + const WDTypedResult* result) OVERRIDE { services_.clear(); if (result) { DCHECK(result->GetType() == WEB_INTENTS_DEFAULTS_RESULT); @@ -209,8 +211,9 @@ class KeywordsConsumer : public WebDataServiceConsumer { public: KeywordsConsumer() : load_succeeded(false) {} - virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, - const WDTypedResult* result) { + virtual void OnWebDataServiceRequestDone( + WebDataService::Handle h, + const WDTypedResult* result) OVERRIDE { if (result) { load_succeeded = true; DCHECK(result->GetType() == KEYWORDS_RESULT); |