diff options
author | Daniel Cheng <dcheng@chromium.org> | 2014-10-21 02:51:29 -0700 |
---|---|---|
committer | Daniel Cheng <dcheng@chromium.org> | 2014-10-21 09:52:23 +0000 |
commit | a542fca3ccd35033c2065fa3e7bed1247043b377 (patch) | |
tree | be0ed153cb1645a1bf02eb1ad1bb9b428cd4c722 /chrome | |
parent | 716bedf160f4c4c1945cab54c3f490424a0eb779 (diff) | |
download | chromium_src-a542fca3ccd35033c2065fa3e7bed1247043b377.zip chromium_src-a542fca3ccd35033c2065fa3e7bed1247043b377.tar.gz chromium_src-a542fca3ccd35033c2065fa3e7bed1247043b377.tar.bz2 |
Standardize usage of virtual/override/final in chrome/browser/
BUG=417463
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/648653003
Cr-Commit-Position: refs/heads/master@{#300440}
Diffstat (limited to 'chrome')
389 files changed, 2475 insertions, 2737 deletions
diff --git a/chrome/browser/accessibility/accessibility_events.h b/chrome/browser/accessibility/accessibility_events.h index 05f3577..00e30aa 100644 --- a/chrome/browser/accessibility/accessibility_events.h +++ b/chrome/browser/accessibility/accessibility_events.h @@ -57,11 +57,11 @@ class AccessibilityEventInfo { // passed to event listeners. class AccessibilityControlInfo : public AccessibilityEventInfo { public: - virtual ~AccessibilityControlInfo(); + ~AccessibilityControlInfo() override; // Serialize this class as a DictionaryValue that can be converted to // a JavaScript object. - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; // Return the specific type of this control, which will be one of the // string constants defined in extension_accessibility_api_constants.h. @@ -97,7 +97,7 @@ class AccessibilityWindowInfo : public AccessibilityControlInfo { public: AccessibilityWindowInfo(Profile* profile, const std::string& window_name); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about a push button passed to onControlFocused @@ -108,7 +108,7 @@ class AccessibilityButtonInfo : public AccessibilityControlInfo { const std::string& button_name, const std::string& context); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about static text passed to onControlFocused @@ -119,7 +119,7 @@ class AccessibilityStaticTextInfo : public AccessibilityControlInfo { const std::string& text, const std::string& context); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about a hyperlink passed to onControlFocused @@ -130,7 +130,7 @@ class AccessibilityLinkInfo : public AccessibilityControlInfo { const std::string& link_name, const std::string& context); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about a radio button passed to onControlFocused @@ -144,9 +144,9 @@ class AccessibilityRadioButtonInfo : public AccessibilityControlInfo { int item_index, int item_count); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetChecked(bool checked) { checked_ = checked; } @@ -170,9 +170,9 @@ class AccessibilityCheckboxInfo : public AccessibilityControlInfo { const std::string& context, bool checked); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetChecked(bool checked) { checked_ = checked; } @@ -192,9 +192,9 @@ class AccessibilityTabInfo : public AccessibilityControlInfo { int tab_index, int tab_count); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetTab(int tab_index, std::string tab_name) { tab_index_ = tab_index; @@ -221,9 +221,9 @@ class AccessibilityComboBoxInfo : public AccessibilityControlInfo { int item_index, int item_count); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetValue(int item_index, const std::string& value) { item_index_ = item_index; @@ -253,9 +253,9 @@ class AccessibilityTextBoxInfo : public AccessibilityControlInfo { const std::string& context, bool password); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetValue( const std::string& value, int selection_start, int selection_end) { @@ -287,9 +287,9 @@ class AccessibilityListBoxInfo : public AccessibilityControlInfo { int item_index, int item_count); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; void SetValue(int item_index, std::string value) { item_index_ = item_index; @@ -315,7 +315,7 @@ class AccessibilityMenuInfo : public AccessibilityControlInfo { public: AccessibilityMenuInfo(Profile* profile, const std::string& menu_name); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about a menu item; this class is used by @@ -329,9 +329,9 @@ class AccessibilityMenuItemInfo : public AccessibilityControlInfo { int item_index, int item_count); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; int item_index() const { return item_index_; } int item_count() const { return item_count_; } @@ -350,7 +350,7 @@ class AccessibilityTreeInfo : public AccessibilityControlInfo { public: AccessibilityTreeInfo(Profile* profile, const std::string& menu_name); - virtual const char* type() const override; + const char* type() const override; }; // Accessibility information about a tree item; this class is used by @@ -366,9 +366,9 @@ class AccessibilityTreeItemInfo : public AccessibilityControlInfo { int children_count, bool is_expanded); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; int item_depth() const { return item_depth_; } int item_index() const { return item_index_; } @@ -399,9 +399,9 @@ class AccessibilitySliderInfo : public AccessibilityControlInfo { const std::string& context, const std::string& value); - virtual const char* type() const override; + const char* type() const override; - virtual void SerializeToDict(base::DictionaryValue* dict) const override; + void SerializeToDict(base::DictionaryValue* dict) const override; const std::string& value() const { return value_; } @@ -414,7 +414,7 @@ class AccessibilityAlertInfo : public AccessibilityControlInfo { public: AccessibilityAlertInfo(Profile* profile, const std::string& name); - virtual const char* type() const override; + const char* type() const override; }; #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ diff --git a/chrome/browser/accessibility/accessibility_extension_api.h b/chrome/browser/accessibility/accessibility_extension_api.h index 6a1bc6c..4c3cf56 100644 --- a/chrome/browser/accessibility/accessibility_extension_api.h +++ b/chrome/browser/accessibility/accessibility_extension_api.h @@ -101,8 +101,8 @@ class ExtensionAccessibilityEventRouter { // minimize the impact. class AccessibilityPrivateSetAccessibilityEnabledFunction : public ChromeSyncExtensionFunction { - virtual ~AccessibilityPrivateSetAccessibilityEnabledFunction() {} - virtual bool RunSync() override; + ~AccessibilityPrivateSetAccessibilityEnabledFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setAccessibilityEnabled", ACCESSIBILITY_PRIVATE_SETACCESSIBILITYENABLED) }; @@ -110,8 +110,8 @@ class AccessibilityPrivateSetAccessibilityEnabledFunction // API function that enables or disables web content accessibility support. class AccessibilityPrivateSetNativeAccessibilityEnabledFunction : public ChromeSyncExtensionFunction { - virtual ~AccessibilityPrivateSetNativeAccessibilityEnabledFunction() {} - virtual bool RunSync() override; + ~AccessibilityPrivateSetNativeAccessibilityEnabledFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION( "accessibilityPrivate.setNativeAccessibilityEnabled", ACCESSIBILITY_PRIVATE_SETNATIVEACCESSIBILITYENABLED) @@ -120,8 +120,8 @@ class AccessibilityPrivateSetNativeAccessibilityEnabledFunction // API function that returns the most recent focused control. class AccessibilityPrivateGetFocusedControlFunction : public ChromeSyncExtensionFunction { - virtual ~AccessibilityPrivateGetFocusedControlFunction() {} - virtual bool RunSync() override; + ~AccessibilityPrivateGetFocusedControlFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.getFocusedControl", ACCESSIBILITY_PRIVATE_GETFOCUSEDCONTROL) }; @@ -129,8 +129,8 @@ class AccessibilityPrivateGetFocusedControlFunction // API function that returns alerts being shown on the give tab. class AccessibilityPrivateGetAlertsForTabFunction : public ChromeSyncExtensionFunction { - virtual ~AccessibilityPrivateGetAlertsForTabFunction() {} - virtual bool RunSync() override; + ~AccessibilityPrivateGetAlertsForTabFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.getAlertsForTab", ACCESSIBILITY_PRIVATE_GETALERTSFORTAB) }; @@ -138,8 +138,8 @@ class AccessibilityPrivateGetAlertsForTabFunction // API function that sets the location of the accessibility focus ring. class AccessibilityPrivateSetFocusRingFunction : public ChromeSyncExtensionFunction { - virtual ~AccessibilityPrivateSetFocusRingFunction() {} - virtual bool RunSync() override; + ~AccessibilityPrivateSetFocusRingFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setFocusRing", ACCESSIBILITY_PRIVATE_SETFOCUSRING) }; diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 3171f02..434e3e7 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -236,7 +236,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { profile_manager_->GetProfileInfoCache().AddObserver(this); } - virtual ~AppControllerProfileObserver() { + ~AppControllerProfileObserver() override { DCHECK(profile_manager_); profile_manager_->GetProfileInfoCache().RemoveObserver(this); } @@ -244,29 +244,21 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { private: // ProfileInfoCacheObserver implementation: - virtual void OnProfileAdded(const base::FilePath& profile_path) override { - } + void OnProfileAdded(const base::FilePath& profile_path) override {} - virtual void OnProfileWasRemoved( - const base::FilePath& profile_path, - const base::string16& profile_name) override { + void OnProfileWasRemoved(const base::FilePath& profile_path, + const base::string16& profile_name) override { // When a profile is deleted we need to notify the AppController, // so it can correctly update its pointer to the last used profile. [app_controller_ profileWasRemoved:profile_path]; } - virtual void OnProfileWillBeRemoved( - const base::FilePath& profile_path) override { - } + void OnProfileWillBeRemoved(const base::FilePath& profile_path) override {} - virtual void OnProfileNameChanged( - const base::FilePath& profile_path, - const base::string16& old_profile_name) override { - } + void OnProfileNameChanged(const base::FilePath& profile_path, + const base::string16& old_profile_name) override {} - virtual void OnProfileAvatarChanged( - const base::FilePath& profile_path) override { - } + void OnProfileAvatarChanged(const base::FilePath& profile_path) override {} ProfileManager* profile_manager_; diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm index 14117eb..f8442c7 100644 --- a/chrome/browser/app_controller_mac_browsertest.mm +++ b/chrome/browser/app_controller_mac_browsertest.mm @@ -89,7 +89,7 @@ class AppControllerPlatformAppBrowserTest chrome::GetActiveDesktop())) { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { PlatformAppBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kAppId, "1234"); @@ -145,7 +145,7 @@ class AppControllerWebAppBrowserTest : public InProcessBrowserTest { chrome::GetActiveDesktop())) { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitchASCII(switches::kApp, GetAppURL()); } @@ -206,7 +206,7 @@ class AppControllerNewProfileManagementBrowserTest chrome::GetActiveDesktop())) { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { switches::EnableNewProfileManagementForTesting(command_line); } @@ -283,7 +283,7 @@ class AppControllerOpenShortcutBrowserTest : public InProcessBrowserTest { AppControllerOpenShortcutBrowserTest() { } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { // In order to mimic opening shortcut during browser startup, we need to // send the event before -applicationDidFinishLaunching is called, but // after AppController is loaded. @@ -315,7 +315,7 @@ class AppControllerOpenShortcutBrowserTest : public InProcessBrowserTest { g_open_shortcut_url = embedded_test_server()->GetURL("/simple.html"); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { // If the arg is empty, PrepareTestCommandLine() after this function will // append about:blank as default url. command_line->AppendArg(chrome::kChromeUINewTabURL); diff --git a/chrome/browser/autocomplete/autocomplete_classifier.h b/chrome/browser/autocomplete/autocomplete_classifier.h index bb252c7..e5be13f 100644 --- a/chrome/browser/autocomplete/autocomplete_classifier.h +++ b/chrome/browser/autocomplete/autocomplete_classifier.h @@ -27,7 +27,7 @@ class AutocompleteClassifier : public KeyedService { AutocompleteClassifier( scoped_ptr<AutocompleteController> controller_, scoped_ptr<AutocompleteSchemeClassifier> scheme_classifier); - virtual ~AutocompleteClassifier(); + ~AutocompleteClassifier() override; // Given some string |text| that the user wants to use for navigation, // determines how it should be interpreted. @@ -55,7 +55,7 @@ class AutocompleteClassifier : public KeyedService { private: // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; scoped_ptr<AutocompleteController> controller_; scoped_ptr<AutocompleteSchemeClassifier> scheme_classifier_; diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.h b/chrome/browser/autocomplete/autocomplete_classifier_factory.h index ddfa944..84ef185 100644 --- a/chrome/browser/autocomplete/autocomplete_classifier_factory.h +++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.h @@ -27,13 +27,13 @@ class AutocompleteClassifierFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<AutocompleteClassifierFactory>; AutocompleteClassifierFactory(); - virtual ~AutocompleteClassifierFactory(); + ~AutocompleteClassifierFactory() override; // BrowserContextKeyedServiceFactory: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; - virtual KeyedService* BuildServiceInstanceFor( + bool ServiceIsNULLWhileTesting() const override; + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(AutocompleteClassifierFactory); diff --git a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc index 4695b7a..c84d83e 100644 --- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc @@ -57,15 +57,14 @@ class TestProvider : public AutocompleteProvider { match_keyword_(match_keyword) { } - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; void set_listener(AutocompleteProviderListener* listener) { listener_ = listener; } private: - virtual ~TestProvider() {} + ~TestProvider() override {} void Run(); @@ -215,9 +214,9 @@ class AutocompleteProviderTest : public testing::Test, private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; base::MessageLoopForUI message_loop_; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/autocomplete/bookmark_provider.h b/chrome/browser/autocomplete/bookmark_provider.h index ad701cc..8d42ab5 100644 --- a/chrome/browser/autocomplete/bookmark_provider.h +++ b/chrome/browser/autocomplete/bookmark_provider.h @@ -34,8 +34,7 @@ class BookmarkProvider : public AutocompleteProvider { // When |minimal_changes| is true short circuit any additional searching and // leave the previous matches for this provider unchanged, otherwise perform // a complete search for |input| across all bookmark titles. - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; // Sets the BookmarkModel for unit tests. void set_bookmark_model_for_testing(BookmarkModel* bookmark_model) { @@ -45,7 +44,7 @@ class BookmarkProvider : public AutocompleteProvider { private: FRIEND_TEST_ALL_PREFIXES(BookmarkProviderTest, InlineAutocompletion); - virtual ~BookmarkProvider(); + ~BookmarkProvider() override; // Performs the actual matching of |input| over the bookmarks and fills in // |matches_|. diff --git a/chrome/browser/autocomplete/builtin_provider.h b/chrome/browser/autocomplete/builtin_provider.h index b86f736..d81cee9 100644 --- a/chrome/browser/autocomplete/builtin_provider.h +++ b/chrome/browser/autocomplete/builtin_provider.h @@ -20,11 +20,10 @@ class BuiltinProvider : public AutocompleteProvider { BuiltinProvider(); // AutocompleteProvider: - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; private: - virtual ~BuiltinProvider(); + ~BuiltinProvider() override; typedef std::vector<base::string16> Builtins; diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h index b468f0e..c214c1c 100644 --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h @@ -13,28 +13,28 @@ class Profile; class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { public: explicit ChromeAutocompleteProviderClient(Profile* profile); - virtual ~ChromeAutocompleteProviderClient(); + ~ChromeAutocompleteProviderClient() override; // AutocompleteProviderClient: - virtual net::URLRequestContextGetter* RequestContext() override; - virtual bool IsOffTheRecord() override; - virtual std::string AcceptLanguages() override; - virtual bool SearchSuggestEnabled() override; - virtual bool ShowBookmarkBar() override; - virtual const AutocompleteSchemeClassifier& SchemeClassifier() override; - virtual void Classify( + net::URLRequestContextGetter* RequestContext() override; + bool IsOffTheRecord() override; + std::string AcceptLanguages() override; + bool SearchSuggestEnabled() override; + bool ShowBookmarkBar() override; + const AutocompleteSchemeClassifier& SchemeClassifier() override; + void Classify( const base::string16& text, bool prefer_keyword, bool allow_exact_keyword_match, metrics::OmniboxEventProto::PageClassification page_classification, AutocompleteMatch* match, GURL* alternate_nav_url) override; - virtual history::URLDatabase* InMemoryDatabase() override; - virtual void DeleteMatchingURLsForKeywordFromHistory( + history::URLDatabase* InMemoryDatabase() override; + void DeleteMatchingURLsForKeywordFromHistory( history::KeywordID keyword_id, const base::string16& term) override; - virtual bool TabSyncEnabledAndUnencrypted() override; - virtual void PrefetchImage(const GURL& url) override; + bool TabSyncEnabledAndUnencrypted() override; + void PrefetchImage(const GURL& url) override; private: Profile* profile_; diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h index 6e9429e..a2f6496 100644 --- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h +++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h @@ -14,10 +14,10 @@ class Profile; class ChromeAutocompleteSchemeClassifier : public AutocompleteSchemeClassifier { public: explicit ChromeAutocompleteSchemeClassifier(Profile* profile); - virtual ~ChromeAutocompleteSchemeClassifier(); + ~ChromeAutocompleteSchemeClassifier() override; // AutocompleteInputSchemeChecker: - virtual metrics::OmniboxInputType::Type GetInputTypeForScheme( + metrics::OmniboxInputType::Type GetInputTypeForScheme( const std::string& scheme) const override; private: diff --git a/chrome/browser/autocomplete/history_provider.h b/chrome/browser/autocomplete/history_provider.h index d00703c..935dc5a 100644 --- a/chrome/browser/autocomplete/history_provider.h +++ b/chrome/browser/autocomplete/history_provider.h @@ -17,7 +17,7 @@ struct AutocompleteMatch; // provides functions useful to all derived classes. class HistoryProvider : public AutocompleteProvider { public: - virtual void DeleteMatch(const AutocompleteMatch& match) override; + void DeleteMatch(const AutocompleteMatch& match) override; // Returns true if inline autocompletion should be prevented for URL-like // input. This method returns true if input.prevent_inline_autocomplete() @@ -26,7 +26,7 @@ class HistoryProvider : public AutocompleteProvider { protected: HistoryProvider(Profile* profile, AutocompleteProvider::Type type); - virtual ~HistoryProvider(); + ~HistoryProvider() override; // Finds and removes the match from the current collection of matches and // backing data. diff --git a/chrome/browser/autocomplete/history_quick_provider.h b/chrome/browser/autocomplete/history_quick_provider.h index 6206ee3..fbd93f4 100644 --- a/chrome/browser/autocomplete/history_quick_provider.h +++ b/chrome/browser/autocomplete/history_quick_provider.h @@ -31,8 +31,7 @@ class HistoryQuickProvider : public HistoryProvider { // AutocompleteProvider. |minimal_changes| is ignored since there is no asynch // completion performed. - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; // Disable this provider. For unit testing purposes only. This is required // because this provider is closely associated with the HistoryURLProvider @@ -46,7 +45,7 @@ class HistoryQuickProvider : public HistoryProvider { FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Spans); FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Relevance); - virtual ~HistoryQuickProvider(); + ~HistoryQuickProvider() override; // Performs the autocomplete matching and scoring. void DoAutocomplete(); diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc index 785f76e..4d9bc36 100644 --- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc @@ -754,8 +754,7 @@ TestURLInfo ordering_test_db[] = { class HQPOrderingTest : public HistoryQuickProviderTest { protected: - virtual void GetTestData(size_t* data_count, - TestURLInfo** test_data) override; + void GetTestData(size_t* data_count, TestURLInfo** test_data) override; }; void HQPOrderingTest::GetTestData(size_t* data_count, TestURLInfo** test_data) { diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc index 00f7192..61eceda 100644 --- a/chrome/browser/autocomplete/history_url_provider.cc +++ b/chrome/browser/autocomplete/history_url_provider.cc @@ -278,21 +278,18 @@ GURL ConvertToHostOnly(const history::HistoryMatch& match, class SearchTermsDataSnapshot : public SearchTermsData { public: explicit SearchTermsDataSnapshot(const SearchTermsData& search_terms_data); - virtual ~SearchTermsDataSnapshot(); - - virtual std::string GoogleBaseURLValue() const override; - virtual std::string GetApplicationLocale() const override; - virtual base::string16 GetRlzParameterValue( - bool from_app_list) const override; - virtual std::string GetSearchClient() const override; - virtual bool EnableAnswersInSuggest() const override; - virtual bool IsShowingSearchTermsOnSearchResultsPages() const override; - virtual std::string InstantExtendedEnabledParam( - bool for_search) const override; - virtual std::string ForceInstantResultsParam( - bool for_prerender) const override; - virtual std::string NTPIsThemedParam() const override; - virtual std::string GoogleImageSearchSource() const override; + ~SearchTermsDataSnapshot() override; + + std::string GoogleBaseURLValue() const override; + std::string GetApplicationLocale() const override; + base::string16 GetRlzParameterValue(bool from_app_list) const override; + std::string GetSearchClient() const override; + bool EnableAnswersInSuggest() const override; + bool IsShowingSearchTermsOnSearchResultsPages() const override; + std::string InstantExtendedEnabledParam(bool for_search) const override; + std::string ForceInstantResultsParam(bool for_prerender) const override; + std::string NTPIsThemedParam() const override; + std::string GoogleImageSearchSource() const override; private: std::string google_base_url_value_; diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc index 69cba73..cb8ddcc 100644 --- a/chrome/browser/autocomplete/history_url_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc @@ -167,7 +167,7 @@ class HistoryURLProviderTest : public testing::Test, } // AutocompleteProviderListener: - virtual void OnProviderUpdate(bool updated_matches) override; + void OnProviderUpdate(bool updated_matches) override; protected: static KeyedService* CreateTemplateURLService( diff --git a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h index f7b29ec..cc415eb 100644 --- a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h +++ b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h @@ -29,24 +29,23 @@ class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate, public content::NotificationObserver { public: KeywordExtensionsDelegateImpl(Profile* profile, KeywordProvider* provider); - virtual ~KeywordExtensionsDelegateImpl(); + ~KeywordExtensionsDelegateImpl() override; private: // KeywordExtensionsDelegate: - virtual void IncrementInputId() override; - virtual bool IsEnabledExtension(const std::string& extension_id) override; - virtual bool Start(const AutocompleteInput& input, - bool minimal_changes, - const TemplateURL* template_url, - const base::string16& remaining_input) override; - virtual void EnterExtensionKeywordMode( - const std::string& extension_id) override; - virtual void MaybeEndExtensionKeywordMode() override; + void IncrementInputId() override; + bool IsEnabledExtension(const std::string& extension_id) override; + bool Start(const AutocompleteInput& input, + bool minimal_changes, + const TemplateURL* template_url, + const base::string16& remaining_input) override; + void EnterExtensionKeywordMode(const std::string& extension_id) override; + void MaybeEndExtensionKeywordMode() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; ACMatches* matches() { return &provider_->matches_; } void set_done(bool done) { diff --git a/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc b/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc index 9f0c7a6..b807b55 100644 --- a/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc +++ b/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc @@ -27,12 +27,12 @@ class ScopedExtensionLoadObserver : public ExtensionRegistryObserver { public: ScopedExtensionLoadObserver(ExtensionRegistry* registry, const base::Closure& quit_closure); - virtual ~ScopedExtensionLoadObserver(); + ~ScopedExtensionLoadObserver() override; private: - virtual void OnExtensionInstalled(content::BrowserContext* browser_context, - const Extension* extension, - bool is_update) override; + void OnExtensionInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update) override; ExtensionRegistry* registry_; base::Closure quit_closure_; diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc index cdebf96..5e93170 100644 --- a/chrome/browser/autocomplete/search_provider_unittest.cc +++ b/chrome/browser/autocomplete/search_provider_unittest.cc @@ -75,10 +75,10 @@ class SearchProviderForTest : public SearchProvider { bool is_success() { return is_success_; }; protected: - virtual ~SearchProviderForTest(); + ~SearchProviderForTest() override; private: - virtual void RecordDeletionResult(bool success) override; + void RecordDeletionResult(bool success) override; bool is_success_; DISALLOW_COPY_AND_ASSIGN(SearchProviderForTest); }; @@ -185,7 +185,7 @@ class SearchProviderTest : public testing::Test, // AutocompleteProviderListener: // If we're waiting for the provider to finish, this exits the message loop. - virtual void OnProviderUpdate(bool updated_matches) override; + void OnProviderUpdate(bool updated_matches) override; // Runs a nested message loop until provider_ is done. The message loop is // exited by way of OnProviderUpdate. diff --git a/chrome/browser/autocomplete/shortcuts_backend.h b/chrome/browser/autocomplete/shortcuts_backend.h index d8ed072..88d82dd 100644 --- a/chrome/browser/autocomplete/shortcuts_backend.h +++ b/chrome/browser/autocomplete/shortcuts_backend.h @@ -91,18 +91,18 @@ class ShortcutsBackend : public RefcountedKeyedService, typedef std::map<std::string, ShortcutMap::iterator> GuidMap; - virtual ~ShortcutsBackend(); + ~ShortcutsBackend() override; static history::ShortcutsDatabase::Shortcut::MatchCore MatchToMatchCore( const AutocompleteMatch& match, Profile* profile); // RefcountedKeyedService: - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Internal initialization of the back-end. Posted by Init() to the DB thread. // On completion posts InitCompleted() back to UI thread. diff --git a/chrome/browser/autocomplete/shortcuts_backend_factory.h b/chrome/browser/autocomplete/shortcuts_backend_factory.h index ce857d7..318b070 100644 --- a/chrome/browser/autocomplete/shortcuts_backend_factory.h +++ b/chrome/browser/autocomplete/shortcuts_backend_factory.h @@ -38,12 +38,12 @@ class ShortcutsBackendFactory friend struct DefaultSingletonTraits<ShortcutsBackendFactory>; ShortcutsBackendFactory(); - virtual ~ShortcutsBackendFactory(); + ~ShortcutsBackendFactory() override; // BrowserContextKeyedServiceFactory: - virtual scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( + scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; }; #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_BACKEND_FACTORY_H_ diff --git a/chrome/browser/autocomplete/shortcuts_backend_unittest.cc b/chrome/browser/autocomplete/shortcuts_backend_unittest.cc index 44cdf5c..2ad0d96 100644 --- a/chrome/browser/autocomplete/shortcuts_backend_unittest.cc +++ b/chrome/browser/autocomplete/shortcuts_backend_unittest.cc @@ -38,8 +38,8 @@ class ShortcutsBackendTest : public testing::Test, virtual void SetUp(); virtual void TearDown(); - virtual void OnShortcutsLoaded() override; - virtual void OnShortcutsChanged() override; + void OnShortcutsLoaded() override; + void OnShortcutsChanged() override; const ShortcutsBackend::ShortcutMap& shortcuts_map() const { return backend_->shortcuts_map(); diff --git a/chrome/browser/autocomplete/shortcuts_provider.h b/chrome/browser/autocomplete/shortcuts_provider.h index c935777..848fa53 100644 --- a/chrome/browser/autocomplete/shortcuts_provider.h +++ b/chrome/browser/autocomplete/shortcuts_provider.h @@ -28,10 +28,9 @@ class ShortcutsProvider // Performs the autocompletion synchronously. Since no asynch completion is // performed |minimal_changes| is ignored. - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; - virtual void DeleteMatch(const AutocompleteMatch& match) override; + void DeleteMatch(const AutocompleteMatch& match) override; private: friend class ClassifyTest; @@ -40,10 +39,10 @@ class ShortcutsProvider typedef std::multimap<base::char16, base::string16> WordMap; - virtual ~ShortcutsProvider(); + ~ShortcutsProvider() override; // ShortcutsBackendObserver: - virtual void OnShortcutsLoaded() override; + void OnShortcutsLoaded() override; // Performs the autocomplete matching and scoring. void GetMatches(const AutocompleteInput& input); diff --git a/chrome/browser/autocomplete/zero_suggest_provider.h b/chrome/browser/autocomplete/zero_suggest_provider.h index c10a622..aaeaa6f 100644 --- a/chrome/browser/autocomplete/zero_suggest_provider.h +++ b/chrome/browser/autocomplete/zero_suggest_provider.h @@ -57,31 +57,30 @@ class ZeroSuggestProvider : public BaseSearchProvider, static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); // AutocompleteProvider: - virtual void Start(const AutocompleteInput& input, - bool minimal_changes) override; - virtual void Stop(bool clear_cached_results) override; - virtual void DeleteMatch(const AutocompleteMatch& match) override; - virtual void AddProviderInfo(ProvidersInfo* provider_info) const override; + void Start(const AutocompleteInput& input, bool minimal_changes) override; + void Stop(bool clear_cached_results) override; + void DeleteMatch(const AutocompleteMatch& match) override; + void AddProviderInfo(ProvidersInfo* provider_info) const override; // Sets |field_trial_triggered_| to false. - virtual void ResetSession() override; + void ResetSession() override; private: ZeroSuggestProvider(AutocompleteProviderListener* listener, TemplateURLService* template_url_service, Profile* profile); - virtual ~ZeroSuggestProvider(); + ~ZeroSuggestProvider() override; // BaseSearchProvider: - virtual const TemplateURL* GetTemplateURL(bool is_keyword) const override; - virtual const AutocompleteInput GetInput(bool is_keyword) const override; - virtual bool ShouldAppendExtraParams( + const TemplateURL* GetTemplateURL(bool is_keyword) const override; + const AutocompleteInput GetInput(bool is_keyword) const override; + bool ShouldAppendExtraParams( const SearchSuggestionParser::SuggestResult& result) const override; - virtual void RecordDeletionResult(bool success) override; + void RecordDeletionResult(bool success) override; // net::URLFetcherDelegate: - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Optionally, cache the received |json_data| and return true if we want // to stop processing results at this point. The |parsed_data| is the parsed diff --git a/chrome/browser/autocomplete/zero_suggest_provider_unittest.cc b/chrome/browser/autocomplete/zero_suggest_provider_unittest.cc index b9f76dc..b6574a7 100644 --- a/chrome/browser/autocomplete/zero_suggest_provider_unittest.cc +++ b/chrome/browser/autocomplete/zero_suggest_provider_unittest.cc @@ -34,7 +34,7 @@ class ZeroSuggestProviderTest : public testing::Test, protected: // AutocompleteProviderListener: - virtual void OnProviderUpdate(bool updated_matches) override; + void OnProviderUpdate(bool updated_matches) override; void ResetFieldTrialList(); diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc index 9a19fc3..eb385e9 100644 --- a/chrome/browser/autofill/autofill_browsertest.cc +++ b/chrome/browser/autofill/autofill_browsertest.cc @@ -67,7 +67,7 @@ class WindowedPersonalDataManagerObserver infobar_service_->AddObserver(this); } - virtual ~WindowedPersonalDataManagerObserver() { + ~WindowedPersonalDataManagerObserver() override { infobar_service_->RemoveObserver(this); if (infobar_service_->infobar_count() > 0) { @@ -85,7 +85,7 @@ class WindowedPersonalDataManagerObserver } // PersonalDataManagerObserver: - virtual void OnPersonalDataChanged() override { + void OnPersonalDataChanged() override { if (has_run_message_loop_) { base::MessageLoopForUI::current()->Quit(); has_run_message_loop_ = false; @@ -93,12 +93,10 @@ class WindowedPersonalDataManagerObserver alerted_ = true; } - virtual void OnInsufficientFormData() override { - OnPersonalDataChanged(); - } + void OnInsufficientFormData() override { OnPersonalDataChanged(); } // infobars::InfoBarManager::Observer: - virtual void OnInfoBarAdded(infobars::InfoBar* infobar) override { + void OnInfoBarAdded(infobars::InfoBar* infobar) override { ConfirmInfoBarDelegate* infobar_delegate = infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate(); ASSERT_TRUE(infobar_delegate); @@ -116,12 +114,12 @@ class AutofillTest : public InProcessBrowserTest { protected: AutofillTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Don't want Keychain coming up on Mac. test::DisableSystemServices(browser()->profile()->GetPrefs()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { // Make sure to close any showing popups prior to tearing down the UI. content::WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h index 64d5d50..2fd4e79 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h @@ -42,22 +42,21 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { private: AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger, const base::Closure& save_card_callback); - virtual ~AutofillCCInfoBarDelegate(); + ~AutofillCCInfoBarDelegate() override; void LogUserAction(AutofillMetrics::InfoBarMetric user_action); // ConfirmInfoBarDelegate: - virtual void InfoBarDismissed() override; - virtual int GetIconID() const override; - virtual Type GetInfoBarType() const override; - virtual bool ShouldExpireInternal( - const NavigationDetails& details) const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; - virtual bool Accept() override; - virtual bool Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + void InfoBarDismissed() override; + int GetIconID() const override; + Type GetInfoBarType() const override; + bool ShouldExpireInternal(const NavigationDetails& details) const override; + base::string16 GetMessageText() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; + bool Accept() override; + bool Cancel() override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; // For logging UMA metrics. // Weak reference. Owned by the AutofillManager that initiated this infobar. diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc index 806801b..eabd7dc 100644 --- a/chrome/browser/autofill/autofill_interactive_uitest.cc +++ b/chrome/browser/autofill/autofill_interactive_uitest.cc @@ -99,20 +99,20 @@ class AutofillManagerTestDelegateImpl : public autofill::AutofillManagerTestDelegate { public: AutofillManagerTestDelegateImpl() {} - virtual ~AutofillManagerTestDelegateImpl() {} + ~AutofillManagerTestDelegateImpl() override {} // autofill::AutofillManagerTestDelegate: - virtual void DidPreviewFormData() override { + void DidPreviewFormData() override { ASSERT_TRUE(loop_runner_->loop_running()); loop_runner_->Quit(); } - virtual void DidFillFormData() override { + void DidFillFormData() override { ASSERT_TRUE(loop_runner_->loop_running()); loop_runner_->Quit(); } - virtual void DidShowSuggestions() override { + void DidShowSuggestions() override { ASSERT_TRUE(loop_runner_->loop_running()); loop_runner_->Quit(); } @@ -149,7 +149,7 @@ class WindowedPersonalDataManagerObserver infobar_service_->AddObserver(this); } - virtual ~WindowedPersonalDataManagerObserver() { + ~WindowedPersonalDataManagerObserver() override { while (infobar_service_->infobar_count() > 0) { infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0)); } @@ -157,7 +157,7 @@ class WindowedPersonalDataManagerObserver } // PersonalDataManagerObserver: - virtual void OnPersonalDataChanged() override { + void OnPersonalDataChanged() override { if (has_run_message_loop_) { base::MessageLoopForUI::current()->Quit(); has_run_message_loop_ = false; @@ -165,9 +165,7 @@ class WindowedPersonalDataManagerObserver alerted_ = true; } - virtual void OnInsufficientFormData() override { - OnPersonalDataChanged(); - } + void OnInsufficientFormData() override { OnPersonalDataChanged(); } void Wait() { @@ -181,7 +179,7 @@ class WindowedPersonalDataManagerObserver private: // infobars::InfoBarManager::Observer: - virtual void OnInfoBarAdded(infobars::InfoBar* infobar) override { + void OnInfoBarAdded(infobars::InfoBar* infobar) override { infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate()-> Accept(); } @@ -205,7 +203,7 @@ class AutofillInteractiveTest : public InProcessBrowserTest { virtual ~AutofillInteractiveTest() {} // InProcessBrowserTest: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Don't want Keychain coming up on Mac. test::DisableSystemServices(browser()->profile()->GetPrefs()); @@ -224,7 +222,7 @@ class AutofillInteractiveTest : public InProcessBrowserTest { ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(reset_mouse)); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { // Make sure to close any showing popups prior to tearing down the UI. content::WebContents* web_contents = GetWebContents(); AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( diff --git a/chrome/browser/autofill/autofill_server_browsertest.cc b/chrome/browser/autofill/autofill_server_browsertest.cc index a7cd12f..49c8bc9 100644 --- a/chrome/browser/autofill/autofill_server_browsertest.cc +++ b/chrome/browser/autofill/autofill_server_browsertest.cc @@ -35,7 +35,7 @@ class WindowedPersonalDataManagerObserver : public PersonalDataManagerObserver { message_loop_runner_(new content::MessageLoopRunner){ PersonalDataManagerFactory::GetForProfile(profile_)->AddObserver(this); } - virtual ~WindowedPersonalDataManagerObserver() {} + ~WindowedPersonalDataManagerObserver() override {} // Waits for the PersonalDataManager's list of profiles to be updated. void Wait() { @@ -44,9 +44,7 @@ class WindowedPersonalDataManagerObserver : public PersonalDataManagerObserver { } // PersonalDataManagerObserver: - virtual void OnPersonalDataChanged() override { - message_loop_runner_->Quit(); - } + void OnPersonalDataChanged() override { message_loop_runner_->Quit(); } private: Profile* profile_; @@ -70,7 +68,7 @@ class WindowedNetworkObserver : public net::TestURLFetcher::DelegateForTests { } // net::TestURLFetcher::DelegateForTests: - virtual void OnRequestStart(int fetcher_id) override { + void OnRequestStart(int fetcher_id) override { net::TestURLFetcher* fetcher = factory_->GetFetcherByID(fetcher_id); if (fetcher->upload_data() == expected_upload_data_) message_loop_runner_->Quit(); @@ -78,8 +76,8 @@ class WindowedNetworkObserver : public net::TestURLFetcher::DelegateForTests { // Not interested in any further status updates from this fetcher. fetcher->SetDelegateForTests(NULL); } - virtual void OnChunkUpload(int fetcher_id) override {} - virtual void OnRequestEnd(int fetcher_id) override {} + void OnChunkUpload(int fetcher_id) override {} + void OnRequestEnd(int fetcher_id) override {} private: // Mocks out network requests. @@ -95,7 +93,7 @@ class WindowedNetworkObserver : public net::TestURLFetcher::DelegateForTests { class AutofillServerTest : public InProcessBrowserTest { public: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Disable interactions with the Mac Keychain. PrefService* pref_service = browser()->profile()->GetPrefs(); test::DisableSystemServices(pref_service); diff --git a/chrome/browser/autofill/content_autofill_driver_browsertest.cc b/chrome/browser/autofill/content_autofill_driver_browsertest.cc index 77e9bea..1b15094 100644 --- a/chrome/browser/autofill/content_autofill_driver_browsertest.cc +++ b/chrome/browser/autofill/content_autofill_driver_browsertest.cc @@ -65,7 +65,7 @@ class TestContentAutofillDriver : public ContentAutofillDriver { client, g_browser_process->GetApplicationLocale(), AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER) {} - virtual ~TestContentAutofillDriver() {} + ~TestContentAutofillDriver() override {} private: DISALLOW_COPY_AND_ASSIGN(TestContentAutofillDriver); diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc index a2d335e..d12a8de 100644 --- a/chrome/browser/autofill/form_structure_browsertest.cc +++ b/chrome/browser/autofill/form_structure_browsertest.cc @@ -48,8 +48,7 @@ class FormStructureBrowserTest : public InProcessBrowserTest, virtual ~FormStructureBrowserTest(); // DataDrivenTest: - virtual void GenerateResults(const std::string& input, - std::string* output) override; + void GenerateResults(const std::string& input, std::string* output) override; // Serializes the given |forms| into a string. std::string FormStructuresToString(const std::vector<FormStructure*>& forms); diff --git a/chrome/browser/autofill/personal_data_manager_factory.h b/chrome/browser/autofill/personal_data_manager_factory.h index 6bb1542..1f69b75 100644 --- a/chrome/browser/autofill/personal_data_manager_factory.h +++ b/chrome/browser/autofill/personal_data_manager_factory.h @@ -32,12 +32,12 @@ class PersonalDataManagerFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<PersonalDataManagerFactory>; PersonalDataManagerFactory(); - virtual ~PersonalDataManagerFactory(); + ~PersonalDataManagerFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; }; diff --git a/chrome/browser/background/background_application_list_model.h b/chrome/browser/background/background_application_list_model.h index 0a0821e..14f7d8f 100644 --- a/chrome/browser/background/background_application_list_model.h +++ b/chrome/browser/background/background_application_list_model.h @@ -49,7 +49,7 @@ class BackgroundApplicationListModel : public content::NotificationObserver { // Create a new model associated with profile. explicit BackgroundApplicationListModel(Profile* profile); - virtual ~BackgroundApplicationListModel(); + ~BackgroundApplicationListModel() override; // Associate observer with this model. void AddObserver(Observer* observer); @@ -116,9 +116,9 @@ class BackgroundApplicationListModel : public content::NotificationObserver { Application* FindApplication(const extensions::Extension* extension); // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Notifies observers that some of the data associated with this background // application, e. g. the Icon, has changed. diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index b0c954f..016e429 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -104,13 +104,13 @@ class CrashNotificationDelegate : public NotificationDelegate { extension_id_(extension->id()) { } - virtual void Display() override {} + void Display() override {} - virtual void Error() override {} + void Error() override {} - virtual void Close(bool by_user) override {} + void Close(bool by_user) override {} - virtual void Click() override { + void Click() override { // http://crbug.com/247790 involves a crash notification balloon being // clicked while the extension isn't in the TERMINATED state. In that case, // any of the "reload" methods called below can unload the extension, which @@ -141,14 +141,14 @@ class CrashNotificationDelegate : public NotificationDelegate { ScheduleCloseBalloon(copied_extension_id, profile_); } - virtual bool HasClickedListener() override { return true; } + bool HasClickedListener() override { return true; } - virtual std::string id() const override { + std::string id() const override { return kNotificationPrefix + extension_id_; } private: - virtual ~CrashNotificationDelegate() {} + ~CrashNotificationDelegate() override {} Profile* profile_; bool is_hosted_app_; diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h index d6d17cf..382cb42 100644 --- a/chrome/browser/background/background_contents_service.h +++ b/chrome/browser/background/background_contents_service.h @@ -59,7 +59,7 @@ class BackgroundContentsService : private content::NotificationObserver, public: BackgroundContentsService(Profile* profile, const base::CommandLine* command_line); - virtual ~BackgroundContentsService(); + ~BackgroundContentsService() override; // Allows tests to reduce the time between a force-installed app/extension // crashing and when we reload it. @@ -89,11 +89,11 @@ class BackgroundContentsService : private content::NotificationObserver, std::vector<BackgroundContents*> GetBackgroundContents() const; // BackgroundContents::Delegate implementation. - virtual void AddWebContents(content::WebContents* new_contents, - WindowOpenDisposition disposition, - const gfx::Rect& initial_pos, - bool user_gesture, - bool* was_blocked) override; + void AddWebContents(content::WebContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture, + bool* was_blocked) override; // Gets the parent application id for the passed BackgroundContents. Returns // an empty string if no parent application found (e.g. passed @@ -140,22 +140,20 @@ class BackgroundContentsService : private content::NotificationObserver, void StartObserving(Profile* profile); // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // extensions::ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded( - content::BrowserContext* browser_context, - const extensions::Extension* extension) override; - virtual void OnExtensionUnloaded( + void OnExtensionLoaded(content::BrowserContext* browser_context, + const extensions::Extension* extension) override; + void OnExtensionUnloaded( content::BrowserContext* browser_context, const extensions::Extension* extension, extensions::UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + extensions::UninstallReason reason) override; // Restarts a force-installed app/extension after a crash. void RestartForceInstalledExtensionOnCrash( diff --git a/chrome/browser/background/background_contents_service_factory.h b/chrome/browser/background/background_contents_service_factory.h index 97cac48..1df96ca 100644 --- a/chrome/browser/background/background_contents_service_factory.h +++ b/chrome/browser/background/background_contents_service_factory.h @@ -26,17 +26,17 @@ class BackgroundContentsServiceFactory friend struct DefaultSingletonTraits<BackgroundContentsServiceFactory>; BackgroundContentsServiceFactory(); - virtual ~BackgroundContentsServiceFactory(); + ~BackgroundContentsServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; }; #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_FACTORY_H_ diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc index ca5953f..a42901c 100644 --- a/chrome/browser/background/background_contents_service_unittest.cc +++ b/chrome/browser/background/background_contents_service_unittest.cc @@ -90,7 +90,7 @@ class MockBackgroundContents : public BackgroundContents { content::Source<Profile>(profile_), content::Details<BackgroundContents>(this)); } - virtual const GURL& GetURL() const override { return url_; } + const GURL& GetURL() const override { return url_; } void MockClose(Profile* profile) { content::NotificationService::current()->Notify( @@ -100,7 +100,7 @@ class MockBackgroundContents : public BackgroundContents { delete this; } - virtual ~MockBackgroundContents() { + ~MockBackgroundContents() override { content::NotificationService::current()->Notify( chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED, content::Source<Profile>(profile_), @@ -125,7 +125,7 @@ class NotificationWaiter : public message_center::MessageCenterObserver { public: explicit NotificationWaiter(const std::string& target_id, Profile* profile) : target_id_(target_id), profile_(profile) {} - virtual ~NotificationWaiter() {} + ~NotificationWaiter() override {} void WaitForNotificationAdded() { DCHECK(!run_loop_.running()); @@ -139,14 +139,12 @@ class NotificationWaiter : public message_center::MessageCenterObserver { private: // message_center::MessageCenterObserver overrides: - virtual void OnNotificationAdded( - const std::string& notification_id) override { + void OnNotificationAdded(const std::string& notification_id) override { if (notification_id == FindNotificationIdFromDelegateId(target_id_)) run_loop_.Quit(); } - virtual void OnNotificationUpdated( - const std::string& notification_id) override { + void OnNotificationUpdated(const std::string& notification_id) override { if (notification_id == FindNotificationIdFromDelegateId(target_id_)) run_loop_.Quit(); } diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h index 1f2c4ba..2deef66 100644 --- a/chrome/browser/background/background_mode_manager.h +++ b/chrome/browser/background/background_mode_manager.h @@ -56,7 +56,7 @@ class BackgroundModeManager public: BackgroundModeManager(base::CommandLine* command_line, ProfileInfoCache* profile_cache); - virtual ~BackgroundModeManager(); + ~BackgroundModeManager() override; static void RegisterPrefs(PrefRegistrySimple* registry); @@ -119,13 +119,13 @@ class BackgroundModeManager explicit BackgroundModeData( Profile* profile, CommandIdExtensionVector* command_id_extension_vector); - virtual ~BackgroundModeData(); + ~BackgroundModeData() override; // The cached list of BackgroundApplications. scoped_ptr<BackgroundApplicationListModel> applications_; // Overrides from StatusIconMenuModel::Delegate implementation. - virtual void ExecuteCommand(int command_id, int event_flags) override; + void ExecuteCommand(int command_id, int event_flags) override; // Returns a browser window, or creates one if none are open. Used by // operations (like displaying the preferences dialog) that require a @@ -191,31 +191,29 @@ class BackgroundModeManager typedef std::map<Profile*, BackgroundModeInfo> BackgroundModeInfoMap; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Called when the kBackgroundModeEnabled preference changes. void OnBackgroundModeEnabledPrefChanged(); // BackgroundApplicationListModel::Observer implementation. - virtual void OnApplicationDataChanged(const extensions::Extension* extension, - Profile* profile) override; - virtual void OnApplicationListChanged(Profile* profile) override; + void OnApplicationDataChanged(const extensions::Extension* extension, + Profile* profile) override; + void OnApplicationListChanged(Profile* profile) override; // Overrides from ProfileInfoCacheObserver - virtual void OnProfileAdded(const base::FilePath& profile_path) override; - virtual void OnProfileWillBeRemoved( - const base::FilePath& profile_path) override; - virtual void OnProfileNameChanged( - const base::FilePath& profile_path, - const base::string16& old_profile_name) override; + void OnProfileAdded(const base::FilePath& profile_path) override; + void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; + void OnProfileNameChanged(const base::FilePath& profile_path, + const base::string16& old_profile_name) override; // Overrides from StatusIconMenuModel::Delegate implementation. - virtual void ExecuteCommand(int command_id, int event_flags) override; + void ExecuteCommand(int command_id, int event_flags) override; // chrome::BrowserListObserver implementation. - virtual void OnBrowserAdded(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override; // Invoked when an extension is installed so we can ensure that // launch-on-startup is enabled if appropriate. |extension| can be NULL when diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc index 67e41e2..d8e9930 100644 --- a/chrome/browser/background/background_mode_manager_unittest.cc +++ b/chrome/browser/background/background_mode_manager_unittest.cc @@ -47,16 +47,16 @@ class SimpleTestBackgroundModeManager : public BackgroundModeManager { ResumeBackgroundMode(); } - virtual void EnableLaunchOnStartup(bool launch) override { + void EnableLaunchOnStartup(bool launch) override { launch_on_startup_ = launch; } - virtual void DisplayAppInstalledNotification( + void DisplayAppInstalledNotification( const extensions::Extension* extension) override { has_shown_balloon_ = true; } - virtual void CreateStatusTrayIcon() override { have_status_tray_ = true; } - virtual void RemoveStatusTrayIcon() override { have_status_tray_ = false; } + void CreateStatusTrayIcon() override { have_status_tray_ = true; } + void RemoveStatusTrayIcon() override { have_status_tray_ = false; } bool HaveStatusTray() const { return have_status_tray_; } bool IsLaunchOnStartup() const { return launch_on_startup_; } @@ -75,13 +75,12 @@ class SimpleTestBackgroundModeManager : public BackgroundModeManager { class TestStatusIcon : public StatusIcon { public: TestStatusIcon() {} - virtual void SetImage(const gfx::ImageSkia& image) override {} - virtual void SetToolTip(const base::string16& tool_tip) override {} - virtual void DisplayBalloon(const gfx::ImageSkia& icon, - const base::string16& title, - const base::string16& contents) override {} - virtual void UpdatePlatformContextMenu( - StatusIconMenuModel* menu) override {} + void SetImage(const gfx::ImageSkia& image) override {} + void SetToolTip(const base::string16& tool_tip) override {} + void DisplayBalloon(const gfx::ImageSkia& icon, + const base::string16& title, + const base::string16& contents) override {} + void UpdatePlatformContextMenu(StatusIconMenuModel* menu) override {} private: DISALLOW_COPY_AND_ASSIGN(TestStatusIcon); @@ -103,9 +102,8 @@ class TestBackgroundModeManager : public SimpleTestBackgroundModeManager { ResumeBackgroundMode(); } - virtual int GetBackgroundAppCount() const override { return app_count_; } - virtual int GetBackgroundAppCountForProfile( - Profile* const profile) const override { + int GetBackgroundAppCount() const override { return app_count_; } + int GetBackgroundAppCountForProfile(Profile* const profile) const override { return profile_app_count_; } void SetBackgroundAppCount(int count) { app_count_ = count; } @@ -116,7 +114,7 @@ class TestBackgroundModeManager : public SimpleTestBackgroundModeManager { enabled_ = enabled; OnBackgroundModeEnabledPrefChanged(); } - virtual bool IsBackgroundModePrefEnabled() const override { return enabled_; } + bool IsBackgroundModePrefEnabled() const override { return enabled_; } private: bool enabled_; diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h index 4af30b1..1d576df 100644 --- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h +++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h @@ -26,7 +26,7 @@ class BitmapFetcher : public net::URLFetcherDelegate, public ImageDecoder::Delegate { public: BitmapFetcher(const GURL& url, BitmapFetcherDelegate* delegate); - virtual ~BitmapFetcher(); + ~BitmapFetcher() override; const GURL& url() const { return url_; } @@ -45,25 +45,25 @@ class BitmapFetcher : public net::URLFetcherDelegate, // This will be called when the URL has been fetched, successfully or not. // Use accessor methods on |source| to get the results. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // This will be called when some part of the response is read. |current| // denotes the number of bytes received up to the call, and |total| is the // expected total size of the response (or -1 if not determined). - virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, - int64 current, - int64 total) override; + void OnURLFetchDownloadProgress(const net::URLFetcher* source, + int64 current, + int64 total) override; // Methods inherited from ImageDecoder::Delegate // Called when image is decoded. |decoder| is used to identify the image in // case of decoding several images simultaneously. This will not be called // on the UI thread. - virtual void OnImageDecoded(const ImageDecoder* decoder, - const SkBitmap& decoded_image) override; + void OnImageDecoded(const ImageDecoder* decoder, + const SkBitmap& decoded_image) override; // Called when decoding image failed. - virtual void OnDecodeImageFailed(const ImageDecoder* decoder) override; + void OnDecodeImageFailed(const ImageDecoder* decoder) override; private: // Alerts the delegate that a failure occurred. diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc index a81cc66..26aaa48 100644 --- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc +++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc @@ -32,13 +32,10 @@ class BitmapFetcherTestDelegate : public BitmapFetcherDelegate { success_(false), async_(async) {} - virtual ~BitmapFetcherTestDelegate() { - EXPECT_TRUE(called_); - } + ~BitmapFetcherTestDelegate() override { EXPECT_TRUE(called_); } // Method inherited from BitmapFetcherDelegate. - virtual void OnFetchComplete(const GURL url, - const SkBitmap* bitmap) override { + void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override { called_ = true; url_ = url; if (bitmap) { diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h index cd80c21..3d98dd8 100644 --- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h +++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h @@ -42,7 +42,7 @@ class BitmapFetcherService : public KeyedService, }; explicit BitmapFetcherService(content::BrowserContext* context); - virtual ~BitmapFetcherService(); + ~BitmapFetcherService() override; // Cancels a request, if it is still in-flight. void CancelRequest(RequestId requestId); @@ -81,7 +81,7 @@ class BitmapFetcherService : public KeyedService, void RemoveFetcher(const chrome::BitmapFetcher* fetcher); // BitmapFetcherDelegate implementation. - virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; + void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; // Currently active image fetchers. BitmapFetchers active_fetchers_; diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h index 1c8fdd8a..52662a5 100644 --- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h +++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h @@ -21,10 +21,10 @@ class BitmapFetcherServiceFactory : BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<BitmapFetcherServiceFactory>; BitmapFetcherServiceFactory(); - virtual ~BitmapFetcherServiceFactory(); + ~BitmapFetcherServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(BitmapFetcherServiceFactory); diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc index 2767455..7d395aa 100644 --- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc +++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc @@ -20,10 +20,10 @@ class TestNotificationInterface { class TestObserver : public BitmapFetcherService::Observer { public: explicit TestObserver(TestNotificationInterface* target) : target_(target) {} - virtual ~TestObserver() { target_->OnRequestFinished(); } + ~TestObserver() override { target_->OnRequestFinished(); } - virtual void OnImageChanged(BitmapFetcherService::RequestId request_id, - const SkBitmap& answers_image) override { + void OnImageChanged(BitmapFetcherService::RequestId request_id, + const SkBitmap& answers_image) override { target_->OnImageChanged(); } @@ -34,11 +34,11 @@ class TestService : public BitmapFetcherService { public: explicit TestService(content::BrowserContext* context) : BitmapFetcherService(context) {} - virtual ~TestService() {} + ~TestService() override {} // Create a fetcher, but don't start downloading. That allows side-stepping // the decode step, which requires a utility process. - virtual chrome::BitmapFetcher* CreateFetcher(const GURL& url) override { + chrome::BitmapFetcher* CreateFetcher(const GURL& url) override { return new chrome::BitmapFetcher(url, this); } }; @@ -64,9 +64,9 @@ class BitmapFetcherServiceTest : public testing::Test, } size_t cache_size() { return service_->cache_.size(); } - virtual void OnImageChanged() override { imagesChanged_++; } + void OnImageChanged() override { imagesChanged_++; } - virtual void OnRequestFinished() override { requestsFinished_++; } + void OnRequestFinished() override { requestsFinished_++; } // Simulate finishing a URL fetch and decode for the given fetcher. void CompleteFetch(const GURL& url) { diff --git a/chrome/browser/bookmarks/bookmark_html_writer.h b/chrome/browser/bookmarks/bookmark_html_writer.h index a37981f..7badebb 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer.h +++ b/chrome/browser/bookmarks/bookmark_html_writer.h @@ -46,15 +46,15 @@ class BookmarkFaviconFetcher: public content::NotificationObserver { BookmarkFaviconFetcher(Profile* profile, const base::FilePath& path, BookmarksExportObserver* observer); - virtual ~BookmarkFaviconFetcher(); + ~BookmarkFaviconFetcher() override; // Executes bookmark export process. void ExportBookmarks(); // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: // Recursively extracts URLs from bookmarks. diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc index 9c473e5..cc9da03 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc @@ -130,9 +130,7 @@ class BookmarksObserver : public BookmarksExportObserver { DCHECK(loop); } - virtual void OnExportFinished() override { - loop_->Quit(); - } + void OnExportFinished() override { loop_->Quit(); } private: base::RunLoop* loop_; diff --git a/chrome/browser/bookmarks/bookmark_model_factory.h b/chrome/browser/bookmarks/bookmark_model_factory.h index 17ed822..5c98c21 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.h +++ b/chrome/browser/bookmarks/bookmark_model_factory.h @@ -26,16 +26,16 @@ class BookmarkModelFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<BookmarkModelFactory>; BookmarkModelFactory(); - virtual ~BookmarkModelFactory(); + ~BookmarkModelFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(BookmarkModelFactory); }; diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.h b/chrome/browser/bookmarks/chrome_bookmark_client.h index f6e4d2d..8d3abe7 100644 --- a/chrome/browser/bookmarks/chrome_bookmark_client.h +++ b/chrome/browser/bookmarks/chrome_bookmark_client.h @@ -25,12 +25,12 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient, public BaseBookmarkModelObserver { public: explicit ChromeBookmarkClient(Profile* profile); - virtual ~ChromeBookmarkClient(); + ~ChromeBookmarkClient() override; void Init(BookmarkModel* model); // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; // Returns the managed_node. const BookmarkNode* managed_node() { return managed_node_; } @@ -43,41 +43,37 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient, const std::vector<const BookmarkNode*>& list); // bookmarks::BookmarkClient: - virtual bool PreferTouchIcon() override; - virtual base::CancelableTaskTracker::TaskId GetFaviconImageForPageURL( + bool PreferTouchIcon() override; + base::CancelableTaskTracker::TaskId GetFaviconImageForPageURL( const GURL& page_url, favicon_base::IconType type, const favicon_base::FaviconImageCallback& callback, base::CancelableTaskTracker* tracker) override; - virtual bool SupportsTypedCountForNodes() override; - virtual void GetTypedCountForNodes( + bool SupportsTypedCountForNodes() override; + void GetTypedCountForNodes( const NodeSet& nodes, NodeTypedCountPairs* node_typed_count_pairs) override; - virtual bool IsPermanentNodeVisible( - const BookmarkPermanentNode* node) override; - virtual void RecordAction(const base::UserMetricsAction& action) override; - virtual bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() override; - virtual bool CanSetPermanentNodeTitle( - const BookmarkNode* permanent_node) override; - virtual bool CanSyncNode(const BookmarkNode* node) override; - virtual bool CanBeEditedByUser(const BookmarkNode* node) override; + bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) override; + void RecordAction(const base::UserMetricsAction& action) override; + bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() override; + bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) override; + bool CanSyncNode(const BookmarkNode* node) override; + bool CanBeEditedByUser(const BookmarkNode* node) override; private: friend class HistoryServiceFactory; void SetHistoryService(HistoryService* history_service); // BaseBookmarkModelObserver: - virtual void BookmarkModelChanged() override; - virtual void BookmarkNodeRemoved(BookmarkModel* model, - const BookmarkNode* parent, - int old_index, - const BookmarkNode* node, + void BookmarkModelChanged() override; + void BookmarkNodeRemoved(BookmarkModel* model, + const BookmarkNode* parent, + int old_index, + const BookmarkNode* node, + const std::set<GURL>& removed_urls) override; + void BookmarkAllUserNodesRemoved(BookmarkModel* model, const std::set<GURL>& removed_urls) override; - virtual void BookmarkAllUserNodesRemoved( - BookmarkModel* model, - const std::set<GURL>& removed_urls) override; - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; // Helper for GetLoadExtraNodesCallback(). static bookmarks::BookmarkPermanentNodeList LoadExtraNodes( diff --git a/chrome/browser/bookmarks/chrome_bookmark_client_factory.h b/chrome/browser/bookmarks/chrome_bookmark_client_factory.h index 0ffefc8..597728bb 100644 --- a/chrome/browser/bookmarks/chrome_bookmark_client_factory.h +++ b/chrome/browser/bookmarks/chrome_bookmark_client_factory.h @@ -26,14 +26,14 @@ class ChromeBookmarkClientFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<ChromeBookmarkClientFactory>; ChromeBookmarkClientFactory(); - virtual ~ChromeBookmarkClientFactory(); + ~ChromeBookmarkClientFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClientFactory); }; diff --git a/chrome/browser/browser_encoding_browsertest.cc b/chrome/browser/browser_encoding_browsertest.cc index d80694d..b26d08f 100644 --- a/chrome/browser/browser_encoding_browsertest.cc +++ b/chrome/browser/browser_encoding_browsertest.cc @@ -81,17 +81,17 @@ class SavePackageFinishedObserver : public content::DownloadManager::Observer { download_manager_->AddObserver(this); } - virtual ~SavePackageFinishedObserver() { + ~SavePackageFinishedObserver() override { if (download_manager_) download_manager_->RemoveObserver(this); } // DownloadManager::Observer: - virtual void OnSavePackageSuccessfullyFinished( - content::DownloadManager* manager, content::DownloadItem* item) override { + void OnSavePackageSuccessfullyFinished(content::DownloadManager* manager, + content::DownloadItem* item) override { callback_.Run(); } - virtual void ManagerGoingDown(content::DownloadManager* manager) override { + void ManagerGoingDown(content::DownloadManager* manager) override { download_manager_->RemoveObserver(this); download_manager_ = NULL; } @@ -142,7 +142,7 @@ class BrowserEncodingTest EXPECT_TRUE(base::ContentsEqual(full_file_name, expected_file_name)); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); save_dir_ = temp_dir_.path(); temp_sub_resource_dir_ = save_dir_.AppendASCII("sub_resource_files"); diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc index 49b1ce9..8c95ada 100644 --- a/chrome/browser/browser_keyevents_browsertest.cc +++ b/chrome/browser/browser_keyevents_browsertest.cc @@ -109,9 +109,9 @@ class TestFinishObserver : public content::NotificationObserver { return finished_; } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { 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/browser_process_impl.h b/chrome/browser/browser_process_impl.h index a2fb838..d66c403 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -57,7 +57,7 @@ class BrowserProcessImpl : public BrowserProcess, // |local_state_task_runner| must be a shutdown-blocking task runner. BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, const base::CommandLine& command_line); - virtual ~BrowserProcessImpl(); + ~BrowserProcessImpl() override; // Called before the browser threads are created. void PreCreateThreads(); @@ -75,70 +75,67 @@ class BrowserProcessImpl : public BrowserProcess, void PostDestroyThreads(); // BrowserProcess implementation. - virtual void ResourceDispatcherHostCreated() override; - virtual void EndSession() override; - virtual MetricsServicesManager* GetMetricsServicesManager() override; - virtual metrics::MetricsService* metrics_service() override; - virtual rappor::RapporService* rappor_service() override; - virtual IOThread* io_thread() override; - virtual WatchDogThread* watchdog_thread() override; - virtual ProfileManager* profile_manager() override; - virtual PrefService* local_state() override; - virtual net::URLRequestContextGetter* system_request_context() override; - virtual chrome_variations::VariationsService* variations_service() override; - virtual BrowserProcessPlatformPart* platform_part() override; - virtual extensions::EventRouterForwarder* - extension_event_router_forwarder() override; - virtual NotificationUIManager* notification_ui_manager() override; - virtual message_center::MessageCenter* message_center() override; - virtual policy::BrowserPolicyConnector* browser_policy_connector() override; - virtual policy::PolicyService* policy_service() override; - virtual IconManager* icon_manager() override; - virtual GLStringManager* gl_string_manager() override; - virtual GpuModeManager* gpu_mode_manager() override; - virtual void CreateDevToolsHttpProtocolHandler( + void ResourceDispatcherHostCreated() override; + void EndSession() override; + MetricsServicesManager* GetMetricsServicesManager() override; + metrics::MetricsService* metrics_service() override; + rappor::RapporService* rappor_service() override; + IOThread* io_thread() override; + WatchDogThread* watchdog_thread() override; + ProfileManager* profile_manager() override; + PrefService* local_state() override; + net::URLRequestContextGetter* system_request_context() override; + chrome_variations::VariationsService* variations_service() override; + BrowserProcessPlatformPart* platform_part() override; + extensions::EventRouterForwarder* extension_event_router_forwarder() override; + NotificationUIManager* notification_ui_manager() override; + message_center::MessageCenter* message_center() override; + policy::BrowserPolicyConnector* browser_policy_connector() override; + policy::PolicyService* policy_service() override; + IconManager* icon_manager() override; + GLStringManager* gl_string_manager() override; + GpuModeManager* gpu_mode_manager() override; + void CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, int port) override; - virtual unsigned int AddRefModule() override; - virtual unsigned int ReleaseModule() override; - virtual bool IsShuttingDown() override; - virtual printing::PrintJobManager* print_job_manager() override; - virtual printing::PrintPreviewDialogController* - print_preview_dialog_controller() override; - virtual printing::BackgroundPrintingManager* - background_printing_manager() override; - virtual IntranetRedirectDetector* intranet_redirect_detector() override; - virtual const std::string& GetApplicationLocale() override; - virtual void SetApplicationLocale(const std::string& locale) override; - virtual DownloadStatusUpdater* download_status_updater() override; - virtual DownloadRequestLimiter* download_request_limiter() override; - virtual BackgroundModeManager* background_mode_manager() override; - virtual void set_background_mode_manager_for_test( + unsigned int AddRefModule() override; + unsigned int ReleaseModule() override; + bool IsShuttingDown() override; + printing::PrintJobManager* print_job_manager() override; + printing::PrintPreviewDialogController* print_preview_dialog_controller() + override; + printing::BackgroundPrintingManager* background_printing_manager() override; + IntranetRedirectDetector* intranet_redirect_detector() override; + const std::string& GetApplicationLocale() override; + void SetApplicationLocale(const std::string& locale) override; + DownloadStatusUpdater* download_status_updater() override; + DownloadRequestLimiter* download_request_limiter() override; + BackgroundModeManager* background_mode_manager() override; + void set_background_mode_manager_for_test( scoped_ptr<BackgroundModeManager> manager) override; - virtual StatusTray* status_tray() override; - virtual SafeBrowsingService* safe_browsing_service() override; - virtual safe_browsing::ClientSideDetectionService* - safe_browsing_detection_service() override; + StatusTray* status_tray() override; + SafeBrowsingService* safe_browsing_service() override; + safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() + override; #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) virtual void StartAutoupdateTimer() override; #endif - virtual ChromeNetLog* net_log() override; - virtual prerender::PrerenderTracker* prerender_tracker() override; - virtual component_updater::ComponentUpdateService* - component_updater() override; - virtual CRLSetFetcher* crl_set_fetcher() override; - virtual component_updater::PnaclComponentInstaller* - pnacl_component_installer() override; - virtual MediaFileSystemRegistry* media_file_system_registry() override; - virtual bool created_local_state() const override; + ChromeNetLog* net_log() override; + prerender::PrerenderTracker* prerender_tracker() override; + component_updater::ComponentUpdateService* component_updater() override; + CRLSetFetcher* crl_set_fetcher() override; + component_updater::PnaclComponentInstaller* pnacl_component_installer() + override; + MediaFileSystemRegistry* media_file_system_registry() override; + bool created_local_state() const override; #if defined(ENABLE_WEBRTC) - virtual WebRtcLogUploader* webrtc_log_uploader() override; + WebRtcLogUploader* webrtc_log_uploader() override; #endif - virtual network_time::NetworkTimeTracker* network_time_tracker() override; - virtual gcm::GCMDriver* gcm_driver() override; + network_time::NetworkTimeTracker* network_time_tracker() override; + gcm::GCMDriver* gcm_driver() override; static void RegisterPrefs(PrefRegistrySimple* registry); diff --git a/chrome/browser/browser_process_platform_part_mac.h b/chrome/browser/browser_process_platform_part_mac.h index 673d22e..d78ee99 100644 --- a/chrome/browser/browser_process_platform_part_mac.h +++ b/chrome/browser/browser_process_platform_part_mac.h @@ -17,12 +17,12 @@ class ExtensionAppShimHandler; class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase { public: BrowserProcessPlatformPart(); - virtual ~BrowserProcessPlatformPart(); + ~BrowserProcessPlatformPart() override; // Overridden from BrowserProcessPlatformPartBase: - virtual void StartTearDown() override; - virtual void AttemptExit() override; - virtual void PreMainMessageLoopRun() override; + void StartTearDown() override; + void AttemptExit() override; + void PreMainMessageLoopRun() override; AppShimHostManager* app_shim_host_manager(); diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index ed55c08..2a8749e 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc @@ -116,7 +116,7 @@ class URLRequestTimeoutOnDemandJob : public net::URLRequestJob, public base::NonThreadSafe { public: // net::URLRequestJob: - virtual void Start() override; + void Start() override; // All the public static methods below can be called on any thread. @@ -144,7 +144,7 @@ class URLRequestTimeoutOnDemandJob : public net::URLRequestJob, URLRequestTimeoutOnDemandJob(net::URLRequest* request, net::NetworkDelegate* network_delegate); - virtual ~URLRequestTimeoutOnDemandJob(); + ~URLRequestTimeoutOnDemandJob() override; // Attempts to removes |this| from |jobs_|. Returns true if it was removed // from the list. @@ -503,7 +503,7 @@ bool IsLoginTab(WebContents* web_contents) { class MultiNavigationObserver : public content::NotificationObserver { public: MultiNavigationObserver(); - virtual ~MultiNavigationObserver(); + ~MultiNavigationObserver() override; // Waits for exactly |num_navigations_to_wait_for| LOAD_STOP // notifications to have occurred since the construction of |this|. More @@ -521,8 +521,9 @@ class MultiNavigationObserver : public content::NotificationObserver { typedef std::map<const WebContents*, int> TabNavigationMap; // content::NotificationObserver: - virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; int num_navigations_; @@ -603,7 +604,7 @@ void MultiNavigationObserver::Observe( class FailLoadsAfterLoginObserver : public content::NotificationObserver { public: FailLoadsAfterLoginObserver(); - virtual ~FailLoadsAfterLoginObserver(); + ~FailLoadsAfterLoginObserver() override; void WaitForNavigations(); @@ -611,8 +612,9 @@ class FailLoadsAfterLoginObserver : public content::NotificationObserver { typedef std::set<const WebContents*> TabSet; // content::NotificationObserver: - virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // The set of tabs that need to be navigated. This is the set of loading // tabs when the observer is created. @@ -700,9 +702,9 @@ class CaptivePortalObserver : public content::NotificationObserver { private: // Records results and exits the message loop, if needed. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Number of times OnPortalResult has been called since construction. int num_results_received_; @@ -799,8 +801,8 @@ class CaptivePortalBrowserTest : public InProcessBrowserTest { CaptivePortalBrowserTest(); // InProcessBrowserTest: - virtual void SetUpOnMainThread() override; - virtual void TearDownOnMainThread() override; + void SetUpOnMainThread() override; + void TearDownOnMainThread() override; // Sets the captive portal checking preference. Does not affect the command // line flag, which is set in SetUpCommandLine. diff --git a/chrome/browser/captive_portal/captive_portal_service.cc b/chrome/browser/captive_portal/captive_portal_service.cc index 22b43a2..93c37a8 100644 --- a/chrome/browser/captive_portal/captive_portal_service.cc +++ b/chrome/browser/captive_portal/captive_portal_service.cc @@ -151,7 +151,7 @@ class CaptivePortalService::RecheckBackoffEntry : public net::BackoffEntry { } private: - virtual base::TimeTicks ImplGetTimeNow() const override { + base::TimeTicks ImplGetTimeNow() const override { return captive_portal_service_->GetCurrentTimeTicks(); } diff --git a/chrome/browser/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h index 8131f62..66e6d1b 100644 --- a/chrome/browser/captive_portal/captive_portal_service.h +++ b/chrome/browser/captive_portal/captive_portal_service.h @@ -43,7 +43,7 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe { }; explicit CaptivePortalService(Profile* profile); - virtual ~CaptivePortalService(); + ~CaptivePortalService() override; // Triggers a check for a captive portal. If there's already a check in // progress, does nothing. Throttles the rate at which requests are sent. @@ -114,7 +114,7 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe { const captive_portal::CaptivePortalDetector::Results& results); // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; // Called when a captive portal check completes. Passes the result to all // observers. diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.h b/chrome/browser/captive_portal/captive_portal_service_factory.h index ad84d41..1c1269b 100644 --- a/chrome/browser/captive_portal/captive_portal_service_factory.h +++ b/chrome/browser/captive_portal/captive_portal_service_factory.h @@ -31,12 +31,12 @@ class CaptivePortalServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<CaptivePortalServiceFactory>; CaptivePortalServiceFactory(); - virtual ~CaptivePortalServiceFactory(); + ~CaptivePortalServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(CaptivePortalServiceFactory); diff --git a/chrome/browser/captive_portal/captive_portal_service_unittest.cc b/chrome/browser/captive_portal/captive_portal_service_unittest.cc index 6a667f0..af6a487 100644 --- a/chrome/browser/captive_portal/captive_portal_service_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_service_unittest.cc @@ -52,9 +52,9 @@ class CaptivePortalObserver : public content::NotificationObserver { int num_results_received() const { return num_results_received_; } private: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { ASSERT_EQ(type, chrome::NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT); ASSERT_EQ(profile_, content::Source<Profile>(source).ptr()); diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.h b/chrome/browser/captive_portal/captive_portal_tab_helper.h index 4acf897..99508a6 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.h +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.h @@ -60,37 +60,33 @@ class CaptivePortalTabHelper public base::NonThreadSafe, public content::WebContentsUserData<CaptivePortalTabHelper> { public: - virtual ~CaptivePortalTabHelper(); + ~CaptivePortalTabHelper() override; // content::WebContentsObserver: - virtual void RenderViewDeleted( - content::RenderViewHost* render_view_host) override; + void RenderViewDeleted(content::RenderViewHost* render_view_host) override; - virtual void DidStartProvisionalLoadForFrame( + void DidStartProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) override; - virtual void DidCommitProvisionalLoadForFrame( + void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, ui::PageTransition transition_type) override; - virtual void DidFailProvisionalLoad( - content::RenderFrameHost* render_frame_host, - const GURL& validated_url, - int error_code, - const base::string16& error_description) override; + void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url, + int error_code, + const base::string16& error_description) override; - virtual void DidStopLoading( - content::RenderViewHost* render_view_host) override; + void DidStopLoading(content::RenderViewHost* render_view_host) override; // content::NotificationObserver: - virtual void Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Called when a certificate interstitial error page is about to be shown. void OnSSLCertError(const net::SSLInfo& ssl_info); diff --git a/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc index bd003fb..ccbcd03 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc @@ -73,14 +73,11 @@ class MockInterstitialPageDelegate : public content::InterstitialPageDelegate { interstitial_page->Show(); } - virtual ~MockInterstitialPageDelegate() { - } + ~MockInterstitialPageDelegate() override {} private: // InterstitialPageDelegate implementation: - virtual std::string GetHTMLContents() override { - return "HTML Contents"; - } + std::string GetHTMLContents() override { return "HTML Contents"; } DISALLOW_COPY_AND_ASSIGN(MockInterstitialPageDelegate); }; diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index cd0f028..5a0e1f7 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -509,12 +509,12 @@ class LoadCompleteListener : public content::NotificationObserver { content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, content::NotificationService::AllSources()); } - virtual ~LoadCompleteListener() {} + ~LoadCompleteListener() override {} // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { DCHECK_EQ(content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, type); startup_metric_utils::OnInitialPageLoadComplete(); delete this; diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h index 2f16143..65cbaa3 100644 --- a/chrome/browser/chrome_browser_main.h +++ b/chrome/browser/chrome_browser_main.h @@ -47,7 +47,7 @@ class TrackingSynchronizer; class ChromeBrowserMainParts : public content::BrowserMainParts { public: - virtual ~ChromeBrowserMainParts(); + ~ChromeBrowserMainParts() override; // Add additional ChromeBrowserMainExtraParts. virtual void AddParts(ChromeBrowserMainExtraParts* parts); @@ -60,16 +60,16 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { // These are called in-order by content::BrowserMainLoop. // Each stage calls the same stages in any ChromeBrowserMainExtraParts added // with AddParts() from ChromeContentBrowserClient::CreateBrowserMainParts. - virtual void PreEarlyInitialization() override; - virtual void PostEarlyInitialization() override; - virtual void ToolkitInitialized() override; - virtual void PreMainMessageLoopStart() override; - virtual void PostMainMessageLoopStart() override; - virtual int PreCreateThreads() override; - virtual void PreMainMessageLoopRun() override; - virtual bool MainMessageLoopRun(int* result_code) override; - virtual void PostMainMessageLoopRun() override; - virtual void PostDestroyThreads() override; + void PreEarlyInitialization() override; + void PostEarlyInitialization() override; + void ToolkitInitialized() override; + void PreMainMessageLoopStart() override; + void PostMainMessageLoopStart() override; + int PreCreateThreads() override; + void PreMainMessageLoopRun() override; + bool MainMessageLoopRun(int* result_code) override; + void PostMainMessageLoopRun() override; + void PostDestroyThreads() override; // Additional stages for ChromeBrowserMainExtraParts. These stages are called // in order from PreMainMessageLoopRun(). See implementation for details. diff --git a/chrome/browser/chrome_browser_main_mac.h b/chrome/browser/chrome_browser_main_mac.h index 7cbfc73..d7285f6 100644 --- a/chrome/browser/chrome_browser_main_mac.h +++ b/chrome/browser/chrome_browser_main_mac.h @@ -11,14 +11,14 @@ class ChromeBrowserMainPartsMac : public ChromeBrowserMainPartsPosix { public: explicit ChromeBrowserMainPartsMac( const content::MainFunctionParams& parameters); - virtual ~ChromeBrowserMainPartsMac(); + ~ChromeBrowserMainPartsMac() override; // BrowserParts overrides. - virtual void PreEarlyInitialization() override; - virtual void PreMainMessageLoopStart() override; - virtual void PostMainMessageLoopStart() override; - virtual void PreProfileInit() override; - virtual void PostProfileInit() override; + void PreEarlyInitialization() override; + void PreMainMessageLoopStart() override; + void PostMainMessageLoopStart() override; + void PreProfileInit() override; + void PostProfileInit() override; // Perform platform-specific work that needs to be done after the main event // loop has ended. The embedder must be sure to call this. diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc index 43927f6..a6f38b1 100644 --- a/chrome/browser/chrome_browser_main_posix.cc +++ b/chrome/browser/chrome_browser_main_posix.cc @@ -95,13 +95,13 @@ class ExitHandler : public content::NotificationObserver { static void ExitWhenPossibleOnUIThread(); // Overridden from content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: ExitHandler(); - virtual ~ExitHandler(); + ~ExitHandler() override; // Does the appropriate call to Exit. static void Exit(); @@ -158,7 +158,7 @@ class ShutdownDetector : public base::PlatformThread::Delegate { public: explicit ShutdownDetector(int shutdown_fd); - virtual void ThreadMain() override; + void ThreadMain() override; private: const int shutdown_fd_; diff --git a/chrome/browser/chrome_browser_main_posix.h b/chrome/browser/chrome_browser_main_posix.h index ff687ca..2223eb2 100644 --- a/chrome/browser/chrome_browser_main_posix.h +++ b/chrome/browser/chrome_browser_main_posix.h @@ -13,11 +13,11 @@ class ChromeBrowserMainPartsPosix : public ChromeBrowserMainParts { const content::MainFunctionParams& parameters); // content::BrowserMainParts overrides. - virtual void PreEarlyInitialization() override; - virtual void PostMainMessageLoopStart() override; + void PreEarlyInitialization() override; + void PostMainMessageLoopStart() override; // ChromeBrowserMainParts overrides. - virtual void ShowMissingLocaleMessageBox() override; + void ShowMissingLocaleMessageBox() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsPosix); diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 1c7d511..cbd7382 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -44,7 +44,7 @@ namespace chrome { class ChromeContentBrowserClient : public content::ContentBrowserClient { public: ChromeContentBrowserClient(); - virtual ~ChromeContentBrowserClient(); + ~ChromeContentBrowserClient() override; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); @@ -52,116 +52,112 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { // update our I/O thread cache of this value. static void SetApplicationLocale(const std::string& locale); - virtual content::BrowserMainParts* CreateBrowserMainParts( + content::BrowserMainParts* CreateBrowserMainParts( const content::MainFunctionParams& parameters) override; - virtual std::string GetStoragePartitionIdForSite( + std::string GetStoragePartitionIdForSite( content::BrowserContext* browser_context, const GURL& site) override; - virtual bool IsValidStoragePartitionId( - content::BrowserContext* browser_context, - const std::string& partition_id) override; - virtual void GetStoragePartitionConfigForSite( + bool IsValidStoragePartitionId(content::BrowserContext* browser_context, + const std::string& partition_id) override; + void GetStoragePartitionConfigForSite( content::BrowserContext* browser_context, const GURL& site, bool can_be_default, std::string* partition_domain, std::string* partition_name, bool* in_memory) override; - virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( + content::WebContentsViewDelegate* GetWebContentsViewDelegate( content::WebContents* web_contents) override; - virtual void RenderProcessWillLaunch( - content::RenderProcessHost* host) override; - virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, - const GURL& effective_url) override; - virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, - const GURL& url) override; - virtual void GetAdditionalWebUISchemes( + void RenderProcessWillLaunch(content::RenderProcessHost* host) override; + bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, + const GURL& effective_url) override; + GURL GetEffectiveURL(content::BrowserContext* browser_context, + const GURL& url) override; + void GetAdditionalWebUISchemes( std::vector<std::string>* additional_schemes) override; - virtual void GetAdditionalWebUIHostsToIgnoreParititionCheck( + void GetAdditionalWebUIHostsToIgnoreParititionCheck( std::vector<std::string>* hosts) override; - virtual net::URLRequestContextGetter* CreateRequestContext( + net::URLRequestContextGetter* CreateRequestContext( content::BrowserContext* browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) override; - virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( content::BrowserContext* browser_context, const base::FilePath& partition_path, bool in_memory, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) override; - virtual bool IsHandledURL(const GURL& url) override; - virtual bool CanCommitURL(content::RenderProcessHost* process_host, - const GURL& url) override; - virtual bool ShouldAllowOpenURL(content::SiteInstance* site_instance, - const GURL& url) override; - virtual bool IsSuitableHost(content::RenderProcessHost* process_host, - const GURL& site_url) override; - virtual bool MayReuseHost(content::RenderProcessHost* process_host) override; - virtual bool ShouldTryToUseExistingProcessHost( - content::BrowserContext* browser_context, const GURL& url) override; - virtual void SiteInstanceGotProcess( - content::SiteInstance* site_instance) override; - virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) - override; - virtual bool ShouldSwapBrowsingInstancesForNavigation( + bool IsHandledURL(const GURL& url) override; + bool CanCommitURL(content::RenderProcessHost* process_host, + const GURL& url) override; + bool ShouldAllowOpenURL(content::SiteInstance* site_instance, + const GURL& url) override; + bool IsSuitableHost(content::RenderProcessHost* process_host, + const GURL& site_url) override; + bool MayReuseHost(content::RenderProcessHost* process_host) override; + bool ShouldTryToUseExistingProcessHost( + content::BrowserContext* browser_context, + const GURL& url) override; + void SiteInstanceGotProcess(content::SiteInstance* site_instance) override; + void SiteInstanceDeleting(content::SiteInstance* site_instance) override; + bool ShouldSwapBrowsingInstancesForNavigation( content::SiteInstance* site_instance, const GURL& current_url, const GURL& new_url) override; - virtual bool ShouldSwapProcessesForRedirect( + bool ShouldSwapProcessesForRedirect( content::ResourceContext* resource_context, const GURL& current_url, const GURL& new_url) override; - virtual bool ShouldAssignSiteForURL(const GURL& url) override; - virtual std::string GetCanonicalEncodingNameByAliasName( + bool ShouldAssignSiteForURL(const GURL& url) override; + std::string GetCanonicalEncodingNameByAliasName( const std::string& alias_name) override; - virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, - int child_process_id) override; - virtual std::string GetApplicationLocale() override; - virtual std::string GetAcceptLangs( - content::BrowserContext* context) override; - virtual const gfx::ImageSkia* GetDefaultFavicon() override; - virtual bool AllowAppCache(const GURL& manifest_url, - const GURL& first_party, - content::ResourceContext* context) override; - virtual bool AllowServiceWorker(const GURL& scope, - const GURL& first_party, - content::ResourceContext* context) override; - virtual bool AllowGetCookie(const GURL& url, - const GURL& first_party, - const net::CookieList& cookie_list, - content::ResourceContext* context, - int render_process_id, - int render_frame_id) override; - virtual bool AllowSetCookie(const GURL& url, - const GURL& first_party, - const std::string& cookie_line, - content::ResourceContext* context, - int render_process_id, - int render_frame_id, - net::CookieOptions* options) override; - virtual bool AllowSaveLocalState(content::ResourceContext* context) override; - virtual bool AllowWorkerDatabase( + void AppendExtraCommandLineSwitches(base::CommandLine* command_line, + int child_process_id) override; + std::string GetApplicationLocale() override; + std::string GetAcceptLangs(content::BrowserContext* context) override; + const gfx::ImageSkia* GetDefaultFavicon() override; + bool AllowAppCache(const GURL& manifest_url, + const GURL& first_party, + content::ResourceContext* context) override; + bool AllowServiceWorker(const GURL& scope, + const GURL& first_party, + content::ResourceContext* context) override; + bool AllowGetCookie(const GURL& url, + const GURL& first_party, + const net::CookieList& cookie_list, + content::ResourceContext* context, + int render_process_id, + int render_frame_id) override; + bool AllowSetCookie(const GURL& url, + const GURL& first_party, + const std::string& cookie_line, + content::ResourceContext* context, + int render_process_id, + int render_frame_id, + net::CookieOptions* options) override; + bool AllowSaveLocalState(content::ResourceContext* context) override; + bool AllowWorkerDatabase( const GURL& url, const base::string16& name, const base::string16& display_name, unsigned long estimated_size, content::ResourceContext* context, - const std::vector<std::pair<int, int> >& render_frames) override; - virtual void AllowWorkerFileSystem( + const std::vector<std::pair<int, int>>& render_frames) override; + void AllowWorkerFileSystem( const GURL& url, content::ResourceContext* context, - const std::vector<std::pair<int, int> >& render_frames, + const std::vector<std::pair<int, int>>& render_frames, base::Callback<void(bool)> callback) override; - virtual bool AllowWorkerIndexedDB( + bool AllowWorkerIndexedDB( const GURL& url, const base::string16& name, content::ResourceContext* context, - const std::vector<std::pair<int, int> >& render_frames) override; - virtual net::URLRequestContext* OverrideRequestContextForURL( - const GURL& url, content::ResourceContext* context) override; - virtual content::QuotaPermissionContext* - CreateQuotaPermissionContext() override; - virtual void AllowCertificateError( + const std::vector<std::pair<int, int>>& render_frames) override; + net::URLRequestContext* OverrideRequestContextForURL( + const GURL& url, + content::ResourceContext* context) override; + content::QuotaPermissionContext* CreateQuotaPermissionContext() override; + void AllowCertificateError( int render_process_id, int render_frame_id, int cert_error, @@ -173,114 +169,109 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { bool expired_previous_decision, const base::Callback<void(bool)>& callback, content::CertificateRequestResultType* request) override; - virtual void SelectClientCertificate( + void SelectClientCertificate( int render_process_id, int render_frame_id, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) override; - virtual void AddCertificate(net::CertificateMimeType cert_type, - const void* cert_data, - size_t cert_size, - int render_process_id, - int render_frame_id) override; - virtual content::MediaObserver* GetMediaObserver() override; - virtual void RequestDesktopNotificationPermission( + void AddCertificate(net::CertificateMimeType cert_type, + const void* cert_data, + size_t cert_size, + int render_process_id, + int render_frame_id) override; + content::MediaObserver* GetMediaObserver() override; + void RequestDesktopNotificationPermission( const GURL& source_origin, content::RenderFrameHost* render_frame_host, const base::Callback<void(blink::WebNotificationPermission)>& callback) - override; - virtual blink::WebNotificationPermission - CheckDesktopNotificationPermission( - const GURL& source_origin, - content::ResourceContext* context, - int render_process_id) override; - virtual void ShowDesktopNotification( + override; + blink::WebNotificationPermission CheckDesktopNotificationPermission( + const GURL& source_origin, + content::ResourceContext* context, + int render_process_id) override; + void ShowDesktopNotification( const content::ShowDesktopNotificationHostMsgParams& params, content::RenderFrameHost* render_frame_host, scoped_ptr<content::DesktopNotificationDelegate> delegate, base::Closure* cancel_callback) override; - virtual void RequestGeolocationPermission( + void RequestGeolocationPermission( content::WebContents* web_contents, int bridge_id, const GURL& requesting_frame, bool user_gesture, const base::Callback<void(bool)>& result_callback) override; - virtual void CancelGeolocationPermissionRequest( + void CancelGeolocationPermissionRequest( content::WebContents* web_contents, int bridge_id, const GURL& requesting_frame) override; - virtual void RequestMidiSysExPermission( - content::WebContents* web_contents, - int bridge_id, - const GURL& requesting_frame, - bool user_gesture, - base::Callback<void(bool)> result_callback, - base::Closure* cancel_callback) override; - virtual void DidUseGeolocationPermission(content::WebContents* web_contents, - const GURL& frame_url, - const GURL& main_frame_url) override; - virtual void RequestProtectedMediaIdentifierPermission( + void RequestMidiSysExPermission(content::WebContents* web_contents, + int bridge_id, + const GURL& requesting_frame, + bool user_gesture, + base::Callback<void(bool)> result_callback, + base::Closure* cancel_callback) override; + void DidUseGeolocationPermission(content::WebContents* web_contents, + const GURL& frame_url, + const GURL& main_frame_url) override; + void RequestProtectedMediaIdentifierPermission( content::WebContents* web_contents, const GURL& origin, base::Callback<void(bool)> result_callback, base::Closure* cancel_callback) override; - virtual bool CanCreateWindow(const GURL& opener_url, - const GURL& opener_top_level_frame_url, - const GURL& source_origin, - WindowContainerType container_type, - const GURL& target_url, - const content::Referrer& referrer, - WindowOpenDisposition disposition, - const blink::WebWindowFeatures& features, - bool user_gesture, - bool opener_suppressed, - content::ResourceContext* context, - int render_process_id, - int opener_id, - bool* no_javascript_access) override; - virtual void ResourceDispatcherHostCreated() override; - virtual content::SpeechRecognitionManagerDelegate* - GetSpeechRecognitionManagerDelegate() override; - virtual net::NetLog* GetNetLog() override; - virtual content::AccessTokenStore* CreateAccessTokenStore() override; - virtual bool IsFastShutdownPossible() override; - virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, - const GURL& url, - content::WebPreferences* prefs) override; - virtual void BrowserURLHandlerCreated( - content::BrowserURLHandler* handler) override; - virtual void ClearCache(content::RenderViewHost* rvh) override; - virtual void ClearCookies(content::RenderViewHost* rvh) override; - virtual base::FilePath GetDefaultDownloadDirectory() override; - virtual std::string GetDefaultDownloadName() override; - virtual void DidCreatePpapiPlugin( - content::BrowserPpapiHost* browser_host) override; - virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost( + bool CanCreateWindow(const GURL& opener_url, + const GURL& opener_top_level_frame_url, + const GURL& source_origin, + WindowContainerType container_type, + const GURL& target_url, + const content::Referrer& referrer, + WindowOpenDisposition disposition, + const blink::WebWindowFeatures& features, + bool user_gesture, + bool opener_suppressed, + content::ResourceContext* context, + int render_process_id, + int opener_id, + bool* no_javascript_access) override; + void ResourceDispatcherHostCreated() override; + content::SpeechRecognitionManagerDelegate* + GetSpeechRecognitionManagerDelegate() override; + net::NetLog* GetNetLog() override; + content::AccessTokenStore* CreateAccessTokenStore() override; + bool IsFastShutdownPossible() override; + void OverrideWebkitPrefs(content::RenderViewHost* rvh, + const GURL& url, + content::WebPreferences* prefs) override; + void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) override; + void ClearCache(content::RenderViewHost* rvh) override; + void ClearCookies(content::RenderViewHost* rvh) override; + base::FilePath GetDefaultDownloadDirectory() override; + std::string GetDefaultDownloadName() override; + void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override; + content::BrowserPpapiHost* GetExternalBrowserPpapiHost( int plugin_process_id) override; - virtual bool AllowPepperSocketAPI( + bool AllowPepperSocketAPI( content::BrowserContext* browser_context, const GURL& url, bool private_api, const content::SocketPermissionRequest* params) override; - virtual ui::SelectFilePolicy* CreateSelectFilePolicy( + ui::SelectFilePolicy* CreateSelectFilePolicy( content::WebContents* web_contents) override; - virtual void GetAdditionalAllowedSchemesForFileSystem( + void GetAdditionalAllowedSchemesForFileSystem( std::vector<std::string>* additional_schemes) override; - virtual void GetURLRequestAutoMountHandlers( + void GetURLRequestAutoMountHandlers( std::vector<storage::URLRequestAutoMountHandler>* handlers) override; - virtual void GetAdditionalFileSystemBackends( + void GetAdditionalFileSystemBackends( content::BrowserContext* browser_context, const base::FilePath& storage_partition_path, ScopedVector<storage::FileSystemBackend>* additional_backends) override; - virtual content::DevToolsManagerDelegate* - GetDevToolsManagerDelegate() override; - virtual bool IsPluginAllowedToCallRequestOSFileHandle( + content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; + bool IsPluginAllowedToCallRequestOSFileHandle( content::BrowserContext* browser_context, const GURL& url) override; - virtual bool IsPluginAllowedToUseDevChannelAPIs( + bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; - virtual net::CookieStore* OverrideCookieStoreForRenderProcess( + net::CookieStore* OverrideCookieStoreForRenderProcess( int render_process_id) override; #if defined(OS_POSIX) && !defined(OS_MACOSX) @@ -294,10 +285,9 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, bool* success) override; #endif - virtual bool CheckMediaAccessPermission( - content::BrowserContext* browser_context, - const GURL& security_origin, - content::MediaStreamType type) override; + bool CheckMediaAccessPermission(content::BrowserContext* browser_context, + const GURL& security_origin, + content::MediaStreamType type) override; private: friend class DisableWebRtcEncryptionFlagTest; diff --git a/chrome/browser/chrome_device_client.h b/chrome/browser/chrome_device_client.h index bd8faaf..a09c36d 100644 --- a/chrome/browser/chrome_device_client.h +++ b/chrome/browser/chrome_device_client.h @@ -18,8 +18,8 @@ class ChromeDeviceClient : device::DeviceClient { virtual ~ChromeDeviceClient(); // device::DeviceClient implementation - virtual device::UsbService* GetUsbService() override; - virtual device::HidService* GetHidService() override; + device::UsbService* GetUsbService() override; + device::HidService* GetHidService() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeDeviceClient); diff --git a/chrome/browser/chrome_net_benchmarking_message_filter.h b/chrome/browser/chrome_net_benchmarking_message_filter.h index 0c4c4bb..2921d44 100644 --- a/chrome/browser/chrome_net_benchmarking_message_filter.h +++ b/chrome/browser/chrome_net_benchmarking_message_filter.h @@ -23,10 +23,10 @@ class ChromeNetBenchmarkingMessageFilter net::URLRequestContextGetter* request_context); // content::BrowserMessageFilter methods: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: - virtual ~ChromeNetBenchmarkingMessageFilter(); + ~ChromeNetBenchmarkingMessageFilter() override; // Message handlers. void OnCloseCurrentConnections(); diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc index 1ceafdd..d853aff 100644 --- a/chrome/browser/chrome_quota_permission_context.cc +++ b/chrome/browser/chrome_quota_permission_context.cc @@ -46,18 +46,18 @@ class QuotaPermissionRequest : public PermissionBubbleRequest { const std::string& display_languages, const content::QuotaPermissionContext::PermissionCallback& callback); - virtual ~QuotaPermissionRequest(); + ~QuotaPermissionRequest() override; // PermissionBubbleRequest: - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetMessageTextFragment() const override; - virtual bool HasUserGesture() const override; - virtual GURL GetRequestingHostname() const override; - virtual void PermissionGranted() override; - virtual void PermissionDenied() override; - virtual void Cancelled() override; - virtual void RequestFinished() override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + base::string16 GetMessageTextFragment() const override; + bool HasUserGesture() const override; + GURL GetRequestingHostname() const override; + void PermissionGranted() override; + void PermissionDenied() override; + void Cancelled() override; + void RequestFinished() override; private: scoped_refptr<ChromeQuotaPermissionContext> context_; @@ -164,12 +164,12 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate { int64 requested_quota, const std::string& display_languages, const content::QuotaPermissionContext::PermissionCallback& callback); - virtual ~RequestQuotaInfoBarDelegate(); + ~RequestQuotaInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual base::string16 GetMessageText() const override; - virtual bool Accept() override; - virtual bool Cancel() override; + base::string16 GetMessageText() const override; + bool Accept() override; + bool Cancel() override; scoped_refptr<ChromeQuotaPermissionContext> context_; GURL origin_url_; diff --git a/chrome/browser/chrome_quota_permission_context.h b/chrome/browser/chrome_quota_permission_context.h index a45ac0d..fc55877 100644 --- a/chrome/browser/chrome_quota_permission_context.h +++ b/chrome/browser/chrome_quota_permission_context.h @@ -14,17 +14,16 @@ class ChromeQuotaPermissionContext : public content::QuotaPermissionContext { ChromeQuotaPermissionContext(); // The callback will be dispatched on the IO thread. - virtual void RequestQuotaPermission( - const content::StorageQuotaParams& params, - int render_process_id, - const PermissionCallback& callback) override; + void RequestQuotaPermission(const content::StorageQuotaParams& params, + int render_process_id, + const PermissionCallback& callback) override; void DispatchCallbackOnIOThread( const PermissionCallback& callback, QuotaPermissionResponse response); private: - virtual ~ChromeQuotaPermissionContext(); + ~ChromeQuotaPermissionContext() override; }; #endif // CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_ diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc index f72024e2..46ece3a 100644 --- a/chrome/browser/chrome_security_exploit_browsertest.cc +++ b/chrome/browser/chrome_security_exploit_browsertest.cc @@ -30,7 +30,7 @@ class ChromeSecurityExploitBrowserTest : public InProcessBrowserTest { ChromeSecurityExploitBrowserTest() {} virtual ~ChromeSecurityExploitBrowserTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ASSERT_TRUE(test_server()->Start()); net::SpawnedTestServer https_server( net::SpawnedTestServer::TYPE_HTTPS, diff --git a/chrome/browser/chrome_switches_browsertest.cc b/chrome/browser/chrome_switches_browsertest.cc index aa6a6a0..7764138 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) override { + void SetUpCommandLine(CommandLine* command_line) override { ASSERT_TRUE(test_server()->Start()); // Map all hosts to our local server. diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h index 59f7c6f..9543f5d 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h +++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h @@ -78,7 +78,7 @@ class OAuth2LoginManager : public KeyedService, }; explicit OAuth2LoginManager(Profile* user_profile); - virtual ~OAuth2LoginManager(); + ~OAuth2LoginManager() override; void AddObserver(OAuth2LoginManager::Observer* observer); void RemoveObserver(OAuth2LoginManager::Observer* observer); @@ -145,28 +145,28 @@ class OAuth2LoginManager : public KeyedService, }; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // gaia::GaiaOAuthClient::Delegate overrides. - virtual void OnRefreshTokenResponse(const std::string& access_token, - int expires_in_seconds) override; - virtual void OnGetUserEmailResponse(const std::string& user_email) override; - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnRefreshTokenResponse(const std::string& access_token, + int expires_in_seconds) override; + void OnGetUserEmailResponse(const std::string& user_email) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; // OAuth2LoginVerifier::Delegate overrides. - virtual void OnSessionMergeSuccess() override; - virtual void OnSessionMergeFailure(bool connection_error) override; - virtual void OnListAccountsSuccess(const std::string& data) override; - virtual void OnListAccountsFailure(bool connection_error) override; + void OnSessionMergeSuccess() override; + void OnSessionMergeFailure(bool connection_error) override; + void OnListAccountsSuccess(const std::string& data) override; + void OnListAccountsFailure(bool connection_error) override; // OAuth2TokenFetcher::Delegate overrides. - virtual void OnOAuth2TokensAvailable( + void OnOAuth2TokensAvailable( const GaiaAuthConsumer::ClientOAuthResult& oauth2_tokens) override; - virtual void OnOAuth2TokensFetchFailed() override; + void OnOAuth2TokensFetchFailed() override; // OAuth2TokenService::Observer implementation: - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; // Signals delegate that authentication is completed, kicks off token fetching // process. diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_verifier.h b/chrome/browser/chromeos/login/signin/oauth2_login_verifier.h index ae6b97a..9a4fbb5 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_login_verifier.h +++ b/chrome/browser/chromeos/login/signin/oauth2_login_verifier.h @@ -50,7 +50,7 @@ class OAuth2LoginVerifier : public base::SupportsWeakPtr<OAuth2LoginVerifier>, net::URLRequestContextGetter* system_request_context, net::URLRequestContextGetter* user_request_context, const std::string& oauthlogin_access_token); - virtual ~OAuth2LoginVerifier(); + ~OAuth2LoginVerifier() override; // Initiates verification of GAIA cookies in |profile|'s cookie jar. void VerifyUserCookies(Profile* profile); @@ -66,22 +66,19 @@ class OAuth2LoginVerifier : public base::SupportsWeakPtr<OAuth2LoginVerifier>, RESTORE_FROM_OAUTH2_REFRESH_TOKEN = 2, }; // GaiaAuthConsumer overrides. - virtual void OnUberAuthTokenSuccess(const std::string& token) override; - virtual void OnUberAuthTokenFailure( - const GoogleServiceAuthError& error) override; - virtual void OnMergeSessionSuccess(const std::string& data) override; - virtual void OnMergeSessionFailure( - const GoogleServiceAuthError& error) override; - virtual void OnListAccountsSuccess(const std::string& data) override; - virtual void OnListAccountsFailure( - const GoogleServiceAuthError& error) override; + void OnUberAuthTokenSuccess(const std::string& token) override; + void OnUberAuthTokenFailure(const GoogleServiceAuthError& error) override; + void OnMergeSessionSuccess(const std::string& data) override; + void OnMergeSessionFailure(const GoogleServiceAuthError& error) override; + void OnListAccountsSuccess(const std::string& data) override; + void OnListAccountsFailure(const GoogleServiceAuthError& error) override; // OAuth2TokenService::Consumer overrides. - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // Starts fetching OAuth1 access token for OAuthLogin call. void StartFetchingOAuthLoginAccessToken(Profile* profile); diff --git a/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.h b/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.h index c02db10..5dd2e6d 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.h +++ b/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.h @@ -36,7 +36,7 @@ class OAuth2TokenFetcher : public base::SupportsWeakPtr<OAuth2TokenFetcher>, OAuth2TokenFetcher(OAuth2TokenFetcher::Delegate* delegate, net::URLRequestContextGetter* context_getter); - virtual ~OAuth2TokenFetcher(); + ~OAuth2TokenFetcher() override; void StartExchangeFromCookies(const std::string& session_index, const std::string& signin_scoped_device_id); @@ -52,10 +52,9 @@ class OAuth2TokenFetcher : public base::SupportsWeakPtr<OAuth2TokenFetcher>, const base::Closure& error_handler); // GaiaAuthConsumer overrides. - virtual void OnClientOAuthSuccess( + void OnClientOAuthSuccess( const GaiaAuthConsumer::ClientOAuthResult& result) override; - virtual void OnClientOAuthFailure( - const GoogleServiceAuthError& error) override; + void OnClientOAuthFailure(const GoogleServiceAuthError& error) override; OAuth2TokenFetcher::Delegate* delegate_; GaiaAuthConsumer::ClientOAuthResult oauth_tokens_; diff --git a/chrome/browser/chromeos/profiles/profile_helper.h b/chrome/browser/chromeos/profiles/profile_helper.h index 7d8f831..e9941dc 100644 --- a/chrome/browser/chromeos/profiles/profile_helper.h +++ b/chrome/browser/chromeos/profiles/profile_helper.h @@ -45,7 +45,7 @@ class ProfileHelper public user_manager::UserManager::UserSessionStateObserver { public: ProfileHelper(); - virtual ~ProfileHelper(); + ~ProfileHelper() override; // Returns ProfileHelper instance. This class is not singleton and is owned // by BrowserProcess/BrowserProcessPlatformPart. This method keeps that @@ -135,15 +135,15 @@ class ProfileHelper friend class SessionStateDelegateChromeOSTest; // BrowsingDataRemover::Observer implementation: - virtual void OnBrowsingDataRemoverDone() override; + void OnBrowsingDataRemoverDone() override; // OAuth2LoginManager::Observer overrides. - virtual void OnSessionRestoreStateChanged( + void OnSessionRestoreStateChanged( Profile* user_profile, OAuth2LoginManager::SessionRestoreState state) override; // user_manager::UserManager::UserSessionStateObserver implementation: - virtual void ActiveUserHashChanged(const std::string& hash) override; + void ActiveUserHashChanged(const std::string& hash) override; // Associates |user| with profile with the same user_id, // for GetUserByProfile() testing. diff --git a/chrome/browser/command_updater_unittest.cc b/chrome/browser/command_updater_unittest.cc index 969509c..9e94bf4 100644 --- a/chrome/browser/command_updater_unittest.cc +++ b/chrome/browser/command_updater_unittest.cc @@ -11,8 +11,7 @@ class FakeCommandUpdaterDelegate : public CommandUpdaterDelegate { public: - virtual void ExecuteCommandWithDisposition(int id, - WindowOpenDisposition) override { + void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) override { EXPECT_EQ(1, id); } }; @@ -21,7 +20,7 @@ class FakeCommandObserver : public CommandObserver { public: FakeCommandObserver() : enabled_(true) {} - virtual void EnabledStateChangedForCommand(int id, bool enabled) override { + void EnabledStateChangedForCommand(int id, bool enabled) override { enabled_ = enabled; } diff --git a/chrome/browser/content_settings/chrome_content_settings_client.h b/chrome/browser/content_settings/chrome_content_settings_client.h index 79a2af9..3e1ede8 100644 --- a/chrome/browser/content_settings/chrome_content_settings_client.h +++ b/chrome/browser/content_settings/chrome_content_settings_client.h @@ -16,33 +16,32 @@ class ChromeContentSettingsClient : public content_settings::ContentSettingsClient, public content::WebContentsUserData<ChromeContentSettingsClient> { public: - virtual ~ChromeContentSettingsClient(); + ~ChromeContentSettingsClient() override; static void CreateForWebContents(content::WebContents* contents); // ContentSettingsClient implementation. - virtual void OnCookiesRead(const GURL& url, - const GURL& first_party_url, - const net::CookieList& cookie_list, + void OnCookiesRead(const GURL& url, + const GURL& first_party_url, + const net::CookieList& cookie_list, + bool blocked_by_policy) override; + void OnCookieChanged(const GURL& url, + const GURL& first_party_url, + const std::string& cookie_line, + const net::CookieOptions& options, + bool blocked_by_policy) override; + void OnFileSystemAccessed(const GURL& url, bool blocked_by_policy) override; + void OnIndexedDBAccessed(const GURL& url, + const base::string16& description, + bool blocked_by_policy) override; + void OnLocalStorageAccessed(const GURL& url, + bool local, + bool blocked_by_policy) override; + void OnWebDatabaseAccessed(const GURL& url, + const base::string16& name, + const base::string16& display_name, bool blocked_by_policy) override; - virtual void OnCookieChanged(const GURL& url, - const GURL& first_party_url, - const std::string& cookie_line, - const net::CookieOptions& options, - bool blocked_by_policy) override; - virtual void OnFileSystemAccessed(const GURL& url, - bool blocked_by_policy) override; - virtual void OnIndexedDBAccessed(const GURL& url, - const base::string16& description, - bool blocked_by_policy) override; - virtual void OnLocalStorageAccessed(const GURL& url, - bool local, - bool blocked_by_policy) override; - virtual void OnWebDatabaseAccessed(const GURL& url, - const base::string16& name, - const base::string16& display_name, - bool blocked_by_policy) override; - virtual const LocalSharedObjectsCounter& local_shared_objects( + const LocalSharedObjectsCounter& local_shared_objects( AccessType type) const override; // Creates a new copy of a CookiesTreeModel for all allowed (or blocked, diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc index 2c4bc27..9bb57c4 100644 --- a/chrome/browser/content_settings/content_settings_browsertest.cc +++ b/chrome/browser/content_settings/content_settings_browsertest.cc @@ -53,7 +53,7 @@ class ContentSettingsTest : public InProcessBrowserTest { base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); @@ -299,7 +299,7 @@ class ClickToPlayPluginTest : public ContentSettingsTest { ClickToPlayPluginTest() {} #if defined(OS_MACOSX) - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { base::FilePath plugin_dir; PathService::Get(base::DIR_MODULE, &plugin_dir); plugin_dir = plugin_dir.AppendASCII("plugins"); @@ -470,7 +470,7 @@ class PepperContentSettingsSpecialCasesTest : public ContentSettingsTest { static const char* const kExternalClearKeyMimeType; // Registers any CDM plugins not registered by default. - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { #if defined(ENABLE_PEPPER_CDMS) // Platform-specific filename relative to the chrome executable. #if defined(OS_WIN) @@ -618,7 +618,7 @@ PepperContentSettingsSpecialCasesTest::kExternalClearKeyMimeType = class PepperContentSettingsSpecialCasesPluginsBlockedTest : public PepperContentSettingsSpecialCasesTest { public: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { PepperContentSettingsSpecialCasesTest::SetUpOnMainThread(); browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); @@ -628,7 +628,7 @@ class PepperContentSettingsSpecialCasesPluginsBlockedTest class PepperContentSettingsSpecialCasesJavaScriptBlockedTest : public PepperContentSettingsSpecialCasesTest { public: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { PepperContentSettingsSpecialCasesTest::SetUpOnMainThread(); browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW); diff --git a/chrome/browser/content_settings/content_settings_custom_extension_provider.h b/chrome/browser/content_settings/content_settings_custom_extension_provider.h index 27a3287..4107803 100644 --- a/chrome/browser/content_settings/content_settings_custom_extension_provider.h +++ b/chrome/browser/content_settings/content_settings_custom_extension_provider.h @@ -21,29 +21,27 @@ class CustomExtensionProvider : public ObservableProvider, extensions_settings, bool incognito); - virtual ~CustomExtensionProvider(); + ~CustomExtensionProvider() override; // ProviderInterface methods: - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; - virtual void ClearAllContentSettingsRules(ContentSettingsType content_type) - override {} + void ClearAllContentSettingsRules(ContentSettingsType content_type) override { + } - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // extensions::ContentSettingsStore::Observer methods: - virtual void OnContentSettingChanged(const std::string& extension_id, - bool incognito) override; + void OnContentSettingChanged(const std::string& extension_id, + bool incognito) override; private: // Specifies whether this provider manages settings for incognito or regular diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc index 6ee9c2c..d615b77 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.cc +++ b/chrome/browser/content_settings/content_settings_default_provider.cc @@ -74,11 +74,9 @@ class DefaultRuleIterator : public RuleIterator { value_.reset(value->DeepCopy()); } - virtual bool HasNext() const override { - return value_.get() != NULL; - } + bool HasNext() const override { return value_.get() != NULL; } - virtual Rule Next() override { + Rule Next() override { DCHECK(value_.get()); return Rule(ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), diff --git a/chrome/browser/content_settings/content_settings_default_provider.h b/chrome/browser/content_settings/content_settings_default_provider.h index 4d39dac..8163e8d 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.h +++ b/chrome/browser/content_settings/content_settings_default_provider.h @@ -32,25 +32,22 @@ class DefaultProvider : public ObservableProvider { DefaultProvider(PrefService* prefs, bool incognito); - virtual ~DefaultProvider(); + ~DefaultProvider() override; // ProviderInterface implementations. - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; - - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; - - virtual void ClearAllContentSettingsRules( - ContentSettingsType content_type) override; - - virtual void ShutdownOnUIThread() override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; + + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; + + void ClearAllContentSettingsRules(ContentSettingsType content_type) override; + + void ShutdownOnUIThread() override; private: // Sets the fields of |settings| based on the values in |dictionary|. diff --git a/chrome/browser/content_settings/content_settings_internal_extension_provider.h b/chrome/browser/content_settings/content_settings_internal_extension_provider.h index cfbec31..ddc91bf 100644 --- a/chrome/browser/content_settings/content_settings_internal_extension_provider.h +++ b/chrome/browser/content_settings/content_settings_internal_extension_provider.h @@ -27,30 +27,28 @@ class InternalExtensionProvider : public ObservableProvider, public: explicit InternalExtensionProvider(ExtensionService* extension_service); - virtual ~InternalExtensionProvider(); + ~InternalExtensionProvider() override; // ProviderInterface methods: - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; - virtual void ClearAllContentSettingsRules(ContentSettingsType content_type) - override; + void ClearAllContentSettingsRules(ContentSettingsType content_type) override; - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; + private: void SetContentSettingForExtension(const extensions::Extension* extension, ContentSetting setting); diff --git a/chrome/browser/content_settings/content_settings_mock_provider.h b/chrome/browser/content_settings/content_settings_mock_provider.h index 59303ce..6524407 100644 --- a/chrome/browser/content_settings/content_settings_mock_provider.h +++ b/chrome/browser/content_settings/content_settings_mock_provider.h @@ -20,26 +20,24 @@ class MockProvider : public ObservableProvider { public: MockProvider(); explicit MockProvider(bool read_only); - virtual ~MockProvider(); + ~MockProvider() override; - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; // The MockProvider is only able to store one content setting. So every time // this method is called the previously set content settings is overwritten. - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& requesting_url_pattern, - const ContentSettingsPattern& embedding_url_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; + bool SetWebsiteSetting(const ContentSettingsPattern& requesting_url_pattern, + const ContentSettingsPattern& embedding_url_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; - virtual void ClearAllContentSettingsRules( - ContentSettingsType content_type) override {} + void ClearAllContentSettingsRules(ContentSettingsType content_type) override { + } - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; void set_read_only(bool read_only) { read_only_ = read_only; diff --git a/chrome/browser/content_settings/content_settings_override_provider.cc b/chrome/browser/content_settings/content_settings_override_provider.cc index 24a5467..d068285 100644 --- a/chrome/browser/content_settings/content_settings_override_provider.cc +++ b/chrome/browser/content_settings/content_settings_override_provider.cc @@ -28,9 +28,9 @@ class OverrideRuleIterator : public RuleIterator { public: explicit OverrideRuleIterator(bool is_allowed) : is_done_(is_allowed) {} - virtual bool HasNext() const override { return !is_done_; } + bool HasNext() const override { return !is_done_; } - virtual Rule Next() override { + Rule Next() override { DCHECK(!is_done_); is_done_ = true; return Rule(ContentSettingsPattern::Wildcard(), diff --git a/chrome/browser/content_settings/content_settings_override_provider.h b/chrome/browser/content_settings/content_settings_override_provider.h index 38d8eb1..98ddbe27 100644 --- a/chrome/browser/content_settings/content_settings_override_provider.h +++ b/chrome/browser/content_settings/content_settings_override_provider.h @@ -27,25 +27,22 @@ class OverrideProvider : public ProviderInterface { static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); OverrideProvider(PrefService* prefs, bool incognito); - virtual ~OverrideProvider(); + ~OverrideProvider() override; // ProviderInterface implementations. - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; - - virtual void ClearAllContentSettingsRules( - ContentSettingsType content_type) override; - - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; - - virtual void ShutdownOnUIThread() override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; + + void ClearAllContentSettingsRules(ContentSettingsType content_type) override; + + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; + + void ShutdownOnUIThread() override; // Sets if a given |content_type| is |enabled|. void SetOverrideSetting(ContentSettingsType content_type, bool enabled); diff --git a/chrome/browser/content_settings/content_settings_policy_provider.h b/chrome/browser/content_settings/content_settings_policy_provider.h index b9f07c9..e59c91b 100644 --- a/chrome/browser/content_settings/content_settings_policy_provider.h +++ b/chrome/browser/content_settings/content_settings_policy_provider.h @@ -27,26 +27,23 @@ namespace content_settings { class PolicyProvider : public ObservableProvider { public: explicit PolicyProvider(PrefService* prefs); - virtual ~PolicyProvider(); + ~PolicyProvider() override; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); // ProviderInterface implementations. - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; - - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; - - virtual void ClearAllContentSettingsRules( - ContentSettingsType content_type) override; - - virtual void ShutdownOnUIThread() override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; + + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; + + void ClearAllContentSettingsRules(ContentSettingsType content_type) override; + + void ShutdownOnUIThread() override; private: // Reads the policy managed default settings. diff --git a/chrome/browser/content_settings/content_settings_pref_provider.h b/chrome/browser/content_settings/content_settings_pref_provider.h index 00ab987..8ae6664 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider.h +++ b/chrome/browser/content_settings/content_settings_pref_provider.h @@ -36,25 +36,22 @@ class PrefProvider : public ObservableProvider { static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); PrefProvider(PrefService* prefs, bool incognito); - virtual ~PrefProvider(); + ~PrefProvider() override; // ProviderInterface implementations. - virtual RuleIterator* GetRuleIterator( - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - bool incognito) const override; + RuleIterator* GetRuleIterator(ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + bool incognito) const override; - virtual bool SetWebsiteSetting( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - const ResourceIdentifier& resource_identifier, - base::Value* value) override; + bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + const ResourceIdentifier& resource_identifier, + base::Value* value) override; - virtual void ClearAllContentSettingsRules( - ContentSettingsType content_type) override; + void ClearAllContentSettingsRules(ContentSettingsType content_type) override; - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // Records the last time the given pattern has used a certain content setting. void UpdateLastUsage(const ContentSettingsPattern& primary_pattern, 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 df68265..5daa947 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc +++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc @@ -42,7 +42,7 @@ class DeadlockCheckerThread : public base::PlatformThread::Delegate { explicit DeadlockCheckerThread(PrefProvider* provider) : provider_(provider) {} - virtual void ThreadMain() override { + void ThreadMain() override { bool got_lock = provider_->lock_.Try(); EXPECT_TRUE(got_lock); if (got_lock) diff --git a/chrome/browser/content_settings/cookie_settings.h b/chrome/browser/content_settings/cookie_settings.h index 0dde884..8476ad2 100644 --- a/chrome/browser/content_settings/cookie_settings.h +++ b/chrome/browser/content_settings/cookie_settings.h @@ -90,7 +90,7 @@ class CookieSettings : public RefcountedKeyedService { // Detaches the |CookieSettings| from all |Profile|-related objects like // |PrefService|. This methods needs to be called before destroying the // |Profile|. Afterwards, only const methods can be called. - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // A helper for applying third party cookie blocking rules. ContentSetting GetCookieSetting( @@ -114,19 +114,19 @@ class CookieSettings : public RefcountedKeyedService { friend struct DefaultSingletonTraits<Factory>; Factory(); - virtual ~Factory(); + ~Factory() override; // |BrowserContextKeyedBaseFactory| methods: - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( + scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( content::BrowserContext* context) const override; }; private: - virtual ~CookieSettings(); + ~CookieSettings() override; void OnBlockThirdPartyCookiesChanged(); diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h index 9316b6f..efd3f99 100644 --- a/chrome/browser/content_settings/host_content_settings_map.h +++ b/chrome/browser/content_settings/host_content_settings_map.h @@ -193,11 +193,10 @@ class HostContentSettingsMap void ShutdownOnUIThread(); // content_settings::Observer implementation. - virtual void OnContentSettingChanged( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - std::string resource_identifier) override; + void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + std::string resource_identifier) override; // Returns true if we should allow all content types for this URL. This is // true for various internal objects like chrome:// URLs, so UI and other @@ -293,7 +292,7 @@ class HostContentSettingsMap typedef ProviderMap::iterator ProviderIterator; typedef ProviderMap::const_iterator ConstProviderIterator; - virtual ~HostContentSettingsMap(); + ~HostContentSettingsMap() override; ContentSetting GetDefaultContentSettingFromProvider( ContentSettingsType content_type, diff --git a/chrome/browser/content_settings/local_shared_objects_container.h b/chrome/browser/content_settings/local_shared_objects_container.h index de5a1da..62d4755 100644 --- a/chrome/browser/content_settings/local_shared_objects_container.h +++ b/chrome/browser/content_settings/local_shared_objects_container.h @@ -23,11 +23,11 @@ class Profile; class LocalSharedObjectsContainer : public LocalSharedObjectsCounter { public: explicit LocalSharedObjectsContainer(Profile* profile); - virtual ~LocalSharedObjectsContainer(); + ~LocalSharedObjectsContainer() override; // LocalSharedObjectsCounter: - virtual size_t GetObjectCount() const override; - virtual size_t GetObjectCountForDomain(const GURL& url) const override; + size_t GetObjectCount() const override; + size_t GetObjectCountForDomain(const GURL& url) const override; // Empties the container. void Reset(); diff --git a/chrome/browser/content_settings/permission_bubble_request_impl.h b/chrome/browser/content_settings/permission_bubble_request_impl.h index c8eece6..caf05b7 100644 --- a/chrome/browser/content_settings/permission_bubble_request_impl.h +++ b/chrome/browser/content_settings/permission_bubble_request_impl.h @@ -31,23 +31,23 @@ class PermissionBubbleRequestImpl : public PermissionBubbleRequest { const PermissionDecidedCallback permission_decided_callback, const base::Closure delete_callback); - virtual ~PermissionBubbleRequestImpl(); + ~PermissionBubbleRequestImpl() override; // PermissionBubbleRequest: - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetMessageTextFragment() const override; - virtual bool HasUserGesture() const override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + base::string16 GetMessageTextFragment() const override; + bool HasUserGesture() const override; // TODO(miguelg) Change this method to GetOrigin() - virtual GURL GetRequestingHostname() const override; + GURL GetRequestingHostname() const override; // Remember to call RegisterActionTaken for these methods if you are // overriding them. - virtual void PermissionGranted() override; - virtual void PermissionDenied() override; - virtual void Cancelled() override; - virtual void RequestFinished() override; + void PermissionGranted() override; + void PermissionDenied() override; + void Cancelled() override; + void RequestFinished() override; protected: void RegisterActionTaken() { action_taken_ = true; } diff --git a/chrome/browser/content_settings/permission_context_base.h b/chrome/browser/content_settings/permission_context_base.h index 87b8afc..48fcac8 100644 --- a/chrome/browser/content_settings/permission_context_base.h +++ b/chrome/browser/content_settings/permission_context_base.h @@ -52,7 +52,7 @@ class PermissionContextBase : public KeyedService { public: PermissionContextBase(Profile* profile, const ContentSettingsType permission_type); - virtual ~PermissionContextBase(); + ~PermissionContextBase() override; // The renderer is requesting permission to push messages. // When the answer to a permission request has been determined, |callback| diff --git a/chrome/browser/content_settings/permission_context_base_unittest.cc b/chrome/browser/content_settings/permission_context_base_unittest.cc index 5d73574..b5dddd2 100644 --- a/chrome/browser/content_settings/permission_context_base_unittest.cc +++ b/chrome/browser/content_settings/permission_context_base_unittest.cc @@ -42,7 +42,7 @@ class TestPermissionContext : public PermissionContextBase { permission_granted_(false), tab_context_updated_(false) {} - virtual ~TestPermissionContext() {} + ~TestPermissionContext() override {} PermissionQueueController* GetInfoBarController() { return GetQueueController(); @@ -66,9 +66,9 @@ class TestPermissionContext : public PermissionContextBase { } protected: - virtual void UpdateTabContext(const PermissionRequestID& id, - const GURL& requesting_origin, - bool allowed) override { + void UpdateTabContext(const PermissionRequestID& id, + const GURL& requesting_origin, + bool allowed) override { tab_context_updated_ = true; } diff --git a/chrome/browser/content_settings/permission_infobar_delegate.h b/chrome/browser/content_settings/permission_infobar_delegate.h index 7df1191..6897072 100644 --- a/chrome/browser/content_settings/permission_infobar_delegate.h +++ b/chrome/browser/content_settings/permission_infobar_delegate.h @@ -25,19 +25,19 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate { const PermissionRequestID& id, const GURL& requesting_origin, ContentSettingsType type); - virtual ~PermissionInfobarDelegate(); + ~PermissionInfobarDelegate() override; // ConfirmInfoBarDelegate: virtual base::string16 GetMessageText() const = 0; - virtual infobars::InfoBarDelegate::Type GetInfoBarType() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; + infobars::InfoBarDelegate::Type GetInfoBarType() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; // Remember to call RegisterActionTaken for these methods if you are // overriding them. - virtual void InfoBarDismissed() override; - virtual bool Accept() override; - virtual bool Cancel() override; + void InfoBarDismissed() override; + bool Accept() override; + bool Cancel() override; private: void SetPermission(bool update_content_setting, bool allowed); diff --git a/chrome/browser/content_settings/permission_queue_controller.h b/chrome/browser/content_settings/permission_queue_controller.h index f953128..ba2dbd4 100644 --- a/chrome/browser/content_settings/permission_queue_controller.h +++ b/chrome/browser/content_settings/permission_queue_controller.h @@ -28,7 +28,7 @@ class PermissionQueueController : public content::NotificationObserver { typedef base::Callback<void(bool /* allowed */)> PermissionDecidedCallback; PermissionQueueController(Profile* profile, ContentSettingsType type); - virtual ~PermissionQueueController(); + ~PermissionQueueController() override; // The InfoBar will be displayed immediately if the tab is not already // displaying one, otherwise it'll be queued. @@ -56,9 +56,9 @@ class PermissionQueueController : public content::NotificationObserver { protected: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: class PendingInfobarRequest; diff --git a/chrome/browser/content_settings/permission_queue_controller_unittest.cc b/chrome/browser/content_settings/permission_queue_controller_unittest.cc index 0ff48a0..83ef33e 100644 --- a/chrome/browser/content_settings/permission_queue_controller_unittest.cc +++ b/chrome/browser/content_settings/permission_queue_controller_unittest.cc @@ -47,7 +47,7 @@ class PermissionQueueControllerTests : public ChromeRenderViewHostTestHarness { class ObservationCountingQueueController : public PermissionQueueController { public: explicit ObservationCountingQueueController(Profile* profile); - virtual ~ObservationCountingQueueController(); + ~ObservationCountingQueueController() override; int call_count() const { return call_count_; } @@ -55,9 +55,9 @@ class ObservationCountingQueueController : public PermissionQueueController { int call_count_; // PermissionQueueController: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; DISALLOW_COPY_AND_ASSIGN(ObservationCountingQueueController); }; diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h index 75f310b..5d8ef64 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.h +++ b/chrome/browser/content_settings/tab_specific_content_settings.h @@ -81,7 +81,7 @@ class TabSpecificContentSettings DISALLOW_COPY_AND_ASSIGN(SiteDataObserver); }; - virtual ~TabSpecificContentSettings(); + ~TabSpecificContentSettings() override; // Returns the object given a render view's id. static TabSpecificContentSettings* Get(int render_process_id, @@ -302,21 +302,20 @@ class TabSpecificContentSettings void SetPepperBrokerAllowed(bool allowed); // content::WebContentsObserver overrides. - virtual void RenderFrameForInterstitialPageCreated( + void RenderFrameForInterstitialPageCreated( content::RenderFrameHost* render_frame_host) override; - virtual bool OnMessageReceived( - const IPC::Message& message, - content::RenderFrameHost* render_frame_host) override; - virtual void DidNavigateMainFrame( + bool OnMessageReceived(const IPC::Message& message, + content::RenderFrameHost* render_frame_host) override; + void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; - virtual void DidStartProvisionalLoadForFrame( + void DidStartProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) override; - virtual void AppCacheAccessed(const GURL& manifest_url, - bool blocked_by_policy) override; + void AppCacheAccessed(const GURL& manifest_url, + bool blocked_by_policy) override; // Message handlers. Public for testing. void OnContentBlocked(ContentSettingsType type); @@ -376,11 +375,10 @@ class TabSpecificContentSettings friend class content::WebContentsUserData<TabSpecificContentSettings>; // content_settings::Observer implementation. - virtual void OnContentSettingChanged( - const ContentSettingsPattern& primary_pattern, - const ContentSettingsPattern& secondary_pattern, - ContentSettingsType content_type, - std::string resource_identifier) override; + void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, + const ContentSettingsPattern& secondary_pattern, + ContentSettingsType content_type, + std::string resource_identifier) override; // Notifies all registered |SiteDataObserver|s. void NotifySiteDataObservers(); diff --git a/chrome/browser/copresence/chrome_whispernet_client.h b/chrome/browser/copresence/chrome_whispernet_client.h index 4edcae5..3cdcf4b 100644 --- a/chrome/browser/copresence/chrome_whispernet_client.h +++ b/chrome/browser/copresence/chrome_whispernet_client.h @@ -34,27 +34,26 @@ class ChromeWhispernetClient : public copresence::WhispernetClient { public: // The browser context needs to outlive this class. explicit ChromeWhispernetClient(content::BrowserContext* browser_context); - virtual ~ChromeWhispernetClient(); + ~ChromeWhispernetClient() override; // WhispernetClient overrides: - virtual void Initialize(const SuccessCallback& init_callback) override; - virtual void Shutdown() override; + void Initialize(const SuccessCallback& init_callback) override; + void Shutdown() override; - virtual void EncodeToken(const std::string& token, bool audible) override; - virtual void DecodeSamples(const std::string& samples) override; - virtual void DetectBroadcast() override; + void EncodeToken(const std::string& token, bool audible) override; + void DecodeSamples(const std::string& samples) override; + void DetectBroadcast() override; - virtual void RegisterTokensCallback( - const TokensCallback& tokens_callback) override; - virtual void RegisterSamplesCallback( + void RegisterTokensCallback(const TokensCallback& tokens_callback) override; + void RegisterSamplesCallback( const SamplesCallback& samples_callback) override; - virtual void RegisterDetectBroadcastCallback( + void RegisterDetectBroadcastCallback( const SuccessCallback& db_callback) override; - virtual TokensCallback GetTokensCallback() override; - virtual SamplesCallback GetSamplesCallback() override; - virtual SuccessCallback GetDetectBroadcastCallback() override; - virtual SuccessCallback GetInitializedCallback() override; + TokensCallback GetTokensCallback() override; + SamplesCallback GetSamplesCallback() override; + SuccessCallback GetDetectBroadcastCallback() override; + SuccessCallback GetInitializedCallback() override; static const char kWhispernetProxyExtensionId[]; diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc index 216d602..82ee547 100644 --- a/chrome/browser/crash_recovery_browsertest.cc +++ b/chrome/browser/crash_recovery_browsertest.cc @@ -76,7 +76,7 @@ class CrashRecoveryBrowserTest : public InProcessBrowserTest { } private: - virtual void SetUpCommandLine(base::CommandLine* command_line) override { + void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch(switches::kDisableBreakpad); } }; diff --git a/chrome/browser/crash_upload_list.h b/chrome/browser/crash_upload_list.h index f0b201c..c81caef 100644 --- a/chrome/browser/crash_upload_list.h +++ b/chrome/browser/crash_upload_list.h @@ -22,7 +22,7 @@ class CrashUploadList : public UploadList { CrashUploadList(Delegate* delegate, const base::FilePath& upload_log_path); protected: - virtual ~CrashUploadList(); + ~CrashUploadList() override; private: DISALLOW_COPY_AND_ASSIGN(CrashUploadList); diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.h b/chrome/browser/custom_handlers/protocol_handler_registry.h index 63adc5b..3426ab0 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry.h +++ b/chrome/browser/custom_handlers/protocol_handler_registry.h @@ -46,14 +46,14 @@ class ProtocolHandlerRegistry : public KeyedService { : public ShellIntegration::DefaultWebClientObserver { public: explicit DefaultClientObserver(ProtocolHandlerRegistry* registry); - virtual ~DefaultClientObserver(); + ~DefaultClientObserver() override; // Get response from the worker regarding whether Chrome is the default // handler for the protocol. - virtual void SetDefaultWebClientUIState( + void SetDefaultWebClientUIState( ShellIntegration::DefaultWebClientUIState state) override; - virtual bool IsInteractiveSetDefaultPermitted() override; + bool IsInteractiveSetDefaultPermitted() override; // Give the observer a handle to the worker, so we can find out the protocol // when we're called and also tell the worker if we get deleted. @@ -63,7 +63,7 @@ class ProtocolHandlerRegistry : public KeyedService { ShellIntegration::DefaultProtocolClientWorker* worker_; private: - virtual bool IsOwnedByWorker() override; + bool IsOwnedByWorker() override; // This is a raw pointer, not reference counted, intentionally. In general // subclasses of DefaultWebClientObserver are not able to be refcounted @@ -105,20 +105,20 @@ class ProtocolHandlerRegistry : public KeyedService { public: // |io_thread_delegate| is used to perform actual job creation work. explicit JobInterceptorFactory(IOThreadDelegate* io_thread_delegate); - virtual ~JobInterceptorFactory(); + ~JobInterceptorFactory() override; // |job_factory| is set as the URLRequestJobFactory where requests are // forwarded if JobInterceptorFactory decides to pass on them. void Chain(scoped_ptr<net::URLRequestJobFactory> job_factory); // URLRequestJobFactory implementation. - virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( + net::URLRequestJob* MaybeCreateJobWithProtocolHandler( const std::string& scheme, net::URLRequest* request, net::NetworkDelegate* network_delegate) const override; - virtual bool IsHandledProtocol(const std::string& scheme) const override; - virtual bool IsHandledURL(const GURL& url) const override; - virtual bool IsSafeRedirectTarget(const GURL& location) const override; + bool IsHandledProtocol(const std::string& scheme) const override; + bool IsHandledURL(const GURL& url) const override; + bool IsSafeRedirectTarget(const GURL& location) const override; private: // When JobInterceptorFactory decides to pass on particular requests, @@ -138,7 +138,7 @@ class ProtocolHandlerRegistry : public KeyedService { // Creates a new instance. Assumes ownership of |delegate|. ProtocolHandlerRegistry(content::BrowserContext* context, Delegate* delegate); - virtual ~ProtocolHandlerRegistry(); + ~ProtocolHandlerRegistry() override; // Returns a net::URLRequestJobFactory suitable for use on the IO thread, but // is initialized on the UI thread. @@ -244,7 +244,7 @@ class ProtocolHandlerRegistry : public KeyedService { // This is called by the UI thread when the system is shutting down. This // does finalization which must be done on the UI thread. - virtual void Shutdown() override; + void Shutdown() override; // Registers the preferences that we store registered protocol handlers in. static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h index fbba519..2002de3 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h +++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h @@ -29,19 +29,19 @@ class ProtocolHandlerRegistryFactory protected: // BrowserContextKeyedServiceFactory implementation. - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual content::BrowserContext* GetBrowserContextToUse( + bool ServiceIsCreatedWithBrowserContext() const override; + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; private: friend struct DefaultSingletonTraits<ProtocolHandlerRegistryFactory>; ProtocolHandlerRegistryFactory(); - virtual ~ProtocolHandlerRegistryFactory(); + ~ProtocolHandlerRegistryFactory() override; // BrowserContextKeyedServiceFactory implementation. - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistryFactory); diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index 7fe0336..e28c034 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc @@ -63,19 +63,17 @@ void AssertIntercepted( // ProtocolHandlerRegistry properly handled a job creation request. class FakeURLRequestJobFactory : public net::URLRequestJobFactory { // net::URLRequestJobFactory implementation: - virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( + net::URLRequestJob* MaybeCreateJobWithProtocolHandler( const std::string& scheme, net::URLRequest* request, net::NetworkDelegate* network_delegate) const override { return NULL; } - virtual bool IsHandledProtocol(const std::string& scheme) const override { + bool IsHandledProtocol(const std::string& scheme) const override { return false; } - virtual bool IsHandledURL(const GURL& url) const override { - return false; - } - virtual bool IsSafeRedirectTarget(const GURL& location) const override { + bool IsHandledURL(const GURL& url) const override { return false; } + bool IsSafeRedirectTarget(const GURL& location) const override { return true; } }; @@ -124,34 +122,32 @@ base::DictionaryValue* GetProtocolHandlerValueWithDefault(std::string protocol, class FakeDelegate : public ProtocolHandlerRegistry::Delegate { public: FakeDelegate() : force_os_failure_(false) {} - virtual ~FakeDelegate() { } - virtual void RegisterExternalHandler(const std::string& protocol) override { + ~FakeDelegate() override {} + 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) override { + void DeregisterExternalHandler(const std::string& protocol) override { registered_protocols_.erase(protocol); } - virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( - ShellIntegration::DefaultWebClientObserver* observer, - const std::string& protocol) override; + ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( + ShellIntegration::DefaultWebClientObserver* observer, + const std::string& protocol) override; - virtual ProtocolHandlerRegistry::DefaultClientObserver* CreateShellObserver( + ProtocolHandlerRegistry::DefaultClientObserver* CreateShellObserver( ProtocolHandlerRegistry* registry) override; - virtual void RegisterWithOSAsDefaultClient( - const std::string& protocol, - ProtocolHandlerRegistry* reg) override { + 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) override { + bool IsExternalHandlerRegistered(const std::string& protocol) override { return registered_protocols_.find(protocol) != registered_protocols_.end(); } @@ -188,7 +184,7 @@ class FakeClientObserver : ProtocolHandlerRegistry::DefaultClientObserver(registry), delegate_(registry_delegate) {} - virtual void SetDefaultWebClientUIState( + void SetDefaultWebClientUIState( ShellIntegration::DefaultWebClientUIState state) override { ProtocolHandlerRegistry::DefaultClientObserver::SetDefaultWebClientUIState( state); @@ -214,9 +210,9 @@ class FakeProtocolClientWorker force_failure_(force_failure) {} private: - virtual ~FakeProtocolClientWorker() {} + ~FakeProtocolClientWorker() override {} - virtual ShellIntegration::DefaultWebClientState CheckIsDefault() override { + ShellIntegration::DefaultWebClientState CheckIsDefault() override { if (force_failure_) { return ShellIntegration::NOT_DEFAULT; } else { @@ -224,9 +220,7 @@ class FakeProtocolClientWorker } } - virtual bool SetAsDefault(bool interactive_permitted) override { - return true; - } + bool SetAsDefault(bool interactive_permitted) override { return true; } private: bool force_failure_; @@ -256,9 +250,9 @@ class NotificationCounter : public content::NotificationObserver { int events() { return events_; } bool notified() { return events_ > 0; } void Clear() { events_ = 0; } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { ++events_; } @@ -279,9 +273,9 @@ class QueryProtocolHandlerOnChange content::Source<content::BrowserContext>(context)); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { std::vector<std::string> output; local_registry_->GetRegisteredProtocols(&output); called_ = true; @@ -301,8 +295,8 @@ class QueryProtocolHandlerOnChange class TestMessageLoop : public base::MessageLoop { public: TestMessageLoop() {} - virtual ~TestMessageLoop() {} - virtual bool IsType(base::MessageLoop::Type type) const override { + ~TestMessageLoop() override {} + bool IsType(base::MessageLoop::Type type) const override { switch (type) { case base::MessageLoop::TYPE_UI: return BrowserThread::CurrentlyOn(BrowserThread::UI); diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h index 7375ca8..137a3d9 100644 --- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h +++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h @@ -27,20 +27,20 @@ class RegisterProtocolHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { private: RegisterProtocolHandlerInfoBarDelegate(ProtocolHandlerRegistry* registry, const ProtocolHandler& handler); - virtual ~RegisterProtocolHandlerInfoBarDelegate(); + ~RegisterProtocolHandlerInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual InfoBarAutomationType GetInfoBarAutomationType() const override; - virtual Type GetInfoBarType() const override; - virtual RegisterProtocolHandlerInfoBarDelegate* - AsRegisterProtocolHandlerInfoBarDelegate() override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; - virtual bool OKButtonTriggersUACPrompt() const override; - virtual bool Accept() override; - virtual bool Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + InfoBarAutomationType GetInfoBarAutomationType() const override; + Type GetInfoBarType() const override; + RegisterProtocolHandlerInfoBarDelegate* + AsRegisterProtocolHandlerInfoBarDelegate() override; + base::string16 GetMessageText() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; + bool OKButtonTriggersUACPrompt() const override; + bool Accept() override; + bool Cancel() override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; // Returns a user-friendly name for the protocol of this protocol handler. base::string16 GetProtocolName(const ProtocolHandler& handler) const; diff --git a/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h b/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h index 8803ff3..7caf082 100644 --- a/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h +++ b/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h @@ -21,18 +21,18 @@ class RegisterProtocolHandlerPermissionRequest const ProtocolHandler& handler, GURL url, bool user_gesture); - virtual ~RegisterProtocolHandlerPermissionRequest(); + ~RegisterProtocolHandlerPermissionRequest() override; // PermissionBubbleRequest: - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetMessageTextFragment() const override; - virtual bool HasUserGesture() const override; - virtual GURL GetRequestingHostname() const override; - virtual void PermissionGranted() override; - virtual void PermissionDenied() override; - virtual void Cancelled() override; - virtual void RequestFinished() override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + base::string16 GetMessageTextFragment() const override; + bool HasUserGesture() const override; + GURL GetRequestingHostname() const override; + void PermissionGranted() override; + void PermissionDenied() override; + void Cancelled() override; + void RequestFinished() override; private: ProtocolHandlerRegistry* registry_; diff --git a/chrome/browser/custom_home_pages_table_model.h b/chrome/browser/custom_home_pages_table_model.h index 59a4652..ca19997 100644 --- a/chrome/browser/custom_home_pages_table_model.h +++ b/chrome/browser/custom_home_pages_table_model.h @@ -31,7 +31,7 @@ class TableModelObserver; class CustomHomePagesTableModel : public ui::TableModel { public: explicit CustomHomePagesTableModel(Profile* profile); - virtual ~CustomHomePagesTableModel(); + ~CustomHomePagesTableModel() override; // Sets the set of urls that this model contains. void SetURLs(const std::vector<GURL>& urls); @@ -55,10 +55,10 @@ class CustomHomePagesTableModel : public ui::TableModel { std::vector<GURL> GetURLs(); // TableModel overrides: - virtual int RowCount() override; - virtual base::string16 GetText(int row, int column_id) override; - virtual base::string16 GetTooltip(int row) override; - virtual void SetObserver(ui::TableModelObserver* observer) override; + int RowCount() override; + base::string16 GetText(int row, int column_id) override; + base::string16 GetTooltip(int row) override; + void SetObserver(ui::TableModelObserver* observer) override; private: // Each item in the model is represented as an Entry. Entry stores the URL diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc index 7584861..0abb186 100644 --- a/chrome/browser/diagnostics/diagnostics_model.cc +++ b/chrome/browser/diagnostics/diagnostics_model.cc @@ -49,13 +49,13 @@ class DiagnosticsModelImpl : public DiagnosticsModel { public: DiagnosticsModelImpl() : tests_run_(0) {} - virtual ~DiagnosticsModelImpl() { STLDeleteElements(&tests_); } + ~DiagnosticsModelImpl() override { STLDeleteElements(&tests_); } - virtual int GetTestRunCount() const override { return tests_run_; } + int GetTestRunCount() const override { return tests_run_; } - virtual int GetTestAvailableCount() const override { return tests_.size(); } + int GetTestAvailableCount() const override { return tests_.size(); } - virtual void RunAll(DiagnosticsModel::Observer* observer) override { + void RunAll(DiagnosticsModel::Observer* observer) override { size_t test_count = tests_.size(); bool continue_running = true; for (size_t i = 0; i != test_count; ++i) { @@ -79,7 +79,7 @@ class DiagnosticsModelImpl : public DiagnosticsModel { observer->OnAllTestsDone(this); } - virtual void RecoverAll(DiagnosticsModel::Observer* observer) override { + void RecoverAll(DiagnosticsModel::Observer* observer) override { size_t test_count = tests_.size(); bool continue_running = true; for (size_t i = 0; i != test_count; ++i) { @@ -102,11 +102,11 @@ class DiagnosticsModelImpl : public DiagnosticsModel { observer->OnAllRecoveryDone(this); } - virtual const TestInfo& GetTest(size_t index) const override { + const TestInfo& GetTest(size_t index) const override { return *tests_[index]; } - virtual bool GetTestInfo(int id, const TestInfo** result) const override { + bool GetTestInfo(int id, const TestInfo** result) const override { DCHECK(id < DIAGNOSTICS_TEST_ID_COUNT); DCHECK(id >= 0); for (size_t i = 0; i < tests_.size(); i++) { diff --git a/chrome/browser/diagnostics/diagnostics_model_unittest.cc b/chrome/browser/diagnostics/diagnostics_model_unittest.cc index ad99ba4..af40f35 100644 --- a/chrome/browser/diagnostics/diagnostics_model_unittest.cc +++ b/chrome/browser/diagnostics/diagnostics_model_unittest.cc @@ -45,7 +45,7 @@ class UTObserver: public DiagnosticsModel::Observer { num_recovered_(0) { } - virtual void OnTestFinished(int index, DiagnosticsModel* model) override { + void OnTestFinished(int index, DiagnosticsModel* model) override { EXPECT_TRUE(model != NULL); ++num_tested_; EXPECT_NE(DiagnosticsModel::TEST_FAIL_STOP, @@ -53,12 +53,12 @@ class UTObserver: public DiagnosticsModel::Observer { << "Failed stop test: " << index; } - virtual void OnAllTestsDone(DiagnosticsModel* model) override { + void OnAllTestsDone(DiagnosticsModel* model) override { EXPECT_TRUE(model != NULL); tests_done_ = true; } - virtual void OnRecoveryFinished(int index, DiagnosticsModel* model) override { + void OnRecoveryFinished(int index, DiagnosticsModel* model) override { EXPECT_TRUE(model != NULL); ++num_recovered_; EXPECT_NE(DiagnosticsModel::RECOVERY_FAIL_STOP, @@ -66,7 +66,7 @@ class UTObserver: public DiagnosticsModel::Observer { << "Failed stop recovery: " << index; } - virtual void OnAllRecoveryDone(DiagnosticsModel* model) override { + void OnAllRecoveryDone(DiagnosticsModel* model) override { EXPECT_TRUE(model != NULL); recovery_done_ = true; } diff --git a/chrome/browser/diagnostics/diagnostics_test.h b/chrome/browser/diagnostics/diagnostics_test.h index 3769f6d..d2e5144 100644 --- a/chrome/browser/diagnostics/diagnostics_test.h +++ b/chrome/browser/diagnostics/diagnostics_test.h @@ -29,7 +29,7 @@ class DiagnosticsTest : public DiagnosticsModel::TestInfo { public: explicit DiagnosticsTest(DiagnosticsTestId id); - virtual ~DiagnosticsTest(); + ~DiagnosticsTest() override; // Runs the test. Returning false signals that no more tests should be run. // The actual outcome of the test should be set using the RecordXX functions. @@ -62,14 +62,15 @@ class DiagnosticsTest : public DiagnosticsModel::TestInfo { static base::FilePath GetUserDefaultProfileDir(); // DiagnosticsModel::TestInfo overrides - virtual int GetId() const override; - virtual std::string GetName() const override; - virtual std::string GetTitle() const override; - virtual DiagnosticsModel::TestResult GetResult() const override; - virtual std::string GetAdditionalInfo() const override; - virtual int GetOutcomeCode() const override; - virtual base::Time GetStartTime() const override; - virtual base::Time GetEndTime() const override; + int GetId() const override; + std::string GetName() const override; + std::string GetTitle() const override; + DiagnosticsModel::TestResult GetResult() const override; + std::string GetAdditionalInfo() const override; + int GetOutcomeCode() const override; + base::Time GetStartTime() const override; + base::Time GetEndTime() const override; + protected: // Derived classes override this method do perform the actual test. virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0; diff --git a/chrome/browser/diagnostics/diagnostics_writer.cc b/chrome/browser/diagnostics/diagnostics_writer.cc index 3693c07..835c24f 100644 --- a/chrome/browser/diagnostics/diagnostics_writer.cc +++ b/chrome/browser/diagnostics/diagnostics_writer.cc @@ -137,25 +137,25 @@ class PosixConsole : public SimpleConsole { public: PosixConsole() : use_color_(false) {} - virtual bool Init() override { + 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 base::string16& text) override { + bool Write(const base::string16& text) override { // We're assuming that the terminal is using UTF-8 encoding. printf("%s", base::UTF16ToUTF8(text).c_str()); return true; } - virtual void OnQuit() override { + void OnQuit() override { // The "press enter to continue" prompt isn't very unixy, so only do that on // Windows. } - virtual bool SetColor(Color color) override { + bool SetColor(Color color) override { if (!use_color_) return false; diff --git a/chrome/browser/diagnostics/diagnostics_writer.h b/chrome/browser/diagnostics/diagnostics_writer.h index ca1b653..6e908ec 100644 --- a/chrome/browser/diagnostics/diagnostics_writer.h +++ b/chrome/browser/diagnostics/diagnostics_writer.h @@ -24,7 +24,7 @@ class DiagnosticsWriter : public DiagnosticsModel::Observer { }; explicit DiagnosticsWriter(FormatType format); - virtual ~DiagnosticsWriter(); + ~DiagnosticsWriter() override; // How many tests reported failure. int failures() { return failures_; } @@ -37,10 +37,10 @@ class DiagnosticsWriter : public DiagnosticsModel::Observer { bool WriteInfoLine(const std::string& info_text); // DiagnosticsModel::Observer overrides - virtual void OnTestFinished(int index, DiagnosticsModel* model) override; - virtual void OnAllTestsDone(DiagnosticsModel* model) override; - virtual void OnRecoveryFinished(int index, DiagnosticsModel* model) override; - virtual void OnAllRecoveryDone(DiagnosticsModel* model) override; + void OnTestFinished(int index, DiagnosticsModel* model) override; + void OnAllTestsDone(DiagnosticsModel* model) override; + void OnRecoveryFinished(int index, DiagnosticsModel* model) override; + void OnAllRecoveryDone(DiagnosticsModel* model) override; private: // Write a result block. For humans, it consists of two lines. The first line diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index 004760d..19c7262 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -51,7 +51,7 @@ class ConflictingDllsTest : public DiagnosticsTest { ConflictingDllsTest() : DiagnosticsTest(DIAGNOSTICS_CONFLICTING_DLLS_TEST) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { #if defined(OS_WIN) EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); model->set_limited_mode(true); @@ -107,7 +107,7 @@ class DiskSpaceTest : public DiagnosticsTest { public: DiskSpaceTest() : DiagnosticsTest(DIAGNOSTICS_DISK_SPACE_TEST) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { base::FilePath data_dir; if (!PathService::Get(chrome::DIR_USER_DATA, &data_dir)) return false; @@ -136,7 +136,7 @@ class InstallTypeTest : public DiagnosticsTest { InstallTypeTest() : DiagnosticsTest(DIAGNOSTICS_INSTALL_TYPE_TEST), user_level_(false) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { #if defined(OS_WIN) base::FilePath chrome_exe; if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { @@ -178,7 +178,7 @@ class JSONTest : public DiagnosticsTest { max_file_size_(max_file_size), importance_(importance) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { if (!base::PathExists(path_)) { if (importance_ == CRITICAL) { RecordOutcome(DIAG_RECON_FILE_NOT_FOUND, @@ -240,7 +240,7 @@ class OperatingSystemTest : public DiagnosticsTest { OperatingSystemTest() : DiagnosticsTest(DIAGNOSTICS_OPERATING_SYSTEM_TEST) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { #if defined(OS_WIN) base::win::Version version = base::win::GetVersion(); if ((version < base::win::VERSION_XP) || @@ -293,7 +293,7 @@ class PathTest : public DiagnosticsTest { : DiagnosticsTest(path_info.test_id), path_info_(path_info) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { if (!g_install_type) { RecordStopFailure(DIAG_RECON_DEPENDENCY, "Install dependency failure"); return false; @@ -357,7 +357,7 @@ class VersionTest : public DiagnosticsTest { public: VersionTest() : DiagnosticsTest(DIAGNOSTICS_VERSION_TEST) {} - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { chrome::VersionInfo version_info; std::string current_version = version_info.Version(); if (current_version.empty()) { diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc index 0c38718..3f98caa 100644 --- a/chrome/browser/diagnostics/sqlite_diagnostics.cc +++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc @@ -44,7 +44,7 @@ class SqliteIntegrityTest : public DiagnosticsTest { const base::FilePath& db_path) : DiagnosticsTest(id), flags_(flags), db_path_(db_path) {} - virtual bool RecoveryImpl(DiagnosticsModel::Observer* observer) override { + bool RecoveryImpl(DiagnosticsModel::Observer* observer) override { int outcome_code = GetOutcomeCode(); if (flags_ & REMOVE_IF_CORRUPT) { switch (outcome_code) { @@ -69,7 +69,7 @@ class SqliteIntegrityTest : public DiagnosticsTest { return true; } - virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { + bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { // If we're given an absolute path, use it. If not, then assume it's under // the profile directory. base::FilePath path; diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.h b/chrome/browser/dom_distiller/dom_distiller_service_factory.h index d846014..f84beff 100644 --- a/chrome/browser/dom_distiller/dom_distiller_service_factory.h +++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.h @@ -27,7 +27,7 @@ class DomDistillerContextKeyedService : public KeyedService, scoped_ptr<DistillerFactory> distiller_factory, scoped_ptr<DistillerPageFactory> distiller_page_factory, scoped_ptr<DistilledPagePrefs> distilled_page_prefs); - virtual ~DomDistillerContextKeyedService() {} + ~DomDistillerContextKeyedService() override {} private: DISALLOW_COPY_AND_ASSIGN(DomDistillerContextKeyedService); @@ -43,12 +43,12 @@ class DomDistillerServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<DomDistillerServiceFactory>; DomDistillerServiceFactory(); - virtual ~DomDistillerServiceFactory(); + ~DomDistillerServiceFactory() override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; }; diff --git a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc index fa4623e..c3f2261 100644 --- a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc +++ b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc @@ -82,13 +82,13 @@ class DomDistillerViewerSourceBrowserTest : public InProcessBrowserTest { DomDistillerViewerSourceBrowserTest() {} virtual ~DomDistillerViewerSourceBrowserTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { database_model_ = new FakeDB<ArticleEntry>::EntryMap; } - virtual void TearDownOnMainThread() override { delete database_model_; } + void TearDownOnMainThread() override { delete database_model_; } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kEnableDomDistiller); } diff --git a/chrome/browser/dom_distiller/lazy_dom_distiller_service.h b/chrome/browser/dom_distiller/lazy_dom_distiller_service.h index 976689d..8f7522f 100644 --- a/chrome/browser/dom_distiller/lazy_dom_distiller_service.h +++ b/chrome/browser/dom_distiller/lazy_dom_distiller_service.h @@ -29,44 +29,41 @@ class LazyDomDistillerService : public DomDistillerServiceInterface, public: LazyDomDistillerService(Profile* profile, const DomDistillerServiceFactory* service_factory); - virtual ~LazyDomDistillerService(); + ~LazyDomDistillerService() override; public: // DomDistillerServiceInterface implementation: - virtual syncer::SyncableService* GetSyncableService() const override; - virtual const std::string AddToList( + syncer::SyncableService* GetSyncableService() const override; + const std::string AddToList( const GURL& url, scoped_ptr<DistillerPage> distiller_page, const ArticleAvailableCallback& article_cb) override; - virtual bool HasEntry(const std::string& entry_id) override; - virtual std::string GetUrlForEntry(const std::string& entry_id) override; - virtual std::vector<ArticleEntry> GetEntries() const override; - virtual scoped_ptr<ArticleEntry> RemoveEntry( - const std::string& entry_id) override; - virtual scoped_ptr<ViewerHandle> ViewEntry( - ViewRequestDelegate* delegate, - scoped_ptr<DistillerPage> distiller_page, - const std::string& entry_id) override; - virtual scoped_ptr<ViewerHandle> ViewUrl( - ViewRequestDelegate* delegate, - scoped_ptr<DistillerPage> distiller_page, - const GURL& url) override; - virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage( + bool HasEntry(const std::string& entry_id) override; + std::string GetUrlForEntry(const std::string& entry_id) override; + std::vector<ArticleEntry> GetEntries() const override; + scoped_ptr<ArticleEntry> RemoveEntry(const std::string& entry_id) override; + scoped_ptr<ViewerHandle> ViewEntry(ViewRequestDelegate* delegate, + scoped_ptr<DistillerPage> distiller_page, + const std::string& entry_id) override; + scoped_ptr<ViewerHandle> ViewUrl(ViewRequestDelegate* delegate, + scoped_ptr<DistillerPage> distiller_page, + const GURL& url) override; + scoped_ptr<DistillerPage> CreateDefaultDistillerPage( const gfx::Size& render_view_size) override; - virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( + scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( scoped_ptr<SourcePageHandle> handle) override; - virtual void AddObserver(DomDistillerObserver* observer) override; - virtual void RemoveObserver(DomDistillerObserver* observer) override; - virtual DistilledPagePrefs* GetDistilledPagePrefs() override; + void AddObserver(DomDistillerObserver* observer) override; + void RemoveObserver(DomDistillerObserver* observer) override; + DistilledPagePrefs* GetDistilledPagePrefs() override; private: // Accessor method for the backing service instance. DomDistillerServiceInterface* instance() const; // content::NotificationObserver implementation: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // The Profile to use when retrieving the DomDistillerService and also the // profile to listen for destruction of. diff --git a/chrome/browser/dom_distiller/tab_utils.cc b/chrome/browser/dom_distiller/tab_utils.cc index 8f94218..5989051 100644 --- a/chrome/browser/dom_distiller/tab_utils.cc +++ b/chrome/browser/dom_distiller/tab_utils.cc @@ -38,20 +38,18 @@ class SelfDeletingRequestDelegate : public ViewRequestDelegate, public content::WebContentsObserver { public: explicit SelfDeletingRequestDelegate(content::WebContents* web_contents); - virtual ~SelfDeletingRequestDelegate(); + ~SelfDeletingRequestDelegate() override; // ViewRequestDelegate implementation. - virtual void OnArticleReady( - const DistilledArticleProto* article_proto) override; - virtual void OnArticleUpdated( - ArticleDistillationUpdate article_update) override; + void OnArticleReady(const DistilledArticleProto* article_proto) override; + void OnArticleUpdated(ArticleDistillationUpdate article_update) override; // content::WebContentsObserver implementation. - virtual void DidNavigateMainFrame( + void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; - virtual void RenderProcessGone(base::TerminationStatus status) override; - virtual void WebContentsDestroyed() override; + void RenderProcessGone(base::TerminationStatus status) override; + void WebContentsDestroyed() override; // Takes ownership of the ViewerHandle to keep distillation alive until |this| // is deleted. diff --git a/chrome/browser/dom_distiller/tab_utils_browsertest.cc b/chrome/browser/dom_distiller/tab_utils_browsertest.cc index 7c79188..6620b6d 100644 --- a/chrome/browser/dom_distiller/tab_utils_browsertest.cc +++ b/chrome/browser/dom_distiller/tab_utils_browsertest.cc @@ -32,7 +32,7 @@ const char* kSimpleArticlePath = "/dom_distiller/simple_article.html"; class DomDistillerTabUtilsBrowserTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kEnableDomDistiller); } }; @@ -45,8 +45,8 @@ class WebContentsMainFrameHelper : public content::WebContentsObserver { content::WebContentsObserver::Observe(web_contents); } - virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url) override { + void DidFinishLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url) override { if (!render_frame_host->GetParent() && validated_url.scheme() == kDomDistillerScheme) callback_.Run(); diff --git a/chrome/browser/domain_reliability/service_factory.h b/chrome/browser/domain_reliability/service_factory.h index 9b1973ce..9fae80a 100644 --- a/chrome/browser/domain_reliability/service_factory.h +++ b/chrome/browser/domain_reliability/service_factory.h @@ -30,10 +30,10 @@ class DomainReliabilityServiceFactory friend struct DefaultSingletonTraits<DomainReliabilityServiceFactory>; DomainReliabilityServiceFactory(); - virtual ~DomainReliabilityServiceFactory(); + ~DomainReliabilityServiceFactory() override; // BrowserContextKeyedServiceFactory implementation: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(DomainReliabilityServiceFactory); diff --git a/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service.h b/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service.h index c29ca65..0231d12 100644 --- a/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service.h +++ b/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service.h @@ -24,14 +24,14 @@ class ChromeBookmarkServerClusterService : public BookmarkServerClusterService, EnhancedBookmarkModel* enhanced_bookmark_model, PrefService* pref_service, ProfileSyncService* sync_service); - virtual ~ChromeBookmarkServerClusterService(); + ~ChromeBookmarkServerClusterService() override; // BookmarkServerClusterService - virtual void AddObserver(BookmarkServerServiceObserver* observer) override; + void AddObserver(BookmarkServerServiceObserver* observer) override; // ProfileSyncServiceObserver implementation. - virtual void OnStateChanged() override; - virtual void OnSyncCycleCompleted() override; + void OnStateChanged() override; + void OnSyncCycleCompleted() override; private: // This class observes the sync service for changes. diff --git a/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service_factory.h b/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service_factory.h index c9f2512..540f649 100644 --- a/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service_factory.h +++ b/chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service_factory.h @@ -28,12 +28,12 @@ class ChromeBookmarkServerClusterServiceFactory ChromeBookmarkServerClusterServiceFactory>; ChromeBookmarkServerClusterServiceFactory(); - virtual ~ChromeBookmarkServerClusterServiceFactory() {} + ~ChromeBookmarkServerClusterServiceFactory() override {} - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkServerClusterServiceFactory); diff --git a/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h b/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h index 9ce18de..ed6f9dd 100644 --- a/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h +++ b/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h @@ -26,12 +26,12 @@ class EnhancedBookmarkModelFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<EnhancedBookmarkModelFactory>; EnhancedBookmarkModelFactory(); - virtual ~EnhancedBookmarkModelFactory() {} + ~EnhancedBookmarkModelFactory() override {} - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkModelFactory); diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc index 56acf64..f4eae6f 100644 --- a/chrome/browser/errorpage_browsertest.cc +++ b/chrome/browser/errorpage_browsertest.cc @@ -154,10 +154,10 @@ class FailFirstNRequestsInterceptor : public net::URLRequestInterceptor { public: explicit FailFirstNRequestsInterceptor(int requests_to_fail) : requests_(0), failures_(0), requests_to_fail_(requests_to_fail) {} - virtual ~FailFirstNRequestsInterceptor() {} + ~FailFirstNRequestsInterceptor() override {} // net::URLRequestInterceptor implementation - virtual net::URLRequestJob* MaybeInterceptRequest( + net::URLRequestJob* MaybeInterceptRequest( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -200,10 +200,10 @@ class LinkDoctorInterceptor : public net::URLRequestInterceptor { weak_factory_(this) { } - virtual ~LinkDoctorInterceptor() {} + ~LinkDoctorInterceptor() override {} // net::URLRequestInterceptor implementation - virtual net::URLRequestJob* MaybeInterceptRequest( + net::URLRequestJob* MaybeInterceptRequest( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -297,7 +297,7 @@ class ErrorPageTest : public InProcessBrowserTest { // Navigates the active tab to a mock url created for the file at |file_path|. // Needed for StaleCacheStatus and StaleCacheStatusFailedCorrections tests. - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache); } @@ -405,7 +405,7 @@ class ErrorPageTest : public InProcessBrowserTest { } protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { link_doctor_interceptor_ = new LinkDoctorInterceptor(); scoped_ptr<net::URLRequestInterceptor> owned_interceptor( link_doctor_interceptor_); @@ -464,10 +464,10 @@ class TestFailProvisionalLoadObserver : public content::WebContentsObserver { public: explicit TestFailProvisionalLoadObserver(content::WebContents* contents) : content::WebContentsObserver(contents) {} - virtual ~TestFailProvisionalLoadObserver() {} + ~TestFailProvisionalLoadObserver() override {} // This method is invoked when the provisional load failed. - virtual void DidFailProvisionalLoad( + void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, @@ -876,7 +876,7 @@ IN_PROC_BROWSER_TEST_F(ErrorPageTest, StaleCacheStatus) { class ErrorPageAutoReloadTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kEnableOfflineAutoReload); } @@ -936,10 +936,10 @@ IN_PROC_BROWSER_TEST_F(ErrorPageAutoReloadTest, AutoReload) { class AddressUnreachableInterceptor : public net::URLRequestInterceptor { public: AddressUnreachableInterceptor() {} - virtual ~AddressUnreachableInterceptor() {} + ~AddressUnreachableInterceptor() override {} // net::URLRequestInterceptor: - virtual net::URLRequestJob* MaybeInterceptRequest( + net::URLRequestJob* MaybeInterceptRequest( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override { return new URLRequestFailedJob(request, @@ -958,13 +958,13 @@ class AddressUnreachableInterceptor : public net::URLRequestInterceptor { class ErrorPageNavigationCorrectionsFailTest : public ErrorPageTest { public: // InProcessBrowserTest: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ErrorPageNavigationCorrectionsFailTest::AddFilters)); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ErrorPageNavigationCorrectionsFailTest::RemoveFilters)); @@ -1058,7 +1058,7 @@ class ErrorPageForIDNTest : public InProcessBrowserTest { static const char kHostnameJSUnicode[]; // InProcessBrowserTest: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Clear AcceptLanguages to force punycode decoding. browser()->profile()->GetPrefs()->SetString(prefs::kAcceptLanguages, std::string()); @@ -1067,7 +1067,7 @@ class ErrorPageForIDNTest : public InProcessBrowserTest { base::Bind(&ErrorPageForIDNTest::AddFilters)); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ErrorPageForIDNTest::RemoveFilters)); diff --git a/chrome/browser/external_extension_browsertest.cc b/chrome/browser/external_extension_browsertest.cc index 38aa22a..dcde9d3 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) override { + 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.cc b/chrome/browser/external_protocol/external_protocol_handler.cc index 061f094..e2503f6 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc @@ -101,7 +101,7 @@ class ExternalDefaultProtocolObserver tab_contents_id_(tab_contents_id), prompt_user_(prompt_user) {} - virtual void SetDefaultWebClientUIState( + void SetDefaultWebClientUIState( ShellIntegration::DefaultWebClientUIState state) override { DCHECK(base::MessageLoopForUI::IsCurrent()); @@ -135,7 +135,7 @@ class ExternalDefaultProtocolObserver escaped_url_, render_process_host_id_, tab_contents_id_, delegate_); } - virtual bool IsOwnedByWorker() override { return true; } + bool IsOwnedByWorker() override { return true; } private: ExternalProtocolHandler::Delegate* delegate_; diff --git a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc index fdbfe28..4518b75 100644 --- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc +++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc @@ -21,15 +21,13 @@ class FakeExternalProtocolHandlerWorker os_state_(os_state) {} private: - virtual ~FakeExternalProtocolHandlerWorker() {} + ~FakeExternalProtocolHandlerWorker() override {} - virtual ShellIntegration::DefaultWebClientState CheckIsDefault() override { + ShellIntegration::DefaultWebClientState CheckIsDefault() override { return os_state_; } - virtual bool SetAsDefault(bool interactive_permitted) override { - return true; - } + bool SetAsDefault(bool interactive_permitted) override { return true; } ShellIntegration::DefaultWebClientState os_state_; }; @@ -44,38 +42,38 @@ class FakeExternalProtocolHandlerDelegate has_prompted_(false), has_blocked_ (false) {} - virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( + ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( ShellIntegration::DefaultWebClientObserver* observer, const std::string& protocol) override { return new FakeExternalProtocolHandlerWorker(observer, protocol, os_state_); } - virtual ExternalProtocolHandler::BlockState GetBlockState( + ExternalProtocolHandler::BlockState GetBlockState( const std::string& scheme) override { return block_state_; } - virtual void BlockRequest() override { + void BlockRequest() override { ASSERT_TRUE(block_state_ == ExternalProtocolHandler::BLOCK || os_state_ == ShellIntegration::IS_DEFAULT); has_blocked_ = true; } - virtual void RunExternalProtocolDialog(const GURL& url, - int render_process_host_id, - int routing_id) override { + void RunExternalProtocolDialog(const GURL& url, + int render_process_host_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) override { + 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() override { + void FinishedProcessingCheck() override { base::MessageLoop::current()->Quit(); } diff --git a/chrome/browser/external_protocol/external_protocol_observer.h b/chrome/browser/external_protocol/external_protocol_observer.h index 206d523..56a653f 100644 --- a/chrome/browser/external_protocol/external_protocol_observer.h +++ b/chrome/browser/external_protocol/external_protocol_observer.h @@ -14,10 +14,10 @@ class ExternalProtocolObserver : public content::WebContentsObserver, public content::WebContentsUserData<ExternalProtocolObserver> { public: - virtual ~ExternalProtocolObserver(); + ~ExternalProtocolObserver() override; // content::WebContentsObserver overrides. - virtual void DidGetUserGesture() override; + void DidGetUserGesture() override; private: explicit ExternalProtocolObserver(content::WebContents* web_contents); diff --git a/chrome/browser/fast_shutdown_browsertest.cc b/chrome/browser/fast_shutdown_browsertest.cc index d76b73e..49ae9f8 100644 --- a/chrome/browser/fast_shutdown_browsertest.cc +++ b/chrome/browser/fast_shutdown_browsertest.cc @@ -26,7 +26,7 @@ class FastShutdown : public InProcessBrowserTest { FastShutdown() { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kDisablePopupBlocking); } diff --git a/chrome/browser/favicon/chrome_favicon_client.h b/chrome/browser/favicon/chrome_favicon_client.h index 932cb7c..9c64512 100644 --- a/chrome/browser/favicon/chrome_favicon_client.h +++ b/chrome/browser/favicon/chrome_favicon_client.h @@ -17,11 +17,11 @@ class Profile; class ChromeFaviconClient : public FaviconClient { public: explicit ChromeFaviconClient(Profile* profile); - virtual ~ChromeFaviconClient(); + ~ChromeFaviconClient() override; // FaviconClient implementation: - virtual FaviconService* GetFaviconService() override; - virtual bool IsBookmarked(const GURL& url) override; + FaviconService* GetFaviconService() override; + bool IsBookmarked(const GURL& url) override; private: Profile* profile_; diff --git a/chrome/browser/favicon/chrome_favicon_client_factory.h b/chrome/browser/favicon/chrome_favicon_client_factory.h index 8f6393c..46f8344 100644 --- a/chrome/browser/favicon/chrome_favicon_client_factory.h +++ b/chrome/browser/favicon/chrome_favicon_client_factory.h @@ -26,12 +26,12 @@ class ChromeFaviconClientFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<ChromeFaviconClientFactory>; ChromeFaviconClientFactory(); - virtual ~ChromeFaviconClientFactory(); + ~ChromeFaviconClientFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; }; diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc index b01abbe..bc5c27d 100644 --- a/chrome/browser/favicon/favicon_handler_unittest.cc +++ b/chrome/browser/favicon/favicon_handler_unittest.cc @@ -177,14 +177,14 @@ class HistoryRequestHandler { class TestFaviconClient : public FaviconClient { public: - virtual ~TestFaviconClient() {}; + ~TestFaviconClient() override{}; - virtual FaviconService* GetFaviconService() override { + FaviconService* GetFaviconService() override { // Just give none NULL value, so overridden methods can be hit. return (FaviconService*)(1); } - virtual bool IsBookmarked(const GURL& url) override { return false; } + bool IsBookmarked(const GURL& url) override { return false; } }; class TestFaviconDriver : public FaviconDriver { @@ -194,36 +194,33 @@ class TestFaviconDriver : public FaviconDriver { virtual ~TestFaviconDriver() { } - virtual bool IsOffTheRecord() override { return false; } + bool IsOffTheRecord() override { return false; } - virtual const gfx::Image GetActiveFaviconImage() override { return image_; } + const gfx::Image GetActiveFaviconImage() override { return image_; } - virtual const GURL GetActiveFaviconURL() override { return favicon_url_; } + const GURL GetActiveFaviconURL() override { return favicon_url_; } - virtual bool GetActiveFaviconValidity() override { return favicon_validity_; } + bool GetActiveFaviconValidity() override { return favicon_validity_; } - virtual const GURL GetActiveURL() override { return url_; } + const GURL GetActiveURL() override { return url_; } - virtual void SetActiveFaviconImage(gfx::Image image) override { - image_ = image; - } + void SetActiveFaviconImage(gfx::Image image) override { image_ = image; } - virtual void SetActiveFaviconURL(GURL favicon_url) override { + void SetActiveFaviconURL(GURL favicon_url) override { favicon_url_ = favicon_url; } - virtual void SetActiveFaviconValidity(bool favicon_validity) override { + void SetActiveFaviconValidity(bool favicon_validity) override { favicon_validity_ = favicon_validity; } - virtual int StartDownload(const GURL& url, - int max_bitmap_size) override { + int StartDownload(const GURL& url, int max_bitmap_size) override { ADD_FAILURE() << "TestFaviconDriver::StartDownload() " << "should never be called in tests."; return -1; } - virtual void NotifyFaviconUpdated(bool icon_url_changed) override { + void NotifyFaviconUpdated(bool icon_url_changed) override { ADD_FAILURE() << "TestFaviconDriver::NotifyFaviconUpdated() " << "should never be called in tests."; } @@ -259,8 +256,7 @@ class TestFaviconHandler : public FaviconHandler { download_handler_.reset(new DownloadHandler(this)); } - virtual ~TestFaviconHandler() { - } + ~TestFaviconHandler() override {} HistoryRequestHandler* history_handler() { return history_handler_.get(); @@ -297,7 +293,7 @@ class TestFaviconHandler : public FaviconHandler { } protected: - virtual void UpdateFaviconMappingAndFetch( + void UpdateFaviconMappingAndFetch( const GURL& page_url, const GURL& icon_url, favicon_base::IconType icon_type, @@ -307,7 +303,7 @@ class TestFaviconHandler : public FaviconHandler { icon_type, callback)); } - virtual void GetFaviconFromFaviconService( + void GetFaviconFromFaviconService( const GURL& icon_url, favicon_base::IconType icon_type, const favicon_base::FaviconResultsCallback& callback, @@ -316,7 +312,7 @@ class TestFaviconHandler : public FaviconHandler { icon_type, callback)); } - virtual void GetFaviconForURLFromFaviconService( + void GetFaviconForURLFromFaviconService( const GURL& page_url, int icon_types, const favicon_base::FaviconResultsCallback& callback, @@ -325,8 +321,7 @@ class TestFaviconHandler : public FaviconHandler { icon_types, callback)); } - virtual int DownloadFavicon(const GURL& image_url, - int max_bitmap_size) override { + int DownloadFavicon(const GURL& image_url, int max_bitmap_size) override { download_id_++; std::vector<int> sizes; sizes.push_back(0); @@ -335,10 +330,10 @@ class TestFaviconHandler : public FaviconHandler { return download_id_; } - virtual void SetHistoryFavicons(const GURL& page_url, - const GURL& icon_url, - favicon_base::IconType icon_type, - const gfx::Image& image) override { + void SetHistoryFavicons(const GURL& page_url, + const GURL& icon_url, + favicon_base::IconType icon_type, + const gfx::Image& image) override { scoped_refptr<base::RefCountedMemory> bytes = image.As1xPNGBytes(); std::vector<unsigned char> bitmap_data(bytes->front(), bytes->front() + bytes->size()); @@ -346,11 +341,9 @@ class TestFaviconHandler : public FaviconHandler { page_url, icon_url, icon_type, bitmap_data, image.Size())); } - virtual bool ShouldSaveFavicon(const GURL& url) override { - return true; - } + bool ShouldSaveFavicon(const GURL& url) override { return true; } - virtual void NotifyFaviconUpdated(bool icon_url_changed) override { + void NotifyFaviconUpdated(bool icon_url_changed) override { ++num_favicon_updates_; } diff --git a/chrome/browser/favicon/favicon_service.h b/chrome/browser/favicon/favicon_service.h index 8827353..06c1a66 100644 --- a/chrome/browser/favicon/favicon_service.h +++ b/chrome/browser/favicon/favicon_service.h @@ -30,7 +30,7 @@ class FaviconService : public KeyedService { // The FaviconClient must outlive the constructed FaviconService. FaviconService(Profile* profile, FaviconClient* favicon_client); - virtual ~FaviconService(); + ~FaviconService() override; // We usually pass parameters with pointer to avoid copy. This function is a // helper to run FaviconResultsCallback with pointer parameters. diff --git a/chrome/browser/favicon/favicon_service_factory.h b/chrome/browser/favicon/favicon_service_factory.h index a2ad7b6..674e7e9 100644 --- a/chrome/browser/favicon/favicon_service_factory.h +++ b/chrome/browser/favicon/favicon_service_factory.h @@ -29,12 +29,12 @@ class FaviconServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<FaviconServiceFactory>; FaviconServiceFactory(); - virtual ~FaviconServiceFactory(); + ~FaviconServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(FaviconServiceFactory); }; diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h index b0d04fa..4a4aa1b 100644 --- a/chrome/browser/favicon/favicon_tab_helper.h +++ b/chrome/browser/favicon/favicon_tab_helper.h @@ -38,7 +38,7 @@ class FaviconTabHelper : public content::WebContentsObserver, public FaviconDriver, public content::WebContentsUserData<FaviconTabHelper> { public: - virtual ~FaviconTabHelper(); + ~FaviconTabHelper() override; // Initiates loading the favicon for the specified url. void FetchFavicon(const GURL& url); @@ -64,23 +64,23 @@ class FaviconTabHelper : public content::WebContentsObserver, // content::WebContentsObserver override. Must be public, because also // called from PrerenderContents. - virtual void DidUpdateFaviconURL( + void DidUpdateFaviconURL( const std::vector<content::FaviconURL>& candidates) override; // Saves the favicon for the current page. void SaveFavicon(); // FaviconDriver methods. - virtual int StartDownload(const GURL& url, int max_bitmap_size) override; - virtual void NotifyFaviconUpdated(bool icon_url_changed) override; - virtual bool IsOffTheRecord() override; - virtual const gfx::Image GetActiveFaviconImage() override; - virtual const GURL GetActiveFaviconURL() override; - virtual bool GetActiveFaviconValidity() override; - virtual const GURL GetActiveURL() override; - virtual void SetActiveFaviconImage(gfx::Image image) override; - virtual void SetActiveFaviconURL(GURL url) override; - virtual void SetActiveFaviconValidity(bool validity) override; + int StartDownload(const GURL& url, int max_bitmap_size) override; + void NotifyFaviconUpdated(bool icon_url_changed) override; + bool IsOffTheRecord() override; + const gfx::Image GetActiveFaviconImage() override; + const GURL GetActiveFaviconURL() override; + bool GetActiveFaviconValidity() override; + const GURL GetActiveURL() override; + void SetActiveFaviconImage(gfx::Image image) override; + void SetActiveFaviconURL(GURL url) override; + void SetActiveFaviconValidity(bool validity) override; // Favicon download callback. void DidDownloadFavicon( @@ -95,10 +95,10 @@ class FaviconTabHelper : public content::WebContentsObserver, friend class content::WebContentsUserData<FaviconTabHelper>; // content::WebContentsObserver overrides. - virtual void DidStartNavigationToPendingEntry( + void DidStartNavigationToPendingEntry( const GURL& url, content::NavigationController::ReloadType reload_type) override; - virtual void DidNavigateMainFrame( + void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; diff --git a/chrome/browser/feedback/feedback_profile_observer.h b/chrome/browser/feedback/feedback_profile_observer.h index 409c5d6..fe85195 100644 --- a/chrome/browser/feedback/feedback_profile_observer.h +++ b/chrome/browser/feedback/feedback_profile_observer.h @@ -29,12 +29,12 @@ class FeedbackProfileObserver : public content::NotificationObserver { friend struct base::DefaultLazyInstanceTraits<FeedbackProfileObserver>; FeedbackProfileObserver(); - virtual ~FeedbackProfileObserver(); + ~FeedbackProfileObserver() override; // content::NotificationObserver override - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Loads any unsent reports from disk and queues them to be uploaded in // the given browser context. diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h index 59111a7..f533965 100644 --- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h +++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h @@ -13,10 +13,10 @@ namespace system_logs { class ChromeInternalLogSource : public SystemLogsSource { public: ChromeInternalLogSource(); - virtual ~ChromeInternalLogSource(); + ~ChromeInternalLogSource() override; // SystemLogsSource override. - virtual void Fetch(const SysLogsSourceCallback& request) override; + void Fetch(const SysLogsSourceCallback& request) override; private: void PopulateSyncLogs(SystemLogsResponse* response); diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc index d09b652..1d2e34c 100644 --- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc @@ -17,7 +17,7 @@ class SystemLogsMemoryHandler : public MemoryDetails { // Sends the data to the callback. // MemoryDetails override. - virtual void OnDetailsAvailable() override { + void OnDetailsAvailable() override { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse); @@ -26,7 +26,7 @@ class SystemLogsMemoryHandler : public MemoryDetails { } private: - virtual ~SystemLogsMemoryHandler() {} + ~SystemLogsMemoryHandler() override {} SysLogsSourceCallback callback_; DISALLOW_COPY_AND_ASSIGN(SystemLogsMemoryHandler); diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h index f1d8912..55e9576 100644 --- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h +++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h @@ -13,10 +13,10 @@ namespace system_logs { class MemoryDetailsLogSource : public SystemLogsSource { public: MemoryDetailsLogSource(); - virtual ~MemoryDetailsLogSource(); + ~MemoryDetailsLogSource() override; // SystemLogsSource override. - virtual void Fetch(const SysLogsSourceCallback& request) override; + void Fetch(const SysLogsSourceCallback& request) override; private: DISALLOW_COPY_AND_ASSIGN(MemoryDetailsLogSource); diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h index 961878a..c94e411 100644 --- a/chrome/browser/file_select_helper.h +++ b/chrome/browser/file_select_helper.h @@ -51,7 +51,7 @@ class FileSelectHelper FRIEND_TEST_ALL_PREFIXES(FileSelectHelperTest, IsAcceptTypeValid); FRIEND_TEST_ALL_PREFIXES(FileSelectHelperTest, ZipPackage); explicit FileSelectHelper(Profile* profile); - virtual ~FileSelectHelper(); + ~FileSelectHelper() override; // Utility class which can listen for directory lister events and relay // them to the main object with the correct tracking id. @@ -61,10 +61,11 @@ class FileSelectHelper DirectoryListerDispatchDelegate(FileSelectHelper* parent, int id) : parent_(parent), id_(id) {} - virtual ~DirectoryListerDispatchDelegate() {} - virtual void OnListFile( + ~DirectoryListerDispatchDelegate() override {} + void OnListFile( const net::DirectoryLister::DirectoryListerData& data) override; - virtual void OnListDone(int error) override; + void OnListDone(int error) override; + private: // This FileSelectHelper owns this object. FileSelectHelper* parent_; @@ -86,23 +87,23 @@ class FileSelectHelper void RunFileChooserEnd(); // SelectFileDialog::Listener overrides. - virtual void FileSelected( - const base::FilePath& path, int index, void* params) override; - virtual void FileSelectedWithExtraInfo( - const ui::SelectedFileInfo& file, - int index, - void* params) override; - virtual void MultiFilesSelected(const std::vector<base::FilePath>& files, - void* params) override; - virtual void MultiFilesSelectedWithExtraInfo( + void FileSelected(const base::FilePath& path, + int index, + void* params) override; + void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file, + int index, + void* params) override; + void MultiFilesSelected(const std::vector<base::FilePath>& files, + void* params) override; + void MultiFilesSelectedWithExtraInfo( const std::vector<ui::SelectedFileInfo>& files, void* params) override; - virtual void FileSelectionCanceled(void* params) override; + void FileSelectionCanceled(void* params) override; // content::NotificationObserver overrides. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void EnumerateDirectory(int request_id, content::RenderViewHost* render_view_host, diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index 98714d9..8ee4f65 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -86,13 +86,13 @@ bool g_should_do_autofill_personal_data_manager_first_run = false; class ImportEndedObserver : public importer::ImporterProgressObserver { public: ImportEndedObserver() : ended_(false) {} - virtual ~ImportEndedObserver() {} + ~ImportEndedObserver() override {} // importer::ImporterProgressObserver: - virtual void ImportStarted() override {} - virtual void ImportItemStarted(importer::ImportItem item) override {} - virtual void ImportItemEnded(importer::ImportItem item) override {} - virtual void ImportEnded() override { + void ImportStarted() override {} + void ImportItemStarted(importer::ImportItem item) override {} + void ImportItemEnded(importer::ImportItem item) override {} + void ImportEnded() override { ended_ = true; if (!callback_for_import_end_.is_null()) callback_for_import_end_.Run(); @@ -134,9 +134,9 @@ class FirstRunDelayedTasks : public content::NotificationObserver { content::NotificationService::AllSources()); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { // After processing the notification we always delete ourselves. if (type == extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED) { Profile* profile = content::Source<Profile>(source).ptr(); @@ -149,7 +149,7 @@ class FirstRunDelayedTasks : public content::NotificationObserver { private: // Private ctor forces it to be created only in the heap. - virtual ~FirstRunDelayedTasks() {} + ~FirstRunDelayedTasks() override {} // The extension work is to basically trigger an extension update check. // If the extension specified in the master pref is older than the live @@ -311,12 +311,12 @@ class FirstRunBubbleLauncher : public content::NotificationObserver { private: FirstRunBubbleLauncher(); - virtual ~FirstRunBubbleLauncher(); + ~FirstRunBubbleLauncher() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc index 18b2acc..d28a41c 100644 --- a/chrome/browser/first_run/first_run_browsertest.cc +++ b/chrome/browser/first_run/first_run_browsertest.cc @@ -101,7 +101,7 @@ class FirstRunMasterPrefsBrowserTestBase : public InProcessBrowserTest { InProcessBrowserTest::TearDown(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { InProcessBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kForceFirstRun); EXPECT_EQ(first_run::AUTO_IMPORT_NONE, first_run::auto_import_state()); @@ -249,7 +249,7 @@ class FirstRunMasterPrefsWithTrackedPreferences : public FirstRunMasterPrefsBrowserTestT<kWithTrackedPrefs>, public testing::WithParamInterface<std::string> { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { FirstRunMasterPrefsBrowserTestT::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( switches::kForceFieldTrials, diff --git a/chrome/browser/font_family_cache.h b/chrome/browser/font_family_cache.h index e05f515..d5ff699 100644 --- a/chrome/browser/font_family_cache.h +++ b/chrome/browser/font_family_cache.h @@ -27,7 +27,7 @@ class FontFamilyCache : public base::SupportsUserData::Data, public content::NotificationObserver { public: explicit FontFamilyCache(Profile* profile); - virtual ~FontFamilyCache(); + ~FontFamilyCache() override; // Gets or creates the relevant FontFamilyCache, and then fills |map|. static void FillFontFamilyMap(Profile* profile, @@ -72,9 +72,9 @@ class FontFamilyCache : public base::SupportsUserData::Data, // content::NotificationObserver override. // Called when the profile is being destructed. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Cache of font family preferences. FontFamilyMap font_family_map_; diff --git a/chrome/browser/font_family_cache_unittest.cc b/chrome/browser/font_family_cache_unittest.cc index 0a28acf..b7f8925 100644 --- a/chrome/browser/font_family_cache_unittest.cc +++ b/chrome/browser/font_family_cache_unittest.cc @@ -15,9 +15,8 @@ class TestingFontFamilyCache : public FontFamilyCache { public: explicit TestingFontFamilyCache(Profile* profile) : FontFamilyCache(profile), fetch_font_count_(0) {} - virtual ~TestingFontFamilyCache() {} - virtual base::string16 FetchFont(const char* script, - const char* map_name) override { + ~TestingFontFamilyCache() override {} + base::string16 FetchFont(const char* script, const char* map_name) override { ++fetch_font_count_; return FontFamilyCache::FetchFont(script, map_name); } diff --git a/chrome/browser/geolocation/chrome_access_token_store.h b/chrome/browser/geolocation/chrome_access_token_store.h index 96211e3..92d0791 100644 --- a/chrome/browser/geolocation/chrome_access_token_store.h +++ b/chrome/browser/geolocation/chrome_access_token_store.h @@ -17,15 +17,14 @@ class ChromeAccessTokenStore : public content::AccessTokenStore { ChromeAccessTokenStore(); - virtual void LoadAccessTokens( - const LoadAccessTokensCallbackType& request) override; + void LoadAccessTokens(const LoadAccessTokensCallbackType& request) override; private: - virtual ~ChromeAccessTokenStore(); + ~ChromeAccessTokenStore() override; // AccessTokenStore - virtual void SaveAccessToken( - const GURL& server_url, const base::string16& access_token) override; + void SaveAccessToken(const GURL& server_url, + const base::string16& access_token) override; DISALLOW_COPY_AND_ASSIGN(ChromeAccessTokenStore); }; diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index 1199d14..e512f29 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -50,12 +50,12 @@ namespace { class IFrameLoader : public content::NotificationObserver { public: IFrameLoader(Browser* browser, int iframe_id, const GURL& url); - virtual ~IFrameLoader(); + ~IFrameLoader() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; const GURL& iframe_url() const { return iframe_url_; } @@ -129,12 +129,12 @@ class GeolocationNotificationObserver : public content::NotificationObserver { // until the infobar has been displayed; otherwise it will block until the // navigation is completed. explicit GeolocationNotificationObserver(bool wait_for_infobar); - virtual ~GeolocationNotificationObserver(); + ~GeolocationNotificationObserver() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void AddWatchAndWaitForNotification( content::RenderFrameHost* render_frame_host); @@ -245,8 +245,8 @@ class GeolocationBrowserTest : public InProcessBrowserTest { virtual ~GeolocationBrowserTest(); // InProcessBrowserTest: - virtual void SetUpOnMainThread() override; - virtual void TearDownInProcessBrowserTestFixture() override; + void SetUpOnMainThread() override; + void TearDownInProcessBrowserTestFixture() override; Browser* current_browser() { return current_browser_; } void set_html_for_tests(const std::string& html_for_tests) { diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate.h b/chrome/browser/geolocation/geolocation_infobar_delegate.h index a5d71b9..6dff312 100644 --- a/chrome/browser/geolocation/geolocation_infobar_delegate.h +++ b/chrome/browser/geolocation/geolocation_infobar_delegate.h @@ -29,11 +29,11 @@ class GeolocationInfoBarDelegate : public PermissionInfobarDelegate { const GURL& requesting_frame, int contents_unique_id, const std::string& display_languages); - virtual ~GeolocationInfoBarDelegate(); + ~GeolocationInfoBarDelegate() override; // PermissionInfoBarDelegate: - virtual base::string16 GetMessageText() const override; - virtual int GetIconID() const override; + base::string16 GetMessageText() const override; + int GetIconID() const override; GURL requesting_frame_; std::string display_languages_; diff --git a/chrome/browser/geolocation/geolocation_permission_context.h b/chrome/browser/geolocation/geolocation_permission_context.h index 6ca3d21..affa191 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.h +++ b/chrome/browser/geolocation/geolocation_permission_context.h @@ -19,26 +19,25 @@ class Profile; class GeolocationPermissionContext : public PermissionContextBase { public: explicit GeolocationPermissionContext(Profile* profile); - virtual ~GeolocationPermissionContext(); - + ~GeolocationPermissionContext() override; // In addition to the base class flow the geolocation permission request // checks that it is only code from valid iframes. // It also adds special logic when called through an extension. - virtual void RequestPermission(content::WebContents* web_contents, - const PermissionRequestID& id, - const GURL& requesting_frame_origin, - bool user_gesture, - const BrowserPermissionCallback& callback) override; + void RequestPermission(content::WebContents* web_contents, + const PermissionRequestID& id, + const GURL& requesting_frame_origin, + bool user_gesture, + const BrowserPermissionCallback& callback) override; // Adds special logic when called through an extension. - virtual void CancelPermissionRequest(content::WebContents* web_contents, - const PermissionRequestID& id) override; + void CancelPermissionRequest(content::WebContents* web_contents, + const PermissionRequestID& id) override; private: - virtual void UpdateTabContext(const PermissionRequestID& id, - const GURL& requesting_frame, - bool allowed) override; + void UpdateTabContext(const PermissionRequestID& id, + const GURL& requesting_frame, + bool allowed) override; // This must only be accessed from the UI thread. GeolocationPermissionContextExtensions extensions_context_; diff --git a/chrome/browser/geolocation/geolocation_permission_context_factory.h b/chrome/browser/geolocation/geolocation_permission_context_factory.h index d0a255d..3bb2efaa 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_factory.h +++ b/chrome/browser/geolocation/geolocation_permission_context_factory.h @@ -26,14 +26,14 @@ class GeolocationPermissionContextFactory DefaultSingletonTraits<GeolocationPermissionContextFactory>; GeolocationPermissionContextFactory(); - virtual ~GeolocationPermissionContextFactory(); + ~GeolocationPermissionContextFactory() override; // BrowserContextKeyedBaseFactory methods: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextFactory); diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc index abae2eb..55184ff 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc @@ -56,12 +56,12 @@ using content::MockRenderProcessHost; class ClosedInfoBarTracker : public content::NotificationObserver { public: ClosedInfoBarTracker(); - virtual ~ClosedInfoBarTracker(); + ~ClosedInfoBarTracker() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; size_t size() const { return removed_infobars_.size(); } diff --git a/chrome/browser/google/chrome_google_url_tracker_client.h b/chrome/browser/google/chrome_google_url_tracker_client.h index 2512da3..2687809 100644 --- a/chrome/browser/google/chrome_google_url_tracker_client.h +++ b/chrome/browser/google/chrome_google_url_tracker_client.h @@ -15,20 +15,20 @@ class ChromeGoogleURLTrackerClient : public GoogleURLTrackerClient, public content::NotificationObserver { public: explicit ChromeGoogleURLTrackerClient(Profile* profile); - virtual ~ChromeGoogleURLTrackerClient(); + ~ChromeGoogleURLTrackerClient() override; // GoogleURLTrackerClient: - virtual void SetListeningForNavigationStart(bool listen) override; - virtual bool IsListeningForNavigationStart() override; - virtual bool IsBackgroundNetworkingEnabled() override; - virtual PrefService* GetPrefs() override; - virtual net::URLRequestContextGetter* GetRequestContext() override; + void SetListeningForNavigationStart(bool listen) override; + bool IsListeningForNavigationStart() override; + bool IsBackgroundNetworkingEnabled() override; + PrefService* GetPrefs() override; + net::URLRequestContextGetter* GetRequestContext() override; private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; Profile* profile_; diff --git a/chrome/browser/google/google_search_counter.h b/chrome/browser/google/google_search_counter.h index a852539..e1f558d 100644 --- a/chrome/browser/google/google_search_counter.h +++ b/chrome/browser/google/google_search_counter.h @@ -46,7 +46,7 @@ class GoogleSearchCounter : content::NotificationObserver { friend class GoogleSearchCounterAndroidTest; GoogleSearchCounter(); - virtual ~GoogleSearchCounter(); + ~GoogleSearchCounter() override; void ProcessCommittedEntry(const content::NotificationSource& source, const content::NotificationDetails& details); @@ -59,9 +59,9 @@ class GoogleSearchCounter : content::NotificationObserver { void RegisterForNotificationsInternal(); // content::NotificationObserver - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; content::NotificationRegistrar registrar_; scoped_ptr<GoogleSearchMetrics> search_metrics_; diff --git a/chrome/browser/google/google_url_tracker_factory.h b/chrome/browser/google/google_url_tracker_factory.h index 207af8a..cf0036f 100644 --- a/chrome/browser/google/google_url_tracker_factory.h +++ b/chrome/browser/google/google_url_tracker_factory.h @@ -25,17 +25,17 @@ class GoogleURLTrackerFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<GoogleURLTrackerFactory>; GoogleURLTrackerFactory(); - virtual ~GoogleURLTrackerFactory(); + ~GoogleURLTrackerFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerFactory); }; diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h index 37acf8c..a0a3359 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h +++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h @@ -20,24 +20,22 @@ class GoogleURLTrackerNavigationHelperImpl public: GoogleURLTrackerNavigationHelperImpl(content::WebContents* web_contents, GoogleURLTracker* tracker); - virtual ~GoogleURLTrackerNavigationHelperImpl(); + ~GoogleURLTrackerNavigationHelperImpl() override; // GoogleURLTrackerNavigationHelper: - virtual void SetListeningForNavigationCommit( - bool listen) override; - virtual bool IsListeningForNavigationCommit() override; - virtual void SetListeningForTabDestruction( - bool listen) override; - virtual bool IsListeningForTabDestruction() override; - virtual void OpenURL(GURL url, - WindowOpenDisposition disposition, - bool user_clicked_on_link) override; + void SetListeningForNavigationCommit(bool listen) override; + bool IsListeningForNavigationCommit() override; + void SetListeningForTabDestruction(bool listen) override; + bool IsListeningForTabDestruction() override; + void OpenURL(GURL url, + WindowOpenDisposition disposition, + bool user_clicked_on_link) override; private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; content::WebContents* web_contents_; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/gpu/gl_string_manager.h b/chrome/browser/gpu/gl_string_manager.h index 254f158..f9eb97e 100644 --- a/chrome/browser/gpu/gl_string_manager.h +++ b/chrome/browser/gpu/gl_string_manager.h @@ -17,13 +17,13 @@ class GLStringManager : public content::GpuDataManagerObserver { static void RegisterPrefs(PrefRegistrySimple* registry); GLStringManager(); - virtual ~GLStringManager(); + ~GLStringManager() override; // Get cached GL strings in local state and send them to GpuDataManager. void Initialize(); // content::GpuDataManagerObserver - virtual void OnGpuInfoUpdate() override; + void OnGpuInfoUpdate() override; private: std::string gl_vendor_; diff --git a/chrome/browser/gpu/gpu_feature_checker.h b/chrome/browser/gpu/gpu_feature_checker.h index 1fbd694..067ad30 100644 --- a/chrome/browser/gpu/gpu_feature_checker.h +++ b/chrome/browser/gpu/gpu_feature_checker.h @@ -28,11 +28,12 @@ class GPUFeatureChecker : public base::RefCountedThreadSafe<GPUFeatureChecker>, void CheckGPUFeatureAvailability(); // content::GpuDataManagerObserver - virtual void OnGpuInfoUpdate() override; + void OnGpuInfoUpdate() override; + private: friend class base::RefCountedThreadSafe<GPUFeatureChecker>; - virtual ~GPUFeatureChecker(); + ~GPUFeatureChecker() override; gpu::GpuFeatureType feature_; FeatureAvailableCallback callback_; diff --git a/chrome/browser/gpu/three_d_api_observer.cc b/chrome/browser/gpu/three_d_api_observer.cc index b551b2d..d2f8d8e 100644 --- a/chrome/browser/gpu/three_d_api_observer.cc +++ b/chrome/browser/gpu/three_d_api_observer.cc @@ -35,18 +35,17 @@ class ThreeDAPIInfoBarDelegate : public ConfirmInfoBarDelegate { }; ThreeDAPIInfoBarDelegate(const GURL& url, content::ThreeDAPIType requester); - virtual ~ThreeDAPIInfoBarDelegate(); + ~ThreeDAPIInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual bool EqualsDelegate( - infobars::InfoBarDelegate* delegate) const override; - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; - virtual bool Accept() override; - virtual bool Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; + bool Accept() override; + bool Cancel() override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; GURL url_; content::ThreeDAPIType requester_; diff --git a/chrome/browser/gpu/three_d_api_observer.h b/chrome/browser/gpu/three_d_api_observer.h index 9181d1c..fb38da9 100644 --- a/chrome/browser/gpu/three_d_api_observer.h +++ b/chrome/browser/gpu/three_d_api_observer.h @@ -11,13 +11,13 @@ class ThreeDAPIObserver : public content::GpuDataManagerObserver { public: ThreeDAPIObserver(); - virtual ~ThreeDAPIObserver(); + ~ThreeDAPIObserver() override; private: - virtual void DidBlock3DAPIs(const GURL& url, - int render_process_id, - int render_view_id, - content::ThreeDAPIType requester) override; + void DidBlock3DAPIs(const GURL& url, + int render_process_id, + int render_view_id, + content::ThreeDAPIType requester) override; DISALLOW_COPY_AND_ASSIGN(ThreeDAPIObserver); }; diff --git a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h index d1794a6..0350c7d 100644 --- a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h +++ b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h @@ -13,11 +13,10 @@ namespace extensions { class ChromeAppViewGuestDelegate : public AppViewGuestDelegate { public: ChromeAppViewGuestDelegate(); - virtual ~ChromeAppViewGuestDelegate(); + ~ChromeAppViewGuestDelegate() override; - virtual bool HandleContextMenu( - content::WebContents* web_contents, - const content::ContextMenuParams& params) override; + bool HandleContextMenu(content::WebContents* web_contents, + const content::ContextMenuParams& params) override; private: DISALLOW_COPY_AND_ASSIGN(ChromeAppViewGuestDelegate); diff --git a/chrome/browser/guest_view/extension_options/chrome_extension_options_guest_delegate.h b/chrome/browser/guest_view/extension_options/chrome_extension_options_guest_delegate.h index 690e972..7234149 100644 --- a/chrome/browser/guest_view/extension_options/chrome_extension_options_guest_delegate.h +++ b/chrome/browser/guest_view/extension_options/chrome_extension_options_guest_delegate.h @@ -17,14 +17,13 @@ class ChromeExtensionOptionsGuestDelegate : public ExtensionOptionsGuestDelegate { public: explicit ChromeExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest); - virtual ~ChromeExtensionOptionsGuestDelegate(); + ~ChromeExtensionOptionsGuestDelegate() override; - virtual void DidInitialize() override; + void DidInitialize() override; - virtual bool HandleContextMenu( - const content::ContextMenuParams& params) override; + bool HandleContextMenu(const content::ContextMenuParams& params) override; - virtual content::WebContents* OpenURLInNewTab( + content::WebContents* OpenURLInNewTab( const content::OpenURLParams& params) override; private: diff --git a/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h b/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h index 127b4c3..93a38a3 100644 --- a/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h +++ b/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h @@ -16,11 +16,11 @@ class ChromeMimeHandlerViewGuestDelegate public: explicit ChromeMimeHandlerViewGuestDelegate( extensions::MimeHandlerViewGuest* guest); - virtual ~ChromeMimeHandlerViewGuestDelegate(); + ~ChromeMimeHandlerViewGuestDelegate() override; // MimeHandlerViewGuestDelegate. - virtual void AttachHelpers() override; - virtual void ChangeZoom(bool zoom_in) override; + void AttachHelpers() override; + void ChangeZoom(bool zoom_in) override; private: extensions::MimeHandlerViewGuest* guest_; // Owns us. diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h index fdae7d5..9b9dca5 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h +++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h @@ -25,28 +25,24 @@ class ChromeWebViewGuestDelegate : public extensions::WebViewGuestDelegate, public : explicit ChromeWebViewGuestDelegate( extensions::WebViewGuest* web_view_guest); - virtual ~ChromeWebViewGuestDelegate(); + ~ChromeWebViewGuestDelegate() override; // WebViewGuestDelegate implementation. - virtual double GetZoom() override; - virtual bool HandleContextMenu( - const content::ContextMenuParams& params) override; - virtual void OnAttachWebViewHelpers(content::WebContents* contents) override; - virtual void OnDidAttachToEmbedder() override; - virtual void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override; - virtual void OnDidInitialize() override; - virtual void OnDocumentLoadedInFrame( + double GetZoom() override; + bool HandleContextMenu(const content::ContextMenuParams& params) override; + void OnAttachWebViewHelpers(content::WebContents* contents) override; + void OnDidAttachToEmbedder() override; + void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override; + void OnDidInitialize() override; + void OnDocumentLoadedInFrame( content::RenderFrameHost* render_frame_host) override; - virtual void OnGuestReady() override; - virtual void OnGuestDestroyed() override; - virtual void OnSetZoom(double zoom_factor) override; - virtual void OnShowContextMenu( - int request_id, - const MenuItemVector* items) override; + void OnGuestReady() override; + void OnGuestDestroyed() override; + void OnSetZoom(double zoom_factor) override; + void OnShowContextMenu(int request_id, const MenuItemVector* items) override; // ZoomObserver implementation. - virtual void OnZoomChanged( - const ZoomController::ZoomChangedEventData& data) override; + void OnZoomChanged(const ZoomController::ZoomChangedEventData& data) override; extensions::WebViewGuest* web_view_guest() const { return web_view_guest_; } diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h index 6d00b36..ae6e00b 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h +++ b/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h @@ -17,46 +17,42 @@ class ChromeWebViewPermissionHelperDelegate : public: explicit ChromeWebViewPermissionHelperDelegate( extensions::WebViewPermissionHelper* web_view_permission_helper); - virtual ~ChromeWebViewPermissionHelperDelegate(); + ~ChromeWebViewPermissionHelperDelegate() override; // WebViewPermissionHelperDelegate implementation. - virtual void CanDownload( - content::RenderViewHost* render_view_host, - const GURL& url, - const std::string& request_method, - const base::Callback<void(bool)>& callback) override; - virtual void RequestPointerLockPermission( + void CanDownload(content::RenderViewHost* render_view_host, + const GURL& url, + const std::string& request_method, + const base::Callback<void(bool)>& callback) override; + void RequestPointerLockPermission( bool user_gesture, bool last_unlocked_by_target, const base::Callback<void(bool)>& callback) override; - virtual void RequestGeolocationPermission( + void RequestGeolocationPermission( int bridge_id, const GURL& requesting_frame, bool user_gesture, const base::Callback<void(bool)>& callback) override; - virtual void CancelGeolocationPermissionRequest(int bridge_id) override; - virtual void RequestFileSystemPermission( + void CancelGeolocationPermissionRequest(int bridge_id) override; + void RequestFileSystemPermission( const GURL& url, bool allowed_by_default, const base::Callback<void(bool)>& callback) override; - virtual void FileSystemAccessedAsync( - int render_process_id, - int render_frame_id, - int request_id, - const GURL& url, - bool blocked_by_policy) override; - virtual void FileSystemAccessedSync( - int render_process_id, - int render_frame_id, - const GURL& url, - bool blocked_by_policy, - IPC::Message* reply_msg) override; + void FileSystemAccessedAsync(int render_process_id, + int render_frame_id, + int request_id, + const GURL& url, + bool blocked_by_policy) override; + void FileSystemAccessedSync(int render_process_id, + int render_frame_id, + const GURL& url, + bool blocked_by_policy, + IPC::Message* reply_msg) override; #if defined(ENABLE_PLUGINS) // content::WebContentsObserver implementation. - virtual bool OnMessageReceived( - const IPC::Message& message, - content::RenderFrameHost* render_frame_host) override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message, + content::RenderFrameHost* render_frame_host) override; + bool OnMessageReceived(const IPC::Message& message) override; #endif // defined(ENABLE_PLUGINS) private: diff --git a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h index 499d3eb..0652fdd 100644 --- a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h +++ b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h @@ -13,10 +13,10 @@ // guests are: searching, printing, speech and instant. class ContextMenuContentTypeWebView : public ContextMenuContentType { public: - virtual ~ContextMenuContentTypeWebView(); + ~ContextMenuContentTypeWebView() override; // ContextMenuContentType overrides. - virtual bool SupportsGroup(int group) override; + bool SupportsGroup(int group) override; protected: ContextMenuContentTypeWebView(content::WebContents* web_contents, diff --git a/chrome/browser/icon_manager.h b/chrome/browser/icon_manager.h index 2d42fe5..0142381 100644 --- a/chrome/browser/icon_manager.h +++ b/chrome/browser/icon_manager.h @@ -55,7 +55,7 @@ class IconManager : public IconLoader::Delegate { public: IconManager(); - virtual ~IconManager(); + ~IconManager() override; // Synchronous call to examine the internal caches for the icon. Returns the // icon if we have already loaded it, NULL if we don't have it and must load @@ -84,11 +84,10 @@ class IconManager : public IconLoader::Delegate { base::CancelableTaskTracker* tracker); // IconLoader::Delegate interface. - virtual bool OnGroupLoaded(IconLoader* loader, - const IconGroupID& group) override; - virtual bool OnImageLoaded(IconLoader* loader, - gfx::Image* result, - const IconGroupID& group) override; + bool OnGroupLoaded(IconLoader* loader, const IconGroupID& group) override; + bool OnImageLoaded(IconLoader* loader, + gfx::Image* result, + const IconGroupID& group) override; private: struct CacheKey { diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h index a5201a0..a7d20183 100644 --- a/chrome/browser/image_decoder.h +++ b/chrome/browser/image_decoder.h @@ -56,10 +56,10 @@ class ImageDecoder : public content::UtilityProcessHostClient { private: // It's a reference counted object, so destructor is private. - virtual ~ImageDecoder(); + ~ImageDecoder() override; // Overidden from UtilityProcessHostClient: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; // IPC message handlers. void OnDecodeImageSucceeded(const SkBitmap& decoded_image); diff --git a/chrome/browser/image_holder.h b/chrome/browser/image_holder.h index 3bfab63..a2bd2c4 100644 --- a/chrome/browser/image_holder.h +++ b/chrome/browser/image_holder.h @@ -30,7 +30,7 @@ class ImageHolder : public chrome::BitmapFetcherDelegate { const GURL& high_dpi_url, Profile* profile, ImageHolderDelegate* delegate); - virtual ~ImageHolder(); + ~ImageHolder() override; // Begin fetching of the URLs we have. void StartFetch(); @@ -40,7 +40,7 @@ class ImageHolder : public chrome::BitmapFetcherDelegate { bool IsFetchingDone() const; // Inherited from BitmapFetcherDelegate - virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; + void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; // Accessors: GURL low_dpi_url() const { return low_dpi_url_; } diff --git a/chrome/browser/image_holder_unittest.cc b/chrome/browser/image_holder_unittest.cc index beac7a4..948f11e 100644 --- a/chrome/browser/image_holder_unittest.cc +++ b/chrome/browser/image_holder_unittest.cc @@ -15,9 +15,7 @@ const char kIconUrl2[] = "http://www.google.com/icon2.jpg"; class TestDelegate : public chrome::ImageHolderDelegate { public: TestDelegate() : on_fetch_complete_called_(false) {} - virtual void OnFetchComplete() override { - on_fetch_complete_called_ = true; - } + void OnFetchComplete() override { on_fetch_complete_called_ = true; } bool on_fetch_complete_called_; }; diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h index 6051335..8328a50 100644 --- a/chrome/browser/importer/external_process_importer_client.h +++ b/chrome/browser/importer/external_process_importer_client.h @@ -58,8 +58,8 @@ class ExternalProcessImporterClient : public content::UtilityProcessHostClient { void Cancel(); // UtilityProcessHostClient implementation: - virtual void OnProcessCrashed(int exit_code) override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void OnProcessCrashed(int exit_code) override; + bool OnMessageReceived(const IPC::Message& message) override; // Message handlers void OnImportStart(); @@ -94,7 +94,7 @@ class ExternalProcessImporterClient : public content::UtilityProcessHostClient { #endif protected: - virtual ~ExternalProcessImporterClient(); + ~ExternalProcessImporterClient() override; private: // Notifies the importerhost that import has finished, and calls Release(). diff --git a/chrome/browser/importer/external_process_importer_host.h b/chrome/browser/importer/external_process_importer_host.h index b1c01e3..f9cf1c6 100644 --- a/chrome/browser/importer/external_process_importer_host.h +++ b/chrome/browser/importer/external_process_importer_host.h @@ -71,7 +71,7 @@ class ExternalProcessImporterHost : public BaseBookmarkModelObserver { private: // ExternalProcessImporterHost deletes itself in OnImportEnded(). - virtual ~ExternalProcessImporterHost(); + ~ExternalProcessImporterHost() override; // Launches the utility process that starts the import task, unless bookmark // or template model are not yet loaded. If load is not detected, this method @@ -80,10 +80,9 @@ class ExternalProcessImporterHost : public BaseBookmarkModelObserver { virtual void LaunchImportIfReady(); // BaseBookmarkModelObserver: - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; - virtual void BookmarkModelChanged() override; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkModelChanged() override; // Called when TemplateURLService has been loaded. void OnTemplateURLServiceLoaded(); diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc index 9ff8658..b2c0000 100644 --- a/chrome/browser/importer/firefox_importer_browsertest.cc +++ b/chrome/browser/importer/firefox_importer_browsertest.cc @@ -127,10 +127,10 @@ class FirefoxObserver : public ProfileWriter, use_keyword_in_json_(use_keyword_in_json) {} // importer::ImporterProgressObserver: - virtual void ImportStarted() override {} - virtual void ImportItemStarted(importer::ImportItem item) override {} - virtual void ImportItemEnded(importer::ImportItem item) override {} - virtual void ImportEnded() override { + void ImportStarted() override {} + void ImportItemStarted(importer::ImportItem item) override {} + void ImportItemEnded(importer::ImportItem item) override {} + void ImportEnded() override { base::MessageLoop::current()->Quit(); EXPECT_EQ(arraysize(kFirefoxBookmarks), bookmark_count_); EXPECT_EQ(1U, history_count_); @@ -138,16 +138,14 @@ class FirefoxObserver : public ProfileWriter, EXPECT_EQ(arraysize(kFirefoxKeywords), keyword_count_); } - virtual bool BookmarkModelIsLoaded() const override { + bool BookmarkModelIsLoaded() const override { // Profile is ready for writing. return true; } - virtual bool TemplateURLServiceIsLoaded() const override { - return true; - } + bool TemplateURLServiceIsLoaded() const override { return true; } - virtual void AddPasswordForm(const autofill::PasswordForm& form) override { + void AddPasswordForm(const autofill::PasswordForm& form) override { PasswordInfo p = kFirefoxPasswords[password_count_]; EXPECT_EQ(p.origin, form.origin.spec()); EXPECT_EQ(p.realm, form.signon_realm); @@ -160,8 +158,8 @@ class FirefoxObserver : public ProfileWriter, ++password_count_; } - virtual void AddHistoryPage(const history::URLRows& page, - history::VisitSource visit_source) override { + void AddHistoryPage(const history::URLRows& page, + history::VisitSource visit_source) override { ASSERT_EQ(3U, page.size()); EXPECT_EQ("http://www.google.com/", page[0].url().spec()); EXPECT_EQ(base::ASCIIToUTF16("Google"), page[0].title()); @@ -174,9 +172,8 @@ class FirefoxObserver : public ProfileWriter, ++history_count_; } - virtual void AddBookmarks( - const std::vector<ImportedBookmarkEntry>& bookmarks, - const base::string16& top_level_folder_name) override { + void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks, + const base::string16& top_level_folder_name) override { ASSERT_LE(bookmark_count_ + bookmarks.size(), arraysize(kFirefoxBookmarks)); // Importer should import the FF favorites the same as the list, in the same // order. @@ -188,7 +185,7 @@ class FirefoxObserver : public ProfileWriter, } } - virtual void AddAutofillFormDataEntries( + void AddAutofillFormDataEntries( const std::vector<autofill::AutofillEntry>& autofill_entries) override { EXPECT_EQ(arraysize(kFirefoxAutofillEntries), autofill_entries.size()); for (size_t i = 0; i < arraysize(kFirefoxAutofillEntries); ++i) { @@ -199,8 +196,8 @@ class FirefoxObserver : public ProfileWriter, } } - virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, - bool unique_on_host_and_path) override { + 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. @@ -222,12 +219,11 @@ class FirefoxObserver : public ProfileWriter, } } - virtual void AddFavicons( - const std::vector<ImportedFaviconUsage>& favicons) override { + void AddFavicons(const std::vector<ImportedFaviconUsage>& favicons) override { } private: - virtual ~FirefoxObserver() {} + ~FirefoxObserver() override {} size_t bookmark_count_; size_t history_count_; diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc index ed24891..22cd547 100644 --- a/chrome/browser/importer/in_process_importer_bridge.cc +++ b/chrome/browser/importer/in_process_importer_bridge.cc @@ -83,11 +83,11 @@ namespace { class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { public: FirefoxURLParameterFilter() {} - virtual ~FirefoxURLParameterFilter() {} + ~FirefoxURLParameterFilter() override {} // TemplateURLParser::ParameterFilter method. - virtual bool KeepParameter(const std::string& key, - const std::string& value) override { + bool KeepParameter(const std::string& key, + const std::string& value) override { std::string low_value = base::StringToLowerASCII(value); if (low_value.find("mozilla") != std::string::npos || low_value.find("firefox") != std::string::npos || diff --git a/chrome/browser/importer/in_process_importer_bridge.h b/chrome/browser/importer/in_process_importer_bridge.h index 3cfb19f..b64845f 100644 --- a/chrome/browser/importer/in_process_importer_bridge.h +++ b/chrome/browser/importer/in_process_importer_bridge.h @@ -34,46 +34,42 @@ class InProcessImporterBridge : public ImporterBridge { base::WeakPtr<ExternalProcessImporterHost> host); // Begin ImporterBridge implementation: - virtual void AddBookmarks( - const std::vector<ImportedBookmarkEntry>& bookmarks, - const base::string16& first_folder_name) override; + void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks, + const base::string16& first_folder_name) override; - virtual void AddHomePage(const GURL& home_page) override; + void AddHomePage(const GURL& home_page) override; #if defined(OS_WIN) virtual void AddIE7PasswordInfo( const importer::ImporterIE7PasswordInfo& password_info) override; #endif - virtual void SetFavicons( - const std::vector<ImportedFaviconUsage>& favicons) override; + void SetFavicons(const std::vector<ImportedFaviconUsage>& favicons) override; - virtual void SetHistoryItems(const std::vector<ImporterURLRow>& rows, - importer::VisitSource visit_source) override; + void SetHistoryItems(const std::vector<ImporterURLRow>& rows, + importer::VisitSource visit_source) override; - virtual void SetKeywords( - const std::vector<importer::URLKeywordInfo>& url_keywords, - bool unique_on_host_and_path) override; + void SetKeywords(const std::vector<importer::URLKeywordInfo>& url_keywords, + bool unique_on_host_and_path) override; - virtual void SetFirefoxSearchEnginesXMLData( + void SetFirefoxSearchEnginesXMLData( const std::vector<std::string>& search_engine_data) override; - virtual void SetPasswordForm( - const autofill::PasswordForm& form) override; + void SetPasswordForm(const autofill::PasswordForm& form) override; - virtual void SetAutofillFormData( + void SetAutofillFormData( const std::vector<ImporterAutofillFormDataEntry>& entries) override; - virtual void NotifyStarted() override; - virtual void NotifyItemStarted(importer::ImportItem item) override; - virtual void NotifyItemEnded(importer::ImportItem item) override; - virtual void NotifyEnded() override; + void NotifyStarted() override; + void NotifyItemStarted(importer::ImportItem item) override; + void NotifyItemEnded(importer::ImportItem item) override; + void NotifyEnded() override; - virtual base::string16 GetLocalizedString(int message_id) override; + base::string16 GetLocalizedString(int message_id) override; // End ImporterBridge implementation. private: - virtual ~InProcessImporterBridge(); + ~InProcessImporterBridge() override; ProfileWriter* const writer_; // weak const base::WeakPtr<ExternalProcessImporterHost> host_; diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc index 743d1a7..afe24e6 100644 --- a/chrome/browser/importer/profile_writer_unittest.cc +++ b/chrome/browser/importer/profile_writer_unittest.cc @@ -29,7 +29,7 @@ class TestProfileWriter : public ProfileWriter { public: explicit TestProfileWriter(Profile* profile) : ProfileWriter(profile) {} protected: - virtual ~TestProfileWriter() {} + ~TestProfileWriter() override {} }; class ProfileWriterTest : public testing::Test { diff --git a/chrome/browser/infobars/infobar_extension_api.h b/chrome/browser/infobars/infobar_extension_api.h index f6116b3..fd8ac68 100644 --- a/chrome/browser/infobars/infobar_extension_api.h +++ b/chrome/browser/infobars/infobar_extension_api.h @@ -8,8 +8,8 @@ #include "chrome/browser/extensions/chrome_extension_function.h" class InfobarsShowFunction : public ChromeSyncExtensionFunction { - virtual ~InfobarsShowFunction() {} - virtual bool RunSync() override; + ~InfobarsShowFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("infobars.show", INFOBARS_SHOW) }; diff --git a/chrome/browser/infobars/infobar_service.h b/chrome/browser/infobars/infobar_service.h index 5a40eb29..985b7c0a 100644 --- a/chrome/browser/infobars/infobar_service.h +++ b/chrome/browser/infobars/infobar_service.h @@ -49,25 +49,24 @@ class InfoBarService : public infobars::InfoBarManager, friend class content::WebContentsUserData<InfoBarService>; explicit InfoBarService(content::WebContents* web_contents); - virtual ~InfoBarService(); + ~InfoBarService() override; // InfoBarManager: - virtual int GetActiveEntryID() override; + int GetActiveEntryID() override; // TODO(droger): Remove these functions once infobar notifications are // removed. See http://crbug.com/354380 - virtual void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; - virtual void NotifyInfoBarRemoved(infobars::InfoBar* infobar, - bool animate) override; + void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; + void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; // content::WebContentsObserver: - virtual void RenderProcessGone(base::TerminationStatus status) override; - virtual void DidStartNavigationToPendingEntry( + void RenderProcessGone(base::TerminationStatus status) override; + void DidStartNavigationToPendingEntry( const GURL& url, content::NavigationController::ReloadType reload_type) override; - virtual void NavigationEntryCommitted( + void NavigationEntryCommitted( const content::LoadCommittedDetails& load_details) override; - virtual void WebContentsDestroyed() override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void WebContentsDestroyed() override; + bool OnMessageReceived(const IPC::Message& message) override; // Message handlers. void OnDidBlockDisplayingInsecureContent(); diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.h b/chrome/browser/infobars/insecure_content_infobar_delegate.h index 9b9949c..eb59556 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.h +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.h @@ -38,18 +38,17 @@ class InsecureContentInfoBarDelegate : public ConfirmInfoBarDelegate { }; explicit InsecureContentInfoBarDelegate(InfoBarType type); - virtual ~InsecureContentInfoBarDelegate(); + ~InsecureContentInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual void InfoBarDismissed() override; - virtual InsecureContentInfoBarDelegate* - AsInsecureContentInfoBarDelegate() override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; - virtual bool Accept() override; - virtual bool Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + void InfoBarDismissed() override; + InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate() override; + base::string16 GetMessageText() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; + bool Accept() override; + bool Cancel() override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; InfoBarType type_; diff --git a/chrome/browser/infobars/simple_alert_infobar_delegate.h b/chrome/browser/infobars/simple_alert_infobar_delegate.h index 19b48c1..d25ab50 100644 --- a/chrome/browser/infobars/simple_alert_infobar_delegate.h +++ b/chrome/browser/infobars/simple_alert_infobar_delegate.h @@ -25,14 +25,13 @@ class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate { SimpleAlertInfoBarDelegate(int icon_id, const base::string16& message, bool auto_expire); - virtual ~SimpleAlertInfoBarDelegate(); + ~SimpleAlertInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual int GetButtons() const override; - virtual bool ShouldExpireInternal( - const NavigationDetails& details) const override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + int GetButtons() const override; + bool ShouldExpireInternal(const NavigationDetails& details) const override; const int icon_id_; base::string16 message_; diff --git a/chrome/browser/intranet_redirect_detector.h b/chrome/browser/intranet_redirect_detector.h index 9325036..58f23f1 100644 --- a/chrome/browser/intranet_redirect_detector.h +++ b/chrome/browser/intranet_redirect_detector.h @@ -46,7 +46,7 @@ class IntranetRedirectDetector // since there aren't useful public functions on this object for consumers to // access anyway). IntranetRedirectDetector(); - virtual ~IntranetRedirectDetector(); + ~IntranetRedirectDetector() override; // Returns the current redirect origin. This will be empty if no redirection // is in place. @@ -62,10 +62,10 @@ class IntranetRedirectDetector void FinishSleep(); // net::URLFetcherDelegate - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // NetworkChangeNotifier::IPAddressObserver - virtual void OnIPAddressChanged() override; + void OnIPAddressChanged() override; GURL redirect_origin_; Fetchers fetchers_; diff --git a/chrome/browser/invalidation/fake_invalidation_service.h b/chrome/browser/invalidation/fake_invalidation_service.h index cec420f..e990fac 100644 --- a/chrome/browser/invalidation/fake_invalidation_service.h +++ b/chrome/browser/invalidation/fake_invalidation_service.h @@ -29,22 +29,21 @@ class InvalidationLogger; class FakeInvalidationService : public InvalidationService { public: FakeInvalidationService(); - virtual ~FakeInvalidationService(); + ~FakeInvalidationService() override; - virtual void RegisterInvalidationHandler( + void RegisterInvalidationHandler( syncer::InvalidationHandler* handler) override; - virtual void UpdateRegisteredInvalidationIds( - syncer::InvalidationHandler* handler, - const syncer::ObjectIdSet& ids) override; - virtual void UnregisterInvalidationHandler( + void UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, + const syncer::ObjectIdSet& ids) override; + void UnregisterInvalidationHandler( syncer::InvalidationHandler* handler) override; - virtual syncer::InvalidatorState GetInvalidatorState() const override; - virtual std::string GetInvalidatorClientId() const override; - virtual InvalidationLogger* GetInvalidationLogger() override; - virtual void RequestDetailedStatus( + syncer::InvalidatorState GetInvalidatorState() const override; + std::string GetInvalidatorClientId() const override; + InvalidationLogger* GetInvalidationLogger() override; + void RequestDetailedStatus( base::Callback<void(const base::DictionaryValue&)> caller) const override; - virtual IdentityProvider* GetIdentityProvider() override; + IdentityProvider* GetIdentityProvider() override; void SetInvalidatorState(syncer::InvalidatorState state); diff --git a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc index 0aca581..8fae64f 100644 --- a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc +++ b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc @@ -24,13 +24,12 @@ namespace { class CustomFakeGCMDriver : public gcm::FakeGCMDriver { public: CustomFakeGCMDriver() {} - virtual ~CustomFakeGCMDriver() {} + ~CustomFakeGCMDriver() override {} protected: // FakeGCMDriver override: - virtual void RegisterImpl( - const std::string& app_id, - const std::vector<std::string>& sender_ids) override { + void RegisterImpl(const std::string& app_id, + const std::vector<std::string>& sender_ids) override { base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&CustomFakeGCMDriver::RegisterFinished, diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.h b/chrome/browser/invalidation/profile_invalidation_provider_factory.h index 632690e..49c5e84 100644 --- a/chrome/browser/invalidation/profile_invalidation_provider_factory.h +++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.h @@ -52,12 +52,12 @@ class ProfileInvalidationProviderFactory friend struct DefaultSingletonTraits<ProfileInvalidationProviderFactory>; ProfileInvalidationProviderFactory(); - virtual ~ProfileInvalidationProviderFactory(); + ~ProfileInvalidationProviderFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; TestingFactoryFunction testing_factory_; diff --git a/chrome/browser/invalidation/ticl_profile_settings_provider.h b/chrome/browser/invalidation/ticl_profile_settings_provider.h index 7d3fab0..1fb01ab 100644 --- a/chrome/browser/invalidation/ticl_profile_settings_provider.h +++ b/chrome/browser/invalidation/ticl_profile_settings_provider.h @@ -18,10 +18,10 @@ namespace invalidation { class TiclProfileSettingsProvider : public TiclSettingsProvider { public: explicit TiclProfileSettingsProvider(Profile* profile); - virtual ~TiclProfileSettingsProvider(); + ~TiclProfileSettingsProvider() override; // TiclInvalidationServiceSettingsProvider: - virtual bool UseGCMChannel() const override; + bool UseGCMChannel() const override; private: PrefChangeRegistrar registrar_; diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index f6ae516..c70c035 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -156,7 +156,7 @@ class SystemURLRequestContext : public net::URLRequestContext { } private: - virtual ~SystemURLRequestContext() { + ~SystemURLRequestContext() override { AssertNoURLRequests(); #if defined(USE_NSS) || defined(OS_IOS) net::SetURLRequestContextForNSSHttpIO(NULL); @@ -326,21 +326,21 @@ class IOThread::LoggingNetworkChangeObserver net::NetworkChangeNotifier::AddNetworkChangeObserver(this); } - virtual ~LoggingNetworkChangeObserver() { + ~LoggingNetworkChangeObserver() override { net::NetworkChangeNotifier::RemoveIPAddressObserver(this); net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); } // NetworkChangeNotifier::IPAddressObserver implementation. - virtual void OnIPAddressChanged() override { + void OnIPAddressChanged() override { VLOG(1) << "Observed a change to the network IP addresses"; net_log_->AddGlobalEntry(net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED); } // NetworkChangeNotifier::ConnectionTypeObserver implementation. - virtual void OnConnectionTypeChanged( + void OnConnectionTypeChanged( net::NetworkChangeNotifier::ConnectionType type) override { std::string type_as_string = net::NetworkChangeNotifier::ConnectionTypeToString(type); @@ -354,7 +354,7 @@ class IOThread::LoggingNetworkChangeObserver } // NetworkChangeNotifier::NetworkChangeObserver implementation. - virtual void OnNetworkChanged( + void OnNetworkChanged( net::NetworkChangeNotifier::ConnectionType type) override { std::string type_as_string = net::NetworkChangeNotifier::ConnectionTypeToString(type); @@ -376,12 +376,12 @@ class SystemURLRequestContextGetter : public net::URLRequestContextGetter { explicit SystemURLRequestContextGetter(IOThread* io_thread); // Implementation for net::UrlRequestContextGetter. - virtual net::URLRequestContext* GetURLRequestContext() override; - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetNetworkTaskRunner() const override; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() + const override; protected: - virtual ~SystemURLRequestContextGetter(); + ~SystemURLRequestContextGetter() override; private: IOThread* const io_thread_; // Weak pointer, owned by BrowserProcess. diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index b46b493..f0b5220 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -213,7 +213,7 @@ class IOThread : public content::BrowserThreadDelegate { ChromeNetLog* net_log, extensions::EventRouterForwarder* extension_event_router_forwarder); - virtual ~IOThread(); + ~IOThread() override; static void RegisterPrefs(PrefRegistrySimple* registry); @@ -255,9 +255,9 @@ class IOThread : public content::BrowserThreadDelegate { // BrowserThreadDelegate implementation, runs on the IO thread. // This handles initialization and destruction of state that must // live on the IO thread. - virtual void Init() override; - virtual void InitAsync() override; - virtual void CleanUp() override; + void Init() override; + void InitAsync() override; + void CleanUp() override; // Initializes |params| based on the settings in |globals|. static void InitializeNetworkSessionParamsFromGlobals( diff --git a/chrome/browser/lifetime/browser_close_manager_browsertest.cc b/chrome/browser/lifetime/browser_close_manager_browsertest.cc index 28e4d6e..dd5fae9 100644 --- a/chrome/browser/lifetime/browser_close_manager_browsertest.cc +++ b/chrome/browser/lifetime/browser_close_manager_browsertest.cc @@ -101,9 +101,9 @@ class RepeatedNotificationObserver : public content::NotificationObserver { registrar_.Add(this, type, content::NotificationService::AllSources()); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { ASSERT_GT(num_outstanding_, 0); if (!--num_outstanding_ && running_) { content::BrowserThread::PostTask( @@ -145,9 +145,9 @@ class TestBrowserCloseManager : public BrowserCloseManager { } protected: - virtual ~TestBrowserCloseManager() {} + ~TestBrowserCloseManager() override {} - virtual void ConfirmCloseWithPendingDownloads( + void ConfirmCloseWithPendingDownloads( int download_count, const base::Callback<void(bool)>& callback) override { EXPECT_NE(NO_USER_CHOICE, user_choice_); @@ -179,9 +179,9 @@ class TestDownloadManagerDelegate : public ChromeDownloadManagerDelegate { : ChromeDownloadManagerDelegate(profile) { GetDownloadIdReceiverCallback().Run(content::DownloadItem::kInvalidId + 1); } - virtual ~TestDownloadManagerDelegate() {} + ~TestDownloadManagerDelegate() override {} - virtual bool DetermineDownloadTarget( + bool DetermineDownloadTarget( content::DownloadItem* item, const content::DownloadTargetCallback& callback) override { content::DownloadTargetCallback dangerous_callback = @@ -211,12 +211,12 @@ class FakeBackgroundModeManager : public BackgroundModeManager { &g_browser_process->profile_manager()->GetProfileInfoCache()), suspended_(false) {} - virtual void SuspendBackgroundMode() override { + void SuspendBackgroundMode() override { BackgroundModeManager::SuspendBackgroundMode(); suspended_ = true; } - virtual void ResumeBackgroundMode() override { + void ResumeBackgroundMode() override { BackgroundModeManager::ResumeBackgroundMode(); suspended_ = false; } @@ -237,7 +237,7 @@ class BrowserCloseManagerBrowserTest : public InProcessBrowserTest, public testing::WithParamInterface<bool> { protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { InProcessBrowserTest::SetUpOnMainThread(); SessionStartupPref::SetStartupPref( browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); @@ -249,7 +249,7 @@ class BrowserCloseManagerBrowserTest base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { if (GetParam()) command_line->AppendSwitch(switches::kEnableFastUnload); #if defined(OS_CHROMEOS) @@ -712,7 +712,7 @@ class BrowserCloseManagerWithDownloadsBrowserTest : BrowserCloseManagerWithDownloadsBrowserTest() {} virtual ~BrowserCloseManagerWithDownloadsBrowserTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BrowserCloseManagerBrowserTest::SetUpOnMainThread(); ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir()); } @@ -894,7 +894,7 @@ class BrowserCloseManagerWithBackgroundModeBrowserTest public: BrowserCloseManagerWithBackgroundModeBrowserTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BrowserCloseManagerBrowserTest::SetUpOnMainThread(); g_browser_process->set_background_mode_manager_for_test( scoped_ptr<BackgroundModeManager>(new FakeBackgroundModeManager)); diff --git a/chrome/browser/locale_tests_browsertest.cc b/chrome/browser/locale_tests_browsertest.cc index 1a53f51..ba2f26e 100644 --- a/chrome/browser/locale_tests_browsertest.cc +++ b/chrome/browser/locale_tests_browsertest.cc @@ -69,7 +69,7 @@ class LocaleTestBase : public InProcessBrowserTest { explicit LocaleTestBase(const char* locale) : locale_(locale) { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitchASCII(switches::kLang, locale_.locale()); } diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h index 04f3f0e..0e43b9b 100644 --- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h +++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h @@ -19,12 +19,12 @@ void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts); class ChromeBrowserMainExtraPartsMetrics : public ChromeBrowserMainExtraParts { public: ChromeBrowserMainExtraPartsMetrics(); - virtual ~ChromeBrowserMainExtraPartsMetrics(); + ~ChromeBrowserMainExtraPartsMetrics() override; // Overridden from ChromeBrowserMainExtraParts: - virtual void PreProfileInit() override; - virtual void PreBrowserStart() override; - virtual void PostBrowserStart() override; + void PreProfileInit() override; + void PreBrowserStart() override; + void PostBrowserStart() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsMetrics); diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc index e97088c..cfda275 100644 --- a/chrome/browser/metrics/chrome_metrics_service_client.cc +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc @@ -106,12 +106,12 @@ class MetricsMemoryDetails : public MemoryDetails { SetMemoryGrowthTracker(memory_growth_tracker); } - virtual void OnDetailsAvailable() override { + void OnDetailsAvailable() override { base::MessageLoop::current()->PostTask(FROM_HERE, callback_); } private: - virtual ~MetricsMemoryDetails() {} + ~MetricsMemoryDetails() override {} base::Closure callback_; diff --git a/chrome/browser/metrics/chrome_metrics_service_client.h b/chrome/browser/metrics/chrome_metrics_service_client.h index b41914f..a6b2360 100644 --- a/chrome/browser/metrics/chrome_metrics_service_client.h +++ b/chrome/browser/metrics/chrome_metrics_service_client.h @@ -45,7 +45,7 @@ class ChromeMetricsServiceClient public metrics::TrackingSynchronizerObserver, public content::NotificationObserver { public: - virtual ~ChromeMetricsServiceClient(); + ~ChromeMetricsServiceClient() override; // Factory function. static scoped_ptr<ChromeMetricsServiceClient> Create( @@ -56,23 +56,21 @@ class ChromeMetricsServiceClient static void RegisterPrefs(PrefRegistrySimple* registry); // metrics::MetricsServiceClient: - virtual void SetMetricsClientId(const std::string& client_id) override; - virtual bool IsOffTheRecordSessionActive() override; - virtual int32 GetProduct() override; - virtual std::string GetApplicationLocale() override; - virtual bool GetBrand(std::string* brand_code) override; - virtual metrics::SystemProfileProto::Channel GetChannel() override; - virtual std::string GetVersionString() override; - virtual void OnLogUploadComplete() override; - virtual void StartGatheringMetrics( - const base::Closure& done_callback) override; - virtual void CollectFinalMetrics(const base::Closure& done_callback) - override; - virtual scoped_ptr<metrics::MetricsLogUploader> CreateUploader( + void SetMetricsClientId(const std::string& client_id) override; + bool IsOffTheRecordSessionActive() override; + int32 GetProduct() override; + std::string GetApplicationLocale() override; + bool GetBrand(std::string* brand_code) override; + metrics::SystemProfileProto::Channel GetChannel() override; + std::string GetVersionString() override; + void OnLogUploadComplete() override; + void StartGatheringMetrics(const base::Closure& done_callback) override; + void CollectFinalMetrics(const base::Closure& done_callback) override; + scoped_ptr<metrics::MetricsLogUploader> CreateUploader( const std::string& server_url, const std::string& mime_type, const base::Callback<void(int)>& on_upload_complete) override; - virtual base::string16 GetRegistryBackupKey() override; + base::string16 GetRegistryBackupKey() override; metrics::MetricsService* metrics_service() { return metrics_service_.get(); } @@ -97,10 +95,10 @@ class ChromeMetricsServiceClient void OnInitTaskGotGoogleUpdateData(); // TrackingSynchronizerObserver: - virtual void ReceivedProfilerData( + void ReceivedProfilerData( const tracked_objects::ProcessDataSnapshot& process_data, int process_type) override; - virtual void FinishedReceivingProfilerData() override; + void FinishedReceivingProfilerData() override; // Callbacks for various stages of final log info collection. Do not call // these directly. @@ -117,9 +115,9 @@ class ChromeMetricsServiceClient void RegisterForNotifications(); // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; #if defined(OS_WIN) // Counts (and removes) the browser crash dump attempt signals left behind by diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.h b/chrome/browser/metrics/chrome_stability_metrics_provider.h index bb72208..89913c1 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider.h +++ b/chrome/browser/metrics/chrome_stability_metrics_provider.h @@ -28,26 +28,26 @@ class ChromeStabilityMetricsProvider public content::NotificationObserver { public: ChromeStabilityMetricsProvider(); - virtual ~ChromeStabilityMetricsProvider(); + ~ChromeStabilityMetricsProvider() override; // metrics::MetricsDataProvider: - virtual void OnRecordingEnabled() override; - virtual void OnRecordingDisabled() override; - virtual void ProvideStabilityMetrics( + void OnRecordingEnabled() override; + void OnRecordingDisabled() override; + void ProvideStabilityMetrics( metrics::SystemProfileProto* system_profile_proto) override; - virtual void ClearSavedStabilityMetrics() override; + void ClearSavedStabilityMetrics() override; // Registers local state prefs used by this class. static void RegisterPrefs(PrefRegistrySimple* registry); private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // content::BrowserChildProcessObserver: - virtual void BrowserChildProcessCrashed( + void BrowserChildProcessCrashed( const content::ChildProcessData& data) override; // Logs the initiation of a page load and uses |web_contents| to do diff --git a/chrome/browser/metrics/extensions_metrics_provider.h b/chrome/browser/metrics/extensions_metrics_provider.h index 9f89727..1e851b2 100644 --- a/chrome/browser/metrics/extensions_metrics_provider.h +++ b/chrome/browser/metrics/extensions_metrics_provider.h @@ -31,10 +31,10 @@ class ExtensionsMetricsProvider : public metrics::MetricsProvider { // weak pointer. explicit ExtensionsMetricsProvider( metrics::MetricsStateManager* metrics_state_manager); - virtual ~ExtensionsMetricsProvider(); + ~ExtensionsMetricsProvider() override; // metrics::MetricsProvider: - virtual void ProvideSystemProfileMetrics( + void ProvideSystemProfileMetrics( metrics::SystemProfileProto* system_profile) override; protected: diff --git a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc index 556288d..1a7f34c 100644 --- a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc @@ -42,7 +42,7 @@ class TestExtensionsMetricsProvider : public ExtensionsMetricsProvider { protected: // Override the GetInstalledExtensions method to return a set of extensions // for tests. - virtual scoped_ptr<extensions::ExtensionSet> GetInstalledExtensions( + scoped_ptr<extensions::ExtensionSet> GetInstalledExtensions( Profile* profile) override { scoped_ptr<extensions::ExtensionSet> extensions( new extensions::ExtensionSet()); @@ -76,7 +76,7 @@ class TestExtensionsMetricsProvider : public ExtensionsMetricsProvider { // Override GetClientID() to return a specific value on which test // expectations are based. - virtual uint64 GetClientID() override { return 0x3f1bfee9; } + uint64 GetClientID() override { return 0x3f1bfee9; } }; } // namespace diff --git a/chrome/browser/metrics/field_trial_synchronizer.h b/chrome/browser/metrics/field_trial_synchronizer.h index b9d59b0..6c62d27 100644 --- a/chrome/browser/metrics/field_trial_synchronizer.h +++ b/chrome/browser/metrics/field_trial_synchronizer.h @@ -45,13 +45,12 @@ class FieldTrialSynchronizer // is finalized. This method contacts all renderers (by calling // NotifyAllRenderers) to create a FieldTrial that carries the randomly // selected state from the browser process into all the renderer processes. - virtual void OnFieldTrialGroupFinalized( - const std::string& name, - const std::string& group_name) override; + void OnFieldTrialGroupFinalized(const std::string& name, + const std::string& group_name) override; private: friend class base::RefCountedThreadSafe<FieldTrialSynchronizer>; - virtual ~FieldTrialSynchronizer(); + ~FieldTrialSynchronizer() override; DISALLOW_COPY_AND_ASSIGN(FieldTrialSynchronizer); }; diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc index be02c98..e92f41b 100644 --- a/chrome/browser/metrics/metrics_service_browsertest.cc +++ b/chrome/browser/metrics/metrics_service_browsertest.cc @@ -29,7 +29,7 @@ class MetricsServiceBrowserTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { // Enable the metrics service for testing (in recording-only mode). command_line->AppendSwitch(switches::kMetricsRecordingOnly); } diff --git a/chrome/browser/metrics/omnibox_metrics_provider.h b/chrome/browser/metrics/omnibox_metrics_provider.h index a5c01b9..9e76f1b 100644 --- a/chrome/browser/metrics/omnibox_metrics_provider.h +++ b/chrome/browser/metrics/omnibox_metrics_provider.h @@ -19,19 +19,19 @@ class OmniboxMetricsProvider : public metrics::MetricsProvider, public content::NotificationObserver { public: OmniboxMetricsProvider(); - virtual ~OmniboxMetricsProvider(); + ~OmniboxMetricsProvider() override; // metrics::MetricsDataProvider: - virtual void OnRecordingEnabled() override; - virtual void OnRecordingDisabled() override; - virtual void ProvideGeneralMetrics( + void OnRecordingEnabled() override; + void OnRecordingDisabled() override; + void ProvideGeneralMetrics( metrics::ChromeUserMetricsExtension* uma_proto) override; private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Records the input text, available choices, and selected entry when the // user uses the Omnibox to open a URL. diff --git a/chrome/browser/metrics/plugin_metrics_provider.h b/chrome/browser/metrics/plugin_metrics_provider.h index acefeb1..8d374c9 100644 --- a/chrome/browser/metrics/plugin_metrics_provider.h +++ b/chrome/browser/metrics/plugin_metrics_provider.h @@ -32,18 +32,18 @@ class PluginMetricsProvider : public metrics::MetricsProvider, public content::BrowserChildProcessObserver { public: explicit PluginMetricsProvider(PrefService* local_state); - virtual ~PluginMetricsProvider(); + ~PluginMetricsProvider() override; // Fetches plugin information data asynchronously and calls |done_callback| // when done. void GetPluginInformation(const base::Closure& done_callback); // metrics::MetricsDataProvider: - virtual void ProvideSystemProfileMetrics( + void ProvideSystemProfileMetrics( metrics::SystemProfileProto* system_profile_proto) override; - virtual void ProvideStabilityMetrics( + void ProvideStabilityMetrics( metrics::SystemProfileProto* system_profile_proto) override; - virtual void ClearSavedStabilityMetrics() override; + void ClearSavedStabilityMetrics() override; // Notifies the provider about an error loading the plugin at |plugin_path|. void LogPluginLoadingError(const base::FilePath& plugin_path); @@ -88,11 +88,11 @@ class PluginMetricsProvider : public metrics::MetricsProvider, bool RecordCurrentStateIfPending(); // content::BrowserChildProcessObserver: - virtual void BrowserChildProcessHostConnected( + void BrowserChildProcessHostConnected( const content::ChildProcessData& data) override; - virtual void BrowserChildProcessCrashed( + void BrowserChildProcessCrashed( const content::ChildProcessData& data) override; - virtual void BrowserChildProcessInstanceCreated( + void BrowserChildProcessInstanceCreated( const content::ChildProcessData& data) override; PrefService* local_state_; diff --git a/chrome/browser/metrics/signin_status_metrics_provider.h b/chrome/browser/metrics/signin_status_metrics_provider.h index 442b45d..5c0fb55 100644 --- a/chrome/browser/metrics/signin_status_metrics_provider.h +++ b/chrome/browser/metrics/signin_status_metrics_provider.h @@ -34,7 +34,7 @@ class SigninStatusMetricsProvider : public metrics::MetricsProvider, public SigninManagerBase::Observer, public SigninManagerFactory::Observer { public: - virtual ~SigninStatusMetricsProvider(); + ~SigninStatusMetricsProvider() override; // metrics::MetricsProvider: void ProvideGeneralMetrics( @@ -71,18 +71,18 @@ class SigninStatusMetricsProvider : public metrics::MetricsProvider, // chrome::BrowserListObserver: // This will never be called on Android. - virtual void OnBrowserAdded(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override; // SigninManagerFactory::Observer: - virtual void SigninManagerCreated(SigninManagerBase* manager) override; - virtual void SigninManagerShutdown(SigninManagerBase* manager) override; + void SigninManagerCreated(SigninManagerBase* manager) override; + void SigninManagerShutdown(SigninManagerBase* manager) override; // SigninManagerBase::Observer: - virtual void GoogleSigninSucceeded(const std::string& account_id, - const std::string& username, - const std::string& password) override; - virtual void GoogleSignedOut(const std::string& account_id, - const std::string& username) override; + void GoogleSigninSucceeded(const std::string& account_id, + const std::string& username, + const std::string& password) override; + void GoogleSignedOut(const std::string& account_id, + const std::string& username) override; // Obtain sign-in status and add observers. void Initialize(); diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index 709ad2b..e3e36f1 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -932,7 +932,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() override { + void Alarm() override { #if !defined(NDEBUG) StartupHang(); return; @@ -978,9 +978,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() override { - ShutdownHang(); - } + void Alarm() override { ShutdownHang(); } private: DISALLOW_COPY_AND_ASSIGN(ShutdownWatchDogThread); diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h index d9ef518..41dfb9c 100644 --- a/chrome/browser/metrics/thread_watcher.h +++ b/chrome/browser/metrics/thread_watcher.h @@ -520,16 +520,16 @@ class ThreadWatcherObserver : public content::NotificationObserver { explicit ThreadWatcherObserver(const base::TimeDelta& wakeup_interval); // Destructor of |g_thread_watcher_observer_| singleton. - virtual ~ThreadWatcherObserver(); + ~ThreadWatcherObserver() override; // This ensures all thread watchers are active because there is some user // activity. It will wake up all thread watchers every |wakeup_interval_| // seconds. This is the implementation of content::NotificationObserver. When // a matching notification is posted to the notification service, this method // is called. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // The singleton of this class. static ThreadWatcherObserver* g_thread_watcher_observer_; @@ -554,7 +554,7 @@ class WatchDogThread : public base::Thread { WatchDogThread(); // Destroys the thread and stops the thread. - virtual ~WatchDogThread(); + ~WatchDogThread() override; // Callable on any thread. Returns whether you're currently on a // WatchDogThread. @@ -572,8 +572,8 @@ class WatchDogThread : public base::Thread { base::TimeDelta delay); protected: - virtual void Init() override; - virtual void CleanUp() override; + void Init() override; + void CleanUp() override; private: static bool PostTaskHelper( diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc index d6c3cef..dde829b 100644 --- a/chrome/browser/metrics/thread_watcher_unittest.cc +++ b/chrome/browser/metrics/thread_watcher_unittest.cc @@ -118,32 +118,32 @@ class CustomThreadWatcher : public ThreadWatcher { return old_state; } - virtual void ActivateThreadWatching() override { + void ActivateThreadWatching() override { State old_state = UpdateState(ACTIVATED); EXPECT_EQ(old_state, INITIALIZED); ThreadWatcher::ActivateThreadWatching(); } - virtual void DeActivateThreadWatching() override { + void DeActivateThreadWatching() override { State old_state = UpdateState(DEACTIVATED); EXPECT_TRUE(old_state == ACTIVATED || old_state == SENT_PING || old_state == RECEIVED_PONG); ThreadWatcher::DeActivateThreadWatching(); } - virtual void PostPingMessage() override { + void PostPingMessage() override { State old_state = UpdateState(SENT_PING); EXPECT_TRUE(old_state == ACTIVATED || old_state == RECEIVED_PONG); ThreadWatcher::PostPingMessage(); } - virtual void OnPongMessage(uint64 ping_sequence_number) override { + 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); } - virtual void OnCheckResponsiveness(uint64 ping_sequence_number) override { + void OnCheckResponsiveness(uint64 ping_sequence_number) override { ThreadWatcher::OnCheckResponsiveness(ping_sequence_number); { base::AutoLock auto_lock(custom_lock_); diff --git a/chrome/browser/metrics/variations/variations_seed_store_unittest.cc b/chrome/browser/metrics/variations/variations_seed_store_unittest.cc index 5954065..58ecf35 100644 --- a/chrome/browser/metrics/variations/variations_seed_store_unittest.cc +++ b/chrome/browser/metrics/variations/variations_seed_store_unittest.cc @@ -22,13 +22,13 @@ class TestVariationsSeedStore : public VariationsSeedStore { public: explicit TestVariationsSeedStore(PrefService* local_state) : VariationsSeedStore(local_state) {} - virtual ~TestVariationsSeedStore() {} + ~TestVariationsSeedStore() override {} bool StoreSeedForTesting(const std::string& seed_data) { return StoreSeedData(seed_data, std::string(), base::Time::Now(), NULL); } - virtual VariationsSeedStore::VerifySignatureResult VerifySeedSignature( + VariationsSeedStore::VerifySignatureResult VerifySeedSignature( const std::string& seed_bytes, const std::string& base64_seed_signature) override { return VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_ENUM_SIZE; diff --git a/chrome/browser/metrics/variations/variations_service.h b/chrome/browser/metrics/variations/variations_service.h index effec59..afcfc6e 100644 --- a/chrome/browser/metrics/variations/variations_service.h +++ b/chrome/browser/metrics/variations/variations_service.h @@ -72,7 +72,7 @@ class VariationsService virtual ~Observer() {} }; - virtual ~VariationsService(); + ~VariationsService() override; // Creates field trials based on Variations Seed loaded from local prefs. If // there is a problem loading the seed data, all trials specified by the seed @@ -173,10 +173,10 @@ class VariationsService const variations::VariationsSeedSimulator::Result& result); // net::URLFetcherDelegate implementation: - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // ResourceRequestAllowedNotifier::Observer implementation: - virtual void OnResourceRequestsAllowed() override; + void OnResourceRequestsAllowed() override; // Performs a variations seed simulation with the given |seed| and |version| // and logs the simulation results as histograms. diff --git a/chrome/browser/metrics/variations/variations_service_unittest.cc b/chrome/browser/metrics/variations/variations_service_unittest.cc index bf79eff..4c190a3 100644 --- a/chrome/browser/metrics/variations/variations_service_unittest.cc +++ b/chrome/browser/metrics/variations/variations_service_unittest.cc @@ -47,8 +47,7 @@ class TestVariationsService : public VariationsService { SetCreateTrialsFromSeedCalledForTesting(true); } - virtual ~TestVariationsService() { - } + ~TestVariationsService() override {} void set_intercepts_fetch(bool value) { intercepts_fetch_ = value; @@ -58,7 +57,7 @@ class TestVariationsService : public VariationsService { bool seed_stored() const { return seed_stored_; } - virtual void DoActualFetch() override { + void DoActualFetch() override { if (intercepts_fetch_) { fetch_attempted_ = true; return; @@ -68,9 +67,9 @@ class TestVariationsService : public VariationsService { } protected: - virtual void StoreSeed(const std::string& seed_data, - const std::string& seed_signature, - const base::Time& date_fetched) override { + void StoreSeed(const std::string& seed_data, + const std::string& seed_signature, + const base::Time& date_fetched) override { seed_stored_ = true; } @@ -88,10 +87,9 @@ class TestVariationsServiceObserver : public VariationsService::Observer { : best_effort_changes_notified_(0), crticial_changes_notified_(0) { } - virtual ~TestVariationsServiceObserver() { - } + ~TestVariationsServiceObserver() override {} - virtual void OnExperimentChangesDetected(Severity severity) override { + void OnExperimentChangesDetected(Severity severity) override { switch (severity) { case BEST_EFFORT: ++best_effort_changes_notified_; diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h b/chrome/browser/nacl_host/nacl_browser_delegate_impl.h index 1229b59..5907b3f 100644 --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.h @@ -21,28 +21,28 @@ class ProfileManager; class NaClBrowserDelegateImpl : public NaClBrowserDelegate { public: explicit NaClBrowserDelegateImpl(ProfileManager* profile_manager); - virtual ~NaClBrowserDelegateImpl(); - - virtual void ShowMissingArchInfobar(int render_process_id, - int render_view_id) override; - virtual bool DialogsAreSuppressed() override; - virtual bool GetCacheDirectory(base::FilePath* cache_dir) override; - virtual bool GetPluginDirectory(base::FilePath* plugin_dir) override; - virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) override; - virtual bool GetUserDirectory(base::FilePath* user_dir) override; - virtual std::string GetVersionString() const override; - virtual ppapi::host::HostFactory* CreatePpapiHostFactory( + ~NaClBrowserDelegateImpl() override; + + void ShowMissingArchInfobar(int render_process_id, + int render_view_id) override; + bool DialogsAreSuppressed() override; + bool GetCacheDirectory(base::FilePath* cache_dir) override; + bool GetPluginDirectory(base::FilePath* plugin_dir) override; + bool GetPnaclDirectory(base::FilePath* pnacl_dir) override; + bool GetUserDirectory(base::FilePath* user_dir) override; + std::string GetVersionString() const override; + ppapi::host::HostFactory* CreatePpapiHostFactory( content::BrowserPpapiHost* ppapi_host) override; - virtual bool MapUrlToLocalFilePath(const GURL& url, - bool is_blocking, - const base::FilePath& profile_directory, - base::FilePath* file_path) override; - virtual void SetDebugPatterns(std::string debug_patterns) override; - virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) override; - virtual content::BrowserPpapiHost::OnKeepaliveCallback - GetOnKeepaliveCallback() override; - virtual bool IsNonSfiModeAllowed(const base::FilePath& profile_directory, - const GURL& manifest_url) override; + bool MapUrlToLocalFilePath(const GURL& url, + bool is_blocking, + const base::FilePath& profile_directory, + base::FilePath* file_path) override; + void SetDebugPatterns(std::string debug_patterns) override; + bool URLMatchesDebugPatterns(const GURL& manifest_url) override; + content::BrowserPpapiHost::OnKeepaliveCallback GetOnKeepaliveCallback() + override; + bool IsNonSfiModeAllowed(const base::FilePath& profile_directory, + const GURL& manifest_url) override; private: #if defined(ENABLE_EXTENSIONS) diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.h b/chrome/browser/nacl_host/nacl_infobar_delegate.h index 54efbf5..9b27f47 100644 --- a/chrome/browser/nacl_host/nacl_infobar_delegate.h +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.h @@ -15,12 +15,12 @@ class NaClInfoBarDelegate : public ConfirmInfoBarDelegate { private: NaClInfoBarDelegate(); - virtual ~NaClInfoBarDelegate(); + ~NaClInfoBarDelegate() override; - virtual base::string16 GetMessageText() const override; - virtual int GetButtons() const override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + base::string16 GetMessageText() const override; + int GetButtons() const override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; DISALLOW_COPY_AND_ASSIGN(NaClInfoBarDelegate); }; 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 fc1c80e..8204bb2 100644 --- a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc +++ b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc @@ -19,7 +19,7 @@ class NaClGdbDebugStubTest : public PPAPINaClNewlibTest { NaClGdbDebugStubTest() { } - virtual void SetUpCommandLine(CommandLine* command_line) override; + 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/omaha_query_params/chrome_omaha_query_params_delegate.h b/chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h index 374ddbe..2f25c65 100644 --- a/chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h +++ b/chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h @@ -11,13 +11,13 @@ class ChromeOmahaQueryParamsDelegate : public omaha_query_params::OmahaQueryParamsDelegate { public: ChromeOmahaQueryParamsDelegate(); - virtual ~ChromeOmahaQueryParamsDelegate(); + ~ChromeOmahaQueryParamsDelegate() override; // Gets the LazyInstance for ChromeOmahaQueryParamsDelegate. static ChromeOmahaQueryParamsDelegate* GetInstance(); // omaha_query_params::OmahaQueryParamsDelegate: - virtual std::string GetExtraParams() override; + std::string GetExtraParams() override; // Returns the value we use for the "updaterchannel=" and "prodchannel=" // parameters. Possible return values include: "canary", "dev", "beta", and diff --git a/chrome/browser/pepper_broker_infobar_delegate.h b/chrome/browser/pepper_broker_infobar_delegate.h index 4791c11..c5f247e 100644 --- a/chrome/browser/pepper_broker_infobar_delegate.h +++ b/chrome/browser/pepper_broker_infobar_delegate.h @@ -39,16 +39,16 @@ class PepperBrokerInfoBarDelegate : public ConfirmInfoBarDelegate { HostContentSettingsMap* content_settings, TabSpecificContentSettings* tab_content_settings, const base::Callback<void(bool)>& callback); - virtual ~PepperBrokerInfoBarDelegate(); + ~PepperBrokerInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual int GetIconID() const override; - virtual base::string16 GetMessageText() const override; - virtual base::string16 GetButtonLabel(InfoBarButton button) const override; - virtual bool Accept() override; - virtual bool Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual bool LinkClicked(WindowOpenDisposition disposition) override; + int GetIconID() const override; + base::string16 GetMessageText() const override; + base::string16 GetButtonLabel(InfoBarButton button) const override; + bool Accept() override; + bool Cancel() override; + base::string16 GetLinkText() const override; + bool LinkClicked(WindowOpenDisposition disposition) override; void DispatchCallback(bool result); diff --git a/chrome/browser/pepper_flash_settings_manager.cc b/chrome/browser/pepper_flash_settings_manager.cc index 74caec5..7dad619 100644 --- a/chrome/browser/pepper_flash_settings_manager.cc +++ b/chrome/browser/pepper_flash_settings_manager.cc @@ -64,8 +64,8 @@ class PepperFlashSettingsManager::Core uint64 max_age); // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelError() override; private: friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; @@ -119,7 +119,7 @@ class PepperFlashSettingsManager::Core uint64 max_age; }; - virtual ~Core(); + ~Core() override; void ConnectToChannel(bool success, const IPC::ChannelHandle& handle); diff --git a/chrome/browser/power/process_power_collector_unittest.cc b/chrome/browser/power/process_power_collector_unittest.cc index 443ac69..9a93cf3 100644 --- a/chrome/browser/power/process_power_collector_unittest.cc +++ b/chrome/browser/power/process_power_collector_unittest.cc @@ -95,14 +95,13 @@ class TestAppWindowContents : public extensions::AppWindowContents { : web_contents_(web_contents) {} // apps:AppWindowContents - virtual void Initialize(content::BrowserContext* context, - const GURL& url) override {} - virtual void LoadContents(int32 creator_process_id) override {} - virtual void NativeWindowChanged( + void Initialize(content::BrowserContext* context, const GURL& url) override {} + void LoadContents(int32 creator_process_id) override {} + void NativeWindowChanged( extensions::NativeAppWindow* native_app_window) override {} - virtual void NativeWindowClosed() override {} - virtual void DispatchWindowShownForTests() const override {} - virtual content::WebContents* GetWebContents() const override { + void NativeWindowClosed() override {} + void DispatchWindowShownForTests() const override {} + content::WebContents* GetWebContents() const override { return web_contents_.get(); } diff --git a/chrome/browser/precache/most_visited_urls_provider.h b/chrome/browser/precache/most_visited_urls_provider.h index 68052d0..253181c 100644 --- a/chrome/browser/precache/most_visited_urls_provider.h +++ b/chrome/browser/precache/most_visited_urls_provider.h @@ -25,7 +25,7 @@ class MostVisitedURLsProvider : public URLListProvider { // Returns a list of the user's most visited URLs via a callback. May be // called from any thread. The callback may be run before the call to GetURLs // returns. - virtual void GetURLs(const GetURLsCallback& callback) override; + void GetURLs(const GetURLsCallback& callback) override; private: scoped_refptr<history::TopSites> top_sites_; diff --git a/chrome/browser/predictors/autocomplete_action_predictor.h b/chrome/browser/predictors/autocomplete_action_predictor.h index 5c799de..e75cb08 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor.h +++ b/chrome/browser/predictors/autocomplete_action_predictor.h @@ -71,7 +71,7 @@ class AutocompleteActionPredictor }; explicit AutocompleteActionPredictor(Profile* profile); - virtual ~AutocompleteActionPredictor(); + ~AutocompleteActionPredictor() override; // Registers an AutocompleteResult for a given |user_text|. This will be used // when the user navigates from the Omnibox to determine early opportunities @@ -154,9 +154,9 @@ class AutocompleteActionPredictor static const int kMaximumDaysToKeepEntry; // NotificationObserver - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // The first step in initializing the predictor is accessing the database and // building the local cache. This should be delayed until after critical DB diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.h b/chrome/browser/predictors/autocomplete_action_predictor_factory.h index fff6a22..69597ab 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_factory.h +++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.h @@ -29,12 +29,12 @@ class AutocompleteActionPredictorFactory friend struct DefaultSingletonTraits<AutocompleteActionPredictorFactory>; AutocompleteActionPredictorFactory(); - virtual ~AutocompleteActionPredictorFactory(); + ~AutocompleteActionPredictorFactory() override; // BrowserContextKeyedServiceFactory: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorFactory); diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table.h b/chrome/browser/predictors/autocomplete_action_predictor_table.h index 0871da5..5c2fb23 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_table.h +++ b/chrome/browser/predictors/autocomplete_action_predictor_table.h @@ -74,11 +74,11 @@ class AutocompleteActionPredictorTable : public PredictorTableBase { friend class PredictorDatabaseInternal; AutocompleteActionPredictorTable(); - virtual ~AutocompleteActionPredictorTable(); + ~AutocompleteActionPredictorTable() override; // PredictorTableBase methods (DB thread). - virtual void CreateTableIfNonExistent() override; - virtual void LogDatabaseStats() override; + void CreateTableIfNonExistent() override; + void LogDatabaseStats() override; DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorTable); }; diff --git a/chrome/browser/predictors/logged_in_predictor_table.h b/chrome/browser/predictors/logged_in_predictor_table.h index 1c263a9..8c49cba 100644 --- a/chrome/browser/predictors/logged_in_predictor_table.h +++ b/chrome/browser/predictors/logged_in_predictor_table.h @@ -49,11 +49,11 @@ class LoggedInPredictorTable : public PredictorTableBase { friend class PredictorDatabaseInternal; LoggedInPredictorTable(); - virtual ~LoggedInPredictorTable(); + ~LoggedInPredictorTable() override; // PredictorTableBase methods. - virtual void CreateTableIfNonExistent() override; - virtual void LogDatabaseStats() override; + void CreateTableIfNonExistent() override; + void LogDatabaseStats() override; DISALLOW_COPY_AND_ASSIGN(LoggedInPredictorTable); }; diff --git a/chrome/browser/predictors/predictor_database.h b/chrome/browser/predictors/predictor_database.h index 7d65b02..43e95a9 100644 --- a/chrome/browser/predictors/predictor_database.h +++ b/chrome/browser/predictors/predictor_database.h @@ -24,7 +24,7 @@ class ResourcePrefetchPredictorTables; class PredictorDatabase : public KeyedService { public: explicit PredictorDatabase(Profile* profile); - virtual ~PredictorDatabase(); + ~PredictorDatabase() override; scoped_refptr<AutocompleteActionPredictorTable> autocomplete_table(); scoped_refptr<ResourcePrefetchPredictorTables> resource_prefetch_tables(); @@ -35,7 +35,7 @@ class PredictorDatabase : public KeyedService { private: // KeyedService - virtual void Shutdown() override; + void Shutdown() override; scoped_refptr<PredictorDatabaseInternal> db_; diff --git a/chrome/browser/predictors/predictor_database_factory.h b/chrome/browser/predictors/predictor_database_factory.h index f3a72bef6..f03dba0 100644 --- a/chrome/browser/predictors/predictor_database_factory.h +++ b/chrome/browser/predictors/predictor_database_factory.h @@ -27,10 +27,10 @@ class PredictorDatabaseFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<PredictorDatabaseFactory>; PredictorDatabaseFactory(); - virtual ~PredictorDatabaseFactory(); + ~PredictorDatabaseFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseFactory); diff --git a/chrome/browser/predictors/resource_prefetch_common_unittest.cc b/chrome/browser/predictors/resource_prefetch_common_unittest.cc index b84d7e7..74033fb 100644 --- a/chrome/browser/predictors/resource_prefetch_common_unittest.cc +++ b/chrome/browser/predictors/resource_prefetch_common_unittest.cc @@ -27,14 +27,14 @@ namespace { class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier { public: - virtual ConnectionType GetCurrentConnectionType() const OVERRIDE { + ConnectionType GetCurrentConnectionType() const OVERRIDE { return NetworkChangeNotifier::CONNECTION_WIFI; } }; class MockNetworkChangeNotifier4G : public NetworkChangeNotifier { public: - virtual ConnectionType GetCurrentConnectionType() const OVERRIDE { + ConnectionType GetCurrentConnectionType() const OVERRIDE { return NetworkChangeNotifier::CONNECTION_4G; } }; diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc index ea767da..878113d 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.cc +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc @@ -117,20 +117,20 @@ class GetUrlVisitCountTask : public history::HistoryDBTask { DCHECK(requests_.get()); } - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { history::URLRow url_row; if (db->GetRowForURL(navigation_id_.main_frame_url, &url_row)) visit_count_ = url_row.visit_count(); return true; } - virtual void DoneRunOnMainThread() override { + void DoneRunOnMainThread() override { callback_.Run(visit_count_, navigation_id_, *requests_); } private: - virtual ~GetUrlVisitCountTask() { } + ~GetUrlVisitCountTask() override {} int visit_count_; NavigationID navigation_id_; diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h index 7a1166e..c6eb715 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.h +++ b/chrome/browser/predictors/resource_prefetch_predictor.h @@ -95,7 +95,7 @@ class ResourcePrefetchPredictor ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config, Profile* profile); - virtual ~ResourcePrefetchPredictor(); + ~ResourcePrefetchPredictor() override; // Thread safe. static bool ShouldRecordRequest(net::URLRequest* request, @@ -184,12 +184,12 @@ class ResourcePrefetchPredictor static bool IsCacheable(const net::URLRequest* request); // content::NotificationObserver methods override. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // KeyedService methods override. - virtual void Shutdown() override; + void Shutdown() override; // Functions called on different network events pertaining to the loading of // main frame resource or sub resources. diff --git a/chrome/browser/predictors/resource_prefetch_predictor_factory.h b/chrome/browser/predictors/resource_prefetch_predictor_factory.h index 8dc5795..6624fca 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_factory.h +++ b/chrome/browser/predictors/resource_prefetch_predictor_factory.h @@ -24,10 +24,10 @@ class ResourcePrefetchPredictorFactory friend struct DefaultSingletonTraits<ResourcePrefetchPredictorFactory>; ResourcePrefetchPredictorFactory(); - virtual ~ResourcePrefetchPredictorFactory(); + ~ResourcePrefetchPredictorFactory() override; // RefcountedBrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorFactory); diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h b/chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h index e70c345..e1d57e85 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h +++ b/chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h @@ -14,11 +14,11 @@ class ResourcePrefetchPredictorTabHelper : public content::WebContentsObserver, public content::WebContentsUserData<ResourcePrefetchPredictorTabHelper> { public: - virtual ~ResourcePrefetchPredictorTabHelper(); + ~ResourcePrefetchPredictorTabHelper() override; // content::WebContentsObserver implementation - virtual void DocumentOnLoadCompletedInMainFrame() override; - virtual void DidLoadResourceFromMemoryCache( + void DocumentOnLoadCompletedInMainFrame() override; + void DidLoadResourceFromMemoryCache( const content::LoadFromMemoryCacheDetails& details) override; private: diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tables.h b/chrome/browser/predictors/resource_prefetch_predictor_tables.h index d455453..84f0eba 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_tables.h +++ b/chrome/browser/predictors/resource_prefetch_predictor_tables.h @@ -121,7 +121,7 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { friend class MockResourcePrefetchPredictorTables; ResourcePrefetchPredictorTables(); - virtual ~ResourcePrefetchPredictorTables(); + ~ResourcePrefetchPredictorTables() override; // Helper functions below help perform functions on the Url and host table // using the same code. @@ -137,8 +137,8 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const; // PredictorTableBase methods. - virtual void CreateTableIfNonExistent() override; - virtual void LogDatabaseStats() override; + void CreateTableIfNonExistent() override; + void LogDatabaseStats() override; // Helpers to return Statements for cached Statements. The caller must take // ownership of the return Statements. diff --git a/chrome/browser/predictors/resource_prefetcher.h b/chrome/browser/predictors/resource_prefetcher.h index 1774307..11af4d3 100644 --- a/chrome/browser/predictors/resource_prefetcher.h +++ b/chrome/browser/predictors/resource_prefetcher.h @@ -89,7 +89,7 @@ class ResourcePrefetcher : public net::URLRequest::Delegate { const NavigationID& navigation_id, PrefetchKeyType key_type, scoped_ptr<RequestVector> requests); - virtual ~ResourcePrefetcher(); + ~ResourcePrefetcher() override; void Start(); // Kicks off the prefetching. Can only be called once. void Stop(); // No additional prefetches will be queued after this. @@ -123,20 +123,19 @@ class ResourcePrefetcher : public net::URLRequest::Delegate { bool ShouldContinueReadingRequest(net::URLRequest* request, int bytes_read); // net::URLRequest::Delegate methods. - virtual void OnReceivedRedirect(net::URLRequest* request, - const net::RedirectInfo& redirect_info, - bool* defer_redirect) override; - virtual void OnAuthRequired(net::URLRequest* request, - net::AuthChallengeInfo* auth_info) override; - virtual void OnCertificateRequested( + void OnReceivedRedirect(net::URLRequest* request, + const net::RedirectInfo& redirect_info, + bool* defer_redirect) override; + void OnAuthRequired(net::URLRequest* request, + net::AuthChallengeInfo* auth_info) override; + void OnCertificateRequested( net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info) override; - virtual void OnSSLCertificateError(net::URLRequest* request, - const net::SSLInfo& ssl_info, - bool fatal) override; - virtual void OnResponseStarted(net::URLRequest* request) override; - virtual void OnReadCompleted(net::URLRequest* request, - int bytes_read) override; + void OnSSLCertificateError(net::URLRequest* request, + const net::SSLInfo& ssl_info, + bool fatal) override; + void OnResponseStarted(net::URLRequest* request) override; + void OnReadCompleted(net::URLRequest* request, int bytes_read) override; enum PrefetcherState { INITIALIZED = 0, // Prefetching hasn't started. diff --git a/chrome/browser/predictors/resource_prefetcher_manager.h b/chrome/browser/predictors/resource_prefetcher_manager.h index 1a6ff7b..335051e 100644 --- a/chrome/browser/predictors/resource_prefetcher_manager.h +++ b/chrome/browser/predictors/resource_prefetcher_manager.h @@ -54,10 +54,10 @@ class ResourcePrefetcherManager void MaybeRemovePrefetch(const NavigationID& navigation_id); // ResourcePrefetcher::Delegate methods. - virtual void ResourcePrefetcherFinished( + void ResourcePrefetcherFinished( ResourcePrefetcher* prefetcher, ResourcePrefetcher::RequestVector* requests) override; - virtual net::URLRequestContext* GetURLRequestContext() override; + net::URLRequestContext* GetURLRequestContext() override; private: friend class base::RefCountedThreadSafe<ResourcePrefetcherManager>; @@ -65,7 +65,7 @@ class ResourcePrefetcherManager typedef std::map<std::string, ResourcePrefetcher*> PrefetcherMap; - virtual ~ResourcePrefetcherManager(); + ~ResourcePrefetcherManager() override; // UI Thread. |predictor_| needs to be called on the UI thread. void ResourcePrefetcherFinishedOnUI( diff --git a/chrome/browser/pref_service_flags_storage.h b/chrome/browser/pref_service_flags_storage.h index 06dfaef..ac41448 100644 --- a/chrome/browser/pref_service_flags_storage.h +++ b/chrome/browser/pref_service_flags_storage.h @@ -17,10 +17,10 @@ namespace about_flags { class PrefServiceFlagsStorage : public FlagsStorage { public: explicit PrefServiceFlagsStorage(PrefService *prefs); - virtual ~PrefServiceFlagsStorage(); + ~PrefServiceFlagsStorage() override; - virtual std::set<std::string> GetFlags() override; - virtual bool SetFlags(const std::set<std::string>& flags) override; + std::set<std::string> GetFlags() override; + bool SetFlags(const std::set<std::string>& flags) override; private: PrefService* prefs_; diff --git a/chrome/browser/prefetch/prefetch_browsertest.cc b/chrome/browser/prefetch/prefetch_browsertest.cc index ffe6ca6..cd3b57e 100644 --- a/chrome/browser/prefetch/prefetch_browsertest.cc +++ b/chrome/browser/prefetch/prefetch_browsertest.cc @@ -32,14 +32,14 @@ const char kPrefetchPage[] = "files/prerender/simple_prefetch.html"; class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier { public: - virtual ConnectionType GetCurrentConnectionType() const override { + ConnectionType GetCurrentConnectionType() const override { return NetworkChangeNotifier::CONNECTION_WIFI; } }; class MockNetworkChangeNotifier4G : public NetworkChangeNotifier { public: - virtual ConnectionType GetCurrentConnectionType() const override { + ConnectionType GetCurrentConnectionType() const override { return NetworkChangeNotifier::CONNECTION_4G; } }; @@ -49,7 +49,7 @@ class PrefetchBrowserTestBase : public InProcessBrowserTest { explicit PrefetchBrowserTestBase(bool disabled_via_field_trial) : disabled_via_field_trial_(disabled_via_field_trial) {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { if (disabled_via_field_trial_) { command_line->AppendSwitchASCII(switches::kForceFieldTrials, "Prefetch/ExperimentDisabled/"); @@ -95,10 +95,10 @@ class HangingURLRequestJob : public net::URLRequestJob { : net::URLRequestJob(request, network_delegate) {} // net::URLRequestJob implementation - virtual void Start() override {} + void Start() override {} private: - virtual ~HangingURLRequestJob() {} + ~HangingURLRequestJob() override {} DISALLOW_COPY_AND_ASSIGN(HangingURLRequestJob); }; @@ -108,9 +108,9 @@ class HangingRequestInterceptor : public net::URLRequestInterceptor { explicit HangingRequestInterceptor(const base::Closure& callback) : callback_(callback) {} - virtual ~HangingRequestInterceptor() {} + ~HangingRequestInterceptor() override {} - virtual net::URLRequestJob* MaybeInterceptRequest( + net::URLRequestJob* MaybeInterceptRequest( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override { if (!callback_.is_null()) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc index 254aed3..d46ea97 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -486,13 +486,11 @@ class ProcessSingleton::LinuxWatcher this, &SocketReader::CleanupAndDeleteSelf); } - virtual ~SocketReader() { - CloseSocket(fd_); - } + ~SocketReader() override { CloseSocket(fd_); } // MessageLoopForIO::Watcher impl. - virtual void OnFileCanReadWithoutBlocking(int fd) override; - virtual void OnFileCanWriteWithoutBlocking(int fd) override { + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override { // SocketReader only watches for accept (read) events. NOTREACHED(); } @@ -550,14 +548,14 @@ class ProcessSingleton::LinuxWatcher SocketReader* reader); // MessageLoopForIO::Watcher impl. These run on the IO thread. - virtual void OnFileCanReadWithoutBlocking(int fd) override; - virtual void OnFileCanWriteWithoutBlocking(int fd) override { + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override { // ProcessSingleton only watches for accept (read) events. NOTREACHED(); } // MessageLoop::DestructionObserver - virtual void WillDestroyCurrentMessageLoop() override { + void WillDestroyCurrentMessageLoop() override { fd_watcher_.StopWatchingFileDescriptor(); } @@ -565,7 +563,7 @@ class ProcessSingleton::LinuxWatcher friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; friend class base::DeleteHelper<ProcessSingleton::LinuxWatcher>; - virtual ~LinuxWatcher() { + ~LinuxWatcher() override { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); STLDeleteElements(&readers_); diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter.h b/chrome/browser/profile_resetter/automatic_profile_resetter.h index 015fdc5..0e43a1b 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter.h +++ b/chrome/browser/profile_resetter/automatic_profile_resetter.h @@ -67,7 +67,7 @@ class AutomaticProfileResetter : public KeyedService { }; explicit AutomaticProfileResetter(Profile* profile); - virtual ~AutomaticProfileResetter(); + ~AutomaticProfileResetter() override; // Initializes the service if it is enabled in the field trial. Otherwise, // skips the initialization steps, and also permanently disables the service. @@ -139,7 +139,7 @@ class AutomaticProfileResetter : public KeyedService { const scoped_refptr<base::TaskRunner>& task_runner); // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; private: class InputBuilder; diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h index 44ca4c0..73a660b 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h @@ -124,7 +124,7 @@ class AutomaticProfileResetterDelegateImpl explicit AutomaticProfileResetterDelegateImpl( Profile* profile, ProfileResetter::ResettableFlags resettable_aspects); - virtual ~AutomaticProfileResetterDelegateImpl(); + ~AutomaticProfileResetterDelegateImpl() override; // Returns the brandcoded default settings; empty defaults if this is not a // branded build; or NULL if FetchBrandcodedDefaultSettingsIfNeeded() has not @@ -134,35 +134,33 @@ class AutomaticProfileResetterDelegateImpl } // AutomaticProfileResetterDelegate: - virtual void EnumerateLoadedModulesIfNeeded() override; - virtual void RequestCallbackWhenLoadedModulesAreEnumerated( + void EnumerateLoadedModulesIfNeeded() override; + void RequestCallbackWhenLoadedModulesAreEnumerated( const base::Closure& ready_callback) const override; - virtual void LoadTemplateURLServiceIfNeeded() override; - virtual void RequestCallbackWhenTemplateURLServiceIsLoaded( + void LoadTemplateURLServiceIfNeeded() override; + void RequestCallbackWhenTemplateURLServiceIsLoaded( const base::Closure& ready_callback) const override; - virtual void FetchBrandcodedDefaultSettingsIfNeeded() override; - virtual void RequestCallbackWhenBrandcodedDefaultsAreFetched( + void FetchBrandcodedDefaultSettingsIfNeeded() override; + void RequestCallbackWhenBrandcodedDefaultsAreFetched( const base::Closure& ready_callback) const override; - virtual scoped_ptr<base::ListValue> - GetLoadedModuleNameDigests() const override; - virtual scoped_ptr<base::DictionaryValue> - GetDefaultSearchProviderDetails() const override; - virtual bool IsDefaultSearchProviderManaged() const override; - virtual scoped_ptr<base::ListValue> - GetPrepopulatedSearchProvidersDetails() const override; - virtual bool TriggerPrompt() override; - virtual void TriggerProfileSettingsReset( - bool send_feedback, - const base::Closure& completion) override; - virtual void DismissPrompt() override; + scoped_ptr<base::ListValue> GetLoadedModuleNameDigests() const override; + scoped_ptr<base::DictionaryValue> GetDefaultSearchProviderDetails() + const override; + bool IsDefaultSearchProviderManaged() const override; + scoped_ptr<base::ListValue> GetPrepopulatedSearchProvidersDetails() + const override; + bool TriggerPrompt() override; + void TriggerProfileSettingsReset(bool send_feedback, + const base::Closure& completion) override; + void DismissPrompt() override; // TemplateURLServiceObserver: - virtual void OnTemplateURLServiceChanged() override; + void OnTemplateURLServiceChanged() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: // Sends a feedback |report|, where |report| is supposed to be result of diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h index 251f4c75..fbbb03f 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h @@ -37,17 +37,17 @@ class AutomaticProfileResetterFactory friend struct DefaultSingletonTraits<AutomaticProfileResetterFactory>; AutomaticProfileResetterFactory(); - virtual ~AutomaticProfileResetterFactory(); + ~AutomaticProfileResetterFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; // BrowserContextKeyedBaseFactory: - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(AutomaticProfileResetterFactory); }; diff --git a/chrome/browser/profile_resetter/brandcode_config_fetcher.h b/chrome/browser/profile_resetter/brandcode_config_fetcher.h index 643abe4..4495454 100644 --- a/chrome/browser/profile_resetter/brandcode_config_fetcher.h +++ b/chrome/browser/profile_resetter/brandcode_config_fetcher.h @@ -22,7 +22,7 @@ class BrandcodeConfigFetcher : public net::URLFetcherDelegate { BrandcodeConfigFetcher(const FetchCallback& callback, const GURL& url, const std::string& brandcode); - virtual ~BrandcodeConfigFetcher(); + ~BrandcodeConfigFetcher() override; bool IsActive() const { return config_fetcher_; } @@ -35,7 +35,7 @@ class BrandcodeConfigFetcher : public net::URLFetcherDelegate { private: // net::URLFetcherDelegate: - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; void OnDownloadTimeout(); diff --git a/chrome/browser/profile_resetter/jtl_interpreter.cc b/chrome/browser/profile_resetter/jtl_interpreter.cc index daca3e6..c918954 100644 --- a/chrome/browser/profile_resetter/jtl_interpreter.cc +++ b/chrome/browser/profile_resetter/jtl_interpreter.cc @@ -112,8 +112,8 @@ class NavigateOperation : public Operation { public: explicit NavigateOperation(const std::string& hashed_key) : hashed_key_(hashed_key) {} - virtual ~NavigateOperation() {} - virtual bool Execute(ExecutionContext* context) override { + ~NavigateOperation() override {} + bool Execute(ExecutionContext* context) override { const base::DictionaryValue* dict = NULL; if (!context->current_node()->GetAsDictionary(&dict)) { // Just ignore this node gracefully as this navigation is a dead end. @@ -142,8 +142,8 @@ class NavigateOperation : public Operation { class NavigateAnyOperation : public Operation { public: NavigateAnyOperation() {} - virtual ~NavigateAnyOperation() {} - virtual bool Execute(ExecutionContext* context) override { + ~NavigateAnyOperation() override {} + bool Execute(ExecutionContext* context) override { const base::DictionaryValue* dict = NULL; const base::ListValue* list = NULL; if (context->current_node()->GetAsDictionary(&dict)) { @@ -177,8 +177,8 @@ class NavigateAnyOperation : public Operation { class NavigateBackOperation : public Operation { public: NavigateBackOperation() {} - virtual ~NavigateBackOperation() {} - virtual bool Execute(ExecutionContext* context) override { + ~NavigateBackOperation() override {} + bool Execute(ExecutionContext* context) override { const base::Value* current_node = context->current_node(); context->stack()->pop_back(); bool continue_traversal = context->ContinueExecution(); @@ -198,8 +198,8 @@ class StoreValue : public Operation { DCHECK(base::IsStringUTF8(hashed_name)); DCHECK(value_); } - virtual ~StoreValue() {} - virtual bool Execute(ExecutionContext* context) override { + ~StoreValue() override {} + bool Execute(ExecutionContext* context) override { context->working_memory()->Set(hashed_name_, value_->DeepCopy()); return context->ContinueExecution(); } @@ -222,8 +222,8 @@ class CompareStoredValue : public Operation { DCHECK(value_); DCHECK(default_value_); } - virtual ~CompareStoredValue() {} - virtual bool Execute(ExecutionContext* context) override { + ~CompareStoredValue() override {} + bool Execute(ExecutionContext* context) override { const base::Value* actual_value = NULL; if (!context->working_memory()->Get(hashed_name_, &actual_value)) actual_value = default_value_.get(); @@ -277,8 +277,8 @@ class StoreNodeRegisterableDomain : public Operation { : hashed_name_(hashed_name) { DCHECK(base::IsStringUTF8(hashed_name)); } - virtual ~StoreNodeRegisterableDomain() {} - virtual bool Execute(ExecutionContext* context) override { + ~StoreNodeRegisterableDomain() override {} + bool Execute(ExecutionContext* context) override { std::string possibly_invalid_url; std::string domain; if (!context->current_node()->GetAsString(&possibly_invalid_url) || @@ -326,8 +326,8 @@ class StoreNodeRegisterableDomain : public Operation { class CompareNodeBool : public Operation { public: explicit CompareNodeBool(bool value) : value_(value) {} - virtual ~CompareNodeBool() {} - virtual bool Execute(ExecutionContext* context) override { + ~CompareNodeBool() override {} + bool Execute(ExecutionContext* context) override { bool actual_value = false; if (!context->current_node()->GetAsBoolean(&actual_value)) return true; @@ -345,8 +345,8 @@ class CompareNodeHash : public Operation { public: explicit CompareNodeHash(const std::string& hashed_value) : hashed_value_(hashed_value) {} - virtual ~CompareNodeHash() {} - virtual bool Execute(ExecutionContext* context) override { + ~CompareNodeHash() override {} + bool Execute(ExecutionContext* context) override { std::string actual_hash; if (!context->GetValueHash(*context->current_node(), &actual_hash) || actual_hash != hashed_value_) @@ -363,8 +363,8 @@ class CompareNodeHashNot : public Operation { public: explicit CompareNodeHashNot(const std::string& hashed_value) : hashed_value_(hashed_value) {} - virtual ~CompareNodeHashNot() {} - virtual bool Execute(ExecutionContext* context) override { + ~CompareNodeHashNot() override {} + bool Execute(ExecutionContext* context) override { std::string actual_hash; if (context->GetValueHash(*context->current_node(), &actual_hash) && actual_hash == hashed_value_) @@ -417,8 +417,8 @@ class CompareNodeSubstring : public Operation { pattern_sum_(pattern_sum) { DCHECK(pattern_length_); } - virtual ~CompareNodeSubstring() {} - virtual bool Execute(ExecutionContext* context) override { + ~CompareNodeSubstring() override {} + bool Execute(ExecutionContext* context) override { std::string value_as_string; if (!context->current_node()->GetAsString(&value_as_string) || !pattern_length_ || value_as_string.size() < pattern_length_) @@ -450,10 +450,8 @@ class CompareNodeSubstring : public Operation { class StopExecutingSentenceOperation : public Operation { public: StopExecutingSentenceOperation() {} - virtual ~StopExecutingSentenceOperation() {} - virtual bool Execute(ExecutionContext* context) override { - return false; - } + ~StopExecutingSentenceOperation() override {} + bool Execute(ExecutionContext* context) override { return false; } private: DISALLOW_COPY_AND_ASSIGN(StopExecutingSentenceOperation); diff --git a/chrome/browser/profile_resetter/profile_reset_global_error.h b/chrome/browser/profile_resetter/profile_reset_global_error.h index 11afd27..4bb7574 100644 --- a/chrome/browser/profile_resetter/profile_reset_global_error.h +++ b/chrome/browser/profile_resetter/profile_reset_global_error.h @@ -22,7 +22,7 @@ class ProfileResetGlobalError public base::SupportsWeakPtr<ProfileResetGlobalError> { public: explicit ProfileResetGlobalError(Profile* profile); - virtual ~ProfileResetGlobalError(); + ~ProfileResetGlobalError() override; // Returns whether or not the reset prompt is supported on this platform. static bool IsSupportedOnPlatform(); @@ -39,14 +39,14 @@ class ProfileResetGlobalError void OnBubbleViewNoThanksButtonPressed(); // GlobalError: - virtual bool HasMenuItem() override; - virtual int MenuItemCommandID() override; - virtual base::string16 MenuItemLabel() override; - virtual void ExecuteMenuItem(Browser* browser) override; - virtual bool HasBubbleView() override; - virtual bool HasShownBubbleView() override; - virtual void ShowBubbleView(Browser* browser) override; - virtual GlobalErrorBubbleViewBase* GetBubbleView() override; + bool HasMenuItem() override; + int MenuItemCommandID() override; + base::string16 MenuItemLabel() override; + void ExecuteMenuItem(Browser* browser) override; + bool HasBubbleView() override; + bool HasShownBubbleView() override; + void ShowBubbleView(Browser* browser) override; + GlobalErrorBubbleViewBase* GetBubbleView() override; private: Profile* profile_; diff --git a/chrome/browser/profile_resetter/profile_resetter.h b/chrome/browser/profile_resetter/profile_resetter.h index 7ea117b..2df678f 100644 --- a/chrome/browser/profile_resetter/profile_resetter.h +++ b/chrome/browser/profile_resetter/profile_resetter.h @@ -56,7 +56,7 @@ class ProfileResetter : public base::NonThreadSafe, type_ResettableFlags_doesnt_match_Resettable); explicit ProfileResetter(Profile* profile); - virtual ~ProfileResetter(); + ~ProfileResetter() override; // Resets |resettable_flags| and calls |callback| on the UI thread on // completion. |default_settings| allows the caller to specify some default @@ -84,7 +84,7 @@ class ProfileResetter : public base::NonThreadSafe, void ResetShortcuts(); // BrowsingDataRemover::Observer: - virtual void OnBrowsingDataRemoverDone() override; + void OnBrowsingDataRemoverDone() override; // Callback for when TemplateURLService has loaded. void OnTemplateURLServiceLoaded(); diff --git a/chrome/browser/profile_resetter/profile_resetter_browsertest.cc b/chrome/browser/profile_resetter/profile_resetter_browsertest.cc index e7df126..8c1b321 100644 --- a/chrome/browser/profile_resetter/profile_resetter_browsertest.cc +++ b/chrome/browser/profile_resetter/profile_resetter_browsertest.cc @@ -155,7 +155,7 @@ void RemoveCookieTester::Notify() { class ProfileResetTest : public InProcessBrowserTest, public ProfileResetterTestBase { protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { resetter_.reset(new ProfileResetter(browser()->profile())); } }; diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc index 62dc99c..70ee9b8 100644 --- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc +++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc @@ -182,9 +182,9 @@ content::WebContents* PinnedTabsResetTest::CreateWebContents() { // URLFetcher delegate that simply records the upload data. struct URLFetcherRequestListener : net::URLFetcherDelegate { URLFetcherRequestListener(); - virtual ~URLFetcherRequestListener(); + ~URLFetcherRequestListener() override; - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; std::string upload_data; net::URLFetcherDelegate* real_delegate; diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_app_mode.h b/chrome/browser/renderer_context_menu/context_menu_content_type_app_mode.h index 2bffe60..4a7d81f 100644 --- a/chrome/browser/renderer_context_menu/context_menu_content_type_app_mode.h +++ b/chrome/browser/renderer_context_menu/context_menu_content_type_app_mode.h @@ -9,10 +9,10 @@ class ContextMenuContentTypeAppMode : public ContextMenuContentType { public: - virtual ~ContextMenuContentTypeAppMode(); + ~ContextMenuContentTypeAppMode() override; // ContextMenuContentType overrides. - virtual bool SupportsGroup(int group) override; + bool SupportsGroup(int group) override; protected: ContextMenuContentTypeAppMode(content::WebContents* web_contents, diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_extension_popup.h b/chrome/browser/renderer_context_menu/context_menu_content_type_extension_popup.h index 7940e2e..7f35b1d 100644 --- a/chrome/browser/renderer_context_menu/context_menu_content_type_extension_popup.h +++ b/chrome/browser/renderer_context_menu/context_menu_content_type_extension_popup.h @@ -9,10 +9,10 @@ class ContextMenuContentTypeExtensionPopup : public ContextMenuContentType { public: - virtual ~ContextMenuContentTypeExtensionPopup(); + ~ContextMenuContentTypeExtensionPopup() override; // ContextMenuContentType overrides. - virtual bool SupportsGroup(int group) override; + bool SupportsGroup(int group) override; protected: ContextMenuContentTypeExtensionPopup( diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_panel.h b/chrome/browser/renderer_context_menu/context_menu_content_type_panel.h index d4acb2a..9718a18 100644 --- a/chrome/browser/renderer_context_menu/context_menu_content_type_panel.h +++ b/chrome/browser/renderer_context_menu/context_menu_content_type_panel.h @@ -9,10 +9,10 @@ class ContextMenuContentTypePanel : public ContextMenuContentType { public: - virtual ~ContextMenuContentTypePanel(); + ~ContextMenuContentTypePanel() override; // ContextMenuContentType overrides. - virtual bool SupportsGroup(int group) override; + bool SupportsGroup(int group) override; protected: ContextMenuContentTypePanel(content::WebContents* web_contents, diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.h b/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.h index 2f18fcb..44389aa 100644 --- a/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.h +++ b/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.h @@ -9,10 +9,10 @@ class ContextMenuContentTypePlatformApp : public ContextMenuContentType { public: - virtual ~ContextMenuContentTypePlatformApp(); + ~ContextMenuContentTypePlatformApp() override; // ContextMenuContentType overrides. - virtual bool SupportsGroup(int group) override; + bool SupportsGroup(int group) override; protected: ContextMenuContentTypePlatformApp(content::WebContents* web_contents, diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h index 107340e..ebacb0e 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -51,12 +51,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase { RenderViewContextMenu(content::RenderFrameHost* render_frame_host, const content::ContextMenuParams& params); - virtual ~RenderViewContextMenu(); + ~RenderViewContextMenu() override; // SimpleMenuModel::Delegate: - virtual bool IsCommandIdChecked(int command_id) const override; - virtual bool IsCommandIdEnabled(int command_id) const override; - virtual void ExecuteCommand(int command_id, int event_flags) override; + bool IsCommandIdChecked(int command_id) const override; + bool IsCommandIdEnabled(int command_id) const override; + void ExecuteCommand(int command_id, int event_flags) override; protected: Profile* GetProfile(); @@ -76,15 +76,15 @@ class RenderViewContextMenu : public RenderViewContextMenuBase { const extensions::MenuItem* item); // RenderViewContextMenuBase: - virtual void InitMenu() override; - virtual void RecordShownItem(int id) override; - virtual void RecordUsedItem(int id) override; + void InitMenu() override; + void RecordShownItem(int id) override; + void RecordUsedItem(int id) override; #if defined(ENABLE_PLUGINS) - virtual void HandleAuthorizeAllPlugins() override; + void HandleAuthorizeAllPlugins() override; #endif - virtual void NotifyMenuShown() override; - virtual void NotifyURLOpened(const GURL& url, - content::WebContents* new_contents) override; + void NotifyMenuShown() override; + void NotifyURLOpened(const GURL& url, + content::WebContents* new_contents) override; // Gets the extension (if any) associated with the WebContents that we're in. const extensions::Extension* GetExtension() const; diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h index a0803ae..c8cd6e4 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h @@ -17,12 +17,12 @@ class ContextMenuNotificationObserver : public content::NotificationObserver { public: // Wait for a context menu to be shown, and then execute |command_to_execute|. explicit ContextMenuNotificationObserver(int command_to_execute); - virtual ~ContextMenuNotificationObserver(); + ~ContextMenuNotificationObserver() override; private: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void ExecuteCommand(RenderViewContextMenu* context_menu); @@ -40,7 +40,7 @@ class SaveLinkAsContextMenuObserver : public ContextMenuNotificationObserver { // NotificationService::AllSources(). explicit SaveLinkAsContextMenuObserver( const content::NotificationSource& source); - virtual ~SaveLinkAsContextMenuObserver(); + ~SaveLinkAsContextMenuObserver() override; // Suggested filename for file downloaded through "Save Link As" option. base::string16 GetSuggestedFilename(); @@ -49,9 +49,9 @@ class SaveLinkAsContextMenuObserver : public ContextMenuNotificationObserver { void WaitForMenu(); private: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void Cancel(RenderViewContextMenu* context_menu); diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h index f4e51bc..5930465 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h @@ -23,7 +23,7 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { public: TestRenderViewContextMenu(content::RenderFrameHost* render_frame_host, content::ContextMenuParams params); - virtual ~TestRenderViewContextMenu(); + ~TestRenderViewContextMenu() override; // Factory. // This is a lightweight method to create a test RenderViewContextMenu @@ -35,9 +35,8 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { const GURL& frame_url); // Implementation of pure virtuals in RenderViewContextMenu. - virtual bool GetAcceleratorForCommandId( - int command_id, - ui::Accelerator* accelerator) override; + bool GetAcceleratorForCommandId(int command_id, + ui::Accelerator* accelerator) override; // Returns true if command specified by |command_id| is present // in the menu. diff --git a/chrome/browser/renderer_context_menu/spellchecker_submenu_observer.h b/chrome/browser/renderer_context_menu/spellchecker_submenu_observer.h index bd0fa39..23b7e86 100644 --- a/chrome/browser/renderer_context_menu/spellchecker_submenu_observer.h +++ b/chrome/browser/renderer_context_menu/spellchecker_submenu_observer.h @@ -22,14 +22,14 @@ class SpellCheckerSubMenuObserver : public RenderViewContextMenuObserver { SpellCheckerSubMenuObserver(RenderViewContextMenuProxy* proxy, ui::SimpleMenuModel::Delegate* delegate, int group); - virtual ~SpellCheckerSubMenuObserver(); + ~SpellCheckerSubMenuObserver() override; // RenderViewContextMenuObserver implementation. - virtual void InitMenu(const content::ContextMenuParams& params) override; - virtual bool IsCommandIdSupported(int command_id) override; - virtual bool IsCommandIdChecked(int command_id) override; - virtual bool IsCommandIdEnabled(int command_id) override; - virtual void ExecuteCommand(int command_id) override; + void InitMenu(const content::ContextMenuParams& params) override; + bool IsCommandIdSupported(int command_id) override; + bool IsCommandIdChecked(int command_id) override; + bool IsCommandIdEnabled(int command_id) override; + void ExecuteCommand(int command_id) override; private: // The interface for adding a submenu to the parent. diff --git a/chrome/browser/renderer_context_menu/spellchecker_submenu_observer_browsertest.cc b/chrome/browser/renderer_context_menu/spellchecker_submenu_observer_browsertest.cc index 80d810e..ab248d2 100644 --- a/chrome/browser/renderer_context_menu/spellchecker_submenu_observer_browsertest.cc +++ b/chrome/browser/renderer_context_menu/spellchecker_submenu_observer_browsertest.cc @@ -39,48 +39,41 @@ class MockRenderViewContextMenu : public ui::SimpleMenuModel::Delegate, }; MockRenderViewContextMenu() : observer_(NULL), profile_(new TestingProfile) {} - virtual ~MockRenderViewContextMenu() {} + ~MockRenderViewContextMenu() override {} // SimpleMenuModel::Delegate implementation. - virtual bool IsCommandIdChecked(int command_id) const override { + bool IsCommandIdChecked(int command_id) const override { return observer_->IsCommandIdChecked(command_id); } - virtual bool IsCommandIdEnabled(int command_id) const override { + bool IsCommandIdEnabled(int command_id) const override { return observer_->IsCommandIdEnabled(command_id); } - virtual void ExecuteCommand(int command_id, int event_flags) override { + void ExecuteCommand(int command_id, int event_flags) override { observer_->ExecuteCommand(command_id); } - virtual void MenuWillShow(ui::SimpleMenuModel* source) override {} - virtual void MenuClosed(ui::SimpleMenuModel* source) override {} - virtual bool GetAcceleratorForCommandId( - int command_id, - ui::Accelerator* accelerator) override { + void MenuWillShow(ui::SimpleMenuModel* source) override {} + void MenuClosed(ui::SimpleMenuModel* source) override {} + bool GetAcceleratorForCommandId(int command_id, + ui::Accelerator* accelerator) override { return false; } // RenderViewContextMenuProxy implementation. - virtual void AddMenuItem(int command_id, - const base::string16& title) override {} - virtual void AddCheckItem(int command_id, - const base::string16& title) override {} - virtual void AddSeparator() override {} - virtual void AddSubMenu(int command_id, - const base::string16& label, - ui::MenuModel* model) override {} - virtual void UpdateMenuItem(int command_id, - bool enabled, - bool hidden, - const base::string16& title) override {} - virtual RenderViewHost* GetRenderViewHost() const override { - return NULL; - } - virtual content::BrowserContext* GetBrowserContext() const override { + void AddMenuItem(int command_id, const base::string16& title) override {} + void AddCheckItem(int command_id, const base::string16& title) override {} + void AddSeparator() override {} + void AddSubMenu(int command_id, + const base::string16& label, + ui::MenuModel* model) override {} + void UpdateMenuItem(int command_id, + bool enabled, + bool hidden, + const base::string16& title) override {} + RenderViewHost* GetRenderViewHost() const override { return NULL; } + content::BrowserContext* GetBrowserContext() const override { return profile_.get(); } - virtual content::WebContents* GetWebContents() const override { - return NULL; - } + content::WebContents* GetWebContents() const override { return NULL; } // Attaches a RenderViewContextMenuObserver to be tested. void SetObserver(RenderViewContextMenuObserver* observer) { diff --git a/chrome/browser/renderer_context_menu/spelling_bubble_model.h b/chrome/browser/renderer_context_menu/spelling_bubble_model.h index 4c19a2c..265f90b 100644 --- a/chrome/browser/renderer_context_menu/spelling_bubble_model.h +++ b/chrome/browser/renderer_context_menu/spelling_bubble_model.h @@ -22,17 +22,17 @@ class SpellingBubbleModel : public ConfirmBubbleModel { SpellingBubbleModel(Profile* profile, content::WebContents* web_contents, bool include_autocorrect); - virtual ~SpellingBubbleModel(); + ~SpellingBubbleModel() override; // ConfirmBubbleModel implementation. - virtual base::string16 GetTitle() const override; - virtual base::string16 GetMessageText() const override; - virtual gfx::Image* GetIcon() const override; - virtual base::string16 GetButtonLabel(BubbleButton button) const override; - virtual void Accept() override; - virtual void Cancel() override; - virtual base::string16 GetLinkText() const override; - virtual void LinkClicked() override; + base::string16 GetTitle() const override; + base::string16 GetMessageText() const override; + gfx::Image* GetIcon() const override; + base::string16 GetButtonLabel(BubbleButton button) const override; + void Accept() override; + void Cancel() override; + base::string16 GetLinkText() const override; + void LinkClicked() override; private: // Set the profile preferences to enable or disable the feature. diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer.h b/chrome/browser/renderer_context_menu/spelling_menu_observer.h index c6db4f3..a29965d 100644 --- a/chrome/browser/renderer_context_menu/spelling_menu_observer.h +++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.h @@ -40,15 +40,15 @@ struct SpellCheckResult; class SpellingMenuObserver : public RenderViewContextMenuObserver { public: explicit SpellingMenuObserver(RenderViewContextMenuProxy* proxy); - virtual ~SpellingMenuObserver(); + ~SpellingMenuObserver() override; // RenderViewContextMenuObserver implementation. - virtual void InitMenu(const content::ContextMenuParams& params) override; - virtual bool IsCommandIdSupported(int command_id) override; - virtual bool IsCommandIdChecked(int command_id) override; - virtual bool IsCommandIdEnabled(int command_id) override; - virtual void ExecuteCommand(int command_id) override; - virtual void OnMenuCancel() override; + void InitMenu(const content::ContextMenuParams& params) override; + bool IsCommandIdSupported(int command_id) override; + bool IsCommandIdChecked(int command_id) override; + bool IsCommandIdEnabled(int command_id) override; + void ExecuteCommand(int command_id) override; + void OnMenuCancel() override; // A callback function called when the Spelling service finishes checking a // misspelled word. diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc b/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc index 84cacef..4055cf7 100644 --- a/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc +++ b/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc @@ -46,21 +46,19 @@ class MockRenderViewContextMenu : public RenderViewContextMenuProxy { virtual ~MockRenderViewContextMenu(); // RenderViewContextMenuProxy implementation. - virtual void AddMenuItem(int command_id, - const base::string16& title) override; - virtual void AddCheckItem(int command_id, - const base::string16& title) override; - virtual void AddSeparator() override; - virtual void AddSubMenu(int command_id, - const base::string16& label, - ui::MenuModel* model) override; - virtual void UpdateMenuItem(int command_id, - bool enabled, - bool hidden, - const base::string16& title) override; - virtual RenderViewHost* GetRenderViewHost() const override; - virtual WebContents* GetWebContents() const override; - virtual content::BrowserContext* GetBrowserContext() const override; + void AddMenuItem(int command_id, const base::string16& title) override; + void AddCheckItem(int command_id, const base::string16& title) override; + void AddSeparator() override; + void AddSubMenu(int command_id, + const base::string16& label, + ui::MenuModel* model) override; + void UpdateMenuItem(int command_id, + bool enabled, + bool hidden, + const base::string16& title) override; + RenderViewHost* GetRenderViewHost() const override; + WebContents* GetWebContents() const override; + content::BrowserContext* GetBrowserContext() const override; // Attaches a RenderViewContextMenuObserver to be tested. void SetObserver(RenderViewContextMenuObserver* observer); @@ -206,11 +204,9 @@ class SpellingMenuObserverTest : public InProcessBrowserTest { public: SpellingMenuObserverTest(); - virtual void SetUpOnMainThread() override { - Reset(false); - } + void SetUpOnMainThread() override { Reset(false); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { observer_.reset(); menu_.reset(); } diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h index 2ca9d25..5ae309b 100644 --- a/chrome/browser/renderer_host/chrome_extension_message_filter.h +++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h @@ -35,17 +35,16 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, ChromeExtensionMessageFilter(int render_process_id, Profile* profile); // content::BrowserMessageFilter methods: - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OverrideThreadForMessage( - const IPC::Message& message, - content::BrowserThread::ID* thread) override; - virtual void OnDestruct() const override; + bool OnMessageReceived(const IPC::Message& message) override; + void OverrideThreadForMessage(const IPC::Message& message, + content::BrowserThread::ID* thread) override; + void OnDestruct() const override; private: friend class content::BrowserThread; friend class base::DeleteHelper<ChromeExtensionMessageFilter>; - virtual ~ChromeExtensionMessageFilter(); + ~ChromeExtensionMessageFilter() override; // TODO(jamescook): Move these functions into the extensions module. Ideally // this would be in extensions::ExtensionMessageFilter but that will require @@ -101,9 +100,9 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, const ExtensionHostMsg_APIActionOrEvent_Params& params); // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; const int render_process_id_; diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.h b/chrome/browser/renderer_host/chrome_render_message_filter.h index fb1ab3e..e9d6859 100644 --- a/chrome/browser/renderer_host/chrome_render_message_filter.h +++ b/chrome/browser/renderer_host/chrome_render_message_filter.h @@ -45,16 +45,15 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter { }; // content::BrowserMessageFilter methods: - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OverrideThreadForMessage( - const IPC::Message& message, - content::BrowserThread::ID* thread) override; + bool OnMessageReceived(const IPC::Message& message) override; + void OverrideThreadForMessage(const IPC::Message& message, + content::BrowserThread::ID* thread) override; private: friend class content::BrowserThread; friend class base::DeleteHelper<ChromeRenderMessageFilter>; - virtual ~ChromeRenderMessageFilter(); + ~ChromeRenderMessageFilter() override; void OnDnsPrefetch(const std::vector<std::string>& hostnames); void OnPreconnect(const GURL& url); diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm index 24525c6..f443200 100644 --- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm +++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm @@ -46,11 +46,10 @@ class SpellCheckObserver : public content::WebContentsObserver { view_delegate_(view_delegate) { } - virtual ~SpellCheckObserver() { - } + ~SpellCheckObserver() override {} private: - virtual bool OnMessageReceived(const IPC::Message& message) override { + bool OnMessageReceived(const IPC::Message& message) override { bool handled = true; IPC_BEGIN_MESSAGE_MAP(SpellCheckObserver, message) IPC_MESSAGE_HANDLER(SpellCheckHostMsg_ToggleSpellCheck, diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm index 6c571a3..6531706 100644 --- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm +++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm @@ -82,7 +82,7 @@ class ChromeRenderWidgetHostViewMacHistorySwiperTest base_path, base::FilePath(FILE_PATH_LITERAL("iframe.html"))); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { event_queue_.reset([[NSMutableArray alloc] init]); touch_ = CGPointMake(0.5, 0.5); @@ -93,9 +93,7 @@ class ChromeRenderWidgetHostViewMacHistorySwiperTest ASSERT_EQ(url2_, GetWebContents()->GetURL()); } - virtual void TearDownOnMainThread() override { - event_queue_.reset(); - } + void TearDownOnMainThread() override { event_queue_.reset(); } protected: // Returns the active web contents. diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h index 915e24c..fc41b85 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h @@ -35,21 +35,20 @@ class ChromeResourceDispatcherHostDelegate // |prerender_tracker| must outlive |this|. explicit ChromeResourceDispatcherHostDelegate( prerender::PrerenderTracker* prerender_tracker); - virtual ~ChromeResourceDispatcherHostDelegate(); + ~ChromeResourceDispatcherHostDelegate() override; // ResourceDispatcherHostDelegate implementation. - virtual bool ShouldBeginRequest( - const std::string& method, - const GURL& url, - content::ResourceType resource_type, - content::ResourceContext* resource_context) override; - virtual void RequestBeginning( + bool ShouldBeginRequest(const std::string& method, + const GURL& url, + content::ResourceType resource_type, + content::ResourceContext* resource_context) override; + void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, content::ResourceType resource_type, ScopedVector<content::ResourceThrottle>* throttles) override; - virtual void DownloadStarting( + void DownloadStarting( net::URLRequest* request, content::ResourceContext* resource_context, int child_id, @@ -58,32 +57,29 @@ class ChromeResourceDispatcherHostDelegate bool is_content_initiated, bool must_download, ScopedVector<content::ResourceThrottle>* throttles) override; - virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( - net::AuthChallengeInfo* auth_info, net::URLRequest* request) override; - virtual bool HandleExternalProtocol(const GURL& url, - int child_id, - int route_id) override; - virtual bool ShouldForceDownloadResource( - const GURL& url, const std::string& mime_type) override; - virtual bool ShouldInterceptResourceAsStream( - net::URLRequest* request, - const std::string& mime_type, - GURL* origin, - std::string* payload) override; - virtual void OnStreamCreated( - net::URLRequest* request, - scoped_ptr<content::StreamInfo> stream) override; - virtual void OnResponseStarted( - net::URLRequest* request, - content::ResourceContext* resource_context, - content::ResourceResponse* response, - IPC::Sender* sender) override; - virtual void OnRequestRedirected( - const GURL& redirect_url, - net::URLRequest* request, - content::ResourceContext* resource_context, - content::ResourceResponse* response) override; - virtual void RequestComplete(net::URLRequest* url_request) override; + content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( + net::AuthChallengeInfo* auth_info, + net::URLRequest* request) override; + bool HandleExternalProtocol(const GURL& url, + int child_id, + int route_id) override; + bool ShouldForceDownloadResource(const GURL& url, + const std::string& mime_type) override; + bool ShouldInterceptResourceAsStream(net::URLRequest* request, + const std::string& mime_type, + GURL* origin, + std::string* payload) override; + void OnStreamCreated(net::URLRequest* request, + scoped_ptr<content::StreamInfo> stream) override; + void OnResponseStarted(net::URLRequest* request, + content::ResourceContext* resource_context, + content::ResourceResponse* response, + IPC::Sender* sender) override; + void OnRequestRedirected(const GURL& redirect_url, + net::URLRequest* request, + content::ResourceContext* resource_context, + content::ResourceResponse* response) override; + void RequestComplete(net::URLRequest* url_request) override; // Called on the UI thread. Allows switching out the // ExternalProtocolHandler::Delegate for testing code. diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc index db46868..e504412 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc @@ -57,9 +57,9 @@ class TestDispatcherHostDelegate : public ChromeResourceDispatcherHostDelegate { : ChromeResourceDispatcherHostDelegate(prerender_tracker) { } - virtual ~TestDispatcherHostDelegate() {} + ~TestDispatcherHostDelegate() override {} - virtual void RequestBeginning( + void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, @@ -74,11 +74,10 @@ class TestDispatcherHostDelegate : public ChromeResourceDispatcherHostDelegate { request_headers_.MergeFrom(request->extra_request_headers()); } - virtual void OnRequestRedirected( - const GURL& redirect_url, - net::URLRequest* request, - content::ResourceContext* resource_context, - content::ResourceResponse* response) override { + void OnRequestRedirected(const GURL& redirect_url, + net::URLRequest* request, + content::ResourceContext* resource_context, + content::ResourceResponse* response) override { ChromeResourceDispatcherHostDelegate::OnRequestRedirected( redirect_url, request, @@ -100,7 +99,7 @@ class ChromeResourceDispatcherHostDelegateBrowserTest : public: ChromeResourceDispatcherHostDelegateBrowserTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { InProcessBrowserTest::SetUpOnMainThread(); // Hook navigations with our delegate. dispatcher_host_delegate_.reset(new TestDispatcherHostDelegate( @@ -130,7 +129,7 @@ class ChromeResourceDispatcherHostDelegateBrowserTest : } } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { content::ResourceDispatcherHost::Get()->SetDelegate(NULL); dispatcher_host_delegate_.reset(); } diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h index 23c853a..dbb60f4 100644 --- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h +++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h @@ -18,9 +18,9 @@ class ChromeBrowserPepperHostFactory : public ppapi::host::HostFactory { public: // Non-owning pointer to the filter must outlive this class. explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host); - virtual ~ChromeBrowserPepperHostFactory(); + ~ChromeBrowserPepperHostFactory() override; - virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( + scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( ppapi::host::PpapiHost* host, const ppapi::proxy::ResourceMessageCallParams& params, PP_Instance instance, diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h index 56ed650..44627c6 100644 --- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h @@ -29,12 +29,12 @@ class PepperBrokerMessageFilter : public ppapi::host::ResourceMessageFilter { content::BrowserPpapiHost* host); private: - virtual ~PepperBrokerMessageFilter(); + ~PepperBrokerMessageFilter() override; // ppapi::host::ResourceMessageFilter overrides. - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& message) override; - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h index 51122b9..96dd943 100644 --- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h +++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h @@ -30,10 +30,10 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost { PepperFlashBrowserHost(content::BrowserPpapiHost* host, PP_Instance instance, PP_Resource resource); - virtual ~PepperFlashBrowserHost(); + ~PepperFlashBrowserHost() override; // ppapi::host::ResourceHost override. - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h index ab2770f..ff07eb7 100644 --- a/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h @@ -39,14 +39,14 @@ class PepperFlashClipboardMessageFilter protected: // ppapi::host::ResourceMessageFilter overrides. - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& msg) override; - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; private: - virtual ~PepperFlashClipboardMessageFilter(); + ~PepperFlashClipboardMessageFilter() override; int32_t OnMsgRegisterCustomFormat( ppapi::host::HostMessageContext* host_context, diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h index 0ef76c9..902545f 100644 --- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h +++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h @@ -28,10 +28,10 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost { PepperFlashDRMHost(content::BrowserPpapiHost* host, PP_Instance instance, PP_Resource resource); - virtual ~PepperFlashDRMHost(); + ~PepperFlashDRMHost() override; // ResourceHost override. - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h index df4bd46..a8ccb91 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h @@ -38,9 +38,9 @@ class PepperIsolatedFileSystemMessageFilter content::BrowserPpapiHost* host); // ppapi::host::ResourceMessageFilter implementation. - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& msg) override; - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; @@ -50,7 +50,7 @@ class PepperIsolatedFileSystemMessageFilter const GURL& document_url, ppapi::host::PpapiHost* ppapi_host_); - virtual ~PepperIsolatedFileSystemMessageFilter(); + ~PepperIsolatedFileSystemMessageFilter() override; Profile* GetProfile(); diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h index f0461e4..c9e575e 100644 --- a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h @@ -32,13 +32,13 @@ class PepperOutputProtectionMessageFilter #endif // ppapi::host::ResourceMessageFilter overrides. - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& msg) override; - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; - virtual ~PepperOutputProtectionMessageFilter(); + ~PepperOutputProtectionMessageFilter() override; int32_t OnQueryStatus(ppapi::host::HostMessageContext* context); int32_t OnEnableProtection(ppapi::host::HostMessageContext* context, diff --git a/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h index b2c0b33..42a5647 100644 --- a/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h @@ -29,12 +29,12 @@ class PepperPlatformVerificationMessageFilter PP_Instance instance); private: - virtual ~PepperPlatformVerificationMessageFilter(); + ~PepperPlatformVerificationMessageFilter() override; // ppapi::host::ResourceMessageFilter overrides. - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& message) override; - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; diff --git a/chrome/browser/renderer_host/pepper/pepper_talk_host.h b/chrome/browser/renderer_host/pepper/pepper_talk_host.h index a61a323..9a71788 100644 --- a/chrome/browser/renderer_host/pepper/pepper_talk_host.h +++ b/chrome/browser/renderer_host/pepper/pepper_talk_host.h @@ -27,11 +27,11 @@ class PepperTalkHost : public ppapi::host::ResourceHost { PepperTalkHost(content::BrowserPpapiHost* host, PP_Instance instance, PP_Resource resource); - virtual ~PepperTalkHost(); + ~PepperTalkHost() override; private: // ResourceHost override. - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) override; diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc index da4b8ece..c5e3ac6 100644 --- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc +++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc @@ -219,7 +219,7 @@ class ChromeRenderProcessHostTest : public InProcessBrowserTest { class ChromeRenderProcessHostTestWithCommandLine : public ChromeRenderProcessHostTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); } }; @@ -462,7 +462,7 @@ class WindowDestroyer : public content::WebContentsObserver { tab_strip_model_(model) { } - virtual void RenderProcessGone(base::TerminationStatus status) override { + void RenderProcessGone(base::TerminationStatus status) override { // Wait for the window to be destroyed, which will ensure all other // RenderViewHost objects are deleted before we return and proceed with // the next iteration of notifications. diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h index aa4a400..c11db66 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h +++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h @@ -54,14 +54,14 @@ class SafeBrowsingResourceThrottle SafeBrowsingService* safe_browsing); // content::ResourceThrottle implementation (called on IO thread): - virtual void WillStartRequest(bool* defer) override; - virtual void WillRedirectRequest(const GURL& new_url, bool* defer) override; - virtual const char* GetNameForLogging() const override; + void WillStartRequest(bool* defer) override; + void WillRedirectRequest(const GURL& new_url, bool* defer) override; + const char* GetNameForLogging() const override; // SafeBrowsingDabaseManager::Client implementation (called on IO thread): - virtual void OnCheckBrowseUrlResult(const GURL& url, - SBThreatType result, - const std::string& metadata) override; + void OnCheckBrowseUrlResult(const GURL& url, + SBThreatType result, + const std::string& metadata) override; private: // Describes what phase of the check a throttle is in. @@ -78,7 +78,7 @@ class SafeBrowsingResourceThrottle DEFERRED_REDIRECT, }; - virtual ~SafeBrowsingResourceThrottle(); + ~SafeBrowsingResourceThrottle() override; // SafeBrowsingService::UrlCheckCallback implementation. void OnBlockingPageComplete(bool proceed); diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h index 6fe6f6f..23779c6 100644 --- a/chrome/browser/repost_form_warning_controller.h +++ b/chrome/browser/repost_form_warning_controller.h @@ -16,19 +16,19 @@ class RepostFormWarningController : public TabModalConfirmDialogDelegate, public content::WebContentsObserver { public: explicit RepostFormWarningController(content::WebContents* web_contents); - virtual ~RepostFormWarningController(); + ~RepostFormWarningController() override; private: // TabModalConfirmDialogDelegate methods: - virtual base::string16 GetTitle() override; - virtual base::string16 GetDialogMessage() override; - virtual base::string16 GetAcceptButtonTitle() override; - virtual void OnAccepted() override; - virtual void OnCanceled() override; - virtual void OnClosed() override; + base::string16 GetTitle() override; + base::string16 GetDialogMessage() override; + base::string16 GetAcceptButtonTitle() override; + void OnAccepted() override; + void OnCanceled() override; + void OnClosed() override; // content::WebContentsObserver methods: - virtual void BeforeFormRepostWarningShow() override; + void BeforeFormRepostWarningShow() override; DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); }; diff --git a/chrome/browser/safe_json_parser.h b/chrome/browser/safe_json_parser.h index ebdae86..67ca547 100644 --- a/chrome/browser/safe_json_parser.h +++ b/chrome/browser/safe_json_parser.h @@ -36,7 +36,7 @@ class SafeJsonParser : public content::UtilityProcessHostClient { void Start(); private: - virtual ~SafeJsonParser(); + ~SafeJsonParser() override; void StartWorkOnIOThread(); @@ -47,7 +47,7 @@ class SafeJsonParser : public content::UtilityProcessHostClient { void ReportResultOnUIThread(); // Implementing pieces of the UtilityProcessHostClient interface. - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; const std::string unsafe_json_; SuccessCallback success_callback_; diff --git a/chrome/browser/search/hotword_service.h b/chrome/browser/search/hotword_service.h index b2b2188..3a70003 100644 --- a/chrome/browser/search/hotword_service.h +++ b/chrome/browser/search/hotword_service.h @@ -43,22 +43,20 @@ class HotwordService : public content::NotificationObserver, static bool IsExperimentalHotwordingEnabled(); explicit HotwordService(Profile* profile); - virtual ~HotwordService(); + ~HotwordService() override; // Overridden from content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Overridden from ExtensionRegisterObserver: - virtual void OnExtensionInstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - bool is_update) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionInstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + bool is_update) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + extensions::UninstallReason reason) override; // Checks for whether all the necessary files have downloaded to allow for // using the extension. diff --git a/chrome/browser/search/hotword_service_factory.h b/chrome/browser/search/hotword_service_factory.h index c07b651..44b655d 100644 --- a/chrome/browser/search/hotword_service_factory.h +++ b/chrome/browser/search/hotword_service_factory.h @@ -36,7 +36,7 @@ class HotwordServiceFactory : public MediaCaptureDevicesDispatcher::Observer, static bool IsMicrophoneAvailable(); // Overridden from MediaCaptureDevicesDispatcher::Observer - virtual void OnUpdateAudioDevices( + void OnUpdateAudioDevices( const content::MediaStreamDevices& devices) override; // This will kick off the monitor that calls OnUpdateAudioDevices when the @@ -51,12 +51,12 @@ class HotwordServiceFactory : public MediaCaptureDevicesDispatcher::Observer, friend struct DefaultSingletonTraits<HotwordServiceFactory>; HotwordServiceFactory(); - virtual ~HotwordServiceFactory(); + ~HotwordServiceFactory() override; // Overrides from BrowserContextKeyedServiceFactory: - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; // Must be called from the UI thread since the instance of diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc index 27377ea..8300371 100644 --- a/chrome/browser/search/hotword_service_unittest.cc +++ b/chrome/browser/search/hotword_service_unittest.cc @@ -32,13 +32,12 @@ class MockHotwordService : public HotwordService { uninstall_count_(0) { } - virtual bool UninstallHotwordExtension( - ExtensionService* extension_service) override { + bool UninstallHotwordExtension(ExtensionService* extension_service) override { uninstall_count_++; return HotwordService::UninstallHotwordExtension(extension_service); } - virtual void InstallHotwordExtensionFromWebstore() override{ + void InstallHotwordExtensionFromWebstore() override { scoped_ptr<base::DictionaryValue> manifest = extensions::DictionaryBuilder() .Set("name", "Hotword Test Extension") diff --git a/chrome/browser/search/iframe_source.h b/chrome/browser/search/iframe_source.h index c1a9348..80beefc 100644 --- a/chrome/browser/search/iframe_source.h +++ b/chrome/browser/search/iframe_source.h @@ -13,15 +13,13 @@ class IframeSource : public content::URLDataSource { public: IframeSource(); - virtual ~IframeSource(); + ~IframeSource() override; protected: // Overridden from content::URLDataSource: - virtual std::string GetMimeType( - const std::string& path_and_query) const override; - virtual bool ShouldDenyXFrameOptions() const override; - virtual bool ShouldServiceRequest( - const net::URLRequest* request) const override; + std::string GetMimeType(const std::string& path_and_query) const override; + bool ShouldDenyXFrameOptions() const override; + bool ShouldServiceRequest(const net::URLRequest* request) const override; // Returns whether this source should serve data for a particular path. virtual bool ServesPath(const std::string& path) const = 0; diff --git a/chrome/browser/search/iframe_source_unittest.cc b/chrome/browser/search/iframe_source_unittest.cc index 284e8d4..4adfe03 100644 --- a/chrome/browser/search/iframe_source_unittest.cc +++ b/chrome/browser/search/iframe_source_unittest.cc @@ -38,27 +38,23 @@ class TestIframeSource : public IframeSource { using IframeSource::SendJSWithOrigin; protected: - virtual std::string GetSource() const override { - return "test"; - } + std::string GetSource() const override { return "test"; } - virtual bool ServesPath(const std::string& path) const override { + bool ServesPath(const std::string& path) const override { return path == "/valid.html" || path == "/valid.js"; } - virtual void StartDataRequest( + void StartDataRequest( const std::string& path, int render_process_id, int render_frame_id, - const content::URLDataSource::GotDataCallback& callback) override { - } + const content::URLDataSource::GotDataCallback& callback) override {} // RenderFrameHost is hard to mock in concert with everything else, so stub // this method out for testing. - virtual bool GetOrigin( - int process_id, - int render_frame_id, - std::string* origin) const override { + bool GetOrigin(int process_id, + int render_frame_id, + std::string* origin) const override { if (process_id == kInstantRendererPID) { *origin = kInstantOrigin; return true; diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h index dca960e..3c02356 100644 --- a/chrome/browser/search/instant_service.h +++ b/chrome/browser/search/instant_service.h @@ -38,7 +38,7 @@ class InstantService : public KeyedService, public TemplateURLServiceObserver { public: explicit InstantService(Profile* profile); - virtual ~InstantService(); + ~InstantService() override; // Add, remove, and query RenderProcessHost IDs that are associated with // Instant processes. @@ -105,18 +105,18 @@ class InstantService : public KeyedService, SendsSearchURLsToRenderer); // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // TemplateURLServiceObserver: // Caches the previous value of the Default Search Provider and the Google // base URL to filter out changes other than those affecting the Default // Search Provider. - virtual void OnTemplateURLServiceChanged() override; + void OnTemplateURLServiceChanged() override; // Called when a renderer process is terminated. void OnRendererProcessTerminated(int process_id); diff --git a/chrome/browser/search/instant_service_factory.h b/chrome/browser/search/instant_service_factory.h index c027083d..223515f 100644 --- a/chrome/browser/search/instant_service_factory.h +++ b/chrome/browser/search/instant_service_factory.h @@ -25,12 +25,12 @@ class InstantServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<InstantServiceFactory>; InstantServiceFactory(); - virtual ~InstantServiceFactory(); + ~InstantServiceFactory() override; // Overridden from BrowserContextKeyedServiceFactory: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(InstantServiceFactory); diff --git a/chrome/browser/search/instant_unittest_base.h b/chrome/browser/search/instant_unittest_base.h index 5c0694b..2aa48f6 100644 --- a/chrome/browser/search/instant_unittest_base.h +++ b/chrome/browser/search/instant_unittest_base.h @@ -50,7 +50,7 @@ class InstantUnitTestBase : public BrowserWithTestWindowTest { private: // BrowserWithTestWindowTest override: - virtual TestingProfile* CreateProfile() override; + TestingProfile* CreateProfile() override; void SetUpHelper(); }; diff --git a/chrome/browser/search/local_ntp_source.h b/chrome/browser/search/local_ntp_source.h index 59ea6f7..1b987d2 100644 --- a/chrome/browser/search/local_ntp_source.h +++ b/chrome/browser/search/local_ntp_source.h @@ -18,19 +18,18 @@ class LocalNtpSource : public content::URLDataSource { explicit LocalNtpSource(Profile* profile); private: - virtual ~LocalNtpSource(); + ~LocalNtpSource() override; // Overridden from content::URLDataSource: - virtual std::string GetSource() const override; - virtual void StartDataRequest( + std::string GetSource() const override; + void StartDataRequest( const std::string& path, int render_process_id, int render_frame_id, const content::URLDataSource::GotDataCallback& callback) override; - virtual std::string GetMimeType(const std::string& path) const override; - virtual bool ShouldServiceRequest( - const net::URLRequest* request) const override; - virtual std::string GetContentSecurityPolicyFrameSrc() const override; + std::string GetMimeType(const std::string& path) const override; + bool ShouldServiceRequest(const net::URLRequest* request) const override; + std::string GetContentSecurityPolicyFrameSrc() const override; // Sends a local resource with a specific |class_name| substituted. void SendResourceWithClass( diff --git a/chrome/browser/search/most_visited_iframe_source.h b/chrome/browser/search/most_visited_iframe_source.h index f48445d..9399573 100644 --- a/chrome/browser/search/most_visited_iframe_source.h +++ b/chrome/browser/search/most_visited_iframe_source.h @@ -15,7 +15,7 @@ class MostVisitedIframeSource : public IframeSource { public: MostVisitedIframeSource(); - virtual ~MostVisitedIframeSource(); + ~MostVisitedIframeSource() override; // Number of Most Visited elements on the NTP for logging purposes. static const int kNumMostVisited; @@ -23,7 +23,7 @@ class MostVisitedIframeSource : public IframeSource { static const char kMostVisitedHistogramName[]; // Overridden from IframeSource. Public for testing. - virtual void StartDataRequest( + void StartDataRequest( const std::string& path_and_query, int render_process_id, int render_frame_id, @@ -31,9 +31,9 @@ class MostVisitedIframeSource : public IframeSource { protected: // Overridden from IframeSource: - virtual std::string GetSource() const override; + std::string GetSource() const override; - virtual bool ServesPath(const std::string& path) const override; + bool ServesPath(const std::string& path) const override; private: FRIEND_TEST_ALL_PREFIXES(MostVisitedIframeSourceTest, diff --git a/chrome/browser/search/search_terms_tracker.h b/chrome/browser/search/search_terms_tracker.h index 75b3046..d22f28b 100644 --- a/chrome/browser/search/search_terms_tracker.h +++ b/chrome/browser/search/search_terms_tracker.h @@ -28,7 +28,7 @@ namespace chrome { class SearchTermsTracker : public content::NotificationObserver { public: SearchTermsTracker(); - virtual ~SearchTermsTracker(); + ~SearchTermsTracker() override; // Returns the current search terms and navigation index of the corresponding // search results page for the specified WebContents. This function will @@ -39,9 +39,9 @@ class SearchTermsTracker : public content::NotificationObserver { int* navigation_index) const; // content::NotificationObserver - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: struct TabData { diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc index 7dd549e..b3bfe2b 100644 --- a/chrome/browser/search/search_unittest.cc +++ b/chrome/browser/search/search_unittest.cc @@ -759,8 +759,7 @@ TEST_F(SearchTest, IsQueryExtractionAllowedForURL) { class SearchURLTest : public SearchTest { protected: - virtual void SetSearchProvider(bool set_ntp_url, bool insecure_ntp_url) - override { + void SetSearchProvider(bool set_ntp_url, bool insecure_ntp_url) override { TemplateURLService* template_url_service = TemplateURLServiceFactory::GetForProfile(profile()); TemplateURLData data; diff --git a/chrome/browser/search/suggestions/image_fetcher_impl.h b/chrome/browser/search/suggestions/image_fetcher_impl.h index 5610f47..63b1ec2 100644 --- a/chrome/browser/search/suggestions/image_fetcher_impl.h +++ b/chrome/browser/search/suggestions/image_fetcher_impl.h @@ -27,18 +27,18 @@ class ImageFetcherImpl : public ImageFetcher, public chrome::BitmapFetcherDelegate { public: explicit ImageFetcherImpl(net::URLRequestContextGetter* url_request_context); - virtual ~ImageFetcherImpl(); + ~ImageFetcherImpl() override; - virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; + void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; - virtual void StartOrQueueNetworkRequest( - const GURL& url, const GURL& image_url, + void StartOrQueueNetworkRequest( + const GURL& url, + const GURL& image_url, base::Callback<void(const GURL&, const SkBitmap*)> callback) override; private: // Inherited from BitmapFetcherDelegate. Runs on the UI thread. - virtual void OnFetchComplete(const GURL image_url, - const SkBitmap* bitmap) override; + void OnFetchComplete(const GURL image_url, const SkBitmap* bitmap) override; typedef std::vector<base::Callback<void(const GURL&, const SkBitmap*)> > CallbackVector; diff --git a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc index 9f32ba9..904a637 100644 --- a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc +++ b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc @@ -34,11 +34,10 @@ class TestImageFetcherDelegate : public ImageFetcherDelegate { TestImageFetcherDelegate() : num_delegate_valid_called_(0), num_delegate_null_called_(0) {} - virtual ~TestImageFetcherDelegate() {}; + ~TestImageFetcherDelegate() override{}; // Perform additional tasks when an image has been fetched. - virtual void OnImageFetched(const GURL& url, const SkBitmap* bitmap) - override { + void OnImageFetched(const GURL& url, const SkBitmap* bitmap) override { if (bitmap) { num_delegate_valid_called_++; } else { @@ -65,14 +64,12 @@ class ImageFetcherImplBrowserTest : public InProcessBrowserTest { net::SpawnedTestServer::kLocalhost, base::FilePath(kDocRoot)) {} - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ASSERT_TRUE(test_server_.Start()); InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); } - virtual void TearDownInProcessBrowserTestFixture() override { - test_server_.Stop(); - } + void TearDownInProcessBrowserTestFixture() override { test_server_.Stop(); } ImageFetcherImpl* CreateImageFetcher() { ImageFetcherImpl* fetcher = diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.h b/chrome/browser/search/suggestions/suggestions_service_factory.h index ad3719b..bc337d1 100644 --- a/chrome/browser/search/suggestions/suggestions_service_factory.h +++ b/chrome/browser/search/suggestions/suggestions_service_factory.h @@ -27,14 +27,14 @@ class SuggestionsServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<SuggestionsServiceFactory>; SuggestionsServiceFactory(); - virtual ~SuggestionsServiceFactory(); + ~SuggestionsServiceFactory() override; // Overrides from BrowserContextKeyedServiceFactory: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceFactory); diff --git a/chrome/browser/search/suggestions/suggestions_source.h b/chrome/browser/search/suggestions/suggestions_source.h index a724abb..eb31cb4 100644 --- a/chrome/browser/search/suggestions/suggestions_source.h +++ b/chrome/browser/search/suggestions/suggestions_source.h @@ -30,16 +30,18 @@ class SuggestionsSource : public content::URLDataSource { explicit SuggestionsSource(Profile* profile); // content::URLDataSource implementation. - virtual std::string GetSource() const override; - virtual void StartDataRequest( - const std::string& path, int render_process_id, int render_frame_id, + std::string GetSource() const override; + void StartDataRequest( + const std::string& path, + int render_process_id, + int render_frame_id, const content::URLDataSource::GotDataCallback& callback) override; - virtual std::string GetMimeType(const std::string& path) const override; - virtual base::MessageLoop* MessageLoopForRequestPath( + std::string GetMimeType(const std::string& path) const override; + base::MessageLoop* MessageLoopForRequestPath( const std::string& path) const override; private: - virtual ~SuggestionsSource(); + ~SuggestionsSource() override; // Container for the state of a request. struct RequestContext { diff --git a/chrome/browser/search_engines/chrome_template_url_service_client.h b/chrome/browser/search_engines/chrome_template_url_service_client.h index 877e5ad..a62a135 100644 --- a/chrome/browser/search_engines/chrome_template_url_service_client.h +++ b/chrome/browser/search_engines/chrome_template_url_service_client.h @@ -16,26 +16,24 @@ class ChromeTemplateURLServiceClient : public TemplateURLServiceClient, public history::HistoryServiceObserver { public: explicit ChromeTemplateURLServiceClient(HistoryService* history_service); - virtual ~ChromeTemplateURLServiceClient(); + ~ChromeTemplateURLServiceClient() override; // TemplateURLServiceClient: - virtual void Shutdown() override; - virtual void SetOwner(TemplateURLService* owner) override; - virtual void DeleteAllSearchTermsForKeyword( - history::KeywordID keyword_Id) override; - virtual void SetKeywordSearchTermsForURL(const GURL& url, - TemplateURLID id, - const base::string16& term) override; - virtual void AddKeywordGeneratedVisit(const GURL& url) override; - virtual void RestoreExtensionInfoIfNecessary( - TemplateURL* template_url) override; + void Shutdown() override; + void SetOwner(TemplateURLService* owner) override; + void DeleteAllSearchTermsForKeyword(history::KeywordID keyword_Id) override; + void SetKeywordSearchTermsForURL(const GURL& url, + TemplateURLID id, + const base::string16& term) override; + void AddKeywordGeneratedVisit(const GURL& url) override; + void RestoreExtensionInfoIfNecessary(TemplateURL* template_url) override; // history::HistoryServiceObserver: - virtual void OnURLVisited(HistoryService* history_service, - ui::PageTransition transition, - const history::URLRow& row, - const history::RedirectList& redirects, - base::Time visit_time) override; + void OnURLVisited(HistoryService* history_service, + ui::PageTransition transition, + const history::URLRow& row, + const history::RedirectList& redirects, + base::Time visit_time) override; private: TemplateURLService* owner_; diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc index 9a42e9e..ea12fb77 100644 --- a/chrome/browser/search_engines/search_provider_install_data.cc +++ b/chrome/browser/search_engines/search_provider_install_data.cc @@ -60,7 +60,7 @@ class IOThreadSearchTermsData : public SearchTermsData { explicit IOThreadSearchTermsData(const std::string& google_base_url); // Implementation of SearchTermsData. - virtual std::string GoogleBaseURLValue() const override; + std::string GoogleBaseURLValue() const override; private: std::string google_base_url_; @@ -121,11 +121,10 @@ class GoogleURLObserver : public content::RenderProcessHostObserver { content::RenderProcessHost* host); // Implementation of content::RenderProcessHostObserver. - virtual void RenderProcessHostDestroyed( - content::RenderProcessHost* host) override; + void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; private: - virtual ~GoogleURLObserver() {} + ~GoogleURLObserver() override {} // Callback that is called when the Google URL is updated. void OnGoogleURLUpdated(); diff --git a/chrome/browser/search_engines/search_provider_install_state_message_filter.h b/chrome/browser/search_engines/search_provider_install_state_message_filter.h index 64e1867..1cf2379 100644 --- a/chrome/browser/search_engines/search_provider_install_state_message_filter.h +++ b/chrome/browser/search_engines/search_provider_install_state_message_filter.h @@ -22,10 +22,10 @@ class SearchProviderInstallStateMessageFilter Profile* profile); // content::BrowserMessageFilter implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: - virtual ~SearchProviderInstallStateMessageFilter(); + ~SearchProviderInstallStateMessageFilter() override; // Figures out the install state for the search provider. search_provider::InstallState GetSearchProviderInstallState( diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.h b/chrome/browser/search_engines/template_url_fetcher_factory.h index a4b75c4..65f82c0 100644 --- a/chrome/browser/search_engines/template_url_fetcher_factory.h +++ b/chrome/browser/search_engines/template_url_fetcher_factory.h @@ -28,12 +28,12 @@ class TemplateURLFetcherFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<TemplateURLFetcherFactory>; TemplateURLFetcherFactory(); - virtual ~TemplateURLFetcherFactory(); + ~TemplateURLFetcherFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcherFactory); diff --git a/chrome/browser/search_engines/template_url_service_factory.h b/chrome/browser/search_engines/template_url_service_factory.h index e7f1e2f..9939278 100644 --- a/chrome/browser/search_engines/template_url_service_factory.h +++ b/chrome/browser/search_engines/template_url_service_factory.h @@ -25,16 +25,16 @@ class TemplateURLServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<TemplateURLServiceFactory>; TemplateURLServiceFactory(); - virtual ~TemplateURLServiceFactory(); + ~TemplateURLServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; }; #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_FACTORY_H_ 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 4c739f4..1d3748c 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -27,10 +27,9 @@ class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { : ChromeTemplateURLServiceClient(history_service), search_term_(search_term) {} - virtual void SetKeywordSearchTermsForURL( - const GURL& url, - TemplateURLID id, - const base::string16& term) override { + void SetKeywordSearchTermsForURL(const GURL& url, + TemplateURLID id, + const base::string16& term) override { *search_term_ = term; } diff --git a/chrome/browser/search_engines/template_url_service_test_util.h b/chrome/browser/search_engines/template_url_service_test_util.h index af72cdf..6428f18 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.h +++ b/chrome/browser/search_engines/template_url_service_test_util.h @@ -23,10 +23,10 @@ class TestingSearchTermsData; class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { public: TemplateURLServiceTestUtil(); - virtual ~TemplateURLServiceTestUtil(); + ~TemplateURLServiceTestUtil() override; // TemplateURLServiceObserver implemementation. - virtual void OnTemplateURLServiceChanged() override; + void OnTemplateURLServiceChanged() override; // Gets the observer count. int GetObserverCount(); diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.h b/chrome/browser/search_engines/ui_thread_search_terms_data.h index 811c60f..616bdd0 100644 --- a/chrome/browser/search_engines/ui_thread_search_terms_data.h +++ b/chrome/browser/search_engines/ui_thread_search_terms_data.h @@ -21,22 +21,19 @@ class UIThreadSearchTermsData : public SearchTermsData { // values, and NTPIsThemedParam() will return an empty string. explicit UIThreadSearchTermsData(Profile* profile); - virtual std::string GoogleBaseURLValue() const override; - virtual std::string GetApplicationLocale() const override; - virtual base::string16 GetRlzParameterValue(bool from_app_list) const - override; - virtual std::string GetSearchClient() const override; - virtual std::string GetSuggestClient() const override; - virtual std::string GetSuggestRequestIdentifier() const override; - virtual bool EnableAnswersInSuggest() const override; - virtual bool IsShowingSearchTermsOnSearchResultsPages() const override; - virtual std::string InstantExtendedEnabledParam( - bool for_search) const override; - virtual std::string ForceInstantResultsParam( - bool for_prerender) const override; - virtual int OmniboxStartMargin() const override; - virtual std::string NTPIsThemedParam() const override; - virtual std::string GoogleImageSearchSource() const override; + std::string GoogleBaseURLValue() const override; + std::string GetApplicationLocale() const override; + base::string16 GetRlzParameterValue(bool from_app_list) const override; + std::string GetSearchClient() const override; + std::string GetSuggestClient() const override; + std::string GetSuggestRequestIdentifier() const override; + bool EnableAnswersInSuggest() const override; + bool IsShowingSearchTermsOnSearchResultsPages() const override; + std::string InstantExtendedEnabledParam(bool for_search) const override; + std::string ForceInstantResultsParam(bool for_prerender) const override; + int OmniboxStartMargin() const override; + std::string NTPIsThemedParam() const override; + std::string GoogleImageSearchSource() const override; // Used by tests to override the value for the Google base URL. Passing the // empty string cancels this override. diff --git a/chrome/browser/service_process/service_process_control.h b/chrome/browser/service_process/service_process_control.h index 35ab57a..8a1074b 100644 --- a/chrome/browser/service_process/service_process_control.h +++ b/chrome/browser/service_process/service_process_control.h @@ -98,17 +98,17 @@ class ServiceProcessControl : public IPC::Sender, virtual void Disconnect(); // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelConnected(int32 peer_pid) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelConnected(int32 peer_pid) override; + void OnChannelError() override; // IPC::Sender implementation - virtual bool Send(IPC::Message* message) override; + bool Send(IPC::Message* message) override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Send a shutdown message to the service process. IPC channel will be // destroyed after calling this method. @@ -177,7 +177,7 @@ class ServiceProcessControl : public IPC::Sender, friend class CloudPrintProxyPolicyStartupTest; ServiceProcessControl(); - virtual ~ServiceProcessControl(); + ~ServiceProcessControl() override; friend struct DefaultSingletonTraits<ServiceProcessControl>; diff --git a/chrome/browser/service_process/service_process_control_browsertest.cc b/chrome/browser/service_process/service_process_control_browsertest.cc index d82b753..5f1ceaa 100644 --- a/chrome/browser/service_process/service_process_control_browsertest.cc +++ b/chrome/browser/service_process/service_process_control_browsertest.cc @@ -118,7 +118,7 @@ class ServiceProcessControlBrowserTest class RealServiceProcessControlBrowserTest : public ServiceProcessControlBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ServiceProcessControlBrowserTest::SetUpCommandLine(command_line); base::FilePath exe; PathService::Get(base::DIR_EXE, &exe); diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc index 584b903..4855b95 100644 --- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc +++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc @@ -20,7 +20,7 @@ namespace { class CustomFakeGCMDriver : public FakeGCMDriver { public: explicit CustomFakeGCMDriver(FakeGCMProfileService* service); - virtual ~CustomFakeGCMDriver(); + ~CustomFakeGCMDriver() override; void OnRegisterFinished(const std::string& app_id, const std::string& registration_id, @@ -33,13 +33,12 @@ class CustomFakeGCMDriver : public FakeGCMDriver { protected: // FakeGCMDriver overrides: - virtual void RegisterImpl( - const std::string& app_id, - const std::vector<std::string>& sender_ids) override; - virtual void UnregisterImpl(const std::string& app_id) override; - virtual void SendImpl(const std::string& app_id, - const std::string& receiver_id, - const GCMClient::OutgoingMessage& message) override; + void RegisterImpl(const std::string& app_id, + const std::vector<std::string>& sender_ids) override; + void UnregisterImpl(const std::string& app_id) override; + void SendImpl(const std::string& app_id, + const std::string& receiver_id, + const GCMClient::OutgoingMessage& message) override; private: FakeGCMProfileService* service_; diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.h b/chrome/browser/services/gcm/fake_gcm_profile_service.h index bc9ade9..2326b99 100644 --- a/chrome/browser/services/gcm/fake_gcm_profile_service.h +++ b/chrome/browser/services/gcm/fake_gcm_profile_service.h @@ -25,7 +25,7 @@ class FakeGCMProfileService : public GCMProfileService { static KeyedService* Build(content::BrowserContext* context); explicit FakeGCMProfileService(Profile* profile); - virtual ~FakeGCMProfileService(); + ~FakeGCMProfileService() override; void RegisterFinished(const std::string& app_id, const std::vector<std::string>& sender_ids); diff --git a/chrome/browser/services/gcm/fake_signin_manager.h b/chrome/browser/services/gcm/fake_signin_manager.h index 451b497..4d1140d 100644 --- a/chrome/browser/services/gcm/fake_signin_manager.h +++ b/chrome/browser/services/gcm/fake_signin_manager.h @@ -33,14 +33,13 @@ class FakeSigninManager : public SigninManager { #endif public: explicit FakeSigninManager(Profile* profile); - virtual ~FakeSigninManager(); + ~FakeSigninManager() override; void SignIn(const std::string& username); #if defined(OS_CHROMEOS) void SignOut(signin_metrics::ProfileSignout signout_source_metric); #else - virtual void SignOut(signin_metrics::ProfileSignout signout_source_metric) - override; + void SignOut(signin_metrics::ProfileSignout signout_source_metric) override; #endif static KeyedService* Build(content::BrowserContext* context); diff --git a/chrome/browser/services/gcm/gcm_account_tracker.h b/chrome/browser/services/gcm/gcm_account_tracker.h index b0588e0..0b1c5e8 100644 --- a/chrome/browser/services/gcm/gcm_account_tracker.h +++ b/chrome/browser/services/gcm/gcm_account_tracker.h @@ -60,7 +60,7 @@ class GCMAccountTracker : public gaia::AccountTracker::Observer, // in the browser context to |driver|. GCMAccountTracker(scoped_ptr<gaia::AccountTracker> account_tracker, GCMDriver* driver); - virtual ~GCMAccountTracker(); + ~GCMAccountTracker() override; // Shuts down the tracker ensuring a proper clean up. After Shutdown() is // called Start() and Stop() should no longer be used. Must be called before @@ -81,21 +81,21 @@ class GCMAccountTracker : public gaia::AccountTracker::Observer, typedef std::map<std::string, AccountInfo> AccountInfos; // AccountTracker::Observer overrides. - virtual void OnAccountAdded(const gaia::AccountIds& ids) override; - virtual void OnAccountRemoved(const gaia::AccountIds& ids) override; - virtual void OnAccountSignInChanged(const gaia::AccountIds& ids, - bool is_signed_in) override; + void OnAccountAdded(const gaia::AccountIds& ids) override; + void OnAccountRemoved(const gaia::AccountIds& ids) override; + void OnAccountSignInChanged(const gaia::AccountIds& ids, + bool is_signed_in) override; // OAuth2TokenService::Consumer overrides. - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // GCMConnectionObserver overrides. - virtual void OnConnected(const net::IPEndPoint& ip_endpoint) override; - virtual void OnDisconnected() override; + void OnConnected(const net::IPEndPoint& ip_endpoint) override; + void OnDisconnected() override; // Report the list of accounts with OAuth2 tokens back using the |callback_| // function. If there are token requests in progress, do nothing. diff --git a/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc b/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc index 2fe1fdb..b9b2b4f 100644 --- a/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc +++ b/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc @@ -68,15 +68,14 @@ void VerifyAccountTokens( class CustomFakeGCMDriver : public FakeGCMDriver { public: CustomFakeGCMDriver(); - virtual ~CustomFakeGCMDriver(); + ~CustomFakeGCMDriver() override; // GCMDriver overrides: - virtual void SetAccountTokens( + void SetAccountTokens( const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; - virtual void AddConnectionObserver(GCMConnectionObserver* observer) override; - virtual void RemoveConnectionObserver( - GCMConnectionObserver* observer) override; - virtual bool IsConnected() const override { return connected_; } + void AddConnectionObserver(GCMConnectionObserver* observer) override; + void RemoveConnectionObserver(GCMConnectionObserver* observer) override; + bool IsConnected() const override { return connected_; } // Test results and helpers. void SetConnected(bool connected); diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc index 8cf374b..c13a3db 100644 --- a/chrome/browser/services/gcm/gcm_profile_service.cc +++ b/chrome/browser/services/gcm/gcm_profile_service.cc @@ -44,11 +44,11 @@ namespace gcm { class GCMProfileService::IdentityObserver : public IdentityProvider::Observer { public: IdentityObserver(Profile* profile, GCMDriver* driver); - virtual ~IdentityObserver(); + ~IdentityObserver() override; // IdentityProvider::Observer: - virtual void OnActiveAccountLogin() override; - virtual void OnActiveAccountLogout() override; + void OnActiveAccountLogin() override; + void OnActiveAccountLogout() override; std::string SignedInUserName() const; diff --git a/chrome/browser/services/gcm/gcm_profile_service.h b/chrome/browser/services/gcm/gcm_profile_service.h index 52ef650..ef3254e 100644 --- a/chrome/browser/services/gcm/gcm_profile_service.h +++ b/chrome/browser/services/gcm/gcm_profile_service.h @@ -42,7 +42,7 @@ class GCMProfileService : public KeyedService { GCMProfileService(Profile* profile, scoped_ptr<GCMClientFactory> gcm_client_factory); #endif - virtual ~GCMProfileService(); + ~GCMProfileService() override; // TODO(jianli): obsolete methods that are going to be removed soon. void AddAppHandler(const std::string& app_id, GCMAppHandler* handler); @@ -52,7 +52,7 @@ class GCMProfileService : public KeyedService { const GCMDriver::RegisterCallback& callback); // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; // Returns the user name if the profile is signed in or an empty string // otherwise. diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.h b/chrome/browser/services/gcm/gcm_profile_service_factory.h index ab46ace..a731be8 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_factory.h +++ b/chrome/browser/services/gcm/gcm_profile_service_factory.h @@ -27,12 +27,12 @@ class GCMProfileServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<GCMProfileServiceFactory>; GCMProfileServiceFactory(); - virtual ~GCMProfileServiceFactory(); + ~GCMProfileServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(GCMProfileServiceFactory); diff --git a/chrome/browser/services/gcm/push_messaging_infobar_delegate.h b/chrome/browser/services/gcm/push_messaging_infobar_delegate.h index caf4d32..702220a 100644 --- a/chrome/browser/services/gcm/push_messaging_infobar_delegate.h +++ b/chrome/browser/services/gcm/push_messaging_infobar_delegate.h @@ -32,11 +32,11 @@ class PushMessagingInfoBarDelegate : public PermissionInfobarDelegate { const GURL& requesting_frame, const std::string& display_languages, ContentSettingsType type); - virtual ~PushMessagingInfoBarDelegate(); + ~PushMessagingInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual base::string16 GetMessageText() const override; - virtual int GetIconID() const override; + base::string16 GetMessageText() const override; + int GetIconID() const override; const GURL requesting_origin_; const std::string display_languages_; diff --git a/chrome/browser/services/gcm/push_messaging_permission_context.h b/chrome/browser/services/gcm/push_messaging_permission_context.h index 9a34b36..819f41e 100644 --- a/chrome/browser/services/gcm/push_messaging_permission_context.h +++ b/chrome/browser/services/gcm/push_messaging_permission_context.h @@ -13,7 +13,7 @@ namespace gcm { class PushMessagingPermissionContext : public PermissionContextBase { public: explicit PushMessagingPermissionContext(Profile* profile); - virtual ~PushMessagingPermissionContext(); + ~PushMessagingPermissionContext() override; private: DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); diff --git a/chrome/browser/services/gcm/push_messaging_permission_context_factory.h b/chrome/browser/services/gcm/push_messaging_permission_context_factory.h index 3c5a288..45be2d3 100644 --- a/chrome/browser/services/gcm/push_messaging_permission_context_factory.h +++ b/chrome/browser/services/gcm/push_messaging_permission_context_factory.h @@ -24,12 +24,12 @@ class PushMessagingPermissionContextFactory friend struct DefaultSingletonTraits<PushMessagingPermissionContextFactory>; PushMessagingPermissionContextFactory(); - virtual ~PushMessagingPermissionContextFactory(); + ~PushMessagingPermissionContextFactory() override; // BrowserContextKeyedBaseFactory methods: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContextFactory); diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.h b/chrome/browser/services/gcm/push_messaging_service_impl.h index 0ef2e6d..b38f377 100644 --- a/chrome/browser/services/gcm/push_messaging_service_impl.h +++ b/chrome/browser/services/gcm/push_messaging_service_impl.h @@ -34,22 +34,22 @@ class PushMessagingServiceImpl : public content::PushMessagingService, PushMessagingServiceImpl(GCMProfileService* gcm_profile_service, Profile* profile); - virtual ~PushMessagingServiceImpl(); + ~PushMessagingServiceImpl() override; // GCMAppHandler implementation. - virtual void ShutdownHandler() override; - virtual void OnMessage(const std::string& app_id, - const GCMClient::IncomingMessage& message) override; - virtual void OnMessagesDeleted(const std::string& app_id) override; - virtual void OnSendError( + void ShutdownHandler() override; + void OnMessage(const std::string& app_id, + const GCMClient::IncomingMessage& message) override; + void OnMessagesDeleted(const std::string& app_id) override; + void OnSendError( const std::string& app_id, const GCMClient::SendErrorDetails& send_error_details) override; - virtual void OnSendAcknowledged(const std::string& app_id, - const std::string& message_id) override; - virtual bool CanHandle(const std::string& app_id) const override; + void OnSendAcknowledged(const std::string& app_id, + const std::string& message_id) override; + bool CanHandle(const std::string& app_id) const override; // content::PushMessagingService implementation: - virtual void Register( + void Register( const GURL& origin, int64 service_worker_registration_id, const std::string& sender_id, diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc index 79dc43f..395ac20 100644 --- a/chrome/browser/sessions/better_session_restore_browsertest.cc +++ b/chrome/browser/sessions/better_session_restore_browsertest.cc @@ -111,9 +111,7 @@ class FakeBackgroundModeManager : public BackgroundModeManager { background_mode_active_ = active; } - virtual bool IsBackgroundModeActive() override { - return background_mode_active_; - } + bool IsBackgroundModeActive() override { return background_mode_active_; } private: bool background_mode_active_; @@ -161,7 +159,7 @@ class BetterSessionRestoreTest : public InProcessBrowserTest { } protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { SessionServiceTestHelper helper( SessionServiceFactory::GetForProfile(browser()->profile())); helper.SetForceBrowserNotAliveWithNoWindows(true); @@ -371,15 +369,15 @@ class ContinueWhereILeftOffTest : public BetterSessionRestoreTest { public: ContinueWhereILeftOffTest() { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BetterSessionRestoreTest::SetUpOnMainThread(); SessionStartupPref::SetStartupPref( browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); } protected: - virtual Browser* QuitBrowserAndRestore(Browser* browser, - bool close_all_windows) override { + Browser* QuitBrowserAndRestore(Browser* browser, + bool close_all_windows) override { content::WindowedNotificationObserver session_restore_observer( chrome::NOTIFICATION_SESSION_RESTORE_DONE, content::NotificationService::AllSources()); @@ -669,7 +667,7 @@ class NoSessionRestoreTest : public BetterSessionRestoreTest { public: NoSessionRestoreTest() { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BetterSessionRestoreTest::SetUpOnMainThread(); SessionStartupPref::SetStartupPref( browser()->profile(), SessionStartupPref(SessionStartupPref::DEFAULT)); diff --git a/chrome/browser/sessions/persistent_tab_restore_service.cc b/chrome/browser/sessions/persistent_tab_restore_service.cc index a10b247..766a3f0 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service.cc @@ -119,17 +119,16 @@ class PersistentTabRestoreService::Delegate public: explicit Delegate(Profile* profile); - virtual ~Delegate(); + ~Delegate() override; // BaseSessionService: - virtual void Save() override; + void Save() override; // TabRestoreServiceHelper::Observer: - virtual void OnClearEntries() override; - virtual void OnRestoreEntryById( - SessionID::id_type id, - Entries::const_iterator entry_iterator) override; - virtual void OnAddEntry() override; + void OnClearEntries() override; + void OnRestoreEntryById(SessionID::id_type id, + Entries::const_iterator entry_iterator) override; + void OnAddEntry() override; void set_tab_restore_service_helper( TabRestoreServiceHelper* tab_restore_service_helper) { diff --git a/chrome/browser/sessions/persistent_tab_restore_service.h b/chrome/browser/sessions/persistent_tab_restore_service.h index 3d59ab7..643030d 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service.h +++ b/chrome/browser/sessions/persistent_tab_restore_service.h @@ -22,30 +22,29 @@ class PersistentTabRestoreService : public TabRestoreService { PersistentTabRestoreService(Profile* profile, TimeFactory* time_factory); - virtual ~PersistentTabRestoreService(); + ~PersistentTabRestoreService() override; // TabRestoreService: - virtual void AddObserver(TabRestoreServiceObserver* observer) override; - virtual void RemoveObserver(TabRestoreServiceObserver* observer) override; - virtual void CreateHistoricalTab(content::WebContents* contents, - int index) override; - virtual void BrowserClosing(TabRestoreServiceDelegate* delegate) override; - virtual void BrowserClosed(TabRestoreServiceDelegate* delegate) override; - virtual void ClearEntries() override; - virtual const Entries& entries() const override; - virtual std::vector<content::WebContents*> RestoreMostRecentEntry( + void AddObserver(TabRestoreServiceObserver* observer) override; + void RemoveObserver(TabRestoreServiceObserver* observer) override; + void CreateHistoricalTab(content::WebContents* contents, int index) override; + void BrowserClosing(TabRestoreServiceDelegate* delegate) override; + void BrowserClosed(TabRestoreServiceDelegate* delegate) override; + void ClearEntries() override; + const Entries& entries() const override; + std::vector<content::WebContents*> RestoreMostRecentEntry( TabRestoreServiceDelegate* delegate, chrome::HostDesktopType host_desktop_type) override; - virtual Tab* RemoveTabEntryById(SessionID::id_type id) override; - virtual std::vector<content::WebContents*> RestoreEntryById( + Tab* RemoveTabEntryById(SessionID::id_type id) override; + std::vector<content::WebContents*> RestoreEntryById( TabRestoreServiceDelegate* delegate, SessionID::id_type id, chrome::HostDesktopType host_desktop_type, WindowOpenDisposition disposition) override; - virtual void LoadTabsFromLastSession() override; - virtual bool IsLoaded() const override; - virtual void DeleteLastSession() override; - virtual void Shutdown() override; + void LoadTabsFromLastSession() override; + bool IsLoaded() const override; + void DeleteLastSession() override; + void Shutdown() override; private: friend class PersistentTabRestoreServiceTest; diff --git a/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc b/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc index a3d538b..8a52e61 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc @@ -46,11 +46,9 @@ class PersistentTabRestoreTimeFactory : public TabRestoreService::TimeFactory { public: PersistentTabRestoreTimeFactory() : time_(base::Time::Now()) {} - virtual ~PersistentTabRestoreTimeFactory() {} + ~PersistentTabRestoreTimeFactory() override {} - virtual base::Time TimeNow() override { - return time_; - } + base::Time TimeNow() override { return time_; } private: base::Time time_; @@ -181,11 +179,9 @@ class TestTabRestoreServiceObserver : public TabRestoreServiceObserver { bool got_loaded() const { return got_loaded_; } // TabRestoreServiceObserver: - virtual void TabRestoreServiceChanged(TabRestoreService* service) override { - } - virtual void TabRestoreServiceDestroyed(TabRestoreService* service) override { - } - virtual void TabRestoreServiceLoaded(TabRestoreService* service) override { + void TabRestoreServiceChanged(TabRestoreService* service) override {} + void TabRestoreServiceDestroyed(TabRestoreService* service) override {} + void TabRestoreServiceLoaded(TabRestoreService* service) override { got_loaded_ = true; } diff --git a/chrome/browser/sessions/restore_on_startup_policy_handler.h b/chrome/browser/sessions/restore_on_startup_policy_handler.h index 4a907c1..3fea806 100644 --- a/chrome/browser/sessions/restore_on_startup_policy_handler.h +++ b/chrome/browser/sessions/restore_on_startup_policy_handler.h @@ -18,13 +18,13 @@ class PolicyMap; class RestoreOnStartupPolicyHandler : public TypeCheckingPolicyHandler { public: RestoreOnStartupPolicyHandler(); - virtual ~RestoreOnStartupPolicyHandler(); + ~RestoreOnStartupPolicyHandler() override; // ConfigurationPolicyHandler methods: - virtual bool CheckPolicySettings(const PolicyMap& policies, - PolicyErrorMap* errors) override; - virtual void ApplyPolicySettings(const PolicyMap& policies, - PrefValueMap* prefs) override; + bool CheckPolicySettings(const PolicyMap& policies, + PolicyErrorMap* errors) override; + void ApplyPolicySettings(const PolicyMap& policies, + PrefValueMap* prefs) override; private: void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index bcace9b..f7f5a1e 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -118,7 +118,7 @@ class TabLoader : public content::NotificationObserver, typedef std::set<RenderWidgetHost*> RenderWidgetHostSet; explicit TabLoader(base::TimeTicks restore_started); - virtual ~TabLoader(); + ~TabLoader() override; // Loads the next tab. If there are no more tabs to load this deletes itself, // otherwise |force_load_timer_| is restarted. @@ -126,12 +126,12 @@ class TabLoader : public content::NotificationObserver, // NotificationObserver method. Removes the specified tab and loads the next // tab. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // net::NetworkChangeNotifier::ConnectionTypeObserver overrides. - virtual void OnConnectionTypeChanged( + void OnConnectionTypeChanged( net::NetworkChangeNotifier::ConnectionType type) override; // Removes the listeners from the specified tab and removes the tab from @@ -686,7 +686,7 @@ class SessionRestoreImpl : public content::NotificationObserver { return web_contents; } - virtual ~SessionRestoreImpl() { + ~SessionRestoreImpl() override { STLDeleteElements(&windows_); active_session_restorers->erase(this); @@ -698,9 +698,9 @@ class SessionRestoreImpl : public content::NotificationObserver { g_browser_process->ReleaseModule(); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { switch (type) { case chrome::NOTIFICATION_BROWSER_CLOSED: delete this; diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc index 38155b3..1dedb15 100644 --- a/chrome/browser/sessions/session_restore_browsertest.cc +++ b/chrome/browser/sessions/session_restore_browsertest.cc @@ -72,7 +72,7 @@ class SessionRestoreTest : public InProcessBrowserTest { } #endif - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { active_browser_list_ = BrowserList::GetInstance(chrome::GetActiveDesktop()); SessionStartupPref pref(SessionStartupPref::LAST); @@ -93,7 +93,7 @@ class SessionRestoreTest : public InProcessBrowserTest { InProcessBrowserTest::SetUpOnMainThread(); } - virtual bool SetUpUserDataDirectory() override { + bool SetUpUserDataDirectory() override { url1_ = ui_test_utils::GetTestUrl( base::FilePath().AppendASCII("session_history"), base::FilePath().AppendASCII("bot1.html")); diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h index 0b0a8b5..d2500fa 100644 --- a/chrome/browser/sessions/session_service.h +++ b/chrome/browser/sessions/session_service.h @@ -72,7 +72,7 @@ class SessionService : public BaseSessionService, // For testing. explicit SessionService(const base::FilePath& save_path); - virtual ~SessionService(); + ~SessionService() override; // Returns true if a new window opening should really be treated like the // start of a session (with potential session restore, startup URLs, etc.). @@ -200,7 +200,7 @@ class SessionService : public BaseSessionService, // Overridden from BaseSessionService because we want some UMA reporting on // session update activities. - virtual void Save() override; + void Save() override; private: // Allow tests to access our innards for testing purposes. @@ -233,14 +233,14 @@ class SessionService : public BaseSessionService, bool RestoreIfNecessary(const std::vector<GURL>& urls_to_open, Browser* browser); - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // chrome::BrowserListObserver - virtual void OnBrowserAdded(Browser* browser) override {} - virtual void OnBrowserRemoved(Browser* browser) override {} - virtual void OnBrowserSetLastActive(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override {} + void OnBrowserRemoved(Browser* browser) override {} + void OnBrowserSetLastActive(Browser* browser) override; // Sets the application extension id of the specified tab. void SetTabExtensionAppID(const SessionID& window_id, @@ -389,7 +389,7 @@ class SessionService : public BaseSessionService, // Schedules the specified command. This method takes ownership of the // command. - virtual void ScheduleCommand(SessionCommand* command) override; + void ScheduleCommand(SessionCommand* command) override; // Converts all pending tab/window closes to commands and schedules them. void CommitPendingCloses(); diff --git a/chrome/browser/sessions/session_service_factory.h b/chrome/browser/sessions/session_service_factory.h index 625e905..2c73d57 100644 --- a/chrome/browser/sessions/session_service_factory.h +++ b/chrome/browser/sessions/session_service_factory.h @@ -59,13 +59,13 @@ class SessionServiceFactory : public BrowserContextKeyedServiceFactory { DetachingTabWithCrashedInfoBar); SessionServiceFactory(); - virtual ~SessionServiceFactory(); + ~SessionServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; }; #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc index 9e11086..21a99f4 100644 --- a/chrome/browser/sessions/session_service_unittest.cc +++ b/chrome/browser/sessions/session_service_unittest.cc @@ -69,9 +69,9 @@ class SessionServiceTest : public BrowserWithTestWindowTest, } // Upon notification, increment the sync_save_count variable - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED); sync_save_count_++; } diff --git a/chrome/browser/sessions/session_tab_helper.h b/chrome/browser/sessions/session_tab_helper.h index b6c5758..c83114a 100644 --- a/chrome/browser/sessions/session_tab_helper.h +++ b/chrome/browser/sessions/session_tab_helper.h @@ -15,7 +15,7 @@ class SessionTabHelper : public content::WebContentsObserver, public content::WebContentsUserData<SessionTabHelper> { public: - virtual ~SessionTabHelper(); + ~SessionTabHelper() override; // Returns the identifier used by session restore for this tab. const SessionID& session_id() const { return session_id_; } @@ -44,10 +44,9 @@ class SessionTabHelper : public content::WebContentsObserver, // content::WebContentsObserver: #if defined(ENABLE_EXTENSIONS) - virtual void RenderViewCreated( - content::RenderViewHost* render_view_host) override; + void RenderViewCreated(content::RenderViewHost* render_view_host) override; #endif - virtual void UserAgentOverrideSet(const std::string& user_agent) override; + void UserAgentOverrideSet(const std::string& user_agent) override; private: explicit SessionTabHelper(content::WebContents* contents); diff --git a/chrome/browser/sessions/tab_restore_browsertest.cc b/chrome/browser/sessions/tab_restore_browsertest.cc index 8df9a6f..2f5bd98 100644 --- a/chrome/browser/sessions/tab_restore_browsertest.cc +++ b/chrome/browser/sessions/tab_restore_browsertest.cc @@ -48,7 +48,7 @@ class WaitForLoadObserver : public TabRestoreServiceObserver { tab_restore_service_->AddObserver(this); } - virtual ~WaitForLoadObserver() { + ~WaitForLoadObserver() override { if (do_wait_) tab_restore_service_->RemoveObserver(this); } @@ -60,10 +60,9 @@ class WaitForLoadObserver : public TabRestoreServiceObserver { private: // Overridden from TabRestoreServiceObserver: - virtual void TabRestoreServiceChanged(TabRestoreService* service) override {} - virtual void TabRestoreServiceDestroyed(TabRestoreService* service) override { - } - virtual void TabRestoreServiceLoaded(TabRestoreService* service) override { + void TabRestoreServiceChanged(TabRestoreService* service) override {} + void TabRestoreServiceDestroyed(TabRestoreService* service) override {} + void TabRestoreServiceLoaded(TabRestoreService* service) override { DCHECK(do_wait_); run_loop_.Quit(); } @@ -87,7 +86,7 @@ class TabRestoreTest : public InProcessBrowserTest { } protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { active_browser_list_ = BrowserList::GetInstance(chrome::GetActiveDesktop()); InProcessBrowserTest::SetUpOnMainThread(); } diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index 12f3b5b..85566c7 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -77,7 +77,7 @@ class TabRestoreService : public KeyedService { // Represents a previously open tab. struct Tab : public Entry { Tab(); - virtual ~Tab(); + ~Tab() override; bool has_browser() const { return browser_id > 0; } @@ -110,7 +110,7 @@ class TabRestoreService : public KeyedService { // Represents a previously open window. struct Window : public Entry { Window(); - virtual ~Window(); + ~Window() override; // The tabs that comprised the window, in order. std::vector<Tab> tabs; @@ -124,7 +124,7 @@ class TabRestoreService : public KeyedService { typedef std::list<Entry*> Entries; - virtual ~TabRestoreService(); + ~TabRestoreService() override; // Adds/removes an observer. TabRestoreService does not take ownership of // the observer. diff --git a/chrome/browser/sessions/tab_restore_service_factory.h b/chrome/browser/sessions/tab_restore_service_factory.h index d07eae3..d5183e24 100644 --- a/chrome/browser/sessions/tab_restore_service_factory.h +++ b/chrome/browser/sessions/tab_restore_service_factory.h @@ -30,12 +30,12 @@ class TabRestoreServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<TabRestoreServiceFactory>; TabRestoreServiceFactory(); - virtual ~TabRestoreServiceFactory(); + ~TabRestoreServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; }; #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_FACTORY_H_ diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 49060c1..d34d3a22 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -275,13 +275,13 @@ class ShellIntegration { explicit DefaultBrowserWorker(DefaultWebClientObserver* observer); private: - virtual ~DefaultBrowserWorker() {} + ~DefaultBrowserWorker() override {} // Check if Chrome is the default browser. - virtual DefaultWebClientState CheckIsDefault() override; + DefaultWebClientState CheckIsDefault() override; // Set Chrome as the default browser. - virtual bool SetAsDefault(bool interactive_permitted) override; + bool SetAsDefault(bool interactive_permitted) override; DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); }; @@ -298,14 +298,14 @@ class ShellIntegration { const std::string& protocol() const { return protocol_; } protected: - virtual ~DefaultProtocolClientWorker() {} + ~DefaultProtocolClientWorker() override {} private: // Check is Chrome is the default handler for this protocol. - virtual DefaultWebClientState CheckIsDefault() override; + DefaultWebClientState CheckIsDefault() override; // Set Chrome as the default handler for this protocol. - virtual bool SetAsDefault(bool interactive_permitted) override; + bool SetAsDefault(bool interactive_permitted) override; std::string protocol_; diff --git a/chrome/browser/spellchecker/feedback_sender.h b/chrome/browser/spellchecker/feedback_sender.h index c48c235..80b23dd 100644 --- a/chrome/browser/spellchecker/feedback_sender.h +++ b/chrome/browser/spellchecker/feedback_sender.h @@ -57,7 +57,7 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>, FeedbackSender(net::URLRequestContextGetter* request_context, const std::string& language, const std::string& country); - virtual ~FeedbackSender(); + ~FeedbackSender() override; // Records that user selected suggestion |suggestion_index| for the // misspelling identified by |hash|. @@ -114,7 +114,7 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>, friend class FeedbackSenderTest; // net::URLFetcherDelegate implementation. Takes ownership of |source|. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Requests the document markers from all of the renderers to determine which // feedback can be finalized. Finalizes feedback for renderers that are gone. diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h index ac2eaad..b8b329e 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h @@ -75,7 +75,7 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary, }; explicit SpellcheckCustomDictionary(const base::FilePath& path); - virtual ~SpellcheckCustomDictionary(); + ~SpellcheckCustomDictionary() override; // Returns the in-memory cache of words in the custom dictionary. const chrome::spellcheck_common::WordSet& GetWords() const; @@ -106,18 +106,17 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary, bool IsSyncing(); // Overridden from SpellcheckDictionary: - virtual void Load() override; + void Load() override; // Overridden from syncer::SyncableService: - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> sync_error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncDataList GetAllSyncData( - syncer::ModelType type) const override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc index 7b54dd7..ea63572 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc @@ -118,10 +118,10 @@ class SyncErrorFactoryStub : public syncer::SyncErrorFactory { public: explicit SyncErrorFactoryStub(int* error_counter) : error_counter_(error_counter) {} - virtual ~SyncErrorFactoryStub() {} + ~SyncErrorFactoryStub() override {} // Overridden from syncer::SyncErrorFactory: - virtual syncer::SyncError CreateAndUploadError( + syncer::SyncError CreateAndUploadError( const tracked_objects::Location& location, const std::string& message) override { (*error_counter_)++; @@ -146,9 +146,11 @@ class DictionaryObserverCounter : public SpellcheckCustomDictionary::Observer { int changes() const { return changes_; } // Overridden from SpellcheckCustomDictionary::Observer: - virtual void OnCustomDictionaryLoaded() override { loads_++; } - virtual void OnCustomDictionaryChanged( - const SpellcheckCustomDictionary::Change& change) override { changes_++; } + void OnCustomDictionaryLoaded() override { loads_++; } + void OnCustomDictionaryChanged( + const SpellcheckCustomDictionary::Change& change) override { + changes_++; + } private: int loads_; diff --git a/chrome/browser/spellchecker/spellcheck_factory.h b/chrome/browser/spellchecker/spellcheck_factory.h index 38a19f2..3e4ad0e 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.h +++ b/chrome/browser/spellchecker/spellcheck_factory.h @@ -29,16 +29,16 @@ class SpellcheckServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<SpellcheckServiceFactory>; SpellcheckServiceFactory(); - virtual ~SpellcheckServiceFactory(); + ~SpellcheckServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT); diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h index bf32c6f..7f95df4 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h @@ -48,10 +48,10 @@ class SpellcheckHunspellDictionary const std::string& language, net::URLRequestContextGetter* request_context_getter, SpellcheckService* spellcheck_service); - virtual ~SpellcheckHunspellDictionary(); + ~SpellcheckHunspellDictionary() override; // SpellcheckDictionary implementation: - virtual void Load() override; + void Load() override; // Retry downloading |dictionary_file_|. void RetryDownloadDictionary( @@ -104,7 +104,7 @@ class SpellcheckHunspellDictionary // net::URLFetcherDelegate implementation. Called when dictionary download // finishes. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Determine the correct url to download the dictionary. GURL GetDictionaryURL(); diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.h b/chrome/browser/spellchecker/spellcheck_message_filter.h index 0eebe13..dbc8f9c 100644 --- a/chrome/browser/spellchecker/spellcheck_message_filter.h +++ b/chrome/browser/spellchecker/spellcheck_message_filter.h @@ -21,15 +21,14 @@ class SpellCheckMessageFilter : public content::BrowserMessageFilter { explicit SpellCheckMessageFilter(int render_process_id); // content::BrowserMessageFilter implementation. - virtual void OverrideThreadForMessage( - const IPC::Message& message, - content::BrowserThread::ID* thread) override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void OverrideThreadForMessage(const IPC::Message& message, + content::BrowserThread::ID* thread) override; + bool OnMessageReceived(const IPC::Message& message) override; private: friend class TestingSpellCheckMessageFilter; - virtual ~SpellCheckMessageFilter(); + ~SpellCheckMessageFilter() override; void OnSpellCheckerRequestDictionary(); void OnNotifyChecked(const base::string16& word, bool misspelled); diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_mac.h b/chrome/browser/spellchecker/spellcheck_message_filter_mac.h index 469715c..18129b3 100644 --- a/chrome/browser/spellchecker/spellcheck_message_filter_mac.h +++ b/chrome/browser/spellchecker/spellcheck_message_filter_mac.h @@ -18,10 +18,9 @@ class SpellCheckMessageFilterMac : public content::BrowserMessageFilter { explicit SpellCheckMessageFilterMac(int render_process_id); // BrowserMessageFilter implementation. - virtual void OverrideThreadForMessage( - const IPC::Message& message, - content::BrowserThread::ID* thread) override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void OverrideThreadForMessage(const IPC::Message& message, + content::BrowserThread::ID* thread) override; + bool OnMessageReceived(const IPC::Message& message) override; // Adjusts remote_results by examining local_results. Any result that's both // local and remote stays type SPELLING, all others are flagged GRAMMAR. @@ -34,7 +33,7 @@ class SpellCheckMessageFilterMac : public content::BrowserMessageFilter { friend class TestingSpellCheckMessageFilter; friend class SpellcheckMessageFilterMacTest; - virtual ~SpellCheckMessageFilterMac(); + ~SpellCheckMessageFilterMac() override; void OnCheckSpelling(const base::string16& word, int route_id, bool* correct); void OnFillSuggestionList(const base::string16& word, diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc b/chrome/browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc index 54bf480..6d3cd68 100644 --- a/chrome/browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc +++ b/chrome/browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc @@ -22,7 +22,7 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilterMac { : SpellCheckMessageFilterMac(0), loop_(loop) { } - virtual bool Send(IPC::Message* message) override { + bool Send(IPC::Message* message) override { sent_messages_.push_back(message); loop_->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); return true; @@ -32,7 +32,7 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilterMac { base::MessageLoopForUI* loop_; private: - virtual ~TestingSpellCheckMessageFilter() {} + ~TestingSpellCheckMessageFilter() override {} }; typedef InProcessBrowserTest SpellCheckMessageFilterMacBrowserTest; diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc b/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc index 0ac5154..fc750a5 100644 --- a/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc @@ -19,12 +19,12 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilter { : SpellCheckMessageFilter(0), spellcheck_(new SpellcheckService(&profile_)) {} - virtual bool Send(IPC::Message* message) override { + bool Send(IPC::Message* message) override { sent_messages.push_back(message); return true; } - virtual SpellcheckService* GetSpellcheckService() const override { + SpellcheckService* GetSpellcheckService() const override { return spellcheck_.get(); } @@ -43,7 +43,7 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilter { ScopedVector<IPC::Message> sent_messages; private: - virtual ~TestingSpellCheckMessageFilter() {} + ~TestingSpellCheckMessageFilter() override {} content::TestBrowserThreadBundle thread_bundle_; TestingProfile profile_; diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h index a0b22f8..84db1ce 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h @@ -53,7 +53,7 @@ class SpellcheckService : public KeyedService, }; explicit SpellcheckService(content::BrowserContext* context); - virtual ~SpellcheckService(); + ~SpellcheckService() override; // This function computes a vector of strings which are to be displayed in // the context menu over a text area for changing spell check languages. It @@ -109,20 +109,20 @@ class SpellcheckService : public KeyedService, bool UnloadExternalDictionary(std::string path); // NotificationProfile implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // SpellcheckCustomDictionary::Observer implementation. - virtual void OnCustomDictionaryLoaded() override; - virtual void OnCustomDictionaryChanged( + void OnCustomDictionaryLoaded() override; + void OnCustomDictionaryChanged( const SpellcheckCustomDictionary::Change& dictionary_change) override; // SpellcheckHunspellDictionary::Observer implementation. - virtual void OnHunspellDictionaryInitialized() override; - virtual void OnHunspellDictionaryDownloadBegin() override; - virtual void OnHunspellDictionaryDownloadSuccess() override; - virtual void OnHunspellDictionaryDownloadFailure() override; + void OnHunspellDictionaryInitialized() override; + void OnHunspellDictionaryDownloadBegin() override; + void OnHunspellDictionaryDownloadSuccess() override; + void OnHunspellDictionaryDownloadFailure() override; private: FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT); diff --git a/chrome/browser/spellchecker/spelling_service_client.h b/chrome/browser/spellchecker/spelling_service_client.h index 4af6bf9..4b5b4df 100644 --- a/chrome/browser/spellchecker/spelling_service_client.h +++ b/chrome/browser/spellchecker/spelling_service_client.h @@ -76,7 +76,7 @@ class SpellingServiceClient : public net::URLFetcherDelegate { TextCheckCompleteCallback; SpellingServiceClient(); - virtual ~SpellingServiceClient(); + ~SpellingServiceClient() override; // Sends a text-check request to the Spelling service. When we send a request // to the Spelling service successfully, this function returns true. (This @@ -110,7 +110,7 @@ class SpellingServiceClient : public net::URLFetcherDelegate { }; // net::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Creates a URLFetcher object used for sending a JSON-RPC request. This // function is overridden by unit tests to prevent them from actually sending diff --git a/chrome/browser/spellchecker/spelling_service_client_unittest.cc b/chrome/browser/spellchecker/spelling_service_client_unittest.cc index 59185b1..3f2516d 100644 --- a/chrome/browser/spellchecker/spelling_service_client_unittest.cc +++ b/chrome/browser/spellchecker/spelling_service_client_unittest.cc @@ -45,11 +45,10 @@ class TestSpellingURLFetcher : public net::TestURLFetcher { set_response_code(status); SetResponseString(response); } - virtual ~TestSpellingURLFetcher() { - } + ~TestSpellingURLFetcher() override {} - virtual void SetUploadData(const std::string& upload_content_type, - const std::string& upload_content) override { + void SetUploadData(const std::string& upload_content_type, + const std::string& upload_content) override { // Verify the given content type is JSON. (The Spelling service returns an // internal server error when this content type is not JSON.) EXPECT_EQ("application/json", upload_content_type); @@ -79,7 +78,7 @@ class TestSpellingURLFetcher : public net::TestURLFetcher { net::TestURLFetcher::SetUploadData(upload_content_type, upload_content); } - virtual void Start() override { + void Start() override { // Verify that this client does not either send cookies to the Spelling // service or accept cookies from it. EXPECT_EQ(net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES, @@ -122,8 +121,7 @@ class TestingSpellingServiceClient : public SpellingServiceClient { success_(false), fetcher_(NULL) { } - virtual ~TestingSpellingServiceClient() { - } + ~TestingSpellingServiceClient() override {} void SetHTTPRequest(int type, const std::string& text, @@ -168,7 +166,7 @@ class TestingSpellingServiceClient : public SpellingServiceClient { } private: - virtual net::URLFetcher* CreateURLFetcher(const GURL& url) override { + 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_, diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate.h b/chrome/browser/ssl/chrome_ssl_host_state_delegate.h index 4ac81ef..e4e6480 100644 --- a/chrome/browser/ssl/chrome_ssl_host_state_delegate.h +++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate.h @@ -24,21 +24,20 @@ class DictionaryValue; class ChromeSSLHostStateDelegate : public content::SSLHostStateDelegate { public: explicit ChromeSSLHostStateDelegate(Profile* profile); - virtual ~ChromeSSLHostStateDelegate(); + ~ChromeSSLHostStateDelegate() override; // SSLHostStateDelegate: - virtual void AllowCert(const std::string& host, - const net::X509Certificate& cert, - net::CertStatus error) override; - virtual void Clear() override; - virtual CertJudgment QueryPolicy(const std::string& host, - const net::X509Certificate& cert, - net::CertStatus error, - bool* expired_previous_decision) override; - virtual void HostRanInsecureContent(const std::string& host, - int pid) override; - virtual bool DidHostRunInsecureContent(const std::string& host, - int pid) const override; + void AllowCert(const std::string& host, + const net::X509Certificate& cert, + net::CertStatus error) override; + void Clear() override; + CertJudgment QueryPolicy(const std::string& host, + const net::X509Certificate& cert, + net::CertStatus error, + bool* expired_previous_decision) override; + void HostRanInsecureContent(const std::string& host, int pid) override; + bool DidHostRunInsecureContent(const std::string& host, + int pid) const override; // Revokes all SSL certificate error allow exceptions made by the user for // |host| in the given Profile. diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.cc b/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.cc index 18f7348..74adcd6 100644 --- a/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.cc +++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.cc @@ -21,7 +21,7 @@ class Service : public KeyedService { ChromeSSLHostStateDelegate* decisions() { return decisions_.get(); } - virtual void Shutdown() override {} + void Shutdown() override {} private: scoped_ptr<ChromeSSLHostStateDelegate> decisions_; diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h b/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h index e6cc4a4..6cfb203 100644 --- a/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h +++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h @@ -26,14 +26,14 @@ class ChromeSSLHostStateDelegateFactory friend struct DefaultSingletonTraits<ChromeSSLHostStateDelegateFactory>; ChromeSSLHostStateDelegateFactory(); - virtual ~ChromeSSLHostStateDelegateFactory(); + ~ChromeSSLHostStateDelegateFactory() override; // BrowserContextKeyedBaseFactory methods: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegateFactory); diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc b/chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc index 657de50..82e307c 100644 --- a/chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc +++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc @@ -298,7 +298,7 @@ IN_PROC_BROWSER_TEST_F(ChromeSSLHostStateDelegateTest, QueryPolicyExpired) { class IncognitoSSLHostStateDelegateTest : public ChromeSSLHostStateDelegateTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ChromeSSLHostStateDelegateTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kRememberCertErrorDecisions, kDeltaSecondsString); @@ -379,7 +379,7 @@ IN_PROC_BROWSER_TEST_F(IncognitoSSLHostStateDelegateTest, AfterRestart) { // won't be remembered over a restart. class ForGetSSLHostStateDelegateTest : public ChromeSSLHostStateDelegateTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ChromeSSLHostStateDelegateTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kRememberCertErrorDecisions, kForgetAtSessionEnd); @@ -425,7 +425,7 @@ IN_PROC_BROWSER_TEST_F(ForGetSSLHostStateDelegateTest, AfterRestart) { class ForgetInstantlySSLHostStateDelegateTest : public ChromeSSLHostStateDelegateTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ChromeSSLHostStateDelegateTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kRememberCertErrorDecisions, kForgetInstantly); @@ -465,7 +465,7 @@ IN_PROC_BROWSER_TEST_F(ForgetInstantlySSLHostStateDelegateTest, // specified. class RememberSSLHostStateDelegateTest : public ChromeSSLHostStateDelegateTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ChromeSSLHostStateDelegateTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kRememberCertErrorDecisions, kDeltaSecondsString); diff --git a/chrome/browser/ssl/ssl_add_certificate.cc b/chrome/browser/ssl/ssl_add_certificate.cc index 86f3c8c..bac7ee5 100644 --- a/chrome/browser/ssl/ssl_add_certificate.cc +++ b/chrome/browser/ssl/ssl_add_certificate.cc @@ -43,35 +43,31 @@ class SSLAddCertificateInfoBarDelegate : public ConfirmInfoBarDelegate { private: explicit SSLAddCertificateInfoBarDelegate(net::X509Certificate* cert) : cert_(cert) {} - virtual ~SSLAddCertificateInfoBarDelegate() {} + ~SSLAddCertificateInfoBarDelegate() override {} // ConfirmInfoBarDelegate implementation: - virtual int GetIconID() const override { + int GetIconID() const override { // TODO(davidben): Use a more appropriate icon. return IDR_INFOBAR_SAVE_PASSWORD; } - virtual Type GetInfoBarType() const override { - return PAGE_ACTION_TYPE; - } + Type GetInfoBarType() const override { return PAGE_ACTION_TYPE; } - virtual base::string16 GetMessageText() const override { + base::string16 GetMessageText() const override { // TODO(evanm): GetDisplayName should return UTF-16. return l10n_util::GetStringFUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_LABEL, base::UTF8ToUTF16( cert_->issuer().GetDisplayName())); } - virtual int GetButtons() const override { - return BUTTON_OK; - } + int GetButtons() const override { return BUTTON_OK; } - virtual base::string16 GetButtonLabel(InfoBarButton button) const override { + base::string16 GetButtonLabel(InfoBarButton button) const override { DCHECK_EQ(BUTTON_OK, button); return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON); } - virtual bool Accept() override { + bool Accept() override { WebContents* web_contents = InfoBarService::WebContentsFromInfoBar(infobar()); ShowCertificateViewer(web_contents, diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index e1a568b..ff575ae5 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -57,7 +57,7 @@ class SSLBlockingPage : public content::InterstitialPageDelegate { EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 2 }; - virtual ~SSLBlockingPage(); + ~SSLBlockingPage() override; // Create an interstitial and show it. void Show(); @@ -82,13 +82,12 @@ class SSLBlockingPage : public content::InterstitialPageDelegate { protected: // InterstitialPageDelegate implementation. - virtual std::string GetHTMLContents() override; - virtual void CommandReceived(const std::string& command) override; - virtual void OverrideEntry(content::NavigationEntry* entry) override; - virtual void OverrideRendererPrefs( - content::RendererPreferences* prefs) override; - virtual void OnProceed() override; - virtual void OnDontProceed() override; + std::string GetHTMLContents() override; + void CommandReceived(const std::string& command) override; + void OverrideEntry(content::NavigationEntry* entry) override; + void OverrideRendererPrefs(content::RendererPreferences* prefs) override; + void OnProceed() override; + void OnDontProceed() override; private: void NotifyDenyCertificate(); diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index 48a22d0..b737a752 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -78,7 +78,7 @@ class ProvisionalLoadWaiter : public content::WebContentsObserver { content::RunMessageLoop(); } - virtual void DidFailProvisionalLoad( + void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, @@ -187,7 +187,7 @@ class SSLUITest : public InProcessBrowserTest { SSLOptions(SSLOptions::CERT_EXPIRED), net::GetWebSocketTestDataDirectory()) {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + 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 @@ -365,7 +365,7 @@ class SSLUITestBlock : public SSLUITest { SSLUITestBlock() : SSLUITest() {} // Browser will neither run nor display insecure content. - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(switches::kNoDisplayingInsecureContent); } }; @@ -374,7 +374,7 @@ class SSLUITestIgnoreCertErrors : public SSLUITest { public: SSLUITestIgnoreCertErrors() : SSLUITest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { // Browser will ignore certificate errors. command_line->AppendSwitch(switches::kIgnoreCertificateErrors); } diff --git a/chrome/browser/ssl/ssl_client_auth_observer.h b/chrome/browser/ssl/ssl_client_auth_observer.h index 74b4a60..62e3fde 100644 --- a/chrome/browser/ssl/ssl_client_auth_observer.h +++ b/chrome/browser/ssl/ssl_client_auth_observer.h @@ -25,7 +25,7 @@ class SSLClientAuthObserver : public content::NotificationObserver { const content::BrowserContext* browser_context, const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback); - virtual ~SSLClientAuthObserver(); + ~SSLClientAuthObserver() override; // UI should implement this to close the dialog. virtual void OnCertSelectedByNotification() = 0; @@ -51,9 +51,9 @@ class SSLClientAuthObserver : public content::NotificationObserver { private: // content::NotificationObserver implementation: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; const content::BrowserContext* browser_context_; scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; diff --git a/chrome/browser/ssl/ssl_client_certificate_selector_test.h b/chrome/browser/ssl/ssl_client_certificate_selector_test.h index 57e598b..ca8c6fe 100644 --- a/chrome/browser/ssl/ssl_client_certificate_selector_test.h +++ b/chrome/browser/ssl/ssl_client_certificate_selector_test.h @@ -21,9 +21,9 @@ class SSLClientCertificateSelectorTestBase : public InProcessBrowserTest { virtual ~SSLClientCertificateSelectorTestBase(); // InProcessBrowserTest: - virtual void SetUpInProcessBrowserTestFixture() override; - virtual void SetUpOnMainThread() override; - virtual void TearDownOnMainThread() override; + void SetUpInProcessBrowserTestFixture() override; + void SetUpOnMainThread() override; + void TearDownOnMainThread() override; virtual void SetUpOnIOThread(); virtual void TearDownOnIOThread(); diff --git a/chrome/browser/ssl/ssl_error_classification.h b/chrome/browser/ssl/ssl_error_classification.h index 44539d6..bdcd8bc 100644 --- a/chrome/browser/ssl/ssl_error_classification.h +++ b/chrome/browser/ssl/ssl_error_classification.h @@ -31,7 +31,7 @@ class SSLErrorClassification : public content::NotificationObserver { const GURL& url, int cert_error, const net::X509Certificate& cert); - virtual ~SSLErrorClassification(); + ~SSLErrorClassification() override; // Returns true if the system time is in the past. static bool IsUserClockInThePast(const base::Time& time_now); @@ -126,10 +126,9 @@ class SSLErrorClassification : public content::NotificationObserver { float CalculateScoreEnvironments() const; // content::NotificationObserver: - virtual void Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; content::WebContents* web_contents_; // This stores the current time. diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc index 528df58..25162b3 100644 --- a/chrome/browser/status_icons/desktop_notification_balloon.cc +++ b/chrome/browser/status_icons/desktop_notification_balloon.cc @@ -38,20 +38,20 @@ class DummyNotificationDelegate : public NotificationDelegate { explicit DummyNotificationDelegate(const std::string& id, Profile* profile) : id_(kNotificationPrefix + id), profile_(profile) {} - virtual void Display() override { + void Display() override { base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind( &CloseBalloon, id(), NotificationUIManager::GetProfileID(profile_)), base::TimeDelta::FromSeconds(kTimeoutSeconds)); } - virtual void Error() override {} - virtual void Close(bool by_user) override {} - virtual void Click() override {} - virtual std::string id() const override { return id_; } + void Error() override {} + void Close(bool by_user) override {} + void Click() override {} + std::string id() const override { return id_; } private: - virtual ~DummyNotificationDelegate() {} + ~DummyNotificationDelegate() override {} std::string id_; Profile* profile_; diff --git a/chrome/browser/status_icons/status_icon_menu_model.h b/chrome/browser/status_icons/status_icon_menu_model.h index bb9185f..6eb4a5e 100644 --- a/chrome/browser/status_icons/status_icon_menu_model.h +++ b/chrome/browser/status_icons/status_icon_menu_model.h @@ -53,7 +53,7 @@ class StatusIconMenuModel // The Delegate can be NULL. explicit StatusIconMenuModel(Delegate* delegate); - virtual ~StatusIconMenuModel(); + ~StatusIconMenuModel() override; // Methods for seting the state of specific command ids. void SetCommandIdChecked(int command_id, bool checked); @@ -77,20 +77,19 @@ class StatusIconMenuModel void RemoveObserver(Observer* observer); // Overridden from ui::SimpleMenuModel::Delegate: - virtual bool IsCommandIdChecked(int command_id) const override; - virtual bool IsCommandIdEnabled(int command_id) const override; - virtual bool IsCommandIdVisible(int command_id) const override; - virtual bool GetAcceleratorForCommandId( - int command_id, ui::Accelerator* accelerator) override; - virtual bool IsItemForCommandIdDynamic(int command_id) const override; - virtual base::string16 GetLabelForCommandId(int command_id) const override; - virtual base::string16 GetSublabelForCommandId(int command_id) const override; - virtual bool GetIconForCommandId(int command_id, gfx::Image* icon) const - override; + bool IsCommandIdChecked(int command_id) const override; + bool IsCommandIdEnabled(int command_id) const override; + bool IsCommandIdVisible(int command_id) const override; + bool GetAcceleratorForCommandId(int command_id, + ui::Accelerator* accelerator) override; + bool IsItemForCommandIdDynamic(int command_id) const override; + base::string16 GetLabelForCommandId(int command_id) const override; + base::string16 GetSublabelForCommandId(int command_id) const override; + bool GetIconForCommandId(int command_id, gfx::Image* icon) const override; protected: // Overriden from ui::SimpleMenuModel: - virtual void MenuItemsChanged() override; + void MenuItemsChanged() override; void NotifyMenuStateChanged(); @@ -99,8 +98,8 @@ class StatusIconMenuModel private: // Overridden from ui::SimpleMenuModel::Delegate: - virtual void CommandIdHighlighted(int command_id) override; - virtual void ExecuteCommand(int command_id, int event_flags) override; + void CommandIdHighlighted(int command_id) override; + void ExecuteCommand(int command_id, int event_flags) override; struct ItemState; diff --git a/chrome/browser/status_icons/status_icon_menu_model_unittest.cc b/chrome/browser/status_icons/status_icon_menu_model_unittest.cc index d1e1d76..b0d73f6e 100644 --- a/chrome/browser/status_icons/status_icon_menu_model_unittest.cc +++ b/chrome/browser/status_icons/status_icon_menu_model_unittest.cc @@ -39,9 +39,7 @@ class StatusIconMenuModelTest : public testing::Test, } private: - virtual void OnMenuStateChanged() override { - ++changed_count_; - } + void OnMenuStateChanged() override { ++changed_count_; } scoped_ptr<StatusIconMenuModel> menu_; int changed_count_; diff --git a/chrome/browser/status_icons/status_icon_unittest.cc b/chrome/browser/status_icons/status_icon_unittest.cc index f5879e3..a108b79 100644 --- a/chrome/browser/status_icons/status_icon_unittest.cc +++ b/chrome/browser/status_icons/status_icon_unittest.cc @@ -18,13 +18,12 @@ class MockStatusIconObserver : public StatusIconObserver { class TestStatusIcon : public StatusIcon { public: TestStatusIcon() {} - virtual void SetImage(const gfx::ImageSkia& image) override {} - virtual void SetToolTip(const base::string16& tool_tip) override {} - virtual void UpdatePlatformContextMenu( - StatusIconMenuModel* menu) override {} - virtual void DisplayBalloon(const gfx::ImageSkia& icon, - const base::string16& title, - const base::string16& contents) override {} + void SetImage(const gfx::ImageSkia& image) override {} + void SetToolTip(const base::string16& tool_tip) override {} + void UpdatePlatformContextMenu(StatusIconMenuModel* menu) override {} + void DisplayBalloon(const gfx::ImageSkia& icon, + const base::string16& title, + const base::string16& contents) override {} }; TEST(StatusIconTest, ObserverAdd) { diff --git a/chrome/browser/status_icons/status_tray_unittest.cc b/chrome/browser/status_icons/status_tray_unittest.cc index 36ba782..12adee3 100644 --- a/chrome/browser/status_icons/status_tray_unittest.cc +++ b/chrome/browser/status_icons/status_tray_unittest.cc @@ -13,18 +13,17 @@ #include "ui/gfx/image/image_skia.h" class MockStatusIcon : public StatusIcon { - virtual void SetImage(const gfx::ImageSkia& image) override {} - virtual void SetToolTip(const base::string16& tool_tip) override {} - virtual void DisplayBalloon(const gfx::ImageSkia& icon, - const base::string16& title, - const base::string16& contents) override {} - virtual void UpdatePlatformContextMenu( - StatusIconMenuModel* menu) override {} + void SetImage(const gfx::ImageSkia& image) override {} + void SetToolTip(const base::string16& tool_tip) override {} + void DisplayBalloon(const gfx::ImageSkia& icon, + const base::string16& title, + const base::string16& contents) override {} + void UpdatePlatformContextMenu(StatusIconMenuModel* menu) override {} }; class TestStatusTray : public StatusTray { public: - virtual StatusIcon* CreatePlatformStatusIcon( + StatusIcon* CreatePlatformStatusIcon( StatusIconType type, const gfx::ImageSkia& image, const base::string16& tool_tip) override { diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h index 7d224ab..5e443fd 100644 --- a/chrome/browser/tab_contents/background_contents.h +++ b/chrome/browser/tab_contents/background_contents.h @@ -49,31 +49,30 @@ class BackgroundContents : public content::WebContentsDelegate, Delegate* delegate, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace); - virtual ~BackgroundContents(); + ~BackgroundContents() override; content::WebContents* web_contents() const { return web_contents_.get(); } virtual const GURL& GetURL() const; // content::WebContentsDelegate implementation: - virtual void CloseContents(content::WebContents* source) override; - virtual bool ShouldSuppressDialogs() override; - virtual void DidNavigateMainFramePostCommit( - content::WebContents* tab) override; - virtual void AddNewContents(content::WebContents* source, - content::WebContents* new_contents, - WindowOpenDisposition disposition, - const gfx::Rect& initial_pos, - bool user_gesture, - bool* was_blocked) override; - virtual bool IsNeverVisible(content::WebContents* web_contents) override; + void CloseContents(content::WebContents* source) override; + bool ShouldSuppressDialogs() override; + void DidNavigateMainFramePostCommit(content::WebContents* tab) override; + void AddNewContents(content::WebContents* source, + content::WebContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture, + bool* was_blocked) override; + bool IsNeverVisible(content::WebContents* web_contents) override; // content::WebContentsObserver implementation: - virtual void RenderProcessGone(base::TerminationStatus status) override; + void RenderProcessGone(base::TerminationStatus status) override; // content::NotificationObserver - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; protected: // Exposed for testing. diff --git a/chrome/browser/tab_contents/navigation_metrics_recorder.h b/chrome/browser/tab_contents/navigation_metrics_recorder.h index b8f645b..6d3ad80 100644 --- a/chrome/browser/tab_contents/navigation_metrics_recorder.h +++ b/chrome/browser/tab_contents/navigation_metrics_recorder.h @@ -12,19 +12,18 @@ class NavigationMetricsRecorder : public content::WebContentsObserver, public content::WebContentsUserData<NavigationMetricsRecorder> { public: - virtual ~NavigationMetricsRecorder(); + ~NavigationMetricsRecorder() override; private: explicit NavigationMetricsRecorder(content::WebContents* web_contents); friend class content::WebContentsUserData<NavigationMetricsRecorder>; // content::WebContentsObserver overrides: - virtual void DidNavigateMainFrame( + void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; - virtual void DidStartLoading( - content::RenderViewHost* render_view_host) override; + void DidStartLoading(content::RenderViewHost* render_view_host) override; DISALLOW_COPY_AND_ASSIGN(NavigationMetricsRecorder); }; diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc index f33d4c1..c665f46 100644 --- a/chrome/browser/themes/browser_theme_pack.cc +++ b/chrome/browser/themes/browser_theme_pack.cc @@ -493,9 +493,9 @@ class ThemeImageSource: public gfx::ImageSkiaSource { public: explicit ThemeImageSource(const gfx::ImageSkia& source) : source_(source) { } - virtual ~ThemeImageSource() {} + ~ThemeImageSource() override {} - virtual gfx::ImageSkiaRep GetImageForScale(float scale) override { + gfx::ImageSkiaRep GetImageForScale(float scale) override { if (source_.HasRepresentation(scale)) return source_.GetRepresentation(scale); const gfx::ImageSkiaRep& rep_100p = source_.GetRepresentation(1.0f); @@ -522,10 +522,10 @@ class ThemeImagePngSource : public gfx::ImageSkiaSource { explicit ThemeImagePngSource(const PngMap& png_map) : png_map_(png_map) {} - virtual ~ThemeImagePngSource() {} + ~ThemeImagePngSource() override {} private: - virtual gfx::ImageSkiaRep GetImageForScale(float scale) override { + gfx::ImageSkiaRep GetImageForScale(float scale) override { ui::ScaleFactor scale_factor = ui::GetSupportedScaleFactor(scale); // Look up the bitmap for |scale factor| in the bitmap map. If found // return it. @@ -611,11 +611,10 @@ class TabBackgroundImageSource: public gfx::CanvasImageSource { vertical_offset_(vertical_offset) { } - virtual ~TabBackgroundImageSource() { - } + ~TabBackgroundImageSource() override {} // Overridden from CanvasImageSource: - virtual void Draw(gfx::Canvas* canvas) override { + void Draw(gfx::Canvas* canvas) override { gfx::ImageSkia bg_tint = gfx::ImageSkiaOperations::CreateHSLShiftedImage(image_to_tint_, hsl_shift_); diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h index ab78da7..effba56 100644 --- a/chrome/browser/themes/browser_theme_pack.h +++ b/chrome/browser/themes/browser_theme_pack.h @@ -79,13 +79,13 @@ class BrowserThemePack : public CustomThemeSupplier { bool WriteToDisk(const base::FilePath& path) const; // Overridden from CustomThemeSupplier: - virtual bool GetTint(int id, color_utils::HSL* hsl) const override; - virtual bool GetColor(int id, SkColor* color) const override; - virtual bool GetDisplayProperty(int id, int* result) const override; - virtual gfx::Image GetImageNamed(int id) override; - virtual base::RefCountedMemory* GetRawData( - int id, ui::ScaleFactor scale_factor) const override; - virtual bool HasCustomImage(int id) const override; + bool GetTint(int id, color_utils::HSL* hsl) const override; + bool GetColor(int id, SkColor* color) const override; + bool GetDisplayProperty(int id, int* result) const override; + gfx::Image GetImageNamed(int id) override; + base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) + const override; + bool HasCustomImage(int id) const override; private: friend class BrowserThemePackTest; @@ -108,7 +108,7 @@ class BrowserThemePack : public CustomThemeSupplier { // Default. Everything is empty. BrowserThemePack(); - virtual ~BrowserThemePack(); + ~BrowserThemePack() override; // Builds a header ready to write to disk. void BuildHeader(const extensions::Extension* extension); diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h index 2bfed24..c6135ab 100644 --- a/chrome/browser/themes/theme_service.h +++ b/chrome/browser/themes/theme_service.h @@ -65,7 +65,7 @@ class ThemeService : public base::NonThreadSafe, static const char* kDefaultThemeID; ThemeService(); - virtual ~ThemeService(); + ~ThemeService() override; virtual void Init(Profile* profile); @@ -76,27 +76,26 @@ class ThemeService : public base::NonThreadSafe, virtual gfx::Image GetImageNamed(int id) const; // Overridden from ui::ThemeProvider: - virtual bool UsingSystemTheme() const override; - virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const override; - virtual SkColor GetColor(int id) const override; - virtual int GetDisplayProperty(int id) const override; - virtual bool ShouldUseNativeFrame() const override; - virtual bool HasCustomImage(int id) const override; - virtual base::RefCountedMemory* GetRawData( - int id, - ui::ScaleFactor scale_factor) const override; + bool UsingSystemTheme() const override; + gfx::ImageSkia* GetImageSkiaNamed(int id) const override; + SkColor GetColor(int id) const override; + int GetDisplayProperty(int id) const override; + bool ShouldUseNativeFrame() const override; + bool HasCustomImage(int id) const override; + base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) + const override; #if defined(OS_MACOSX) - virtual NSImage* GetNSImageNamed(int id) const override; - virtual NSColor* GetNSImageColorNamed(int id) const override; - virtual NSColor* GetNSColor(int id) const override; - virtual NSColor* GetNSColorTint(int id) const override; - virtual NSGradient* GetNSGradient(int id) const override; + NSImage* GetNSImageNamed(int id) const override; + NSColor* GetNSImageColorNamed(int id) const override; + NSColor* GetNSColor(int id) const override; + NSColor* GetNSColorTint(int id) const override; + NSGradient* GetNSGradient(int id) const override; #endif // Overridden from content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Set the current theme to the theme defined in |extension|. // |extension| must already be added to this profile's diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h index 564f422..8d3320a 100644 --- a/chrome/browser/themes/theme_service_factory.h +++ b/chrome/browser/themes/theme_service_factory.h @@ -37,16 +37,16 @@ class ThemeServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<ThemeServiceFactory>; ThemeServiceFactory(); - virtual ~ThemeServiceFactory(); + ~ThemeServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual void RegisterProfilePrefs( + void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsCreatedWithBrowserContext() const override; DISALLOW_COPY_AND_ASSIGN(ThemeServiceFactory); }; diff --git a/chrome/browser/themes/theme_syncable_service.h b/chrome/browser/themes/theme_syncable_service.h index df30bc5..c5bd893 100644 --- a/chrome/browser/themes/theme_syncable_service.h +++ b/chrome/browser/themes/theme_syncable_service.h @@ -25,7 +25,7 @@ class ThemeSyncableService : public syncer::SyncableService { public: ThemeSyncableService(Profile* profile, // Same profile used by theme_service. ThemeService* theme_service); - virtual ~ThemeSyncableService(); + ~ThemeSyncableService() override; static syncer::ModelType model_type() { return syncer::THEMES; } @@ -33,15 +33,14 @@ class ThemeSyncableService : public syncer::SyncableService { void OnThemeChange(); // syncer::SyncableService implementation. - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncDataList GetAllSyncData( - syncer::ModelType type) const override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index bbeb1bc..df0ea15 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -61,36 +61,32 @@ class FakeThemeService : public ThemeService { is_dirty_(false) {} // ThemeService implementation - virtual void SetTheme(const extensions::Extension* extension) override { + void SetTheme(const extensions::Extension* extension) override { is_dirty_ = true; theme_extension_ = extension; using_system_theme_ = false; using_default_theme_ = false; } - virtual void UseDefaultTheme() override { + void UseDefaultTheme() override { is_dirty_ = true; using_default_theme_ = true; using_system_theme_ = false; theme_extension_ = NULL; } - virtual void UseSystemTheme() override { + void UseSystemTheme() override { is_dirty_ = true; using_system_theme_ = true; using_default_theme_ = false; theme_extension_ = NULL; } - virtual bool UsingDefaultTheme() const override { - return using_default_theme_; - } + bool UsingDefaultTheme() const override { return using_default_theme_; } - virtual bool UsingSystemTheme() const override { - return using_system_theme_; - } + bool UsingSystemTheme() const override { return using_system_theme_; } - virtual string GetThemeID() const override { + string GetThemeID() const override { if (theme_extension_.get()) return theme_extension_->id(); else @@ -236,7 +232,7 @@ class ThemeSyncableServiceTest : public testing::Test { }; class PolicyInstalledThemeTest : public ThemeSyncableServiceTest { - virtual extensions::Manifest::Location GetThemeLocation() override { + extensions::Manifest::Location GetThemeLocation() override { return extensions::Manifest::EXTERNAL_POLICY_DOWNLOAD; } }; diff --git a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h index 2062642..517a6c4 100644 --- a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h +++ b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h @@ -17,14 +17,14 @@ class ContentBasedThumbnailingAlgorithm : public ThumbnailingAlgorithm { public: explicit ContentBasedThumbnailingAlgorithm(const gfx::Size& target_size); - virtual ClipResult GetCanvasCopyInfo(const gfx::Size& source_size, - ui::ScaleFactor scale_factor, - gfx::Rect* clipping_rect, - gfx::Size* target_size) const override; + ClipResult GetCanvasCopyInfo(const gfx::Size& source_size, + ui::ScaleFactor scale_factor, + gfx::Rect* clipping_rect, + gfx::Size* target_size) const override; - virtual void ProcessBitmap(scoped_refptr<ThumbnailingContext> context, - const ConsumerCallback& callback, - const SkBitmap& bitmap) override; + void ProcessBitmap(scoped_refptr<ThumbnailingContext> context, + const ConsumerCallback& callback, + const SkBitmap& bitmap) override; // Prepares (clips to size, copies etc.) the bitmap passed to ProcessBitmap. // Always returns a bitmap that can be properly refcounted. @@ -43,7 +43,7 @@ class ContentBasedThumbnailingAlgorithm : public ThumbnailingAlgorithm { const ConsumerCallback& callback); protected: - virtual ~ContentBasedThumbnailingAlgorithm(); + ~ContentBasedThumbnailingAlgorithm() override; private: static gfx::Rect GetClippingRect(const gfx::Size& source_size, diff --git a/chrome/browser/thumbnails/simple_thumbnail_crop.h b/chrome/browser/thumbnails/simple_thumbnail_crop.h index e18f3e33..ce40374 100644 --- a/chrome/browser/thumbnails/simple_thumbnail_crop.h +++ b/chrome/browser/thumbnails/simple_thumbnail_crop.h @@ -18,14 +18,14 @@ class SimpleThumbnailCrop : public ThumbnailingAlgorithm { public: explicit SimpleThumbnailCrop(const gfx::Size& target_size); - virtual ClipResult GetCanvasCopyInfo(const gfx::Size& source_size, - ui::ScaleFactor scale_factor, - gfx::Rect* clipping_rect, - gfx::Size* target_size) const override; + ClipResult GetCanvasCopyInfo(const gfx::Size& source_size, + ui::ScaleFactor scale_factor, + gfx::Rect* clipping_rect, + gfx::Size* target_size) const override; - virtual void ProcessBitmap(scoped_refptr<ThumbnailingContext> context, - const ConsumerCallback& callback, - const SkBitmap& bitmap) override; + void ProcessBitmap(scoped_refptr<ThumbnailingContext> context, + const ConsumerCallback& callback, + const SkBitmap& bitmap) override; // Calculates how "boring" a thumbnail is. The boring score is the // 0,1 ranged percentage of pixels that are the most common @@ -57,7 +57,7 @@ class SimpleThumbnailCrop : public ThumbnailingAlgorithm { static gfx::Size ComputeTargetSizeAtMaximumScale(const gfx::Size& given_size); protected: - virtual ~SimpleThumbnailCrop(); + ~SimpleThumbnailCrop() override; private: static SkBitmap CreateThumbnail(const SkBitmap& bitmap, diff --git a/chrome/browser/thumbnails/thumbnail_list_source.h b/chrome/browser/thumbnails/thumbnail_list_source.h index bff4228..9421cc6 100644 --- a/chrome/browser/thumbnails/thumbnail_list_source.h +++ b/chrome/browser/thumbnails/thumbnail_list_source.h @@ -32,21 +32,20 @@ class ThumbnailListSource : public content::URLDataSource { explicit ThumbnailListSource(Profile* profile); // content::URLDataSource implementation. - virtual std::string GetSource() const override; - virtual void StartDataRequest( + std::string GetSource() const override; + void StartDataRequest( const std::string& path, int render_process_id, int render_frame_id, const content::URLDataSource::GotDataCallback& callback) override; - virtual std::string GetMimeType(const std::string& path) const override; - virtual base::MessageLoop* MessageLoopForRequestPath( + std::string GetMimeType(const std::string& path) const override; + base::MessageLoop* MessageLoopForRequestPath( const std::string& path) const override; - virtual bool ShouldServiceRequest( - const net::URLRequest* request) const override; - virtual bool ShouldReplaceExistingSource() const override; + bool ShouldServiceRequest(const net::URLRequest* request) const override; + bool ShouldReplaceExistingSource() const override; private: - virtual ~ThumbnailListSource(); + ~ThumbnailListSource() override; void OnMostVisitedURLsAvailable( const content::URLDataSource::GotDataCallback& callback, diff --git a/chrome/browser/thumbnails/thumbnail_service.h b/chrome/browser/thumbnails/thumbnail_service.h index 688a50f..97000d2 100644 --- a/chrome/browser/thumbnails/thumbnail_service.h +++ b/chrome/browser/thumbnails/thumbnail_service.h @@ -58,7 +58,7 @@ class ThumbnailService : public RefcountedKeyedService { virtual bool ShouldAcquirePageThumbnail(const GURL& url) = 0; protected: - virtual ~ThumbnailService() {} + ~ThumbnailService() override {} }; } // namespace thumbnails diff --git a/chrome/browser/thumbnails/thumbnail_service_factory.h b/chrome/browser/thumbnails/thumbnail_service_factory.h index 0a27124..921721d 100644 --- a/chrome/browser/thumbnails/thumbnail_service_factory.h +++ b/chrome/browser/thumbnails/thumbnail_service_factory.h @@ -34,10 +34,10 @@ class ThumbnailServiceFactory friend struct DefaultSingletonTraits<ThumbnailServiceFactory>; ThumbnailServiceFactory(); - virtual ~ThumbnailServiceFactory(); + ~ThumbnailServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( + scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(ThumbnailServiceFactory); diff --git a/chrome/browser/thumbnails/thumbnail_service_impl.h b/chrome/browser/thumbnails/thumbnail_service_impl.h index 84067ec..d84b672 100644 --- a/chrome/browser/thumbnails/thumbnail_service_impl.h +++ b/chrome/browser/thumbnails/thumbnail_service_impl.h @@ -23,21 +23,20 @@ class ThumbnailServiceImpl : public ThumbnailService { explicit ThumbnailServiceImpl(Profile* profile); // Implementation of ThumbnailService. - virtual bool SetPageThumbnail(const ThumbnailingContext& context, - const gfx::Image& thumbnail) override; - virtual ThumbnailingAlgorithm* GetThumbnailingAlgorithm() const override; - virtual bool GetPageThumbnail( - const GURL& url, - bool prefix_match, - scoped_refptr<base::RefCountedMemory>* bytes) override; - virtual void AddForcedURL(const GURL& url) override; - virtual bool ShouldAcquirePageThumbnail(const GURL& url) override; + bool SetPageThumbnail(const ThumbnailingContext& context, + const gfx::Image& thumbnail) override; + ThumbnailingAlgorithm* GetThumbnailingAlgorithm() const override; + bool GetPageThumbnail(const GURL& url, + bool prefix_match, + scoped_refptr<base::RefCountedMemory>* bytes) override; + void AddForcedURL(const GURL& url) override; + bool ShouldAcquirePageThumbnail(const GURL& url) override; // Implementation of RefcountedKeyedService. - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; private: - virtual ~ThumbnailServiceImpl(); + ~ThumbnailServiceImpl() override; scoped_refptr<history::TopSites> top_sites_; bool use_thumbnail_retargeting_; diff --git a/chrome/browser/thumbnails/thumbnail_service_unittest.cc b/chrome/browser/thumbnails/thumbnail_service_unittest.cc index b72654d..32f564c 100644 --- a/chrome/browser/thumbnails/thumbnail_service_unittest.cc +++ b/chrome/browser/thumbnails/thumbnail_service_unittest.cc @@ -21,17 +21,12 @@ class MockTopSites : public history::TopSitesImpl { } // history::TopSitesImpl overrides. - virtual bool IsNonForcedFull() override { - return known_url_map_.size() >= capacity_; - } - virtual bool IsForcedFull() override { - return false; - } - virtual bool IsKnownURL(const GURL& url) override { + bool IsNonForcedFull() override { return known_url_map_.size() >= capacity_; } + bool IsForcedFull() override { return false; } + bool IsKnownURL(const GURL& url) override { return known_url_map_.find(url.spec()) != known_url_map_.end(); } - virtual bool GetPageThumbnailScore(const GURL& url, - ThumbnailScore* score) override { + bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score) override { std::map<std::string, ThumbnailScore>::const_iterator iter = known_url_map_.find(url.spec()); if (iter == known_url_map_.end()) { @@ -48,7 +43,7 @@ class MockTopSites : public history::TopSitesImpl { } private: - virtual ~MockTopSites() {} + ~MockTopSites() override {} const size_t capacity_; std::map<std::string, ThumbnailScore> known_url_map_; @@ -62,9 +57,7 @@ class MockProfile : public TestingProfile { MockProfile() : mock_top_sites_(new MockTopSites(this)) { } - virtual history::TopSites* GetTopSites() override { - return mock_top_sites_.get(); - } + history::TopSites* GetTopSites() override { return mock_top_sites_.get(); } void AddKnownURL(const GURL& url, const ThumbnailScore& score) { mock_top_sites_->AddKnownURL(url, score); diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.h b/chrome/browser/thumbnails/thumbnail_tab_helper.h index 232643dd..74e7698 100644 --- a/chrome/browser/thumbnails/thumbnail_tab_helper.h +++ b/chrome/browser/thumbnails/thumbnail_tab_helper.h @@ -22,7 +22,7 @@ class ThumbnailTabHelper public content::WebContentsObserver, public content::WebContentsUserData<ThumbnailTabHelper> { public: - virtual ~ThumbnailTabHelper(); + ~ThumbnailTabHelper() override; // Enables or disables the function of taking thumbnails. // A disabled ThumbnailTabHelper generates no thumbnails although it still @@ -34,16 +34,14 @@ class ThumbnailTabHelper friend class content::WebContentsUserData<ThumbnailTabHelper>; // content::NotificationObserver overrides. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // content::WebContentsObserver overrides. - virtual void RenderViewDeleted( - content::RenderViewHost* render_view_host) override; - virtual void DidStartLoading( - content::RenderViewHost* render_view_host) override; - virtual void NavigationStopped() override; + void RenderViewDeleted(content::RenderViewHost* render_view_host) override; + void DidStartLoading(content::RenderViewHost* render_view_host) override; + void NavigationStopped() override; // Update the thumbnail of the given tab contents if necessary. void UpdateThumbnailIfNecessary(content::WebContents* web_contents); diff --git a/chrome/browser/translate/chrome_translate_client.h b/chrome/browser/translate/chrome_translate_client.h index 2ba5e34..1d2a7ee 100644 --- a/chrome/browser/translate/chrome_translate_client.h +++ b/chrome/browser/translate/chrome_translate_client.h @@ -41,7 +41,7 @@ class ChromeTranslateClient public content::WebContentsObserver, public content::WebContentsUserData<ChromeTranslateClient> { public: - virtual ~ChromeTranslateClient(); + ~ChromeTranslateClient() override; // Gets the LanguageState associated with the page. translate::LanguageState& GetLanguageState(); @@ -79,38 +79,35 @@ class ChromeTranslateClient content::WebContents* GetWebContents(); // TranslateClient implementation. - virtual translate::TranslateDriver* GetTranslateDriver() override; - virtual PrefService* GetPrefs() override; - virtual scoped_ptr<translate::TranslatePrefs> GetTranslatePrefs() override; - virtual translate::TranslateAcceptLanguages* GetTranslateAcceptLanguages() - override; - virtual int GetInfobarIconID() const override; - virtual scoped_ptr<infobars::InfoBar> CreateInfoBar( + translate::TranslateDriver* GetTranslateDriver() override; + PrefService* GetPrefs() override; + scoped_ptr<translate::TranslatePrefs> GetTranslatePrefs() override; + translate::TranslateAcceptLanguages* GetTranslateAcceptLanguages() override; + int GetInfobarIconID() const override; + scoped_ptr<infobars::InfoBar> CreateInfoBar( scoped_ptr<translate::TranslateInfoBarDelegate> delegate) const override; - virtual void ShowTranslateUI(translate::TranslateStep step, - const std::string source_language, - const std::string target_language, - translate::TranslateErrors::Type error_type, - bool triggered_from_menu) override; - virtual bool IsTranslatableURL(const GURL& url) override; - virtual void ShowReportLanguageDetectionErrorUI( - const GURL& report_url) override; + void ShowTranslateUI(translate::TranslateStep step, + const std::string source_language, + const std::string target_language, + translate::TranslateErrors::Type error_type, + bool triggered_from_menu) override; + bool IsTranslatableURL(const GURL& url) override; + void ShowReportLanguageDetectionErrorUI(const GURL& report_url) override; // ContentTranslateDriver::Observer implementation. - virtual void OnLanguageDetermined( + void OnLanguageDetermined( const translate::LanguageDetectionDetails& details) override; - virtual void OnPageTranslated( - const std::string& original_lang, - const std::string& translated_lang, - translate::TranslateErrors::Type error_type) override; + void OnPageTranslated(const std::string& original_lang, + const std::string& translated_lang, + translate::TranslateErrors::Type error_type) override; private: explicit ChromeTranslateClient(content::WebContents* web_contents); friend class content::WebContentsUserData<ChromeTranslateClient>; // content::WebContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void WebContentsDestroyed() override; + bool OnMessageReceived(const IPC::Message& message) override; + void WebContentsDestroyed() override; // Shows the translate bubble. void ShowBubble(translate::TranslateStep step, diff --git a/chrome/browser/translate/static_cld_data_harness.h b/chrome/browser/translate/static_cld_data_harness.h index 552f11d..7c5b888 100644 --- a/chrome/browser/translate/static_cld_data_harness.h +++ b/chrome/browser/translate/static_cld_data_harness.h @@ -12,8 +12,8 @@ namespace test { class StaticCldDataHarness : public CldDataHarness { public: StaticCldDataHarness(); - virtual ~StaticCldDataHarness(); - virtual void Init() override; + ~StaticCldDataHarness() override; + void Init() override; private: DISALLOW_COPY_AND_ASSIGN(StaticCldDataHarness); diff --git a/chrome/browser/translate/translate_accept_languages_factory.cc b/chrome/browser/translate/translate_accept_languages_factory.cc index d74321c..22ec3b6 100644 --- a/chrome/browser/translate/translate_accept_languages_factory.cc +++ b/chrome/browser/translate/translate_accept_languages_factory.cc @@ -19,7 +19,7 @@ namespace { class TranslateAcceptLanguagesService : public KeyedService { public: explicit TranslateAcceptLanguagesService(PrefService* prefs); - virtual ~TranslateAcceptLanguagesService(); + ~TranslateAcceptLanguagesService() override; // Returns the associated TranslateAcceptLanguages. translate::TranslateAcceptLanguages& accept_languages() { diff --git a/chrome/browser/translate/translate_accept_languages_factory.h b/chrome/browser/translate/translate_accept_languages_factory.h index a712e97..98b5ac0 100644 --- a/chrome/browser/translate/translate_accept_languages_factory.h +++ b/chrome/browser/translate/translate_accept_languages_factory.h @@ -26,12 +26,12 @@ class TranslateAcceptLanguagesFactory friend struct DefaultSingletonTraits<TranslateAcceptLanguagesFactory>; TranslateAcceptLanguagesFactory(); - virtual ~TranslateAcceptLanguagesFactory(); + ~TranslateAcceptLanguagesFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(TranslateAcceptLanguagesFactory); diff --git a/chrome/browser/translate/translate_browsertest.cc b/chrome/browser/translate/translate_browsertest.cc index c460475..b8cb3d1 100644 --- a/chrome/browser/translate/translate_browsertest.cc +++ b/chrome/browser/translate/translate_browsertest.cc @@ -54,7 +54,7 @@ class TranslateBrowserTest : public InProcessBrowserTest { base::FilePath(kTranslateRoot)), infobar_service_(NULL) {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ASSERT_TRUE(https_server_.Start()); // Setup alternate security origin for testing in order to allow XHR against // local test server. Note that this flag shows a confirm infobar in tests. diff --git a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc index a87acfe..f51a947 100644 --- a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc +++ b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc @@ -63,9 +63,9 @@ class NavEntryCommittedObserver : public content::NotificationObserver { &web_contents->GetController())); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { DCHECK(type == content::NOTIFICATION_NAV_ENTRY_COMMITTED); details_ = *(content::Details<content::LoadCommittedDetails>(details).ptr()); @@ -369,7 +369,7 @@ class MockTranslateBubbleFactory : public TranslateBubbleFactory { public: MockTranslateBubbleFactory() {} - virtual void ShowImplementation( + void ShowImplementation( BrowserWindow* window, content::WebContents* web_contents, translate::TranslateStep step, diff --git a/chrome/browser/translate/translate_service.h b/chrome/browser/translate/translate_service.h index 22b4949..9655cfb 100644 --- a/chrome/browser/translate/translate_service.h +++ b/chrome/browser/translate/translate_service.h @@ -52,7 +52,7 @@ class TranslateService : public ResourceRequestAllowedNotifier::Observer { ~TranslateService(); // ResourceRequestAllowedNotifier::Observer methods. - virtual void OnResourceRequestsAllowed() override; + void OnResourceRequestsAllowed() override; // Helper class to know if it's allowed to make network resource requests. ResourceRequestAllowedNotifier resource_request_allowed_notifier_; diff --git a/chrome/browser/undo/bookmark_undo_service.cc b/chrome/browser/undo/bookmark_undo_service.cc index ff7f44f..d763bdb 100644 --- a/chrome/browser/undo/bookmark_undo_service.cc +++ b/chrome/browser/undo/bookmark_undo_service.cc @@ -27,7 +27,7 @@ class BookmarkUndoOperation : public UndoOperation, public BookmarkRenumberObserver { public: explicit BookmarkUndoOperation(Profile* profile); - virtual ~BookmarkUndoOperation() {} + ~BookmarkUndoOperation() override {} BookmarkModel* GetBookmarkModel() const; BookmarkRenumberObserver* GetUndoRenumberObserver() const; @@ -55,15 +55,15 @@ BookmarkRenumberObserver* BookmarkUndoOperation::GetUndoRenumberObserver() class BookmarkAddOperation : public BookmarkUndoOperation { public: BookmarkAddOperation(Profile* profile, const BookmarkNode* parent, int index); - virtual ~BookmarkAddOperation() {} + ~BookmarkAddOperation() override {} // UndoOperation: - virtual void Undo() override; - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + void Undo() override; + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; private: int64 parent_id_; @@ -114,15 +114,15 @@ class BookmarkRemoveOperation : public BookmarkUndoOperation { const BookmarkNode* parent, int old_index, const BookmarkNode* node); - virtual ~BookmarkRemoveOperation() {} + ~BookmarkRemoveOperation() override {} // UndoOperation: - virtual void Undo() override; - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + void Undo() override; + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; private: void UpdateBookmarkIds(const BookmarkNodeData::Element& element, @@ -191,15 +191,15 @@ class BookmarkEditOperation : public BookmarkUndoOperation { public: BookmarkEditOperation(Profile* profile, const BookmarkNode* node); - virtual ~BookmarkEditOperation() {} + ~BookmarkEditOperation() override {} // UndoOperation: - virtual void Undo() override; - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + void Undo() override; + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; private: int64 node_id_; @@ -249,15 +249,15 @@ class BookmarkMoveOperation : public BookmarkUndoOperation { int old_index, const BookmarkNode* new_parent, int new_index); - virtual ~BookmarkMoveOperation() {} - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + ~BookmarkMoveOperation() override {} + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; // UndoOperation: - virtual void Undo() override; + void Undo() override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; private: int64 old_parent_id_; @@ -326,15 +326,15 @@ class BookmarkReorderOperation : public BookmarkUndoOperation { public: BookmarkReorderOperation(Profile* profile, const BookmarkNode* parent); - virtual ~BookmarkReorderOperation(); + ~BookmarkReorderOperation() override; // UndoOperation: - virtual void Undo() override; - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + void Undo() override; + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; private: int64 parent_id_; diff --git a/chrome/browser/undo/bookmark_undo_service.h b/chrome/browser/undo/bookmark_undo_service.h index dc6c822..4d42b37 100644 --- a/chrome/browser/undo/bookmark_undo_service.h +++ b/chrome/browser/undo/bookmark_undo_service.h @@ -27,38 +27,37 @@ class BookmarkUndoService : public BaseBookmarkModelObserver, public BookmarkRenumberObserver { public: explicit BookmarkUndoService(Profile* profile); - virtual ~BookmarkUndoService(); + ~BookmarkUndoService() override; UndoManager* undo_manager() { return &undo_manager_; } private: // BaseBookmarkModelObserver: - virtual void BookmarkModelChanged() override {} - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; - virtual void BookmarkNodeMoved(BookmarkModel* model, - const BookmarkNode* old_parent, - int old_index, - const BookmarkNode* new_parent, - int new_index) override; - virtual void BookmarkNodeAdded(BookmarkModel* model, - const BookmarkNode* parent, - int index) override; - virtual void OnWillRemoveBookmarks(BookmarkModel* model, - const BookmarkNode* parent, - int old_index, - const BookmarkNode* node) override; - virtual void OnWillRemoveAllUserBookmarks(BookmarkModel* model) override; - virtual void OnWillChangeBookmarkNode(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void OnWillReorderBookmarkNode(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) override; - virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) override; + void BookmarkModelChanged() override {} + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkNodeMoved(BookmarkModel* model, + const BookmarkNode* old_parent, + int old_index, + const BookmarkNode* new_parent, + int new_index) override; + void BookmarkNodeAdded(BookmarkModel* model, + const BookmarkNode* parent, + int index) override; + void OnWillRemoveBookmarks(BookmarkModel* model, + const BookmarkNode* parent, + int old_index, + const BookmarkNode* node) override; + void OnWillRemoveAllUserBookmarks(BookmarkModel* model) override; + void OnWillChangeBookmarkNode(BookmarkModel* model, + const BookmarkNode* node) override; + void OnWillReorderBookmarkNode(BookmarkModel* model, + const BookmarkNode* node) override; + void GroupedBookmarkChangesBeginning(BookmarkModel* model) override; + void GroupedBookmarkChangesEnded(BookmarkModel* model) override; // BookmarkRenumberObserver: - virtual void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; + void OnBookmarkRenumbered(int64 old_id, int64 new_id) override; Profile* profile_; UndoManager undo_manager_; diff --git a/chrome/browser/undo/bookmark_undo_service_factory.h b/chrome/browser/undo/bookmark_undo_service_factory.h index 10edb49..31ac604 100644 --- a/chrome/browser/undo/bookmark_undo_service_factory.h +++ b/chrome/browser/undo/bookmark_undo_service_factory.h @@ -21,10 +21,10 @@ class BookmarkUndoServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<BookmarkUndoServiceFactory>; BookmarkUndoServiceFactory(); - virtual ~BookmarkUndoServiceFactory(); + ~BookmarkUndoServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; DISALLOW_COPY_AND_ASSIGN(BookmarkUndoServiceFactory); diff --git a/chrome/browser/undo/undo_manager_test.cc b/chrome/browser/undo/undo_manager_test.cc index 1a4b5ac..013b6214 100644 --- a/chrome/browser/undo/undo_manager_test.cc +++ b/chrome/browser/undo/undo_manager_test.cc @@ -36,12 +36,12 @@ class TestUndoService { class TestUndoOperation : public UndoOperation { public: explicit TestUndoOperation(TestUndoService* undo_service); - virtual ~TestUndoOperation(); + ~TestUndoOperation() override; // UndoOperation: - virtual void Undo() override; - virtual int GetUndoLabelId() const override; - virtual int GetRedoLabelId() const override; + void Undo() override; + int GetUndoLabelId() const override; + int GetRedoLabelId() const override; private: TestUndoService* undo_service_; @@ -103,7 +103,7 @@ class TestObserver : public UndoManagerObserver { // Returns the number of state change callbacks int state_change_count() { return state_change_count_; } - virtual void OnUndoManagerStateChange() override { ++state_change_count_; } + void OnUndoManagerStateChange() override { ++state_change_count_; } private: int state_change_count_; diff --git a/chrome/browser/unload_browsertest.cc b/chrome/browser/unload_browsertest.cc index 8a0b62d..4481adf 100644 --- a/chrome/browser/unload_browsertest.cc +++ b/chrome/browser/unload_browsertest.cc @@ -113,7 +113,7 @@ const std::string CLOSE_TAB_WHEN_OTHER_TAB_HAS_LISTENER = class UnloadTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { const testing::TestInfo* const test_info = testing::UnitTest::GetInstance()->current_test_info(); if (strcmp(test_info->name(), @@ -126,7 +126,7 @@ class UnloadTest : public InProcessBrowserTest { } } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); @@ -416,18 +416,16 @@ IN_PROC_BROWSER_TEST_F(UnloadTest, BrowserCloseTabWhenOtherTabHasListener) { class FastUnloadTest : public UnloadTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { UnloadTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kEnableFastUnload); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ASSERT_TRUE(test_server()->Start()); } - virtual void TearDownInProcessBrowserTestFixture() override { - test_server()->Stop(); - } + void TearDownInProcessBrowserTestFixture() override { test_server()->Stop(); } GURL GetUrl(const std::string& name) { return GURL(test_server()->GetURL( @@ -462,13 +460,12 @@ class FastTabCloseTabStripModelObserver : public TabStripModelObserver { model_->AddObserver(this); } - virtual ~FastTabCloseTabStripModelObserver() { + ~FastTabCloseTabStripModelObserver() override { model_->RemoveObserver(this); } // TabStripModelObserver: - virtual void TabDetachedAt(content::WebContents* contents, - int index) override { + void TabDetachedAt(content::WebContents* contents, int index) override { run_loop_->Quit(); } diff --git a/chrome/browser/upgrade_detector_impl.h b/chrome/browser/upgrade_detector_impl.h index 0f90229..aeba643 100644 --- a/chrome/browser/upgrade_detector_impl.h +++ b/chrome/browser/upgrade_detector_impl.h @@ -17,7 +17,7 @@ class UpgradeDetectorImpl : public UpgradeDetector, public chrome_variations::VariationsService::Observer { public: - virtual ~UpgradeDetectorImpl(); + ~UpgradeDetectorImpl() override; // Returns the currently installed Chrome version, which may be newer than the // one currently running. Not supported on Android, iOS or ChromeOS. Must be @@ -31,7 +31,7 @@ class UpgradeDetectorImpl : UpgradeDetectorImpl(); // chrome_variations::VariationsService::Observer: - virtual void OnExperimentChangesDetected(Severity severity) override; + void OnExperimentChangesDetected(Severity severity) override; // Trigger an "on upgrade" notification based on the specified |time_passed| // interval. Exposed as protected for testing. diff --git a/chrome/browser/upgrade_detector_impl_unittest.cc b/chrome/browser/upgrade_detector_impl_unittest.cc index e8a1ada..a574bc8 100644 --- a/chrome/browser/upgrade_detector_impl_unittest.cc +++ b/chrome/browser/upgrade_detector_impl_unittest.cc @@ -16,14 +16,14 @@ class TestUpgradeDetectorImpl : public UpgradeDetectorImpl { public: TestUpgradeDetectorImpl() : trigger_critical_update_call_count_(0) {} - virtual ~TestUpgradeDetectorImpl() {} + ~TestUpgradeDetectorImpl() override {} // Methods exposed for testing. using UpgradeDetectorImpl::OnExperimentChangesDetected; using UpgradeDetectorImpl::NotifyOnUpgradeWithTimePassed; // UpgradeDetector: - virtual void TriggerCriticalUpdate() override { + void TriggerCriticalUpdate() override { trigger_critical_update_call_count_++; } @@ -45,8 +45,7 @@ class TestUpgradeNotificationListener : public content::NotificationObserver { registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, content::NotificationService::AllSources()); } - virtual ~TestUpgradeNotificationListener() { - } + ~TestUpgradeNotificationListener() override {} const std::vector<int>& notifications_received() const { return notifications_received_; @@ -54,9 +53,9 @@ class TestUpgradeNotificationListener : public content::NotificationObserver { private: // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { notifications_received_.push_back(type); } diff --git a/chrome/browser/web_resource/eula_accepted_notifier_unittest.cc b/chrome/browser/web_resource/eula_accepted_notifier_unittest.cc index 777ecd9..d339ca7 100644 --- a/chrome/browser/web_resource/eula_accepted_notifier_unittest.cc +++ b/chrome/browser/web_resource/eula_accepted_notifier_unittest.cc @@ -24,7 +24,7 @@ class EulaAcceptedNotifierTest : public testing::Test, } // EulaAcceptedNotifier::Observer overrides. - virtual void OnEulaAccepted() override { + void OnEulaAccepted() override { EXPECT_FALSE(eula_accepted_called_); eula_accepted_called_ = true; } diff --git a/chrome/browser/web_resource/json_asynchronous_unpacker.cc b/chrome/browser/web_resource/json_asynchronous_unpacker.cc index b65feca9..b64d3a1 100644 --- a/chrome/browser/web_resource/json_asynchronous_unpacker.cc +++ b/chrome/browser/web_resource/json_asynchronous_unpacker.cc @@ -29,7 +29,7 @@ class JSONAsynchronousUnpackerImpl got_response_(false) { } - virtual void Start(const std::string& json_data) override { + void Start(const std::string& json_data) override { AddRef(); // balanced in Cleanup. BrowserThread::ID thread_id; @@ -42,10 +42,10 @@ class JSONAsynchronousUnpackerImpl } private: - virtual ~JSONAsynchronousUnpackerImpl() {} + ~JSONAsynchronousUnpackerImpl() override {} // UtilityProcessHostClient. - virtual bool OnMessageReceived(const IPC::Message& message) override { + bool OnMessageReceived(const IPC::Message& message) override { bool handled = true; IPC_BEGIN_MESSAGE_MAP(JSONAsynchronousUnpackerImpl, message) IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_UnpackWebResource_Succeeded, @@ -57,7 +57,7 @@ class JSONAsynchronousUnpackerImpl return handled; } - virtual void OnProcessCrashed(int exit_code) override { + void OnProcessCrashed(int exit_code) override { if (got_response_) return; diff --git a/chrome/browser/web_resource/promo_resource_service.h b/chrome/browser/web_resource/promo_resource_service.h index e38f481..0efbc51 100644 --- a/chrome/browser/web_resource/promo_resource_service.h +++ b/chrome/browser/web_resource/promo_resource_service.h @@ -35,7 +35,7 @@ class PromoResourceService : public WebResourceService { PromoResourceService(); private: - virtual ~PromoResourceService(); + ~PromoResourceService() override; // Schedule a notification that a web resource is either going to become // available or be no longer valid. @@ -56,7 +56,7 @@ class PromoResourceService : public WebResourceService { void PromoResourceStateChange(); // WebResourceService override to process the parsed information. - virtual void Unpack(const base::DictionaryValue& parsed_json) override; + void Unpack(const base::DictionaryValue& parsed_json) override; // Allows the creation of tasks to send a notification. // This allows the PromoResourceService to notify the New Tab Page immediately diff --git a/chrome/browser/web_resource/resource_request_allowed_notifier.h b/chrome/browser/web_resource/resource_request_allowed_notifier.h index 0a48e3c..d37bfff 100644 --- a/chrome/browser/web_resource/resource_request_allowed_notifier.h +++ b/chrome/browser/web_resource/resource_request_allowed_notifier.h @@ -47,7 +47,7 @@ class ResourceRequestAllowedNotifier }; ResourceRequestAllowedNotifier(); - virtual ~ResourceRequestAllowedNotifier(); + ~ResourceRequestAllowedNotifier() override; // Sets |observer| as the service to be notified by this instance, and // performs initial checks on the criteria. |observer| may not be NULL. @@ -81,10 +81,10 @@ class ResourceRequestAllowedNotifier virtual EulaAcceptedNotifier* CreateEulaNotifier(); // EulaAcceptedNotifier::Observer overrides: - virtual void OnEulaAccepted() override; + void OnEulaAccepted() override; // net::NetworkChangeNotifier::ConnectionTypeObserver overrides: - virtual void OnConnectionTypeChanged( + void OnConnectionTypeChanged( net::NetworkChangeNotifier::ConnectionType type) override; // Tracks whether or not the observer/service depending on this class actually diff --git a/chrome/browser/web_resource/resource_request_allowed_notifier_test_util.h b/chrome/browser/web_resource/resource_request_allowed_notifier_test_util.h index 0ac85b1..ee6685d 100644 --- a/chrome/browser/web_resource/resource_request_allowed_notifier_test_util.h +++ b/chrome/browser/web_resource/resource_request_allowed_notifier_test_util.h @@ -19,7 +19,7 @@ class TestRequestAllowedNotifier : public ResourceRequestAllowedNotifier { public: TestRequestAllowedNotifier(); - virtual ~TestRequestAllowedNotifier(); + ~TestRequestAllowedNotifier() override; // A version of |Init()| that accepts a custom EulaAcceptedNotifier. void InitWithEulaAcceptNotifier( @@ -34,8 +34,8 @@ class TestRequestAllowedNotifier : public ResourceRequestAllowedNotifier { void NotifyObserver(); // ResourceRequestAllowedNotifier overrides: - virtual State GetResourceRequestsAllowedState() override; - virtual EulaAcceptedNotifier* CreateEulaNotifier() override; + State GetResourceRequestsAllowedState() override; + EulaAcceptedNotifier* CreateEulaNotifier() override; private: scoped_ptr<EulaAcceptedNotifier> test_eula_notifier_; diff --git a/chrome/browser/web_resource/resource_request_allowed_notifier_unittest.cc b/chrome/browser/web_resource/resource_request_allowed_notifier_unittest.cc index b779f28..836c378 100644 --- a/chrome/browser/web_resource/resource_request_allowed_notifier_unittest.cc +++ b/chrome/browser/web_resource/resource_request_allowed_notifier_unittest.cc @@ -30,7 +30,7 @@ class TestNetworkChangeNotifier : public net::NetworkChangeNotifier { } private: - virtual ConnectionType GetCurrentConnectionType() const override { + ConnectionType GetCurrentConnectionType() const override { return connection_type_to_return_; } @@ -49,12 +49,9 @@ class TestEulaAcceptedNotifier : public EulaAcceptedNotifier { : EulaAcceptedNotifier(NULL), eula_accepted_(false) { } - virtual ~TestEulaAcceptedNotifier() { - } + ~TestEulaAcceptedNotifier() override {} - virtual bool IsEulaAccepted() override { - return eula_accepted_; - } + bool IsEulaAccepted() override { return eula_accepted_; } void SetEulaAcceptedForTesting(bool eula_accepted) { eula_accepted_ = eula_accepted; @@ -89,9 +86,7 @@ class ResourceRequestAllowedNotifierTest bool was_notified() const { return was_notified_; } // ResourceRequestAllowedNotifier::Observer override: - virtual void OnResourceRequestsAllowed() override { - was_notified_ = true; - } + void OnResourceRequestsAllowed() override { was_notified_ = true; } // Network manipulation methods: void SetWaitingForNetwork(bool waiting) { diff --git a/chrome/browser/web_resource/web_resource_service.h b/chrome/browser/web_resource/web_resource_service.h index b5aa7ff..74cd8a0 100644 --- a/chrome/browser/web_resource/web_resource_service.h +++ b/chrome/browser/web_resource/web_resource_service.h @@ -46,12 +46,11 @@ class WebResourceService void StartAfterDelay(); // JSONAsynchronousUnpackerDelegate methods. - virtual void OnUnpackFinished( - const base::DictionaryValue& parsed_json) override; - virtual void OnUnpackError(const std::string& error_message) override; + void OnUnpackFinished(const base::DictionaryValue& parsed_json) override; + void OnUnpackError(const std::string& error_message) override; protected: - virtual ~WebResourceService(); + ~WebResourceService() override; // For the subclasses to process the result of a fetch. virtual void Unpack(const base::DictionaryValue& parsed_json) = 0; @@ -63,7 +62,7 @@ class WebResourceService friend class base::RefCountedThreadSafe<WebResourceService>; // net::URLFetcherDelegate implementation: - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Schedules a fetch after |delay_ms| milliseconds. void ScheduleFetch(int64 delay_ms); @@ -75,7 +74,7 @@ class WebResourceService void EndFetch(); // Implements ResourceRequestAllowedNotifier::Observer. - virtual void OnResourceRequestsAllowed() override; + void OnResourceRequestsAllowed() override; // Helper class used to tell this service if it's allowed to make network // resource requests. diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h index c081c78..307d7b1 100644 --- a/chrome/browser/webdata/autocomplete_syncable_service.h +++ b/chrome/browser/webdata/autocomplete_syncable_service.h @@ -50,7 +50,7 @@ class AutocompleteSyncableService public autofill::AutofillWebDataServiceObserverOnDBThread, public base::NonThreadSafe { public: - virtual ~AutocompleteSyncableService(); + ~AutocompleteSyncableService() override; // Creates a new AutocompleteSyncableService and hangs it off of // |web_data_service|, which takes ownership. @@ -65,20 +65,19 @@ class AutocompleteSyncableService static syncer::ModelType model_type() { return syncer::AUTOFILL; } // syncer::SyncableService: - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncDataList GetAllSyncData( - syncer::ModelType type) const override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; // AutofillWebDataServiceObserverOnDBThread: - virtual void AutofillEntriesChanged( + void AutofillEntriesChanged( const autofill::AutofillChangeList& changes) override; // Provides a StartSyncFlare to the SyncableService. See sync_start_util for diff --git a/chrome/browser/webdata/web_data_service_factory.h b/chrome/browser/webdata/web_data_service_factory.h index c862a87..fd6d975 100644 --- a/chrome/browser/webdata/web_data_service_factory.h +++ b/chrome/browser/webdata/web_data_service_factory.h @@ -32,10 +32,10 @@ class WebDataServiceWrapper : public KeyedService { // For testing. WebDataServiceWrapper(); - virtual ~WebDataServiceWrapper(); + ~WebDataServiceWrapper() override; // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData(); @@ -102,14 +102,14 @@ class WebDataServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<WebDataServiceFactory>; WebDataServiceFactory(); - virtual ~WebDataServiceFactory(); + ~WebDataServiceFactory() override; // |BrowserContextKeyedBaseFactory| methods: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); }; |