diff options
Diffstat (limited to 'chrome')
164 files changed, 1238 insertions, 1398 deletions
diff --git a/chrome/app/chrome_crash_reporter_client.h b/chrome/app/chrome_crash_reporter_client.h index ddd426b..9ca2818 100644 --- a/chrome/app/chrome_crash_reporter_client.h +++ b/chrome/app/chrome_crash_reporter_client.h @@ -14,10 +14,10 @@ namespace chrome { class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient { public: ChromeCrashReporterClient(); - virtual ~ChromeCrashReporterClient(); + ~ChromeCrashReporterClient() override; // crash_reporter::CrashReporterClient implementation. - virtual void SetCrashReporterClientIdFromGUID( + void SetCrashReporterClientIdFromGUID( const std::string& client_guid) override; #if defined(OS_WIN) virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) @@ -45,16 +45,16 @@ class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient { virtual base::FilePath GetReporterLogFilename() override; #endif - virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) override; + bool GetCrashDumpLocation(base::FilePath* crash_dir) override; - virtual size_t RegisterCrashKeys() override; + size_t RegisterCrashKeys() override; - virtual bool IsRunningUnattended() override; + bool IsRunningUnattended() override; - virtual bool GetCollectStatsConsent() override; + bool GetCollectStatsConsent() override; #if defined(OS_WIN) || defined(OS_MACOSX) - virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; + bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; #endif #if defined(OS_ANDROID) @@ -62,11 +62,10 @@ class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient { #endif #if defined(OS_MACOSX) - virtual void InstallAdditionalFilters(BreakpadRef breakpad) override; + void InstallAdditionalFilters(BreakpadRef breakpad) override; #endif - virtual bool EnableBreakpadForProcess( - const std::string& process_type) override; + bool EnableBreakpadForProcess(const std::string& process_type) override; private: DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient); diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h index 08b7715..4b8bf5f 100644 --- a/chrome/app/chrome_main_delegate.h +++ b/chrome/app/chrome_main_delegate.h @@ -21,23 +21,22 @@ class CommandLine; class ChromeMainDelegate : public content::ContentMainDelegate { public: ChromeMainDelegate(); - virtual ~ChromeMainDelegate(); + ~ChromeMainDelegate() override; protected: // content::ContentMainDelegate implementation: - virtual bool BasicStartupComplete(int* exit_code) override; - virtual void PreSandboxStartup() override; - virtual void SandboxInitialized(const std::string& process_type) override; - virtual int RunProcess( + bool BasicStartupComplete(int* exit_code) override; + void PreSandboxStartup() override; + void SandboxInitialized(const std::string& process_type) override; + int RunProcess( const std::string& process_type, const content::MainFunctionParams& main_function_params) override; - virtual void ProcessExiting(const std::string& process_type) override; + void ProcessExiting(const std::string& process_type) override; #if defined(OS_MACOSX) - virtual bool ProcessRegistersWithSystemProcess( - const std::string& process_type) override; - virtual bool ShouldSendMachPort(const std::string& process_type) override; - virtual bool DelaySandboxInitialization( + bool ProcessRegistersWithSystemProcess( const std::string& process_type) override; + bool ShouldSendMachPort(const std::string& process_type) override; + bool DelaySandboxInitialization(const std::string& process_type) override; #elif defined(OS_POSIX) && !defined(OS_ANDROID) virtual void ZygoteStarting( ScopedVector<content::ZygoteForkDelegate>* delegates) override; @@ -46,11 +45,10 @@ class ChromeMainDelegate : public content::ContentMainDelegate { virtual bool ShouldEnableTerminationOnHeapCorruption() override; #endif - virtual content::ContentBrowserClient* CreateContentBrowserClient() override; - virtual content::ContentPluginClient* CreateContentPluginClient() override; - virtual content::ContentRendererClient* - CreateContentRendererClient() override; - virtual content::ContentUtilityClient* CreateContentUtilityClient() override; + content::ContentBrowserClient* CreateContentBrowserClient() override; + content::ContentPluginClient* CreateContentPluginClient() override; + content::ContentRendererClient* CreateContentRendererClient() override; + content::ContentUtilityClient* CreateContentUtilityClient() override; #if defined(OS_MACOSX) void InitMacCrashReporter(const base::CommandLine& command_line, diff --git a/chrome/app_shim/chrome_main_app_mode_mac.mm b/chrome/app_shim/chrome_main_app_mode_mac.mm index 4e300ac..5692f7e 100644 --- a/chrome/app_shim/chrome_main_app_mode_mac.mm +++ b/chrome/app_shim/chrome_main_app_mode_mac.mm @@ -88,7 +88,7 @@ class AppShimController; class AppShimController : public IPC::Listener { public: AppShimController(); - virtual ~AppShimController(); + ~AppShimController() override; // Called when the main Chrome process responds to the Apple Event ping that // was sent, or when the ping fails (if |success| is false). @@ -119,8 +119,8 @@ class AppShimController : public IPC::Listener { private: // IPC::Listener implemetation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelError() override; // If Chrome failed to launch the app, |success| will be false and the app // shim process should die. diff --git a/chrome/common/chrome_content_client.h b/chrome/common/chrome_content_client.h index f8c0d75..e9d3ed0 100644 --- a/chrome/common/chrome_content_client.h +++ b/chrome/common/chrome_content_client.h @@ -20,26 +20,25 @@ class ChromeContentClient : public content::ContentClient { static const char* const kPDFPluginName; static const char* const kRemotingViewerPluginPath; - virtual void SetActiveURL(const GURL& url) override; - virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; - virtual void AddPepperPlugins( + void SetActiveURL(const GURL& url) override; + void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; + void AddPepperPlugins( std::vector<content::PepperPluginInfo>* plugins) override; - virtual void AddAdditionalSchemes( - std::vector<std::string>* standard_schemes, - std::vector<std::string>* saveable_shemes) override; - virtual std::string GetProduct() const override; - virtual std::string GetUserAgent() const override; - virtual base::string16 GetLocalizedString(int message_id) const override; - virtual base::StringPiece GetDataResource( + void AddAdditionalSchemes(std::vector<std::string>* standard_schemes, + std::vector<std::string>* saveable_shemes) override; + std::string GetProduct() const override; + std::string GetUserAgent() const override; + base::string16 GetLocalizedString(int message_id) const override; + base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const override; - virtual base::RefCountedStaticMemory* GetDataResourceBytes( + base::RefCountedStaticMemory* GetDataResourceBytes( int resource_id) const override; - virtual gfx::Image& GetNativeImageNamed(int resource_id) const override; - virtual std::string GetProcessTypeNameInEnglish(int type) override; + gfx::Image& GetNativeImageNamed(int resource_id) const override; + std::string GetProcessTypeNameInEnglish(int type) override; #if defined(OS_MACOSX) && !defined(OS_IOS) - virtual bool GetSandboxProfileForSandboxType( + bool GetSandboxProfileForSandboxType( int sandbox_type, int* sandbox_profile_resource_id) const override; #endif diff --git a/chrome/common/extensions/api/commands/commands_handler.h b/chrome/common/extensions/api/commands/commands_handler.h index 3731522..ddd3348 100644 --- a/chrome/common/extensions/api/commands/commands_handler.h +++ b/chrome/common/extensions/api/commands/commands_handler.h @@ -17,7 +17,7 @@ namespace extensions { struct CommandsInfo : public Extension::ManifestData { CommandsInfo(); - virtual ~CommandsInfo(); + ~CommandsInfo() override; // Optional list of commands (keyboard shortcuts). // These commands are the commands which the extension wants to use, which are @@ -36,10 +36,10 @@ struct CommandsInfo : public Extension::ManifestData { class CommandsHandler : public ManifestHandler { public: CommandsHandler(); - virtual ~CommandsHandler(); + ~CommandsHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool AlwaysParseForType(Manifest::Type type) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool AlwaysParseForType(Manifest::Type type) const override; private: // If the extension defines a browser action, but no command for it, then @@ -48,7 +48,7 @@ class CommandsHandler : public ManifestHandler { void MaybeSetBrowserActionDefault(const Extension* extension, CommandsInfo* info); - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(CommandsHandler); }; diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc index 95fea8f..8cf0386 100644 --- a/chrome/common/extensions/api/extension_action/action_info.cc +++ b/chrome/common/extensions/api/extension_action/action_info.cc @@ -24,7 +24,7 @@ namespace { // PageActions and SystemIndicators. struct ActionInfoData : public Extension::ManifestData { explicit ActionInfoData(ActionInfo* action_info); - virtual ~ActionInfoData(); + ~ActionInfoData() override; // The action associated with the BrowserAction. scoped_ptr<ActionInfo> action_info; diff --git a/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc b/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc index cdc6d6b..236a45c 100644 --- a/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc +++ b/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc @@ -19,7 +19,7 @@ namespace keys = manifest_keys; class PageActionManifestTest : public ChromeManifestTest { protected: - virtual base::FilePath GetTestDataDir() override { + base::FilePath GetTestDataDir() override { base::FilePath path; PathService::Get(chrome::DIR_TEST_DATA, &path); return path.AppendASCII("extensions").AppendASCII("page_action"); diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc index 181f2f5..92124d2 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc @@ -46,7 +46,7 @@ struct FileBrowserHandlerInfo : public extensions::Extension::ManifestData { FileBrowserHandler::List file_browser_handlers; FileBrowserHandlerInfo(); - virtual ~FileBrowserHandlerInfo(); + ~FileBrowserHandlerInfo() override; }; FileBrowserHandlerInfo::FileBrowserHandlerInfo() { diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h index 476da0d..d7297f1 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h @@ -89,13 +89,12 @@ class FileBrowserHandler { class FileBrowserHandlerParser : public extensions::ManifestHandler { public: FileBrowserHandlerParser(); - virtual ~FileBrowserHandlerParser(); + ~FileBrowserHandlerParser() override; - virtual bool Parse(extensions::Extension* extension, - base::string16* error) override; + bool Parse(extensions::Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; }; #endif // CHROME_COMMON_EXTENSIONS_API_FILE_BROWSER_HANDLERS_FILE_BROWSER_HANDLER_H_ diff --git a/chrome/common/extensions/api/i18n/default_locale_handler.h b/chrome/common/extensions/api/i18n/default_locale_handler.h index f34f611..d0f795e 100644 --- a/chrome/common/extensions/api/i18n/default_locale_handler.h +++ b/chrome/common/extensions/api/i18n/default_locale_handler.h @@ -24,19 +24,19 @@ struct LocaleInfo : public Extension::ManifestData { class DefaultLocaleHandler : public ManifestHandler { public: DefaultLocaleHandler(); - virtual ~DefaultLocaleHandler(); + ~DefaultLocaleHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; // Validates locale info. Doesn't check if messages.json files are valid. - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; - virtual bool AlwaysValidateForType(Manifest::Type type) const override; + bool AlwaysValidateForType(Manifest::Type type) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(DefaultLocaleHandler); }; diff --git a/chrome/common/extensions/api/input_ime/input_components_handler.h b/chrome/common/extensions/api/input_ime/input_components_handler.h index 2df25db..410dcbb 100644 --- a/chrome/common/extensions/api/input_ime/input_components_handler.h +++ b/chrome/common/extensions/api/input_ime/input_components_handler.h @@ -45,7 +45,7 @@ struct InputComponentInfo { struct InputComponents : public Extension::ManifestData { // Define out of line constructor/destructor to please Clang. InputComponents(); - virtual ~InputComponents(); + ~InputComponents() override; std::vector<InputComponentInfo> input_components; @@ -58,15 +58,15 @@ struct InputComponents : public Extension::ManifestData { class InputComponentsHandler : public ManifestHandler { public: InputComponentsHandler(); - virtual ~InputComponentsHandler(); + ~InputComponentsHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; // Requires kOptionsPage is already parsed. - virtual const std::vector<std::string> PrerequisiteKeys() const override; + const std::vector<std::string> PrerequisiteKeys() const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(InputComponentsHandler); }; diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.h b/chrome/common/extensions/api/omnibox/omnibox_handler.h index 62f115d..97eabb7 100644 --- a/chrome/common/extensions/api/omnibox/omnibox_handler.h +++ b/chrome/common/extensions/api/omnibox/omnibox_handler.h @@ -26,12 +26,12 @@ struct OmniboxInfo : public Extension::ManifestData { class OmniboxHandler : public ManifestHandler { public: OmniboxHandler(); - virtual ~OmniboxHandler(); + ~OmniboxHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; }; } // namespace extensions diff --git a/chrome/common/extensions/api/plugins/plugins_handler.h b/chrome/common/extensions/api/plugins/plugins_handler.h index 48a2cc8..d9ce2fa 100644 --- a/chrome/common/extensions/api/plugins/plugins_handler.h +++ b/chrome/common/extensions/api/plugins/plugins_handler.h @@ -34,15 +34,15 @@ struct PluginInfo { class PluginsHandler : public ManifestHandler { public: PluginsHandler(); - virtual ~PluginsHandler(); + ~PluginsHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(PluginsHandler); }; diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc index 9919962..9a5b544 100644 --- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc +++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc @@ -22,7 +22,7 @@ namespace { struct TtsVoices : public Extension::ManifestData { TtsVoices() {} - virtual ~TtsVoices() {} + ~TtsVoices() override {} std::vector<extensions::TtsVoice> voices; }; diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h index 9005a55..2fcc54f 100644 --- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h +++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h @@ -31,12 +31,12 @@ struct TtsVoice { class TtsEngineManifestHandler : public ManifestHandler { public: TtsEngineManifestHandler(); - virtual ~TtsEngineManifestHandler(); + ~TtsEngineManifestHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(TtsEngineManifestHandler); }; diff --git a/chrome/common/extensions/api/spellcheck/spellcheck_handler.h b/chrome/common/extensions/api/spellcheck/spellcheck_handler.h index e482935..53bfe32 100644 --- a/chrome/common/extensions/api/spellcheck/spellcheck_handler.h +++ b/chrome/common/extensions/api/spellcheck/spellcheck_handler.h @@ -14,7 +14,7 @@ namespace extensions { // used in the SpellcheckAPI functions. It is stored on the extension. struct SpellcheckDictionaryInfo : public extensions::Extension::ManifestData { SpellcheckDictionaryInfo(); - virtual ~SpellcheckDictionaryInfo(); + ~SpellcheckDictionaryInfo() override; std::string language; std::string locale; @@ -26,12 +26,12 @@ struct SpellcheckDictionaryInfo : public extensions::Extension::ManifestData { class SpellcheckHandler : public ManifestHandler { public: SpellcheckHandler(); - virtual ~SpellcheckHandler(); + ~SpellcheckHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(SpellcheckHandler); }; diff --git a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h index e7553a1..c698e2d 100644 --- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h +++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h @@ -18,7 +18,7 @@ namespace extensions { class StorageSchemaManifestHandler : public ManifestHandler { public: StorageSchemaManifestHandler(); - virtual ~StorageSchemaManifestHandler(); + ~StorageSchemaManifestHandler() override; #if defined(ENABLE_CONFIGURATION_POLICY) // Returns the managed storage schema defined for |extension|. @@ -31,11 +31,11 @@ class StorageSchemaManifestHandler : public ManifestHandler { private: // ManifestHandler implementation: - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; - virtual const std::vector<std::string> Keys() const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(StorageSchemaManifestHandler); }; diff --git a/chrome/common/extensions/api/supervised_user_private/supervised_user_handler.h b/chrome/common/extensions/api/supervised_user_private/supervised_user_handler.h index 6f8a5f5..6383523 100644 --- a/chrome/common/extensions/api/supervised_user_private/supervised_user_handler.h +++ b/chrome/common/extensions/api/supervised_user_private/supervised_user_handler.h @@ -18,7 +18,7 @@ namespace extensions { struct SupervisedUserInfo : public Extension::ManifestData { SupervisedUserInfo(); - virtual ~SupervisedUserInfo(); + ~SupervisedUserInfo() override; static bool IsContentPack(const Extension* extension); static ExtensionResource GetContentPackSiteList(const Extension* extension); @@ -31,12 +31,12 @@ struct SupervisedUserInfo : public Extension::ManifestData { class SupervisedUserHandler : public ManifestHandler { public: SupervisedUserHandler(); - virtual ~SupervisedUserHandler(); + ~SupervisedUserHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; bool LoadSites(SupervisedUserInfo* info, const base::DictionaryValue* content_pack_value, diff --git a/chrome/common/extensions/api/system_indicator/system_indicator_handler.h b/chrome/common/extensions/api/system_indicator/system_indicator_handler.h index 3db395b..19e4e5f 100644 --- a/chrome/common/extensions/api/system_indicator/system_indicator_handler.h +++ b/chrome/common/extensions/api/system_indicator/system_indicator_handler.h @@ -15,12 +15,12 @@ namespace extensions { class SystemIndicatorHandler : public ManifestHandler { public: SystemIndicatorHandler(); - virtual ~SystemIndicatorHandler(); + ~SystemIndicatorHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(SystemIndicatorHandler); }; diff --git a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h index af3fbc1..3c3350f 100644 --- a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h +++ b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h @@ -30,7 +30,7 @@ struct UrlHandlerInfo { struct UrlHandlers : public Extension::ManifestData { UrlHandlers(); - virtual ~UrlHandlers(); + ~UrlHandlers() override; // Returns an array of URL handlers |extension| has defined in its manifest. static const std::vector<UrlHandlerInfo>* GetUrlHandlers( @@ -55,13 +55,13 @@ struct UrlHandlers : public Extension::ManifestData { class UrlHandlersParser : public ManifestHandler { public: UrlHandlersParser(); - virtual ~UrlHandlersParser(); + ~UrlHandlersParser() override; // ManifestHandler API - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(UrlHandlersParser); }; diff --git a/chrome/common/extensions/chrome_extensions_client.h b/chrome/common/extensions/chrome_extensions_client.h index 922ee0c..9df85cd 100644 --- a/chrome/common/extensions/chrome_extensions_client.h +++ b/chrome/common/extensions/chrome_extensions_client.h @@ -20,37 +20,34 @@ namespace extensions { class ChromeExtensionsClient : public ExtensionsClient { public: ChromeExtensionsClient(); - virtual ~ChromeExtensionsClient(); + ~ChromeExtensionsClient() override; - virtual void Initialize() override; + void Initialize() override; - virtual const PermissionMessageProvider& GetPermissionMessageProvider() const - override; - virtual const std::string GetProductName() override; - virtual scoped_ptr<FeatureProvider> CreateFeatureProvider( + const PermissionMessageProvider& GetPermissionMessageProvider() + const override; + const std::string GetProductName() override; + scoped_ptr<FeatureProvider> CreateFeatureProvider( const std::string& name) const override; - virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource( + scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource( const std::string& name) const override; - virtual void FilterHostPermissions( + void FilterHostPermissions( const URLPatternSet& hosts, URLPatternSet* new_hosts, std::set<PermissionMessage>* messages) const override; - virtual void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) - override; - virtual const ScriptingWhitelist& GetScriptingWhitelist() const override; - virtual URLPatternSet GetPermittedChromeSchemeHosts( + void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) override; + const ScriptingWhitelist& GetScriptingWhitelist() const override; + URLPatternSet GetPermittedChromeSchemeHosts( const Extension* extension, const APIPermissionSet& api_permissions) const override; - virtual bool IsScriptableURL(const GURL& url, std::string* error) const - override; - virtual bool IsAPISchemaGenerated(const std::string& name) const override; - virtual base::StringPiece GetAPISchema(const std::string& name) const - override; - virtual void RegisterAPISchemaResources(ExtensionAPI* api) const override; - virtual bool ShouldSuppressFatalErrors() const override; - virtual std::string GetWebstoreBaseURL() const override; - virtual std::string GetWebstoreUpdateURL() const override; - virtual bool IsBlacklistUpdateURL(const GURL& url) const override; + bool IsScriptableURL(const GURL& url, std::string* error) const override; + bool IsAPISchemaGenerated(const std::string& name) const override; + base::StringPiece GetAPISchema(const std::string& name) const override; + void RegisterAPISchemaResources(ExtensionAPI* api) const override; + bool ShouldSuppressFatalErrors() const override; + std::string GetWebstoreBaseURL() const override; + std::string GetWebstoreUpdateURL() const override; + bool IsBlacklistUpdateURL(const GURL& url) const override; // Get the LazyInstance for ChromeExtensionsClient. static ChromeExtensionsClient* GetInstance(); diff --git a/chrome/common/extensions/chrome_manifest_url_handlers.h b/chrome/common/extensions/chrome_manifest_url_handlers.h index ab56a1d..396fb42 100644 --- a/chrome/common/extensions/chrome_manifest_url_handlers.h +++ b/chrome/common/extensions/chrome_manifest_url_handlers.h @@ -27,7 +27,7 @@ struct URLOverrides : public Extension::ManifestData { typedef std::map<const std::string, GURL> URLOverrideMap; URLOverrides(); - virtual ~URLOverrides(); + ~URLOverrides() override; static const URLOverrideMap& GetChromeURLOverrides( const Extension* extension); @@ -41,12 +41,12 @@ struct URLOverrides : public Extension::ManifestData { class DevToolsPageHandler : public ManifestHandler { public: DevToolsPageHandler(); - virtual ~DevToolsPageHandler(); + ~DevToolsPageHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(DevToolsPageHandler); }; @@ -55,12 +55,12 @@ class DevToolsPageHandler : public ManifestHandler { class URLOverridesHandler : public ManifestHandler { public: URLOverridesHandler(); - virtual ~URLOverridesHandler(); + ~URLOverridesHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(URLOverridesHandler); }; diff --git a/chrome/common/extensions/features/chrome_channel_feature_filter.h b/chrome/common/extensions/features/chrome_channel_feature_filter.h index 55f2441..4394f56 100644 --- a/chrome/common/extensions/features/chrome_channel_feature_filter.h +++ b/chrome/common/extensions/features/chrome_channel_feature_filter.h @@ -15,11 +15,11 @@ namespace extensions { class ChromeChannelFeatureFilter : public SimpleFeatureFilter { public: explicit ChromeChannelFeatureFilter(SimpleFeature* feature); - virtual ~ChromeChannelFeatureFilter(); + ~ChromeChannelFeatureFilter() override; // SimpleFeatureFilter implementation. - virtual std::string Parse(const base::DictionaryValue* value) override; - virtual Feature::Availability IsAvailableToManifest( + std::string Parse(const base::DictionaryValue* value) override; + Feature::Availability IsAvailableToManifest( const std::string& extension_id, Manifest::Type type, Manifest::Location location, diff --git a/chrome/common/extensions/manifest_handlers/app_isolation_info.h b/chrome/common/extensions/manifest_handlers/app_isolation_info.h index 10578c1..c3f3de1 100644 --- a/chrome/common/extensions/manifest_handlers/app_isolation_info.h +++ b/chrome/common/extensions/manifest_handlers/app_isolation_info.h @@ -16,7 +16,7 @@ namespace extensions { struct AppIsolationInfo : public Extension::ManifestData { explicit AppIsolationInfo(bool isolated_storage); - virtual ~AppIsolationInfo(); + ~AppIsolationInfo() override; static bool HasIsolatedStorage(const Extension* extension); @@ -28,13 +28,13 @@ struct AppIsolationInfo : public Extension::ManifestData { class AppIsolationHandler : public ManifestHandler { public: AppIsolationHandler(); - virtual ~AppIsolationHandler(); + ~AppIsolationHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool AlwaysParseForType(Manifest::Type type) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool AlwaysParseForType(Manifest::Type type) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(AppIsolationHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/app_launch_info.h b/chrome/common/extensions/manifest_handlers/app_launch_info.h index 1ffc4ec..cf39263 100644 --- a/chrome/common/extensions/manifest_handlers/app_launch_info.h +++ b/chrome/common/extensions/manifest_handlers/app_launch_info.h @@ -20,7 +20,7 @@ namespace extensions { class AppLaunchInfo : public Extension::ManifestData { public: AppLaunchInfo(); - virtual ~AppLaunchInfo(); + ~AppLaunchInfo() override; // Get the local path inside the extension to use with the launcher. static const std::string& GetLaunchLocalPath(const Extension* extension); @@ -67,13 +67,13 @@ class AppLaunchInfo : public Extension::ManifestData { class AppLaunchManifestHandler : public ManifestHandler { public: AppLaunchManifestHandler(); - virtual ~AppLaunchManifestHandler(); + ~AppLaunchManifestHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool AlwaysParseForType(Manifest::Type type) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool AlwaysParseForType(Manifest::Type type) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(AppLaunchManifestHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/automation.cc b/chrome/common/extensions/manifest_handlers/automation.cc index ea9fd7e..c5b24af 100644 --- a/chrome/common/extensions/manifest_handlers/automation.cc +++ b/chrome/common/extensions/manifest_handlers/automation.cc @@ -44,26 +44,23 @@ class AutomationManifestPermission : public ManifestPermission { : automation_info_(automation_info.Pass()) {} // extensions::ManifestPermission overrides. - virtual std::string name() const override; + std::string name() const override; - virtual std::string id() const override; + std::string id() const override; - virtual bool HasMessages() const override; + bool HasMessages() const override; - virtual PermissionMessages GetMessages() const override; + PermissionMessages GetMessages() const override; - virtual bool FromValue(const base::Value* value) override; + bool FromValue(const base::Value* value) override; - virtual scoped_ptr<base::Value> ToValue() const override; + scoped_ptr<base::Value> ToValue() const override; - virtual ManifestPermission* Diff( - const ManifestPermission* rhs) const override; + ManifestPermission* Diff(const ManifestPermission* rhs) const override; - virtual ManifestPermission* Union( - const ManifestPermission* rhs) const override; + ManifestPermission* Union(const ManifestPermission* rhs) const override; - virtual ManifestPermission* Intersect( - const ManifestPermission* rhs) const override; + ManifestPermission* Intersect(const ManifestPermission* rhs) const override; private: scoped_ptr<const AutomationInfo> automation_info_; diff --git a/chrome/common/extensions/manifest_handlers/automation.h b/chrome/common/extensions/manifest_handlers/automation.h index 30b5e4e..2eaed61 100644 --- a/chrome/common/extensions/manifest_handlers/automation.h +++ b/chrome/common/extensions/manifest_handlers/automation.h @@ -43,7 +43,7 @@ struct AutomationInfo : public Extension::ManifestData { base::string16* error); static scoped_ptr<base::Value> ToValue(const AutomationInfo& info); - virtual ~AutomationInfo(); + ~AutomationInfo() override; // true if the extension has requested 'desktop' permission. const bool desktop; @@ -72,16 +72,16 @@ struct AutomationInfo : public Extension::ManifestData { class AutomationHandler : public ManifestHandler { public: AutomationHandler(); - virtual ~AutomationHandler(); + ~AutomationHandler() override; private: // ManifestHandler implementation. - virtual bool Parse(Extension* extensions, base::string16* error) override; + bool Parse(Extension* extensions, base::string16* error) override; - virtual ManifestPermission* CreatePermission() override; - virtual ManifestPermission* CreateInitialRequiredPermission( + ManifestPermission* CreatePermission() override; + ManifestPermission* CreateInitialRequiredPermission( const Extension* extension) override; - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(AutomationHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.h b/chrome/common/extensions/manifest_handlers/content_scripts_handler.h index dd6e90c..295a59b 100644 --- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.h +++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.h @@ -17,7 +17,7 @@ class URLPatternSet; struct ContentScriptsInfo : public Extension::ManifestData { ContentScriptsInfo(); - virtual ~ContentScriptsInfo(); + ~ContentScriptsInfo() override; // Paths to the content scripts the extension contains (possibly empty). UserScriptList content_scripts; @@ -38,15 +38,15 @@ struct ContentScriptsInfo : public Extension::ManifestData { class ContentScriptsHandler : public ManifestHandler { public: ContentScriptsHandler(); - virtual ~ContentScriptsHandler(); + ~ContentScriptsHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(ContentScriptsHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/extension_action_handler.h b/chrome/common/extensions/manifest_handlers/extension_action_handler.h index 3c03ef9..48441b3 100644 --- a/chrome/common/extensions/manifest_handlers/extension_action_handler.h +++ b/chrome/common/extensions/manifest_handlers/extension_action_handler.h @@ -15,16 +15,16 @@ namespace extensions { class ExtensionActionHandler : public ManifestHandler { public: ExtensionActionHandler(); - virtual ~ExtensionActionHandler(); + ~ExtensionActionHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; private: - virtual bool AlwaysParseForType(Manifest::Type type) const override; - virtual const std::vector<std::string> Keys() const override; + bool AlwaysParseForType(Manifest::Type type) const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(ExtensionActionHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/mime_types_handler.cc b/chrome/common/extensions/manifest_handlers/mime_types_handler.cc index 3e22d7f..dd25d89 100644 --- a/chrome/common/extensions/manifest_handlers/mime_types_handler.cc +++ b/chrome/common/extensions/manifest_handlers/mime_types_handler.cc @@ -30,7 +30,7 @@ struct MimeTypesHandlerInfo : public extensions::Extension::ManifestData { MimeTypesHandler handler_; MimeTypesHandlerInfo(); - virtual ~MimeTypesHandlerInfo(); + ~MimeTypesHandlerInfo() override; }; MimeTypesHandlerInfo::MimeTypesHandlerInfo() { diff --git a/chrome/common/extensions/manifest_handlers/mime_types_handler.h b/chrome/common/extensions/manifest_handlers/mime_types_handler.h index 6156106..7933ce5 100644 --- a/chrome/common/extensions/manifest_handlers/mime_types_handler.h +++ b/chrome/common/extensions/manifest_handlers/mime_types_handler.h @@ -57,13 +57,12 @@ class MimeTypesHandler { class MimeTypesHandlerParser : public extensions::ManifestHandler { public: MimeTypesHandlerParser(); - virtual ~MimeTypesHandlerParser(); + ~MimeTypesHandlerParser() override; - virtual bool Parse(extensions::Extension* extension, - base::string16* error) override; + bool Parse(extensions::Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; }; #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_MIME_TYPES_HANDLER_H_ diff --git a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h index 030d59c..272a980 100644 --- a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h +++ b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h @@ -13,14 +13,14 @@ namespace extensions { class MinimumChromeVersionChecker : public ManifestHandler { public: MinimumChromeVersionChecker(); - virtual ~MinimumChromeVersionChecker(); + ~MinimumChromeVersionChecker() override; // Validate minimum Chrome version. We don't need to store this, since the // extension is not valid if it is incorrect. - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(MinimumChromeVersionChecker); }; diff --git a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h index 992a04b..f813965 100644 --- a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h +++ b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h @@ -24,7 +24,7 @@ class ManifestPermission; // homepage and append a startup page to the list. struct SettingsOverrides : public Extension::ManifestData { SettingsOverrides(); - virtual ~SettingsOverrides(); + ~SettingsOverrides() override; static const SettingsOverrides* Get(const Extension* extension); @@ -40,12 +40,12 @@ struct SettingsOverrides : public Extension::ManifestData { class SettingsOverridesHandler : public ManifestHandler { public: SettingsOverridesHandler(); - virtual ~SettingsOverridesHandler(); + ~SettingsOverridesHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; + bool Parse(Extension* extension, base::string16* error) override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/theme_handler.h b/chrome/common/extensions/manifest_handlers/theme_handler.h index 26d613c..bd35f28 100644 --- a/chrome/common/extensions/manifest_handlers/theme_handler.h +++ b/chrome/common/extensions/manifest_handlers/theme_handler.h @@ -18,7 +18,7 @@ namespace extensions { struct ThemeInfo : public Extension::ManifestData { // Define out of line constructor/destructor to please Clang. ThemeInfo(); - virtual ~ThemeInfo(); + ~ThemeInfo() override; static const base::DictionaryValue* GetImages(const Extension* extension); static const base::DictionaryValue* GetColors(const Extension* extension); @@ -43,15 +43,15 @@ struct ThemeInfo : public Extension::ManifestData { class ThemeHandler : public ManifestHandler { public: ThemeHandler(); - virtual ~ThemeHandler(); + ~ThemeHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; private: - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(ThemeHandler); }; diff --git a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc index b631f1c..adf85f7 100644 --- a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc +++ b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc @@ -30,19 +30,15 @@ class UIOverridesHandler::ManifestPermissionImpl : public ManifestPermission { : override_bookmarks_ui_permission_(override_bookmarks_ui_permission) {} // extensions::ManifestPermission overrides. - virtual std::string name() const override { - return manifest_keys::kUIOverride; - } + std::string name() const override { return manifest_keys::kUIOverride; } - virtual std::string id() const override { - return name(); - } + std::string id() const override { return name(); } - virtual bool HasMessages() const override { + bool HasMessages() const override { return override_bookmarks_ui_permission_; } - virtual PermissionMessages GetMessages() const override { + PermissionMessages GetMessages() const override { PermissionMessages result; if (override_bookmarks_ui_permission_) { result.push_back(PermissionMessage( @@ -53,17 +49,16 @@ class UIOverridesHandler::ManifestPermissionImpl : public ManifestPermission { return result; } - virtual bool FromValue(const base::Value* value) override { + bool FromValue(const base::Value* value) override { return value && value->GetAsBoolean(&override_bookmarks_ui_permission_); } - virtual scoped_ptr<base::Value> ToValue() const override { + scoped_ptr<base::Value> ToValue() const override { return scoped_ptr<base::Value>( new base::FundamentalValue(override_bookmarks_ui_permission_)).Pass(); } - virtual ManifestPermission* Diff(const ManifestPermission* rhs) const - override { + ManifestPermission* Diff(const ManifestPermission* rhs) const override { const ManifestPermissionImpl* other = static_cast<const ManifestPermissionImpl*>(rhs); @@ -72,8 +67,7 @@ class UIOverridesHandler::ManifestPermissionImpl : public ManifestPermission { !other->override_bookmarks_ui_permission_)).release(); } - virtual ManifestPermission* Union(const ManifestPermission* rhs) const - override { + ManifestPermission* Union(const ManifestPermission* rhs) const override { const ManifestPermissionImpl* other = static_cast<const ManifestPermissionImpl*>(rhs); @@ -82,8 +76,7 @@ class UIOverridesHandler::ManifestPermissionImpl : public ManifestPermission { other->override_bookmarks_ui_permission_)).release(); } - virtual ManifestPermission* Intersect(const ManifestPermission* rhs) const - override { + ManifestPermission* Intersect(const ManifestPermission* rhs) const override { const ManifestPermissionImpl* other = static_cast<const ManifestPermissionImpl*>(rhs); diff --git a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.h b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.h index b1ce864..15ad89a 100644 --- a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.h +++ b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.h @@ -18,7 +18,7 @@ class ManifestPermission; // interface. struct UIOverrides : public Extension::ManifestData { UIOverrides(); - virtual ~UIOverrides(); + ~UIOverrides() override; static const UIOverrides* Get(const Extension* extension); @@ -37,21 +37,21 @@ struct UIOverrides : public Extension::ManifestData { class UIOverridesHandler : public ManifestHandler { public: UIOverridesHandler(); - virtual ~UIOverridesHandler(); + ~UIOverridesHandler() override; - virtual bool Parse(Extension* extension, base::string16* error) override; - virtual bool Validate(const Extension* extension, - std::string* error, - std::vector<InstallWarning>* warnings) const override; + bool Parse(Extension* extension, base::string16* error) override; + bool Validate(const Extension* extension, + std::string* error, + std::vector<InstallWarning>* warnings) const override; - virtual ManifestPermission* CreatePermission() override; - virtual ManifestPermission* CreateInitialRequiredPermission( + ManifestPermission* CreatePermission() override; + ManifestPermission* CreateInitialRequiredPermission( const Extension* extension) override; private: class ManifestPermissionImpl; - virtual const std::vector<std::string> Keys() const override; + const std::vector<std::string> Keys() const override; DISALLOW_COPY_AND_ASSIGN(UIOverridesHandler); }; diff --git a/chrome/common/extensions/manifest_tests/chrome_manifest_test.h b/chrome/common/extensions/manifest_tests/chrome_manifest_test.h index 7a71cdd..0de34d4 100644 --- a/chrome/common/extensions/manifest_tests/chrome_manifest_test.h +++ b/chrome/common/extensions/manifest_tests/chrome_manifest_test.h @@ -18,7 +18,7 @@ class ChromeManifestTest : public extensions::ManifestTest { virtual ~ChromeManifestTest(); // ManifestTest overrides: - virtual base::FilePath GetTestDataDir() override; + base::FilePath GetTestDataDir() override; private: // Force the manifest tests to run as though they are on trunk, since several diff --git a/chrome/common/extensions/permissions/chrome_api_permissions.h b/chrome/common/extensions/permissions/chrome_api_permissions.h index aef5eb7..29890bd 100644 --- a/chrome/common/extensions/permissions/chrome_api_permissions.h +++ b/chrome/common/extensions/permissions/chrome_api_permissions.h @@ -15,9 +15,8 @@ namespace extensions { // Registers the permissions used in Chrome with the PermissionsInfo global. class ChromeAPIPermissions : public PermissionsProvider { public: - virtual std::vector<APIPermissionInfo*> GetAllPermissions() const override; - virtual std::vector<PermissionsProvider::AliasInfo> GetAllAliases() const - override; + std::vector<APIPermissionInfo*> GetAllPermissions() const override; + std::vector<PermissionsProvider::AliasInfo> GetAllAliases() const override; }; } // namespace extensions diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.h b/chrome/common/extensions/permissions/chrome_permission_message_provider.h index d52150a..6638fb5 100644 --- a/chrome/common/extensions/permissions/chrome_permission_message_provider.h +++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.h @@ -23,22 +23,21 @@ namespace extensions { class ChromePermissionMessageProvider : public PermissionMessageProvider { public: ChromePermissionMessageProvider(); - virtual ~ChromePermissionMessageProvider(); + ~ChromePermissionMessageProvider() override; // PermissionMessageProvider implementation. - virtual PermissionMessages GetPermissionMessages( + PermissionMessages GetPermissionMessages( const PermissionSet* permissions, Manifest::Type extension_type) const override; - virtual std::vector<base::string16> GetWarningMessages( + std::vector<base::string16> GetWarningMessages( const PermissionSet* permissions, Manifest::Type extension_type) const override; - virtual std::vector<base::string16> GetWarningMessagesDetails( + std::vector<base::string16> GetWarningMessagesDetails( const PermissionSet* permissions, Manifest::Type extension_type) const override; - virtual bool IsPrivilegeIncrease( - const PermissionSet* old_permissions, - const PermissionSet* new_permissions, - Manifest::Type extension_type) const override; + bool IsPrivilegeIncrease(const PermissionSet* old_permissions, + const PermissionSet* new_permissions, + Manifest::Type extension_type) const override; private: // Gets the permission messages for the API permissions. diff --git a/chrome/common/icon_with_badge_image_source.h b/chrome/common/icon_with_badge_image_source.h index 87bf9df..f120a0a 100644 --- a/chrome/common/icon_with_badge_image_source.h +++ b/chrome/common/icon_with_badge_image_source.h @@ -27,10 +27,10 @@ class IconWithBadgeImageSource const SkColor& text_color, const SkColor& background_color, extensions::ActionInfo::Type action_type); - virtual ~IconWithBadgeImageSource(); + ~IconWithBadgeImageSource() override; private: - virtual void Draw(gfx::Canvas* canvas) override; + void Draw(gfx::Canvas* canvas) override; // Browser action icon image. gfx::ImageSkia icon_; diff --git a/chrome/common/ini_parser.h b/chrome/common/ini_parser.h index 4c63a50..7ca7b5f 100644 --- a/chrome/common/ini_parser.h +++ b/chrome/common/ini_parser.h @@ -46,15 +46,15 @@ class INIParser { class DictionaryValueINIParser : public INIParser { public: DictionaryValueINIParser(); - virtual ~DictionaryValueINIParser(); + ~DictionaryValueINIParser() override; const base::DictionaryValue& root() const { return root_; } private: // INIParser implementation. - virtual void HandleTriplet(const std::string& section, - const std::string& key, - const std::string& value) override; + void HandleTriplet(const std::string& section, + const std::string& key, + const std::string& value) override; base::DictionaryValue root_; diff --git a/chrome/common/ini_parser_unittest.cc b/chrome/common/ini_parser_unittest.cc index b11fdef..8d7ada5 100644 --- a/chrome/common/ini_parser_unittest.cc +++ b/chrome/common/ini_parser_unittest.cc @@ -31,15 +31,16 @@ class TestINIParser : public INIParser { : expected_triplets_(expected_triplets), pair_i_(0) { } - virtual ~TestINIParser() {} + ~TestINIParser() override {} size_t pair_i() { return pair_i_; } private: - virtual void HandleTriplet(const std::string& section, const std::string& key, - const std::string& value) override { + void HandleTriplet(const std::string& section, + const std::string& key, + const std::string& value) override { EXPECT_EQ(expected_triplets_[pair_i_].section, section); EXPECT_EQ(expected_triplets_[pair_i_].key, key); EXPECT_EQ(expected_triplets_[pair_i_].value, value); diff --git a/chrome/common/mac/mock_launchd.h b/chrome/common/mac/mock_launchd.h index 33e24d9..ba82009 100644 --- a/chrome/common/mac/mock_launchd.h +++ b/chrome/common/mac/mock_launchd.h @@ -30,28 +30,24 @@ class MockLaunchd : public Launchd { MockLaunchd(const base::FilePath& file, base::MessageLoop* loop, bool create_socket, bool as_service); - virtual ~MockLaunchd(); + ~MockLaunchd() override; - virtual CFDictionaryRef CopyExports() override; - virtual CFDictionaryRef CopyJobDictionary(CFStringRef label) override; - virtual CFDictionaryRef CopyDictionaryByCheckingIn(CFErrorRef* error) - override; - virtual bool RemoveJob(CFStringRef label, CFErrorRef* error) override; - virtual bool RestartJob(Domain domain, - Type type, - CFStringRef name, - CFStringRef session_type) override; - virtual CFMutableDictionaryRef CreatePlistFromFile( - Domain domain, - Type type, - CFStringRef name) override; - virtual bool WritePlistToFile(Domain domain, - Type type, - CFStringRef name, - CFDictionaryRef dict) override; - virtual bool DeletePlist(Domain domain, - Type type, - CFStringRef name) override; + CFDictionaryRef CopyExports() override; + CFDictionaryRef CopyJobDictionary(CFStringRef label) override; + CFDictionaryRef CopyDictionaryByCheckingIn(CFErrorRef* error) override; + bool RemoveJob(CFStringRef label, CFErrorRef* error) override; + bool RestartJob(Domain domain, + Type type, + CFStringRef name, + CFStringRef session_type) override; + CFMutableDictionaryRef CreatePlistFromFile(Domain domain, + Type type, + CFStringRef name) override; + bool WritePlistToFile(Domain domain, + Type type, + CFStringRef name, + CFDictionaryRef dict) override; + bool DeletePlist(Domain domain, Type type, CFStringRef name) override; void SignalReady(); diff --git a/chrome/common/multi_process_lock_mac.cc b/chrome/common/multi_process_lock_mac.cc index 2d5ab8b..1c58b5b 100644 --- a/chrome/common/multi_process_lock_mac.cc +++ b/chrome/common/multi_process_lock_mac.cc @@ -14,13 +14,13 @@ class MultiProcessLockMac : public MultiProcessLock { public: explicit MultiProcessLockMac(const std::string& name) : name_(name) { } - virtual ~MultiProcessLockMac() { + ~MultiProcessLockMac() override { if (port_ != NULL) { Unlock(); } } - virtual bool TryLock() override { + bool TryLock() override { if (port_ != NULL) { DLOG(ERROR) << "MultiProcessLock is already locked - " << name_; return true; @@ -38,7 +38,7 @@ class MultiProcessLockMac : public MultiProcessLock { return port_ != NULL; } - virtual void Unlock() override { + void Unlock() override { if (port_ == NULL) { DLOG(ERROR) << "Over-unlocked MultiProcessLock - " << name_; return; diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h index 393e53e..9eb1491 100644 --- a/chrome/common/service_process_util_posix.h +++ b/chrome/common/service_process_util_posix.h @@ -46,11 +46,11 @@ class ServiceProcessTerminateMonitor : public base::MessageLoopForIO::Watcher { }; explicit ServiceProcessTerminateMonitor(const base::Closure& terminate_task); - virtual ~ServiceProcessTerminateMonitor(); + ~ServiceProcessTerminateMonitor() override; // MessageLoopForIO::Watcher overrides - virtual void OnFileCanReadWithoutBlocking(int fd) override; - virtual void OnFileCanWriteWithoutBlocking(int fd) override; + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override; private: base::Closure terminate_task_; diff --git a/chrome/common/worker_thread_ticker_unittest.cc b/chrome/common/worker_thread_ticker_unittest.cc index f22702e..4f7dc0d 100644 --- a/chrome/common/worker_thread_ticker_unittest.cc +++ b/chrome/common/worker_thread_ticker_unittest.cc @@ -14,7 +14,7 @@ class TestCallback : public WorkerThreadTicker::Callback { public: TestCallback() : counter_(0), message_loop_(base::MessageLoop::current()) {} - virtual void OnTick() override { + void OnTick() override { counter_++; // Finish the test faster. @@ -30,7 +30,7 @@ class TestCallback : public WorkerThreadTicker::Callback { class LongCallback : public WorkerThreadTicker::Callback { public: - virtual void OnTick() override { + void OnTick() override { base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1500)); } }; diff --git a/chrome/plugin/chrome_content_plugin_client.h b/chrome/plugin/chrome_content_plugin_client.h index 0d717ea..bd159c2 100644 --- a/chrome/plugin/chrome_content_plugin_client.h +++ b/chrome/plugin/chrome_content_plugin_client.h @@ -12,7 +12,7 @@ namespace chrome { class ChromeContentPluginClient : public content::ContentPluginClient { public: - virtual void PreSandboxInitialization() override; + void PreSandboxInitialization() override; }; } // namespace chrome diff --git a/chrome/service/cloud_print/cloud_print_auth.h b/chrome/service/cloud_print/cloud_print_auth.h index f78ecfc..4a9f24d 100644 --- a/chrome/service/cloud_print/cloud_print_auth.h +++ b/chrome/service/cloud_print/cloud_print_auth.h @@ -56,26 +56,26 @@ class CloudPrintAuth void RefreshAccessToken(); // gaia::GaiaOAuthClient::Delegate implementation. - virtual void OnGetTokensResponse(const std::string& refresh_token, - const std::string& access_token, - int expires_in_seconds) override; - virtual void OnRefreshTokenResponse(const std::string& access_token, - int expires_in_seconds) override; - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnGetTokensResponse(const std::string& refresh_token, + const std::string& access_token, + int expires_in_seconds) override; + void OnRefreshTokenResponse(const std::string& access_token, + int expires_in_seconds) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; // CloudPrintURLFetcher::Delegate implementation. - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, bool succeeded) override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; - virtual std::string GetAuthHeader() override; + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; + std::string GetAuthHeader() override; private: friend class base::RefCountedThreadSafe<CloudPrintAuth>; - virtual ~CloudPrintAuth(); + ~CloudPrintAuth() override; Client* client_; gaia::OAuthClientInfo oauth_client_info_; diff --git a/chrome/service/cloud_print/cloud_print_connector.h b/chrome/service/cloud_print/cloud_print_connector.h index 52280af..6d05247 100644 --- a/chrome/service/cloud_print/cloud_print_connector.h +++ b/chrome/service/cloud_print/cloud_print_connector.h @@ -83,25 +83,25 @@ class CloudPrintConnector ~PendingTask() {} }; - virtual ~CloudPrintConnector(); + ~CloudPrintConnector() override; // PrintServerWatcherDelegate implementation - virtual void OnPrinterAdded() override; + void OnPrinterAdded() override; // PrinterJobHandler::Delegate implementation - virtual void OnPrinterDeleted(const std::string& printer_name) override; - virtual void OnAuthError() override; + void OnPrinterDeleted(const std::string& printer_name) override; + void OnAuthError() override; // CloudPrintURLFetcher::Delegate implementation. - virtual CloudPrintURLFetcher::ResponseAction HandleRawData( + CloudPrintURLFetcher::ResponseAction HandleRawData( const net::URLFetcher* source, const GURL& url, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, bool succeeded) override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; - virtual std::string GetAuthHeader() override; + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; + std::string GetAuthHeader() override; // Begin response handlers CloudPrintURLFetcher::ResponseAction HandlePrinterListResponse( diff --git a/chrome/service/cloud_print/cloud_print_proxy.h b/chrome/service/cloud_print/cloud_print_proxy.h index 7f839d1..4f7daa0 100644 --- a/chrome/service/cloud_print/cloud_print_proxy.h +++ b/chrome/service/cloud_print/cloud_print_proxy.h @@ -34,7 +34,7 @@ class CloudPrintProxy : public CloudPrintProxyFrontend, virtual void OnCloudPrintProxyDisabled(bool persist_state) {} }; CloudPrintProxy(); - virtual ~CloudPrintProxy(); + ~CloudPrintProxy() override; // Initializes the object. This should be called every time an object of this // class is constructed. @@ -62,18 +62,17 @@ class CloudPrintProxy : public CloudPrintProxyFrontend, } // CloudPrintProxyFrontend implementation. Called on UI thread. - virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token, - const std::string& robot_email, - const std::string& user_email) override; - virtual void OnAuthenticationFailed() override; - virtual void OnPrintSystemUnavailable() override; - virtual void OnUnregisterPrinters( - const std::string& auth_token, - const std::list<std::string>& printer_ids) override; - virtual void OnXmppPingUpdated(int ping_timeout) override; + void OnAuthenticated(const std::string& robot_oauth_refresh_token, + const std::string& robot_email, + const std::string& user_email) override; + void OnAuthenticationFailed() override; + void OnPrintSystemUnavailable() override; + void OnUnregisterPrinters(const std::string& auth_token, + const std::list<std::string>& printer_ids) override; + void OnXmppPingUpdated(int ping_timeout) override; // CloudPrintWipeout::Client implementation. - virtual void OnUnregisterPrintersComplete() override; + void OnUnregisterPrintersComplete() override; protected: void ShutdownBackend(); diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc index c4e6c6c..f364a13 100644 --- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc +++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc @@ -65,29 +65,28 @@ class CloudPrintProxyBackend::Core void DoUnregisterPrinters(); // CloudPrintAuth::Client implementation. - virtual void OnAuthenticationComplete( - const std::string& access_token, - const std::string& robot_oauth_refresh_token, - const std::string& robot_email, - const std::string& user_email) override; - virtual void OnInvalidCredentials() override; + void OnAuthenticationComplete(const std::string& access_token, + const std::string& robot_oauth_refresh_token, + const std::string& robot_email, + const std::string& user_email) override; + void OnInvalidCredentials() override; // CloudPrintConnector::Client implementation. - virtual void OnAuthFailed() override; - virtual void OnXmppPingUpdated(int ping_timeout) override; + void OnAuthFailed() override; + void OnXmppPingUpdated(int ping_timeout) override; // notifier::PushClientObserver implementation. - virtual void OnNotificationsEnabled() override; - virtual void OnNotificationsDisabled( + void OnNotificationsEnabled() override; + void OnNotificationsDisabled( notifier::NotificationsDisabledReason reason) override; - virtual void OnIncomingNotification( + void OnIncomingNotification( const notifier::Notification& notification) override; - virtual void OnPingResponse() override; + void OnPingResponse() override; private: friend class base::RefCountedThreadSafe<Core>; - virtual ~Core() {} + ~Core() override {} void CreateAuthAndConnector(); void DestroyAuthAndConnector(); diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.h b/chrome/service/cloud_print/cloud_print_url_fetcher.h index 901d584..91cad82 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher.h +++ b/chrome/service/cloud_print/cloud_print_url_fetcher.h @@ -134,12 +134,12 @@ class CloudPrintURLFetcher const std::string& additional_headers); // net::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; protected: CloudPrintURLFetcher(); friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; - virtual ~CloudPrintURLFetcher(); + ~CloudPrintURLFetcher() override; // Virtual for testing. virtual net::URLRequestContextGetter* GetRequestContextGetter(); diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc index 488f5be..a7e00f3 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc +++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc @@ -38,7 +38,7 @@ class TrackingTestURLRequestContextGetter g_request_context_getter_instances++; } - virtual net::TestURLRequestContext* GetURLRequestContext() override { + net::TestURLRequestContext* GetURLRequestContext() override { if (!context_.get()) { context_.reset(new net::TestURLRequestContext(true)); context_->set_throttler_manager(throttler_manager_); @@ -48,7 +48,7 @@ class TrackingTestURLRequestContextGetter } protected: - virtual ~TrackingTestURLRequestContextGetter() { + ~TrackingTestURLRequestContextGetter() override { g_request_context_getter_instances--; } @@ -65,7 +65,7 @@ class TestCloudPrintURLFetcher : public CloudPrintURLFetcher { : io_message_loop_proxy_(io_message_loop_proxy) { } - virtual net::URLRequestContextGetter* GetRequestContextGetter() override { + net::URLRequestContextGetter* GetRequestContextGetter() override { return new TrackingTestURLRequestContextGetter( io_message_loop_proxy_.get(), throttler_manager()); } @@ -75,7 +75,7 @@ class TestCloudPrintURLFetcher : public CloudPrintURLFetcher { } private: - virtual ~TestCloudPrintURLFetcher() {} + ~TestCloudPrintURLFetcher() override {} scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; @@ -93,7 +93,7 @@ class CloudPrintURLFetcherTest : public testing::Test, virtual void CreateFetcher(const GURL& url, int max_retries); // CloudPrintURLFetcher::Delegate - virtual CloudPrintURLFetcher::ResponseAction HandleRawResponse( + CloudPrintURLFetcher::ResponseAction HandleRawResponse( const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, @@ -101,14 +101,12 @@ class CloudPrintURLFetcherTest : public testing::Test, const net::ResponseCookies& cookies, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override { + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override { ADD_FAILURE(); return CloudPrintURLFetcher::STOP_PROCESSING; } - virtual std::string GetAuthHeader() override { - return std::string(); - } + std::string GetAuthHeader() override { return std::string(); } scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy() { return io_message_loop_proxy_; @@ -146,7 +144,7 @@ class CloudPrintURLFetcherBasicTest : public CloudPrintURLFetcherTest { CloudPrintURLFetcherBasicTest() : handle_raw_response_(false), handle_raw_data_(false) { } // CloudPrintURLFetcher::Delegate - virtual CloudPrintURLFetcher::ResponseAction HandleRawResponse( + CloudPrintURLFetcher::ResponseAction HandleRawResponse( const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, @@ -154,12 +152,12 @@ class CloudPrintURLFetcherBasicTest : public CloudPrintURLFetcherTest { const net::ResponseCookies& cookies, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction HandleRawData( + CloudPrintURLFetcher::ResponseAction HandleRawData( const net::URLFetcher* source, const GURL& url, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, @@ -183,7 +181,7 @@ class CloudPrintURLFetcherOverloadTest : public CloudPrintURLFetcherTest { } // CloudPrintURLFetcher::Delegate - virtual CloudPrintURLFetcher::ResponseAction HandleRawData( + CloudPrintURLFetcher::ResponseAction HandleRawData( const net::URLFetcher* source, const GURL& url, const std::string& data) override; @@ -199,12 +197,12 @@ class CloudPrintURLFetcherRetryBackoffTest : public CloudPrintURLFetcherTest { } // CloudPrintURLFetcher::Delegate - virtual CloudPrintURLFetcher::ResponseAction HandleRawData( + CloudPrintURLFetcher::ResponseAction HandleRawData( const net::URLFetcher* source, const GURL& url, const std::string& data) override; - virtual void OnRequestGiveUp() override; + void OnRequestGiveUp() override; private: int response_count_; diff --git a/chrome/service/cloud_print/cloud_print_wipeout.h b/chrome/service/cloud_print/cloud_print_wipeout.h index 62d52d5..92053bf 100644 --- a/chrome/service/cloud_print/cloud_print_wipeout.h +++ b/chrome/service/cloud_print/cloud_print_wipeout.h @@ -25,20 +25,20 @@ class CloudPrintWipeout : public CloudPrintURLFetcherDelegate { }; CloudPrintWipeout(Client* client, const GURL& cloud_print_server_url); - virtual ~CloudPrintWipeout(); + ~CloudPrintWipeout() override; void UnregisterPrinters(const std::string& auth_token, const std::list<std::string>& printer_ids); // CloudPrintURLFetcher::Delegate implementation. - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, bool succeeded) override; - virtual void OnRequestGiveUp() override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; - virtual std::string GetAuthHeader() override; + void OnRequestGiveUp() override; + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; + std::string GetAuthHeader() override; private: void UnregisterNextPrinter(); diff --git a/chrome/service/cloud_print/job_status_updater.h b/chrome/service/cloud_print/job_status_updater.h index 01863f9..169f0e7 100644 --- a/chrome/service/cloud_print/job_status_updater.h +++ b/chrome/service/cloud_print/job_status_updater.h @@ -45,13 +45,13 @@ class JobStatusUpdater : public base::RefCountedThreadSafe<JobStatusUpdater>, void Stop(); // CloudPrintURLFetcher::Delegate implementation. - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, bool succeeded) override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; - virtual std::string GetAuthHeader() override; + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; + std::string GetAuthHeader() override; base::Time start_time() const { return start_time_; @@ -59,7 +59,7 @@ class JobStatusUpdater : public base::RefCountedThreadSafe<JobStatusUpdater>, private: friend class base::RefCountedThreadSafe<JobStatusUpdater>; - virtual ~JobStatusUpdater(); + ~JobStatusUpdater() override; base::Time start_time_; std::string printer_name_; diff --git a/chrome/service/cloud_print/print_system_cups.cc b/chrome/service/cloud_print/print_system_cups.cc index 19d6ddf..132a252 100644 --- a/chrome/service/cloud_print/print_system_cups.cc +++ b/chrome/service/cloud_print/print_system_cups.cc @@ -76,26 +76,25 @@ class PrintSystemCUPS : public PrintSystem { explicit PrintSystemCUPS(const base::DictionaryValue* print_system_settings); // PrintSystem implementation. - virtual PrintSystemResult Init() override; - virtual PrintSystem::PrintSystemResult EnumeratePrinters( + PrintSystemResult Init() override; + PrintSystem::PrintSystemResult EnumeratePrinters( printing::PrinterList* printer_list) override; - virtual void GetPrinterCapsAndDefaults( + void GetPrinterCapsAndDefaults( const std::string& printer_name, const PrinterCapsAndDefaultsCallback& callback) override; - virtual bool IsValidPrinter(const std::string& printer_name) override; - virtual bool ValidatePrintTicket( - const std::string& printer_name, - const std::string& print_ticket_data, - const std::string& print_ticket_mime_type) override; - virtual bool GetJobDetails(const std::string& printer_name, - PlatformJobId job_id, - PrintJobDetails *job_details) override; - virtual PrintSystem::PrintServerWatcher* CreatePrintServerWatcher() override; - virtual PrintSystem::PrinterWatcher* CreatePrinterWatcher( + bool IsValidPrinter(const std::string& printer_name) override; + bool ValidatePrintTicket(const std::string& printer_name, + const std::string& print_ticket_data, + const std::string& print_ticket_mime_type) override; + bool GetJobDetails(const std::string& printer_name, + PlatformJobId job_id, + PrintJobDetails* job_details) override; + PrintSystem::PrintServerWatcher* CreatePrintServerWatcher() override; + PrintSystem::PrinterWatcher* CreatePrinterWatcher( const std::string& printer_name) override; - virtual PrintSystem::JobSpooler* CreateJobSpooler() override; - virtual bool UseCddAndCjt() override; - virtual std::string GetSupportedMimeTypes() override; + PrintSystem::JobSpooler* CreateJobSpooler() override; + bool UseCddAndCjt() override; + std::string GetSupportedMimeTypes() override; // Helper functions. PlatformJobId SpoolPrintJob(const std::string& print_ticket, @@ -126,7 +125,7 @@ class PrintSystemCUPS : public PrintSystem { } private: - virtual ~PrintSystemCUPS() {} + ~PrintSystemCUPS() override {} // Following functions are wrappers around corresponding CUPS functions. // <functions>2() are called when print server is specified, and plain @@ -180,7 +179,7 @@ class PrintServerWatcherCUPS } // PrintSystem::PrintServerWatcher implementation. - virtual bool StartWatching( + bool StartWatching( PrintSystem::PrintServerWatcher::Delegate* delegate) override { delegate_ = delegate; printers_hash_ = GetPrintersHash(); @@ -191,7 +190,7 @@ class PrintServerWatcherCUPS return true; } - virtual bool StopWatching() override { + bool StopWatching() override { delegate_ = NULL; return true; } @@ -212,9 +211,7 @@ class PrintServerWatcherCUPS } protected: - virtual ~PrintServerWatcherCUPS() { - StopWatching(); - } + ~PrintServerWatcherCUPS() override { StopWatching(); } private: std::string GetPrintersHash() { @@ -253,8 +250,7 @@ class PrinterWatcherCUPS } // PrintSystem::PrinterWatcher implementation. - virtual bool StartWatching( - PrintSystem::PrinterWatcher::Delegate* delegate) override{ + bool StartWatching(PrintSystem::PrinterWatcher::Delegate* delegate) override { scoped_refptr<printing::PrintBackend> print_backend( printing::PrintBackend::CreateInstance(NULL)); crash_keys::ScopedPrinterInfo crash_key( @@ -277,12 +273,12 @@ class PrinterWatcherCUPS return true; } - virtual bool StopWatching() override{ + bool StopWatching() override { delegate_ = NULL; return true; } - virtual bool GetCurrentPrinterInfo( + bool GetCurrentPrinterInfo( printing::PrinterBasicInfo* printer_info) override { DCHECK(printer_info); return print_system_->GetPrinterInfo(printer_name_, printer_info); @@ -328,9 +324,7 @@ class PrinterWatcherCUPS } protected: - virtual ~PrinterWatcherCUPS() { - StopWatching(); - } + ~PrinterWatcherCUPS() override { StopWatching(); } private: std::string GetSettingsHash() { @@ -373,14 +367,14 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler { } // PrintSystem::JobSpooler implementation. - virtual bool Spool(const std::string& print_ticket, - const std::string& print_ticket_mime_type, - const base::FilePath& print_data_file_path, - const std::string& print_data_mime_type, - const std::string& printer_name, - const std::string& job_title, - const std::vector<std::string>& tags, - JobSpooler::Delegate* delegate) override{ + bool Spool(const std::string& print_ticket, + const std::string& print_ticket_mime_type, + const base::FilePath& print_data_file_path, + const std::string& print_data_mime_type, + const std::string& printer_name, + const std::string& job_title, + const std::vector<std::string>& tags, + JobSpooler::Delegate* delegate) override { DCHECK(delegate); bool dry_run = false; int job_id = print_system_->SpoolPrintJob( @@ -401,7 +395,7 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler { } protected: - virtual ~JobSpoolerCUPS() {} + ~JobSpoolerCUPS() override {} private: scoped_refptr<PrintSystemCUPS> print_system_; diff --git a/chrome/service/cloud_print/printer_job_handler.h b/chrome/service/cloud_print/printer_job_handler.h index 46d29fd..b5731d8 100644 --- a/chrome/service/cloud_print/printer_job_handler.h +++ b/chrome/service/cloud_print/printer_job_handler.h @@ -115,39 +115,39 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>, // Begin Delegate implementations // CloudPrintURLFetcher::Delegate implementation. - virtual CloudPrintURLFetcher::ResponseAction HandleRawResponse( + CloudPrintURLFetcher::ResponseAction HandleRawResponse( const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code, const net::ResponseCookies& cookies, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction HandleRawData( + CloudPrintURLFetcher::ResponseAction HandleRawData( const net::URLFetcher* source, const GURL& url, const std::string& data) override; - virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( + CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, base::DictionaryValue* json_data, bool succeeded) override; - virtual void OnRequestGiveUp() override; - virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; - virtual std::string GetAuthHeader() override; + void OnRequestGiveUp() override; + CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; + std::string GetAuthHeader() override; // JobStatusUpdater::Delegate implementation - virtual bool OnJobCompleted(JobStatusUpdater* updater) override; - virtual void OnAuthError() override; + bool OnJobCompleted(JobStatusUpdater* updater) override; + void OnAuthError() override; // PrinterWatcherDelegate implementation - virtual void OnPrinterDeleted() override; - virtual void OnPrinterChanged() override; - virtual void OnJobChanged() override; + void OnPrinterDeleted() override; + void OnPrinterChanged() override; + void OnJobChanged() override; // JobSpoolerDelegate implementation. // Called on print_thread_. - virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) override; - virtual void OnJobSpoolFailed() override; + void OnJobSpoolSucceeded(const PlatformJobId& job_id) override; + void OnJobSpoolFailed() override; // End Delegate implementations @@ -176,7 +176,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>, const GURL& url, const std::string& data); - virtual ~PrinterJobHandler(); + ~PrinterJobHandler() override; // Begin request handlers for each state in the state machine CloudPrintURLFetcher::ResponseAction HandlePrinterUpdateResponse( diff --git a/chrome/service/cloud_print/printer_job_handler_unittest.cc b/chrome/service/cloud_print/printer_job_handler_unittest.cc index c1f770d..8c4e2b1 100644 --- a/chrome/service/cloud_print/printer_job_handler_unittest.cc +++ b/chrome/service/cloud_print/printer_job_handler_unittest.cc @@ -251,11 +251,12 @@ class CloudPrintURLFetcherNoServiceProcess context_getter_(new net::TestURLRequestContextGetter( base::MessageLoopProxy::current())) {} protected: - virtual net::URLRequestContextGetter* GetRequestContextGetter() override { + net::URLRequestContextGetter* GetRequestContextGetter() override { return context_getter_.get(); } - virtual ~CloudPrintURLFetcherNoServiceProcess() {} + ~CloudPrintURLFetcherNoServiceProcess() override {} + private: scoped_refptr<net::URLRequestContextGetter> context_getter_; }; @@ -264,11 +265,11 @@ class CloudPrintURLFetcherNoServiceProcess class CloudPrintURLFetcherNoServiceProcessFactory : public CloudPrintURLFetcherFactory { public: - virtual CloudPrintURLFetcher* CreateCloudPrintURLFetcher() override { + CloudPrintURLFetcher* CreateCloudPrintURLFetcher() override { return new CloudPrintURLFetcherNoServiceProcess; } - virtual ~CloudPrintURLFetcherNoServiceProcessFactory() {} + ~CloudPrintURLFetcherNoServiceProcessFactory() override {} }; diff --git a/chrome/service/cloud_print/printer_job_queue_handler.cc b/chrome/service/cloud_print/printer_job_queue_handler.cc index 48060c1..ba81ff1 100644 --- a/chrome/service/cloud_print/printer_job_queue_handler.cc +++ b/chrome/service/cloud_print/printer_job_queue_handler.cc @@ -14,7 +14,7 @@ namespace cloud_print { class TimeProviderImpl : public PrinterJobQueueHandler::TimeProvider { public: - virtual base::Time GetNow() override; + base::Time GetNow() override; }; base::Time TimeProviderImpl::GetNow() { diff --git a/chrome/service/net/service_url_request_context_getter.h b/chrome/service/net/service_url_request_context_getter.h index c3bad84..cd50265 100644 --- a/chrome/service/net/service_url_request_context_getter.h +++ b/chrome/service/net/service_url_request_context_getter.h @@ -30,9 +30,9 @@ class ProxyConfigService; class ServiceURLRequestContextGetter : public net::URLRequestContextGetter { public: - virtual net::URLRequestContext* GetURLRequestContext() override; - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetNetworkTaskRunner() const override; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() + const override; void set_user_agent(const std::string& ua) { user_agent_ = ua; @@ -44,7 +44,7 @@ class ServiceURLRequestContextGetter : public net::URLRequestContextGetter { private: friend class ServiceProcess; ServiceURLRequestContextGetter(); - virtual ~ServiceURLRequestContextGetter(); + ~ServiceURLRequestContextGetter() override; std::string user_agent_; scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; diff --git a/chrome/service/service_ipc_server.h b/chrome/service/service_ipc_server.h index c397362..b858df5 100644 --- a/chrome/service/service_ipc_server.h +++ b/chrome/service/service_ipc_server.h @@ -26,12 +26,12 @@ class HistogramDeltaSerialization; class ServiceIPCServer : public IPC::Listener, public IPC::Sender { public: explicit ServiceIPCServer(const IPC::ChannelHandle& handle); - virtual ~ServiceIPCServer(); + ~ServiceIPCServer() override; bool Init(); // IPC::Sender implementation. - virtual bool Send(IPC::Message* msg) override; + bool Send(IPC::Message* msg) override; IPC::SyncChannel* channel() { return channel_.get(); } @@ -48,9 +48,9 @@ class ServiceIPCServer : public IPC::Listener, public IPC::Sender { friend class MockServiceIPCServer; // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& msg) override; - virtual void OnChannelConnected(int32 peer_pid) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& msg) override; + void OnChannelConnected(int32 peer_pid) override; + void OnChannelError() override; // IPC message handlers. void OnEnableCloudPrintProxyWithRobot( diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc index cbfa85d..da6c823 100644 --- a/chrome/service/service_process.cc +++ b/chrome/service/service_process.cc @@ -56,10 +56,10 @@ const char kDefaultServiceProcessLocale[] = "en-US"; class ServiceIOThread : public base::Thread { public: explicit ServiceIOThread(const char* name); - virtual ~ServiceIOThread(); + ~ServiceIOThread() override; protected: - virtual void CleanUp() override; + void CleanUp() override; private: DISALLOW_COPY_AND_ASSIGN(ServiceIOThread); diff --git a/chrome/service/service_process.h b/chrome/service/service_process.h index c37c1be..1b2bc78 100644 --- a/chrome/service/service_process.h +++ b/chrome/service/service_process.h @@ -35,7 +35,7 @@ class NetworkChangeNotifier; class ServiceProcess : public cloud_print::CloudPrintProxy::Client { public: ServiceProcess(); - virtual ~ServiceProcess(); + ~ServiceProcess() override; // Initialize the ServiceProcess with the message loop that it should run on. // ServiceProcess takes ownership of |state|. @@ -90,8 +90,8 @@ class ServiceProcess : public cloud_print::CloudPrintProxy::Client { cloud_print::CloudPrintProxy* GetCloudPrintProxy(); // CloudPrintProxy::Client implementation. - virtual void OnCloudPrintProxyEnabled(bool persist_state) override; - virtual void OnCloudPrintProxyDisabled(bool persist_state) override; + void OnCloudPrintProxyEnabled(bool persist_state) override; + void OnCloudPrintProxyDisabled(bool persist_state) override; ServiceURLRequestContextGetter* GetServiceURLRequestContextGetter(); diff --git a/chrome/test/base/browser_perf_tests_main.cc b/chrome/test/base/browser_perf_tests_main.cc index 3ba3ccf..6e0958b 100644 --- a/chrome/test/base/browser_perf_tests_main.cc +++ b/chrome/test/base/browser_perf_tests_main.cc @@ -7,7 +7,7 @@ class ChromeBrowserTestSuiteRunner : public ChromeTestSuiteRunner { public: - virtual int RunTestSuite(int argc, char** argv) override { + int RunTestSuite(int argc, char** argv) override { return ChromeTestSuite(argc, argv).Run(); } }; diff --git a/chrome/test/base/browser_tests_main.cc b/chrome/test/base/browser_tests_main.cc index 4d1958a..4806db5 100644 --- a/chrome/test/base/browser_tests_main.cc +++ b/chrome/test/base/browser_tests_main.cc @@ -10,7 +10,7 @@ class ChromeBrowserTestSuiteRunner : public ChromeTestSuiteRunner { public: - virtual int RunTestSuite(int argc, char** argv) override { + int RunTestSuite(int argc, char** argv) override { return ChromeTestSuite(argc, argv).Run(); } }; diff --git a/chrome/test/base/chrome_process_util.cc b/chrome/test/base/chrome_process_util.cc index a9cc24e..fe6d0c6 100644 --- a/chrome/test/base/chrome_process_util.cc +++ b/chrome/test/base/chrome_process_util.cc @@ -69,7 +69,7 @@ class ChildProcessFilter : public base::ProcessFilter { explicit ChildProcessFilter(const std::vector<base::ProcessId>& parent_pids) : parent_pids_(parent_pids.begin(), parent_pids.end()) {} - virtual bool Includes(const base::ProcessEntry& entry) const override { + bool Includes(const base::ProcessEntry& entry) const override { return parent_pids_.find(entry.parent_pid()) != parent_pids_.end(); } diff --git a/chrome/test/base/chrome_render_view_host_test_harness.h b/chrome/test/base/chrome_render_view_host_test_harness.h index ddc6df1..7df7bd33 100644 --- a/chrome/test/base/chrome_render_view_host_test_harness.h +++ b/chrome/test/base/chrome_render_view_host_test_harness.h @@ -29,7 +29,7 @@ class ChromeRenderViewHostTestHarness virtual void TearDown() override; // content::RenderViewHostTestHarness. - virtual content::BrowserContext* CreateBrowserContext() override; + content::BrowserContext* CreateBrowserContext() override; }; #endif // CHROME_TEST_BASE_CHROME_RENDER_VIEW_HOST_TEST_HARNESS_H_ diff --git a/chrome/test/base/chrome_render_view_test.h b/chrome/test/base/chrome_render_view_test.h index c00cbb5..e283836 100644 --- a/chrome/test/base/chrome_render_view_test.h +++ b/chrome/test/base/chrome_render_view_test.h @@ -30,10 +30,9 @@ class ChromeRenderViewTest : public content::RenderViewTest { // testing::Test virtual void SetUp() override; virtual void TearDown() override; - virtual content::ContentClient* CreateContentClient() override; - virtual content::ContentBrowserClient* CreateContentBrowserClient() override; - virtual content::ContentRendererClient* - CreateContentRendererClient() override; + content::ContentClient* CreateContentClient() override; + content::ContentBrowserClient* CreateContentBrowserClient() override; + content::ContentRendererClient* CreateContentRendererClient() override; #if defined(ENABLE_EXTENSIONS) scoped_ptr<extensions::DispatcherDelegate> extension_dispatcher_delegate_; diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc index dd31620..e4c70f0 100644 --- a/chrome/test/base/chrome_test_launcher.cc +++ b/chrome/test/base/chrome_test_launcher.cc @@ -50,14 +50,15 @@ class ChromeTestLauncherDelegate : public content::TestLauncherDelegate { public: explicit ChromeTestLauncherDelegate(ChromeTestSuiteRunner* runner) : runner_(runner) {} - virtual ~ChromeTestLauncherDelegate() {} + ~ChromeTestLauncherDelegate() override {} - virtual int RunTestSuite(int argc, char** argv) override { + int RunTestSuite(int argc, char** argv) override { return runner_->RunTestSuite(argc, argv); } - virtual bool AdjustChildProcessCommandLine( - CommandLine* command_line, const base::FilePath& temp_data_dir) override { + bool AdjustChildProcessCommandLine( + CommandLine* command_line, + const base::FilePath& temp_data_dir) override { CommandLine new_command_line(command_line->GetProgram()); CommandLine::SwitchMap switches = command_line->GetSwitches(); @@ -79,11 +80,11 @@ class ChromeTestLauncherDelegate : public content::TestLauncherDelegate { } protected: - virtual content::ContentMainDelegate* CreateContentMainDelegate() override { + content::ContentMainDelegate* CreateContentMainDelegate() override { return new ChromeMainDelegate(); } - virtual void AdjustDefaultParallelJobs(int* default_jobs) override { + void AdjustDefaultParallelJobs(int* default_jobs) override { #if defined(OS_WIN) if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kAshBrowserTests)) { diff --git a/chrome/test/base/chrome_test_suite.h b/chrome/test/base/chrome_test_suite.h index 9480957..9c28831 100644 --- a/chrome/test/base/chrome_test_suite.h +++ b/chrome/test/base/chrome_test_suite.h @@ -16,12 +16,12 @@ class ChromeTestSuite : public content::ContentTestSuiteBase { public: ChromeTestSuite(int argc, char** argv); - virtual ~ChromeTestSuite(); + ~ChromeTestSuite() override; protected: // base::TestSuite overrides: - virtual void Initialize() override; - virtual void Shutdown() override; + void Initialize() override; + void Shutdown() override; void SetBrowserDirectory(const base::FilePath& browser_dir) { browser_dir_ = browser_dir; diff --git a/chrome/test/base/chrome_unit_test_suite.h b/chrome/test/base/chrome_unit_test_suite.h index e020815..a8bb208 100644 --- a/chrome/test/base/chrome_unit_test_suite.h +++ b/chrome/test/base/chrome_unit_test_suite.h @@ -15,11 +15,11 @@ class ChromeUnitTestSuite : public ChromeTestSuite { public: ChromeUnitTestSuite(int argc, char** argv); - virtual ~ChromeUnitTestSuite(); + ~ChromeUnitTestSuite() override; // base::TestSuite overrides: - virtual void Initialize() override; - virtual void Shutdown() override; + void Initialize() override; + void Shutdown() override; // These methods allow unit tests which run in the browser_test binary, and so // which don't exercise the initialization in this test suite, to do basic diff --git a/chrome/test/base/find_in_page_observer.h b/chrome/test/base/find_in_page_observer.h index 82e00f9..53fdb2b 100644 --- a/chrome/test/base/find_in_page_observer.h +++ b/chrome/test/base/find_in_page_observer.h @@ -28,7 +28,7 @@ namespace ui_test_utils { class FindInPageNotificationObserver : public content::NotificationObserver { public: explicit FindInPageNotificationObserver(content::WebContents* parent_tab); - virtual ~FindInPageNotificationObserver(); + ~FindInPageNotificationObserver() override; void Wait(); @@ -37,9 +37,9 @@ class FindInPageNotificationObserver : public content::NotificationObserver { gfx::Rect selection_rect() const { return selection_rect_; } 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; content::NotificationRegistrar registrar_; // We will at some point (before final update) be notified of the ordinal and diff --git a/chrome/test/base/history_index_restore_observer.h b/chrome/test/base/history_index_restore_observer.h index c03a385..4d76aee 100644 --- a/chrome/test/base/history_index_restore_observer.h +++ b/chrome/test/base/history_index_restore_observer.h @@ -17,12 +17,12 @@ class HistoryIndexRestoreObserver : public history::InMemoryURLIndex::RestoreCacheObserver { public: explicit HistoryIndexRestoreObserver(const base::Closure& task); - virtual ~HistoryIndexRestoreObserver(); + ~HistoryIndexRestoreObserver() override; bool succeeded() const { return succeeded_; } // RestoreCacheObserver implementation. - virtual void OnCacheRestoreFinished(bool success) override; + void OnCacheRestoreFinished(bool success) override; private: base::Closure task_; diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc index 4034d56..21eeef8 100644 --- a/chrome/test/base/in_process_browser_test.cc +++ b/chrome/test/base/in_process_browser_test.cc @@ -85,10 +85,10 @@ class SingleDesktopTestObserver : public chrome::BrowserListObserver, public base::NonThreadSafe { public: explicit SingleDesktopTestObserver(chrome::HostDesktopType allowed_desktop); - virtual ~SingleDesktopTestObserver(); + ~SingleDesktopTestObserver() override; // chrome::BrowserListObserver: - virtual void OnBrowserAdded(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override; private: chrome::HostDesktopType allowed_desktop_; diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h index e91a3e7..338343b 100644 --- a/chrome/test/base/in_process_browser_test.h +++ b/chrome/test/base/in_process_browser_test.h @@ -123,7 +123,7 @@ class InProcessBrowserTest : public content::BrowserTestBase { virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; // BrowserTestBase: - virtual void RunTestOnMainThreadLoop() override; + void RunTestOnMainThreadLoop() override; // Creates a browser with a single tab (about:blank), waits for the tab to // finish loading and shows the browser. diff --git a/chrome/test/base/in_process_browser_test_browsertest.cc b/chrome/test/base/in_process_browser_test_browsertest.cc index 1ecf532..33502a4 100644 --- a/chrome/test/base/in_process_browser_test_browsertest.cc +++ b/chrome/test/base/in_process_browser_test_browsertest.cc @@ -37,7 +37,7 @@ class LoadFailObserver : public content::WebContentsObserver { failed_load_(false), error_code_(net::OK) { } - virtual void DidFailProvisionalLoad( + void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, diff --git a/chrome/test/base/interactive_ui_tests_main.cc b/chrome/test/base/interactive_ui_tests_main.cc index 6f5b46c..59e56ff 100644 --- a/chrome/test/base/interactive_ui_tests_main.cc +++ b/chrome/test/base/interactive_ui_tests_main.cc @@ -26,11 +26,11 @@ class InteractiveUITestSuite : public ChromeTestSuite { public: InteractiveUITestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} - virtual ~InteractiveUITestSuite() {} + ~InteractiveUITestSuite() override {} protected: // ChromeTestSuite overrides: - virtual void Initialize() override { + void Initialize() override { ChromeTestSuite::Initialize(); // Only allow ui_controls to be used in interactive_ui_tests, since they @@ -54,7 +54,7 @@ class InteractiveUITestSuite : public ChromeTestSuite { #endif } - virtual void Shutdown() override { + void Shutdown() override { #if defined(OS_WIN) com_initializer_.reset(); #endif @@ -68,7 +68,7 @@ class InteractiveUITestSuite : public ChromeTestSuite { class InteractiveUITestSuiteRunner : public ChromeTestSuiteRunner { public: - virtual int RunTestSuite(int argc, char** argv) override { + int RunTestSuite(int argc, char** argv) override { return InteractiveUITestSuite(argc, argv).Run(); } }; diff --git a/chrome/test/base/javascript_browser_test.h b/chrome/test/base/javascript_browser_test.h index b5cdf78..6bbf21b 100644 --- a/chrome/test/base/javascript_browser_test.h +++ b/chrome/test/base/javascript_browser_test.h @@ -31,7 +31,7 @@ class JavaScriptBrowserTest : public InProcessBrowserTest { virtual ~JavaScriptBrowserTest(); // InProcessBrowserTest overrides. - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; // Builds a vector of strings of all added javascript libraries suitable for // execution by subclasses. diff --git a/chrome/test/base/menu_model_test.h b/chrome/test/base/menu_model_test.h index 108f67b..8133485 100644 --- a/chrome/test/base/menu_model_test.h +++ b/chrome/test/base/menu_model_test.h @@ -23,12 +23,11 @@ class MenuModelTest { public: Delegate() : execute_count_(0), enable_count_(0) {} - virtual bool IsCommandIdChecked(int command_id) const override; - virtual bool IsCommandIdEnabled(int command_id) const override; - virtual bool GetAcceleratorForCommandId( - int command_id, - ui::Accelerator* accelerator) 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; + bool GetAcceleratorForCommandId(int command_id, + ui::Accelerator* accelerator) override; + void ExecuteCommand(int command_id, int event_flags) override; int execute_count_; mutable int enable_count_; diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index e295b3b..da54513 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc @@ -22,13 +22,11 @@ class TestBrowserWindowOwner : public chrome::BrowserListObserver { explicit TestBrowserWindowOwner(TestBrowserWindow* window) : window_(window) { BrowserList::AddObserver(this); } - virtual ~TestBrowserWindowOwner() { - BrowserList::RemoveObserver(this); - } + ~TestBrowserWindowOwner() override { BrowserList::RemoveObserver(this); } private: // Overridden from BrowserListObserver: - virtual void OnBrowserRemoved(Browser* browser) override { + void OnBrowserRemoved(Browser* browser) override { if (browser->window() == window_.get()) delete this; } diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index 67df7c0..d93e404 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h @@ -26,166 +26,162 @@ class Extension; class TestBrowserWindow : public BrowserWindow { public: TestBrowserWindow(); - virtual ~TestBrowserWindow(); + ~TestBrowserWindow() override; // BrowserWindow: - virtual void Show() override {} - virtual void ShowInactive() override {} - virtual void Hide() override {} - virtual void SetBounds(const gfx::Rect& bounds) override {} - virtual void Close() override {} - virtual void Activate() override {} - virtual void Deactivate() override {} - virtual bool IsActive() const override; - virtual void FlashFrame(bool flash) override {} - virtual bool IsAlwaysOnTop() const override; - virtual void SetAlwaysOnTop(bool always_on_top) override {} - virtual gfx::NativeWindow GetNativeWindow() override; - virtual BrowserWindowTesting* GetBrowserWindowTesting() override; - virtual StatusBubble* GetStatusBubble() override; - virtual void UpdateTitleBar() override {} - virtual void BookmarkBarStateChanged( + void Show() override {} + void ShowInactive() override {} + void Hide() override {} + void SetBounds(const gfx::Rect& bounds) override {} + void Close() override {} + void Activate() override {} + void Deactivate() override {} + bool IsActive() const override; + void FlashFrame(bool flash) override {} + bool IsAlwaysOnTop() const override; + void SetAlwaysOnTop(bool always_on_top) override {} + gfx::NativeWindow GetNativeWindow() override; + BrowserWindowTesting* GetBrowserWindowTesting() override; + StatusBubble* GetStatusBubble() override; + void UpdateTitleBar() override {} + void BookmarkBarStateChanged( BookmarkBar::AnimateChangeType change_type) override {} - virtual void UpdateDevTools() override {} - virtual void UpdateLoadingAnimations(bool should_animate) override {} - virtual void SetStarredState(bool is_starred) override {} - virtual void SetTranslateIconToggled(bool is_lit) override {} - virtual void OnActiveTabChanged(content::WebContents* old_contents, - content::WebContents* new_contents, - int index, - int reason) override {} - virtual void ZoomChangedForActiveTab(bool can_show_bubble) override {} - virtual gfx::Rect GetRestoredBounds() const override; - virtual ui::WindowShowState GetRestoredState() const override; - virtual gfx::Rect GetBounds() const override; - virtual bool IsMaximized() const override; - virtual bool IsMinimized() const override; - virtual void Maximize() override {} - virtual void Minimize() override {} - virtual void Restore() override {} - virtual void EnterFullscreen( - const GURL& url, FullscreenExitBubbleType type) override {} - virtual void ExitFullscreen() override {} - virtual void UpdateFullscreenExitBubbleContent( + void UpdateDevTools() override {} + void UpdateLoadingAnimations(bool should_animate) override {} + void SetStarredState(bool is_starred) override {} + void SetTranslateIconToggled(bool is_lit) override {} + void OnActiveTabChanged(content::WebContents* old_contents, + content::WebContents* new_contents, + int index, + int reason) override {} + void ZoomChangedForActiveTab(bool can_show_bubble) override {} + gfx::Rect GetRestoredBounds() const override; + ui::WindowShowState GetRestoredState() const override; + gfx::Rect GetBounds() const override; + bool IsMaximized() const override; + bool IsMinimized() const override; + void Maximize() override {} + void Minimize() override {} + void Restore() override {} + void EnterFullscreen(const GURL& url, + FullscreenExitBubbleType type) override {} + void ExitFullscreen() override {} + void UpdateFullscreenExitBubbleContent( const GURL& url, FullscreenExitBubbleType bubble_type) override {} - virtual bool ShouldHideUIForFullscreen() const override; - virtual bool IsFullscreen() const override; + bool ShouldHideUIForFullscreen() const override; + bool IsFullscreen() const override; #if defined(OS_WIN) virtual void SetMetroSnapMode(bool enable) override {} virtual bool IsInMetroSnapMode() const; #endif - virtual bool IsFullscreenBubbleVisible() const override; - virtual LocationBar* GetLocationBar() const override; - virtual void SetFocusToLocationBar(bool select_all) override {} - virtual void UpdateReloadStopState(bool is_loading, bool force) override {} - virtual void UpdateToolbar(content::WebContents* contents) override {} - virtual void FocusToolbar() override {} - virtual void FocusAppMenu() override {} - virtual void FocusBookmarksToolbar() override {} - virtual void FocusInfobars() override {} - virtual void RotatePaneFocus(bool forwards) override {} - virtual void ShowAppMenu() override {} - virtual bool PreHandleKeyboardEvent( - const content::NativeWebKeyboardEvent& event, - bool* is_keyboard_shortcut) override; - virtual void HandleKeyboardEvent( + bool IsFullscreenBubbleVisible() const override; + LocationBar* GetLocationBar() const override; + void SetFocusToLocationBar(bool select_all) override {} + void UpdateReloadStopState(bool is_loading, bool force) override {} + void UpdateToolbar(content::WebContents* contents) override {} + void FocusToolbar() override {} + void FocusAppMenu() override {} + void FocusBookmarksToolbar() override {} + void FocusInfobars() override {} + void RotatePaneFocus(bool forwards) override {} + void ShowAppMenu() override {} + bool PreHandleKeyboardEvent(const content::NativeWebKeyboardEvent& event, + bool* is_keyboard_shortcut) override; + void HandleKeyboardEvent( const content::NativeWebKeyboardEvent& event) override {} - virtual bool IsBookmarkBarVisible() const override; - virtual bool IsBookmarkBarAnimating() const override; - virtual bool IsTabStripEditable() const override; - virtual bool IsToolbarVisible() const override; - virtual gfx::Rect GetRootWindowResizerRect() const override; - virtual void ConfirmAddSearchProvider(TemplateURL* template_url, - Profile* profile) override {} - virtual void ShowUpdateChromeDialog() override {} - virtual void ShowBookmarkBubble(const GURL& url, - bool already_bookmarked) override {} - virtual void ShowBookmarkAppBubble( - const WebApplicationInfo& web_app_info, - const std::string& extension_id) override {} - virtual void ShowTranslateBubble( - content::WebContents* contents, - translate::TranslateStep step, - translate::TranslateErrors::Type error_type, - bool is_user_gesture) override {} + bool IsBookmarkBarVisible() const override; + bool IsBookmarkBarAnimating() const override; + bool IsTabStripEditable() const override; + bool IsToolbarVisible() const override; + gfx::Rect GetRootWindowResizerRect() const override; + void ConfirmAddSearchProvider(TemplateURL* template_url, + Profile* profile) override {} + void ShowUpdateChromeDialog() override {} + void ShowBookmarkBubble(const GURL& url, bool already_bookmarked) override {} + void ShowBookmarkAppBubble(const WebApplicationInfo& web_app_info, + const std::string& extension_id) override {} + void ShowTranslateBubble(content::WebContents* contents, + translate::TranslateStep step, + translate::TranslateErrors::Type error_type, + bool is_user_gesture) override {} #if defined(ENABLE_ONE_CLICK_SIGNIN) - virtual void ShowOneClickSigninBubble( + void ShowOneClickSigninBubble( OneClickSigninBubbleType type, const base::string16& email, const base::string16& error_message, const StartSyncCallback& start_sync_callback) override {} #endif - virtual bool IsDownloadShelfVisible() const override; - virtual DownloadShelf* GetDownloadShelf() override; - virtual void ConfirmBrowserCloseWithPendingDownloads( + bool IsDownloadShelfVisible() const override; + DownloadShelf* GetDownloadShelf() override; + void ConfirmBrowserCloseWithPendingDownloads( int download_count, Browser::DownloadClosePreventionType dialog_type, bool app_modal, const base::Callback<void(bool)>& callback) override {} - virtual void UserChangedTheme() override {} - virtual int GetExtraRenderViewHeight() const override; - virtual void WebContentsFocused(content::WebContents* contents) override {} - virtual void ShowWebsiteSettings(Profile* profile, - content::WebContents* web_contents, - const GURL& url, - const content::SSLStatus& ssl) override {} - virtual void Cut() override {} - virtual void Copy() override {} - virtual void Paste() override {} + void UserChangedTheme() override {} + int GetExtraRenderViewHeight() const override; + void WebContentsFocused(content::WebContents* contents) override {} + void ShowWebsiteSettings(Profile* profile, + content::WebContents* web_contents, + const GURL& url, + const content::SSLStatus& ssl) override {} + void Cut() override {} + void Copy() override {} + void Paste() override {} #if defined(OS_MACOSX) - virtual void EnterFullscreenWithChrome() override {} - virtual void EnterFullscreenWithoutChrome() override {} - virtual bool IsFullscreenWithChrome() override; - virtual bool IsFullscreenWithoutChrome() override; + void EnterFullscreenWithChrome() override {} + void EnterFullscreenWithoutChrome() override {} + bool IsFullscreenWithChrome() override; + bool IsFullscreenWithoutChrome() override; #endif - virtual WindowOpenDisposition GetDispositionForPopupBounds( + WindowOpenDisposition GetDispositionForPopupBounds( const gfx::Rect& bounds) override; - virtual FindBar* CreateFindBar() override; - virtual web_modal::WebContentsModalDialogHost* - GetWebContentsModalDialogHost() override; - virtual void ShowAvatarBubble(content::WebContents* web_contents, - const gfx::Rect& rect) override {} - virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, + FindBar* CreateFindBar() override; + web_modal::WebContentsModalDialogHost* GetWebContentsModalDialogHost() + override; + void ShowAvatarBubble(content::WebContents* web_contents, + const gfx::Rect& rect) override {} + void ShowAvatarBubbleFromAvatarButton( + AvatarBubbleMode mode, const signin::ManageAccountsParams& manage_accounts_params) override {} - virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() override; - virtual void ExecuteExtensionCommand( - const extensions::Extension* extension, - const extensions::Command& command) override; + int GetRenderViewHeightInsetWithDetachedBookmarkBar() override; + void ExecuteExtensionCommand(const extensions::Extension* extension, + const extensions::Command& command) override; protected: - virtual void DestroyBrowser() override {} + void DestroyBrowser() override {} private: class TestLocationBar : public LocationBar { public: TestLocationBar() : LocationBar(NULL) {} - virtual ~TestLocationBar() {} + ~TestLocationBar() override {} // LocationBar: - virtual void ShowFirstRunBubble() override {} - virtual GURL GetDestinationURL() const override; - virtual WindowOpenDisposition GetWindowOpenDisposition() const override; - virtual ui::PageTransition GetPageTransition() const override; - virtual void AcceptInput() override {} - virtual void FocusLocation(bool select_all) override {} - virtual void FocusSearch() override {} - virtual void UpdateContentSettingsIcons() override {} - virtual void UpdateManagePasswordsIconAndBubble() override {} - virtual void UpdatePageActions() override {} - virtual void InvalidatePageActions() override {} - virtual void UpdateBookmarkStarVisibility() override {} - virtual bool ShowPageActionPopup(const extensions::Extension* extension, - bool grant_active_tab) override; - virtual void UpdateOpenPDFInReaderPrompt() override {} - virtual void UpdateGeneratedCreditCardView() override {} - virtual void SaveStateToContents(content::WebContents* contents) override {} - virtual void Revert() override {} - virtual const OmniboxView* GetOmniboxView() const override; - virtual OmniboxView* GetOmniboxView() override; - virtual LocationBarTesting* GetLocationBarForTesting() override; + void ShowFirstRunBubble() override {} + GURL GetDestinationURL() const override; + WindowOpenDisposition GetWindowOpenDisposition() const override; + ui::PageTransition GetPageTransition() const override; + void AcceptInput() override {} + void FocusLocation(bool select_all) override {} + void FocusSearch() override {} + void UpdateContentSettingsIcons() override {} + void UpdateManagePasswordsIconAndBubble() override {} + void UpdatePageActions() override {} + void InvalidatePageActions() override {} + void UpdateBookmarkStarVisibility() override {} + bool ShowPageActionPopup(const extensions::Extension* extension, + bool grant_active_tab) override; + void UpdateOpenPDFInReaderPrompt() override {} + void UpdateGeneratedCreditCardView() override {} + void SaveStateToContents(content::WebContents* contents) override {} + void Revert() override {} + const OmniboxView* GetOmniboxView() const override; + OmniboxView* GetOmniboxView() override; + LocationBarTesting* GetLocationBarForTesting() override; private: DISALLOW_COPY_AND_ASSIGN(TestLocationBar); diff --git a/chrome/test/base/test_chrome_web_ui_controller_factory.h b/chrome/test/base/test_chrome_web_ui_controller_factory.h index 03f7bf7..ceb4af9 100644 --- a/chrome/test/base/test_chrome_web_ui_controller_factory.h +++ b/chrome/test/base/test_chrome_web_ui_controller_factory.h @@ -32,7 +32,7 @@ class TestChromeWebUIControllerFactory : public ChromeWebUIControllerFactory { typedef std::map<std::string, WebUIProvider*> FactoryOverridesMap; TestChromeWebUIControllerFactory(); - virtual ~TestChromeWebUIControllerFactory(); + ~TestChromeWebUIControllerFactory() override; // Override the creation for urls having |host| with |provider|. void AddFactoryOverride(const std::string& host, WebUIProvider* provider); @@ -41,11 +41,11 @@ class TestChromeWebUIControllerFactory : public ChromeWebUIControllerFactory { void RemoveFactoryOverride(const std::string& host); // ChromeWebUIFactory overrides. - virtual content::WebUI::TypeID GetWebUIType( - content::BrowserContext* browser_context, + content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, + const GURL& url) const override; + content::WebUIController* CreateWebUIControllerForURL( + content::WebUI* web_ui, const GURL& url) const override; - virtual content::WebUIController* CreateWebUIControllerForURL( - content::WebUI* web_ui, const GURL& url) const override; private: // Return the WebUIProvider for the |url|'s host if it exists, otherwise NULL. diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 233fdb0..8c58578 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -58,74 +58,71 @@ class TestingBrowserProcess : public BrowserProcess { // Convenience method to get g_browser_process as a TestingBrowserProcess*. static TestingBrowserProcess* GetGlobal(); - 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 chrome_variations::VariationsService* variations_service() 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 BackgroundModeManager* background_mode_manager() override; - virtual void set_background_mode_manager_for_test( + 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; + chrome_variations::VariationsService* variations_service() 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; + 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; - virtual net::URLRequestContextGetter* system_request_context() 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 IntranetRedirectDetector* intranet_redirect_detector() override; - virtual void CreateDevToolsHttpProtocolHandler( + StatusTray* status_tray() override; + SafeBrowsingService* safe_browsing_service() override; + safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() + override; + net::URLRequestContextGetter* system_request_context() override; + BrowserProcessPlatformPart* platform_part() override; + + extensions::EventRouterForwarder* extension_event_router_forwarder() override; + NotificationUIManager* notification_ui_manager() override; + message_center::MessageCenter* message_center() override; + IntranetRedirectDetector* intranet_redirect_detector() 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 const std::string& GetApplicationLocale() override; - virtual void SetApplicationLocale(const std::string& app_locale) override; - virtual DownloadStatusUpdater* download_status_updater() override; - virtual DownloadRequestLimiter* download_request_limiter() override; + 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; + const std::string& GetApplicationLocale() override; + void SetApplicationLocale(const std::string& app_locale) override; + DownloadStatusUpdater* download_status_updater() override; + DownloadRequestLimiter* download_request_limiter() 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; + network_time::NetworkTimeTracker* network_time_tracker() override; - virtual gcm::GCMDriver* gcm_driver() override; + gcm::GCMDriver* gcm_driver() override; // Set the local state for tests. Consumer is responsible for cleaning it up // afterwards (using ScopedTestingLocalState, for example). @@ -139,7 +136,7 @@ class TestingBrowserProcess : public BrowserProcess { private: // See CreateInstance() and DestoryInstance() above. TestingBrowserProcess(); - virtual ~TestingBrowserProcess(); + ~TestingBrowserProcess() override; scoped_ptr<content::NotificationService> notification_service_; unsigned int module_ref_count_; diff --git a/chrome/test/base/testing_browser_process_platform_part.h b/chrome/test/base/testing_browser_process_platform_part.h index dd9ecb6..d53b442 100644 --- a/chrome/test/base/testing_browser_process_platform_part.h +++ b/chrome/test/base/testing_browser_process_platform_part.h @@ -13,7 +13,7 @@ class TestingBrowserProcessPlatformPart : public BrowserProcessPlatformPart { public: TestingBrowserProcessPlatformPart(); - virtual ~TestingBrowserProcessPlatformPart(); + ~TestingBrowserProcessPlatformPart() override; #if defined(OS_CHROMEOS) // Overridden from BrowserProcessPlatformPart: diff --git a/chrome/test/base/testing_pref_service_syncable.h b/chrome/test/base/testing_pref_service_syncable.h index 1831d83..646c579 100644 --- a/chrome/test/base/testing_pref_service_syncable.h +++ b/chrome/test/base/testing_pref_service_syncable.h @@ -24,7 +24,7 @@ class TestingPrefServiceSyncable TestingPrefStore* recommended_prefs, user_prefs::PrefRegistrySyncable* pref_registry, PrefNotifierImpl* pref_notifier); - virtual ~TestingPrefServiceSyncable(); + ~TestingPrefServiceSyncable() override; // This is provided as a convenience; on a production PrefService // you would do all registrations before constructing it, passing it diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index 3cee584..be0e04f 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc @@ -112,10 +112,10 @@ class WaitTopSitesLoadedObserver : public history::TopSitesObserver { public: explicit WaitTopSitesLoadedObserver(content::MessageLoopRunner* runner) : runner_(runner) {} - virtual void TopSitesLoaded(history::TopSites* top_sites) override { + void TopSitesLoaded(history::TopSites* top_sites) override { runner_->Quit(); } - virtual void TopSitesChanged(history::TopSites* top_sites) override {} + void TopSitesChanged(history::TopSites* top_sites) override {} private: // weak @@ -129,17 +129,15 @@ class QuittingHistoryDBTask : public history::HistoryDBTask { public: QuittingHistoryDBTask() {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { return true; } - virtual void DoneRunOnMainThread() override { - base::MessageLoop::current()->Quit(); - } + void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); } private: - virtual ~QuittingHistoryDBTask() {} + ~QuittingHistoryDBTask() override {} DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask); }; @@ -155,26 +153,24 @@ class TestExtensionURLRequestContext : public net::URLRequestContext { set_cookie_store(cookie_monster); } - virtual ~TestExtensionURLRequestContext() { - AssertNoURLRequests(); - } + ~TestExtensionURLRequestContext() override { AssertNoURLRequests(); } }; class TestExtensionURLRequestContextGetter : public net::URLRequestContextGetter { public: - virtual net::URLRequestContext* GetURLRequestContext() override { + net::URLRequestContext* GetURLRequestContext() override { if (!context_.get()) context_.reset(new TestExtensionURLRequestContext()); return context_.get(); } - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetNetworkTaskRunner() const override { + scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() + const override { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } protected: - virtual ~TestExtensionURLRequestContextGetter() {} + ~TestExtensionURLRequestContextGetter() override {} private: scoped_ptr<net::URLRequestContext> context_; diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h index 6117452..b7f887b 100644 --- a/chrome/test/base/testing_profile.h +++ b/chrome/test/base/testing_profile.h @@ -161,7 +161,7 @@ class TestingProfile : public Profile { scoped_ptr<policy::PolicyService> policy_service, const TestingFactories& factories); - virtual ~TestingProfile(); + ~TestingProfile() override; // Creates the favicon service. Consequent calls would recreate the service. void CreateFaviconService(); @@ -216,28 +216,27 @@ class TestingProfile : public Profile { void SetOffTheRecordProfile(scoped_ptr<Profile> profile); // content::BrowserContext - virtual base::FilePath GetPath() const override; - virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; - virtual bool IsOffTheRecord() const override; - virtual content::DownloadManagerDelegate* - GetDownloadManagerDelegate() override; - virtual net::URLRequestContextGetter* GetRequestContext() override; - virtual net::URLRequestContextGetter* CreateRequestContext( + base::FilePath GetPath() const override; + scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; + bool IsOffTheRecord() const override; + content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; + net::URLRequestContextGetter* GetRequestContext() override; + net::URLRequestContextGetter* CreateRequestContext( content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) override; - virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( + net::URLRequestContextGetter* GetRequestContextForRenderProcess( int renderer_child_id) override; - virtual content::ResourceContext* GetResourceContext() override; - virtual content::BrowserPluginGuestManager* GetGuestManager() override; - virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; - virtual content::PushMessagingService* GetPushMessagingService() override; - virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; + content::ResourceContext* GetResourceContext() override; + content::BrowserPluginGuestManager* GetGuestManager() override; + storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; + content::PushMessagingService* GetPushMessagingService() override; + content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; - virtual TestingProfile* AsTestingProfile() override; + TestingProfile* AsTestingProfile() override; // Profile - virtual std::string GetProfileName() override; - virtual ProfileType GetProfileType() const override; + std::string GetProfileName() override; + ProfileType GetProfileType() const override; // DEPRECATED, because it's fragile to change a profile from non-incognito // to incognito after the ProfileKeyedServices have been created (some @@ -256,54 +255,51 @@ class TestingProfile : public Profile { force_incognito_ = force_incognito; } - virtual Profile* GetOffTheRecordProfile() override; - virtual void DestroyOffTheRecordProfile() override {} - virtual bool HasOffTheRecordProfile() override; - virtual Profile* GetOriginalProfile() override; - virtual bool IsSupervised() override; + Profile* GetOffTheRecordProfile() override; + void DestroyOffTheRecordProfile() override {} + bool HasOffTheRecordProfile() override; + Profile* GetOriginalProfile() override; + bool IsSupervised() override; #if defined(ENABLE_EXTENSIONS) void SetExtensionSpecialStoragePolicy( ExtensionSpecialStoragePolicy* extension_special_storage_policy); #endif - virtual ExtensionSpecialStoragePolicy* - GetExtensionSpecialStoragePolicy() override; + ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override; // TODO(ajwong): Remove this API in favor of directly retrieving the // CookieStore from the StoragePartition after ExtensionURLRequestContext // has been removed. net::CookieMonster* GetCookieMonster(); - virtual PrefService* GetPrefs() override; + PrefService* GetPrefs() override; - virtual history::TopSites* GetTopSites() override; - virtual history::TopSites* GetTopSitesWithoutCreating() override; + history::TopSites* GetTopSites() override; + history::TopSites* GetTopSitesWithoutCreating() override; - virtual net::URLRequestContextGetter* GetMediaRequestContext() override; - virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( + net::URLRequestContextGetter* GetMediaRequestContext() override; + net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( int renderer_child_id) override; - virtual net::URLRequestContextGetter* - GetRequestContextForExtensions() override; - virtual net::URLRequestContextGetter* - GetMediaRequestContextForStoragePartition( - const base::FilePath& partition_path, - bool in_memory) override; - virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + net::URLRequestContextGetter* GetRequestContextForExtensions() override; + net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( + const base::FilePath& partition_path, + bool in_memory) override; + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( const base::FilePath& partition_path, bool in_memory, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) override; - virtual net::SSLConfigService* GetSSLConfigService() override; - virtual HostContentSettingsMap* GetHostContentSettingsMap() override; + net::SSLConfigService* GetSSLConfigService() override; + HostContentSettingsMap* GetHostContentSettingsMap() override; void set_last_session_exited_cleanly(bool value) { last_session_exited_cleanly_ = value; } - virtual bool IsSameProfile(Profile *p) override; - virtual base::Time GetStartTime() const override; - virtual base::FilePath last_selected_directory() override; - virtual void set_last_selected_directory(const base::FilePath& path) override; - virtual bool WasCreatedByVersionOrLater(const std::string& version) override; - virtual bool IsGuestSession() const override; - virtual void SetExitType(ExitType exit_type) override {} - virtual ExitType GetLastSessionExitType() override; + bool IsSameProfile(Profile* p) override; + base::Time GetStartTime() const override; + base::FilePath last_selected_directory() override; + void set_last_selected_directory(const base::FilePath& path) override; + bool WasCreatedByVersionOrLater(const std::string& version) override; + bool IsGuestSession() const override; + void SetExitType(ExitType exit_type) override {} + ExitType GetLastSessionExitType() override; #if defined(OS_CHROMEOS) virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) override { @@ -314,21 +310,20 @@ class TestingProfile : public Profile { } #endif // defined(OS_CHROMEOS) - virtual PrefProxyConfigTracker* GetProxyConfigTracker() override; + PrefProxyConfigTracker* GetProxyConfigTracker() override; // Schedules a task on the history backend and runs a nested loop until the // task is processed. This has the effect of blocking the caller until the // history service processes all pending requests. void BlockUntilHistoryProcessesPendingRequests(); - virtual chrome_browser_net::Predictor* GetNetworkPredictor() override; - virtual DevToolsNetworkController* GetDevToolsNetworkController() override; - virtual void ClearNetworkingHistorySince( - base::Time time, - const base::Closure& completion) override; - virtual GURL GetHomePage() override; + chrome_browser_net::Predictor* GetNetworkPredictor() override; + DevToolsNetworkController* GetDevToolsNetworkController() override; + void ClearNetworkingHistorySince(base::Time time, + const base::Closure& completion) override; + GURL GetHomePage() override; - virtual PrefService* GetOffTheRecordPrefs() override; + PrefService* GetOffTheRecordPrefs() override; void set_profile_name(const std::string& profile_name) { profile_name_ = profile_name; diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc index a583816..2ddcb99 100644 --- a/chrome/test/base/testing_profile_manager.cc +++ b/chrome/test/base/testing_profile_manager.cc @@ -27,8 +27,7 @@ class ProfileManager : public ::ProfileManagerWithoutInit { : ::ProfileManagerWithoutInit(user_data_dir) {} protected: - virtual Profile* CreateProfileHelper( - const base::FilePath& file_path) override { + Profile* CreateProfileHelper(const base::FilePath& file_path) override { return new TestingProfile(file_path); } }; diff --git a/chrome/test/base/tracing.cc b/chrome/test/base/tracing.cc index 8a37ab9..6ed0f54 100644 --- a/chrome/test/base/tracing.cc +++ b/chrome/test/base/tracing.cc @@ -24,18 +24,18 @@ class StringTraceSink : public content::TracingController::TraceDataSink { StringTraceSink(std::string* result, const base::Closure& callback) : result_(result), completion_callback_(callback) {} - virtual void AddTraceChunk(const std::string& chunk) override { + void AddTraceChunk(const std::string& chunk) override { *result_ += result_->empty() ? "[" : ","; *result_ += chunk; } - virtual void Close() override { + void Close() override { if (!result_->empty()) *result_ += "]"; completion_callback_.Run(); } private: - virtual ~StringTraceSink() {} + ~StringTraceSink() override {} std::string* result_; base::Closure completion_callback_; diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h index 3d96ab3..81fa904 100644 --- a/chrome/test/base/ui_test_utils.h +++ b/chrome/test/base/ui_test_utils.h @@ -177,9 +177,9 @@ class WindowedTabAddedNotificationObserver // Returns the added tab, or NULL if no notification was observed yet. content::WebContents* GetTab() { return added_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; private: content::WebContents* added_tab_; @@ -233,12 +233,12 @@ class UrlLoadObserver : public content::WindowedNotificationObserver { // specific source, or from all sources if |source| is // NotificationService::AllSources(). UrlLoadObserver(const GURL& url, const content::NotificationSource& source); - virtual ~UrlLoadObserver(); + ~UrlLoadObserver() 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: GURL url_; diff --git a/chrome/test/base/view_event_test_platform_part_mac.mm b/chrome/test/base/view_event_test_platform_part_mac.mm index 60c9703..94f9671 100644 --- a/chrome/test/base/view_event_test_platform_part_mac.mm +++ b/chrome/test/base/view_event_test_platform_part_mac.mm @@ -12,7 +12,7 @@ class ViewEventTestPlatformPartMac : public ViewEventTestPlatformPart { ViewEventTestPlatformPartMac() {} // Overridden from ViewEventTestPlatformPart: - virtual gfx::NativeWindow GetContext() override { return NULL; } + gfx::NativeWindow GetContext() override { return NULL; } private: DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPartMac); diff --git a/chrome/test/base/web_ui_browser_test.cc b/chrome/test/base/web_ui_browser_test.cc index 77bfe91..a2506f4 100644 --- a/chrome/test/base/web_ui_browser_test.cc +++ b/chrome/test/base/web_ui_browser_test.cc @@ -71,7 +71,7 @@ class WebUIJsInjectionReadyObserver : public content::WebContentsObserver { preload_test_fixture_(preload_test_fixture), preload_test_name_(preload_test_name) {} - virtual void RenderViewCreated(content::RenderViewHost* rvh) override { + void RenderViewCreated(content::RenderViewHost* rvh) override { browser_test_->PreLoadJavascriptLibraries( preload_test_fixture_, preload_test_name_, rvh); } @@ -242,7 +242,7 @@ class PrintContentBrowserClient : public chrome::ChromeContentBrowserClient { private: // ChromeContentBrowserClient implementation: - virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( + content::WebContentsViewDelegate* GetWebContentsViewDelegate( content::WebContents* web_contents) override { preview_dialog_ = web_contents; observer_.reset(new WebUIJsInjectionReadyObserver(preview_dialog_, @@ -317,11 +317,11 @@ class MockWebUIDataSource : public content::URLDataSource { MockWebUIDataSource() {} private: - virtual ~MockWebUIDataSource() {} + ~MockWebUIDataSource() override {} - virtual std::string GetSource() const override { return "dummyurl"; } + std::string GetSource() const override { return "dummyurl"; } - virtual void StartDataRequest( + void StartDataRequest( const std::string& path, int render_process_id, int render_frame_id, @@ -332,7 +332,7 @@ class MockWebUIDataSource : public content::URLDataSource { callback.Run(response.get()); } - virtual std::string GetMimeType(const std::string& path) const override { + std::string GetMimeType(const std::string& path) const override { return "text/html"; } @@ -347,8 +347,7 @@ class MockWebUIProvider MockWebUIProvider() {} // Returns a new WebUI - virtual WebUIController* NewWebUI(content::WebUI* web_ui, - const GURL& url) override { + WebUIController* NewWebUI(content::WebUI* web_ui, const GURL& url) override { WebUIController* controller = new content::WebUIController(web_ui); Profile* profile = Profile::FromWebUI(web_ui); content::URLDataSource::Add(profile, new MockWebUIDataSource()); diff --git a/chrome/test/base/web_ui_browser_test.h b/chrome/test/base/web_ui_browser_test.h index 8a436a6..5784e10 100644 --- a/chrome/test/base/web_ui_browser_test.h +++ b/chrome/test/base/web_ui_browser_test.h @@ -112,8 +112,8 @@ class WebUIBrowserTest : public JavaScriptBrowserTest { void set_preload_test_name(const std::string& preload_test_name); // Set up & tear down console error catching. - virtual void SetUpOnMainThread() override; - virtual void TearDownOnMainThread() override; + void SetUpOnMainThread() override; + void TearDownOnMainThread() override; // Set a WebUI instance to run tests on. void SetWebUIInstance(content::WebUI* web_ui); diff --git a/chrome/test/chromedriver/chrome/adb_impl.h b/chrome/test/chromedriver/chrome/adb_impl.h index 043986d..895bd78 100644 --- a/chrome/test/chromedriver/chrome/adb_impl.h +++ b/chrome/test/chromedriver/chrome/adb_impl.h @@ -23,31 +23,31 @@ class AdbImpl : public Adb { explicit AdbImpl( const scoped_refptr<base::SingleThreadTaskRunner>& io_message_loop_proxy, int port); - virtual ~AdbImpl(); + ~AdbImpl() override; // Overridden from Adb: - virtual Status GetDevices(std::vector<std::string>* devices) override; - virtual Status ForwardPort(const std::string& device_serial, - int local_port, - const std::string& remote_abstract) override; - virtual Status SetCommandLineFile(const std::string& device_serial, - const std::string& command_line_file, - const std::string& exec_name, - const std::string& args) override; - virtual Status CheckAppInstalled(const std::string& device_serial, - const std::string& package) override; - virtual Status ClearAppData(const std::string& device_serial, - const std::string& package) override; - virtual Status SetDebugApp(const std::string& device_serial, - const std::string& package) override; - virtual Status Launch(const std::string& device_serial, - const std::string& package, - const std::string& activity) override; - virtual Status ForceStop(const std::string& device_serial, + Status GetDevices(std::vector<std::string>* devices) override; + Status ForwardPort(const std::string& device_serial, + int local_port, + const std::string& remote_abstract) override; + Status SetCommandLineFile(const std::string& device_serial, + const std::string& command_line_file, + const std::string& exec_name, + const std::string& args) override; + Status CheckAppInstalled(const std::string& device_serial, const std::string& package) override; - virtual Status GetPidByName(const std::string& device_serial, - const std::string& process_name, - int* pid) override; + Status ClearAppData(const std::string& device_serial, + const std::string& package) override; + Status SetDebugApp(const std::string& device_serial, + const std::string& package) override; + Status Launch(const std::string& device_serial, + const std::string& package, + const std::string& activity) override; + Status ForceStop(const std::string& device_serial, + const std::string& package) override; + Status GetPidByName(const std::string& device_serial, + const std::string& process_name, + int* pid) override; private: Status ExecuteCommand(const std::string& command, diff --git a/chrome/test/chromedriver/chrome/chrome_android_impl.h b/chrome/test/chromedriver/chrome/chrome_android_impl.h index ae86a57..2fe76ee 100644 --- a/chrome/test/chromedriver/chrome/chrome_android_impl.h +++ b/chrome/test/chromedriver/chrome/chrome_android_impl.h @@ -23,13 +23,13 @@ class ChromeAndroidImpl : public ChromeImpl { ScopedVector<DevToolsEventListener>& devtools_event_listeners, scoped_ptr<PortReservation> port_reservation, scoped_ptr<Device> device); - virtual ~ChromeAndroidImpl(); + ~ChromeAndroidImpl() override; // Overridden from Chrome: - virtual std::string GetOperatingSystemName() override; + std::string GetOperatingSystemName() override; // Overridden from ChromeImpl: - virtual Status QuitImpl() override; + Status QuitImpl() override; private: scoped_ptr<Device> device_; diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h index 8a973dc..7778483 100644 --- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.h +++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.h @@ -35,7 +35,7 @@ class ChromeDesktopImpl : public ChromeImpl { const base::CommandLine& command, base::ScopedTempDir* user_data_dir, base::ScopedTempDir* extension_dir); - virtual ~ChromeDesktopImpl(); + ~ChromeDesktopImpl() override; // Waits for a page with the given URL to appear and finish loading. // Returns an error if the timeout is exceeded. @@ -47,12 +47,12 @@ class ChromeDesktopImpl : public ChromeImpl { Status GetAutomationExtension(AutomationExtension** extension); // Overridden from Chrome: - virtual ChromeDesktopImpl* GetAsDesktop() override; - virtual std::string GetOperatingSystemName() override; + ChromeDesktopImpl* GetAsDesktop() override; + std::string GetOperatingSystemName() override; // Overridden from ChromeImpl: - virtual bool IsMobileEmulationEnabled() const override; - virtual Status QuitImpl() override; + bool IsMobileEmulationEnabled() const override; + Status QuitImpl() override; const base::CommandLine& command() const; diff --git a/chrome/test/chromedriver/chrome/chrome_impl.h b/chrome/test/chromedriver/chrome/chrome_impl.h index 22ecd91..93bb97f 100644 --- a/chrome/test/chromedriver/chrome/chrome_impl.h +++ b/chrome/test/chromedriver/chrome/chrome_impl.h @@ -27,19 +27,18 @@ class WebViewImpl; class ChromeImpl : public Chrome { public: - virtual ~ChromeImpl(); + ~ChromeImpl() override; // Overridden from Chrome: - virtual ChromeDesktopImpl* GetAsDesktop() override; - virtual const BrowserInfo* GetBrowserInfo() override; - virtual bool HasCrashedWebView() override; - virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) override; - virtual Status GetWebViewById(const std::string& id, - WebView** web_view) override; - virtual Status CloseWebView(const std::string& id) override; - virtual Status ActivateWebView(const std::string& id) override; - virtual bool IsMobileEmulationEnabled() const override; - virtual Status Quit() override; + ChromeDesktopImpl* GetAsDesktop() override; + const BrowserInfo* GetBrowserInfo() override; + bool HasCrashedWebView() override; + Status GetWebViewIds(std::list<std::string>* web_view_ids) override; + Status GetWebViewById(const std::string& id, WebView** web_view) override; + Status CloseWebView(const std::string& id) override; + Status ActivateWebView(const std::string& id) override; + bool IsMobileEmulationEnabled() const override; + Status Quit() override; protected: ChromeImpl( diff --git a/chrome/test/chromedriver/chrome/chrome_remote_impl.h b/chrome/test/chromedriver/chrome/chrome_remote_impl.h index 6fffaae..b853a7b 100644 --- a/chrome/test/chromedriver/chrome/chrome_remote_impl.h +++ b/chrome/test/chromedriver/chrome/chrome_remote_impl.h @@ -20,13 +20,13 @@ class ChromeRemoteImpl : public ChromeImpl { scoped_ptr<DevToolsHttpClient> http_client, scoped_ptr<DevToolsClient> websocket_client, ScopedVector<DevToolsEventListener>& devtools_event_listeners); - virtual ~ChromeRemoteImpl(); + ~ChromeRemoteImpl() override; // Overridden from Chrome. - virtual std::string GetOperatingSystemName() override; + std::string GetOperatingSystemName() override; // Overridden from ChromeImpl. - virtual Status QuitImpl() override; + Status QuitImpl() override; }; #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_REMOTE_IMPL_H_ diff --git a/chrome/test/chromedriver/chrome/console_logger.h b/chrome/test/chromedriver/chrome/console_logger.h index f8a957e..5646408 100644 --- a/chrome/test/chromedriver/chrome/console_logger.h +++ b/chrome/test/chromedriver/chrome/console_logger.h @@ -24,11 +24,11 @@ class ConsoleLogger : public DevToolsEventListener { explicit ConsoleLogger(Log* log); // Enables Console events for the client, which must not be null. - virtual Status OnConnected(DevToolsClient* client) override; + Status OnConnected(DevToolsClient* client) override; // Translates an event into a log entry. - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: Log* log_; // The log where to create entries. diff --git a/chrome/test/chromedriver/chrome/console_logger_unittest.cc b/chrome/test/chromedriver/chrome/console_logger_unittest.cc index f72a11c..b7bb32b 100644 --- a/chrome/test/chromedriver/chrome/console_logger_unittest.cc +++ b/chrome/test/chromedriver/chrome/console_logger_unittest.cc @@ -20,7 +20,7 @@ class FakeDevToolsClient : public StubDevToolsClient { public: explicit FakeDevToolsClient(const std::string& id) : id_(id), listener_(NULL) {} - virtual ~FakeDevToolsClient() {} + ~FakeDevToolsClient() override {} std::string PopSentCommand() { std::string command; @@ -37,11 +37,9 @@ class FakeDevToolsClient : public StubDevToolsClient { } // Overridden from DevToolsClient: - virtual Status ConnectIfNecessary() override { - return listener_->OnConnected(this); - } + Status ConnectIfNecessary() override { return listener_->OnConnected(this); } - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -49,14 +47,12 @@ class FakeDevToolsClient : public StubDevToolsClient { return Status(kOk); } - virtual void AddListener(DevToolsEventListener* listener) override { + void AddListener(DevToolsEventListener* listener) override { CHECK(!listener_); listener_ = listener; } - virtual const std::string& GetId() override { - return id_; - } + const std::string& GetId() override { return id_; } private: const std::string id_; // WebView id. @@ -79,10 +75,10 @@ struct LogEntry { class FakeLog : public Log { public: - virtual void AddEntryTimestamped(const base::Time& timestamp, - Level level, - const std::string& source, - const std::string& message) override; + void AddEntryTimestamped(const base::Time& timestamp, + Level level, + const std::string& source, + const std::string& message) override; const ScopedVector<LogEntry>& GetEntries() { return entries_; diff --git a/chrome/test/chromedriver/chrome/debugger_tracker.h b/chrome/test/chromedriver/chrome/debugger_tracker.h index a1d5f39..6cc56ea 100644 --- a/chrome/test/chromedriver/chrome/debugger_tracker.h +++ b/chrome/test/chromedriver/chrome/debugger_tracker.h @@ -22,12 +22,12 @@ class Status; class DebuggerTracker : public DevToolsEventListener { public: explicit DebuggerTracker(DevToolsClient* client); - virtual ~DebuggerTracker(); + ~DebuggerTracker() override; // Overridden from DevToolsEventListener: - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: DISALLOW_COPY_AND_ASSIGN(DebuggerTracker); diff --git a/chrome/test/chromedriver/chrome/device_manager_unittest.cc b/chrome/test/chromedriver/chrome/device_manager_unittest.cc index b600388..be6f279 100644 --- a/chrome/test/chromedriver/chrome/device_manager_unittest.cc +++ b/chrome/test/chromedriver/chrome/device_manager_unittest.cc @@ -17,56 +17,56 @@ namespace { class FakeAdb : public Adb { public: FakeAdb() {} - virtual ~FakeAdb() {} + ~FakeAdb() override {} - virtual Status GetDevices(std::vector<std::string>* devices) override { + Status GetDevices(std::vector<std::string>* devices) override { devices->push_back("a"); devices->push_back("b"); return Status(kOk); } - virtual Status ForwardPort(const std::string& device_serial, - int local_port, - const std::string& remote_abstract) override { + Status ForwardPort(const std::string& device_serial, + int local_port, + const std::string& remote_abstract) override { return Status(kOk); } - virtual Status SetCommandLineFile(const std::string& device_serial, - const std::string& command_line_file, - const std::string& exec_name, - const std::string& args) override { + Status SetCommandLineFile(const std::string& device_serial, + const std::string& command_line_file, + const std::string& exec_name, + const std::string& args) override { return Status(kOk); } - virtual Status CheckAppInstalled(const std::string& device_serial, - const std::string& package) override { + Status CheckAppInstalled(const std::string& device_serial, + const std::string& package) override { return Status(kOk); } - virtual Status ClearAppData(const std::string& device_serial, - const std::string& package) override { + Status ClearAppData(const std::string& device_serial, + const std::string& package) override { return Status(kOk); } - virtual Status SetDebugApp(const std::string& device_serial, - const std::string& package) override { + Status SetDebugApp(const std::string& device_serial, + const std::string& package) override { return Status(kOk); } - virtual Status Launch(const std::string& device_serial, - const std::string& package, - const std::string& activity) override { + Status Launch(const std::string& device_serial, + const std::string& package, + const std::string& activity) override { return Status(kOk); } - virtual Status ForceStop(const std::string& device_serial, - const std::string& package) override { + Status ForceStop(const std::string& device_serial, + const std::string& package) override { return Status(kOk); } - virtual Status GetPidByName(const std::string& device_serial, - const std::string& process_name, - int* pid) override { + Status GetPidByName(const std::string& device_serial, + const std::string& process_name, + int* pid) override { *pid = 0; // avoid uninit error crbug.com/393231 return Status(kOk); } diff --git a/chrome/test/chromedriver/chrome/devtools_client_impl.h b/chrome/test/chromedriver/chrome/devtools_client_impl.h index 3d4d9e5..48aee16 100644 --- a/chrome/test/chromedriver/chrome/devtools_client_impl.h +++ b/chrome/test/chromedriver/chrome/devtools_client_impl.h @@ -76,25 +76,24 @@ class DevToolsClientImpl : public DevToolsClient { const FrontendCloserFunc& frontend_closer_func, const ParserFunc& parser_func); - virtual ~DevToolsClientImpl(); + ~DevToolsClientImpl() override; void SetParserFuncForTesting(const ParserFunc& parser_func); // Overridden from DevToolsClient: - virtual const std::string& GetId() override; - virtual bool WasCrashed() override; - virtual Status ConnectIfNecessary() override; - virtual Status SendCommand(const std::string& method, - const base::DictionaryValue& params) override; - virtual Status SendCommandAndGetResult( + const std::string& GetId() override; + bool WasCrashed() override; + Status ConnectIfNecessary() override; + Status SendCommand(const std::string& method, + const base::DictionaryValue& params) override; + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override; - virtual void AddListener(DevToolsEventListener* listener) override; - virtual Status HandleEventsUntil( - const ConditionalFunc& conditional_func, - const base::TimeDelta& timeout) override; - virtual Status HandleReceivedEvents() override; + void AddListener(DevToolsEventListener* listener) override; + Status HandleEventsUntil(const ConditionalFunc& conditional_func, + const base::TimeDelta& timeout) override; + Status HandleReceivedEvents() override; private: enum ResponseState { diff --git a/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc b/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc index 3f7aba7..158caf3 100644 --- a/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc +++ b/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc @@ -29,19 +29,17 @@ Status CloserFunc() { class MockSyncWebSocket : public SyncWebSocket { public: MockSyncWebSocket() : connected_(false), id_(-1), queued_messages_(1) {} - virtual ~MockSyncWebSocket() {} + ~MockSyncWebSocket() override {} - virtual bool IsConnected() override { - return connected_; - } + bool IsConnected() override { return connected_; } - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { EXPECT_STREQ("http://url/", url.possibly_invalid_spec().c_str()); connected_ = true; return true; } - virtual bool Send(const std::string& message) override { + bool Send(const std::string& message) override { EXPECT_TRUE(connected_); scoped_ptr<base::Value> value(base::JSONReader::Read(message)); base::DictionaryValue* dict = NULL; @@ -62,7 +60,7 @@ class MockSyncWebSocket : public SyncWebSocket { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { if (timeout <= base::TimeDelta()) @@ -77,9 +75,7 @@ class MockSyncWebSocket : public SyncWebSocket { return SyncWebSocket::kOk; } - virtual bool HasNextMessage() override { - return queued_messages_ > 0; - } + bool HasNextMessage() override { return queued_messages_ > 0; } protected: bool connected_; @@ -133,31 +129,25 @@ namespace { class MockSyncWebSocket2 : public SyncWebSocket { public: MockSyncWebSocket2() {} - virtual ~MockSyncWebSocket2() {} + ~MockSyncWebSocket2() override {} - virtual bool IsConnected() override { - return false; - } + bool IsConnected() override { return false; } - virtual bool Connect(const GURL& url) override { - return false; - } + bool Connect(const GURL& url) override { return false; } - virtual bool Send(const std::string& message) override { + bool Send(const std::string& message) override { EXPECT_TRUE(false); return false; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { EXPECT_TRUE(false); return SyncWebSocket::kDisconnected; } - virtual bool HasNextMessage() override { - return true; - } + bool HasNextMessage() override { return true; } }; } // namespace @@ -175,31 +165,25 @@ namespace { class MockSyncWebSocket3 : public SyncWebSocket { public: MockSyncWebSocket3() : connected_(false) {} - virtual ~MockSyncWebSocket3() {} + ~MockSyncWebSocket3() override {} - virtual bool IsConnected() override { - return connected_; - } + bool IsConnected() override { return connected_; } - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { connected_ = true; return true; } - virtual bool Send(const std::string& message) override { - return false; - } + bool Send(const std::string& message) override { return false; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { EXPECT_TRUE(false); return SyncWebSocket::kDisconnected; } - virtual bool HasNextMessage() override { - return true; - } + bool HasNextMessage() override { return true; } private: bool connected_; @@ -222,30 +206,24 @@ namespace { class MockSyncWebSocket4 : public SyncWebSocket { public: MockSyncWebSocket4() : connected_(false) {} - virtual ~MockSyncWebSocket4() {} + ~MockSyncWebSocket4() override {} - virtual bool IsConnected() override { - return connected_; - } + bool IsConnected() override { return connected_; } - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { connected_ = true; return true; } - virtual bool Send(const std::string& message) override { - return true; - } + bool Send(const std::string& message) override { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { return SyncWebSocket::kDisconnected; } - virtual bool HasNextMessage() override { - return true; - } + bool HasNextMessage() override { return true; } private: bool connected_; @@ -268,31 +246,25 @@ namespace { class FakeSyncWebSocket : public SyncWebSocket { public: FakeSyncWebSocket() : connected_(false) {} - virtual ~FakeSyncWebSocket() {} + ~FakeSyncWebSocket() override {} - virtual bool IsConnected() override { - return connected_; - } + bool IsConnected() override { return connected_; } - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { EXPECT_FALSE(connected_); connected_ = true; return true; } - virtual bool Send(const std::string& message) override { - return true; - } + bool Send(const std::string& message) override { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { return SyncWebSocket::kOk; } - virtual bool HasNextMessage() override { - return true; - } + bool HasNextMessage() override { return true; } private: bool connected_; @@ -349,17 +321,13 @@ bool ReturnCommandError( class MockListener : public DevToolsEventListener { public: MockListener() : called_(false) {} - virtual ~MockListener() { - EXPECT_TRUE(called_); - } + ~MockListener() override { EXPECT_TRUE(called_); } - virtual Status OnConnected(DevToolsClient* client) override { - return Status(kOk); - } + Status OnConnected(DevToolsClient* client) override { return Status(kOk); } - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { called_ = true; EXPECT_STREQ("method", method.c_str()); EXPECT_TRUE(params.HasKey("key")); @@ -695,14 +663,14 @@ class OnConnectedListener : public DevToolsEventListener { on_event_called_(false) { client_->AddListener(this); } - virtual ~OnConnectedListener() {} + ~OnConnectedListener() override {} void VerifyCalled() { EXPECT_TRUE(on_connected_called_); EXPECT_TRUE(on_event_called_); } - virtual Status OnConnected(DevToolsClient* client) override { + Status OnConnected(DevToolsClient* client) override { EXPECT_EQ(client_, client); EXPECT_STREQ("onconnected-id", client->GetId().c_str()); EXPECT_FALSE(on_connected_called_); @@ -712,9 +680,9 @@ class OnConnectedListener : public DevToolsEventListener { return client_->SendCommand(method_, params); } - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { EXPECT_EQ(client_, client); EXPECT_STREQ("onconnected-id", client->GetId().c_str()); EXPECT_TRUE(on_connected_called_); @@ -732,18 +700,16 @@ class OnConnectedListener : public DevToolsEventListener { class OnConnectedSyncWebSocket : public SyncWebSocket { public: OnConnectedSyncWebSocket() : connected_(false) {} - virtual ~OnConnectedSyncWebSocket() {} + ~OnConnectedSyncWebSocket() override {} - virtual bool IsConnected() override { - return connected_; - } + bool IsConnected() override { return connected_; } - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { connected_ = true; return true; } - virtual bool Send(const std::string& message) override { + bool Send(const std::string& message) override { EXPECT_TRUE(connected_); scoped_ptr<base::Value> value(base::JSONReader::Read(message)); base::DictionaryValue* dict = NULL; @@ -773,7 +739,7 @@ class OnConnectedSyncWebSocket : public SyncWebSocket { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { if (queued_response_.empty()) @@ -783,9 +749,7 @@ class OnConnectedSyncWebSocket : public SyncWebSocket { return SyncWebSocket::kOk; } - virtual bool HasNextMessage() override { - return !queued_response_.empty(); - } + bool HasNextMessage() override { return !queued_response_.empty(); } private: bool connected_; @@ -830,21 +794,15 @@ namespace { class MockSyncWebSocket5 : public SyncWebSocket { public: MockSyncWebSocket5() : request_no_(0) {} - virtual ~MockSyncWebSocket5() {} + ~MockSyncWebSocket5() override {} - virtual bool IsConnected() override { - return true; - } + bool IsConnected() override { return true; } - virtual bool Connect(const GURL& url) override { - return true; - } + bool Connect(const GURL& url) override { return true; } - virtual bool Send(const std::string& message) override { - return true; - } + bool Send(const std::string& message) override { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { if (request_no_ == 0) { @@ -857,9 +815,7 @@ class MockSyncWebSocket5 : public SyncWebSocket { return SyncWebSocket::kOk; } - virtual bool HasNextMessage() override { - return false; - } + bool HasNextMessage() override { return false; } private: int request_no_; @@ -868,14 +824,12 @@ class MockSyncWebSocket5 : public SyncWebSocket { class OtherEventListener : public DevToolsEventListener { public: OtherEventListener() : received_event_(false) {} - virtual ~OtherEventListener() {} + ~OtherEventListener() override {} - virtual Status OnConnected(DevToolsClient* client) override { - return Status(kOk); - } - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnConnected(DevToolsClient* client) override { return Status(kOk); } + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { received_event_ = true; return Status(kOk); } @@ -889,16 +843,16 @@ class OnEventListener : public DevToolsEventListener { OtherEventListener* other_listener) : client_(client), other_listener_(other_listener) {} - virtual ~OnEventListener() {} + ~OnEventListener() override {} - virtual Status OnConnected(DevToolsClient* client) override { + Status OnConnected(DevToolsClient* client) override { EXPECT_EQ(client_, client); return Status(kOk); } - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { EXPECT_EQ(client_, client); client_->SendCommand("method", params); EXPECT_TRUE(other_listener_->received_event_); @@ -930,15 +884,15 @@ namespace { class DisconnectedSyncWebSocket : public MockSyncWebSocket { public: DisconnectedSyncWebSocket() : connection_count_(0), command_count_(0) {} - virtual ~DisconnectedSyncWebSocket() {} + ~DisconnectedSyncWebSocket() override {} - virtual bool Connect(const GURL& url) override { + bool Connect(const GURL& url) override { connection_count_++; connected_ = connection_count_ != 2; return connected_; } - virtual bool Send(const std::string& message) override { + bool Send(const std::string& message) override { command_count_++; if (command_count_ == 1) { connected_ = false; @@ -990,15 +944,15 @@ class MockSyncWebSocket6 : public SyncWebSocket { public: explicit MockSyncWebSocket6(std::list<std::string>* messages) : messages_(messages) {} - virtual ~MockSyncWebSocket6() {} + ~MockSyncWebSocket6() override {} - virtual bool IsConnected() override { return true; } + bool IsConnected() override { return true; } - virtual bool Connect(const GURL& url) override { return true; } + bool Connect(const GURL& url) override { return true; } - virtual bool Send(const std::string& message) override { return true; } + bool Send(const std::string& message) override { return true; } - virtual SyncWebSocket::StatusCode ReceiveNextMessage( + SyncWebSocket::StatusCode ReceiveNextMessage( std::string* message, const base::TimeDelta& timeout) override { if (messages_->empty()) @@ -1008,7 +962,7 @@ class MockSyncWebSocket6 : public SyncWebSocket { return SyncWebSocket::kOk; } - virtual bool HasNextMessage() override { return messages_->size(); } + bool HasNextMessage() override { return messages_->size(); } private: std::list<std::string>* messages_; @@ -1017,15 +971,13 @@ class MockSyncWebSocket6 : public SyncWebSocket { class MockDevToolsEventListener : public DevToolsEventListener { public: MockDevToolsEventListener() : id_(1) {} - virtual ~MockDevToolsEventListener() {} + ~MockDevToolsEventListener() override {} - virtual Status OnConnected(DevToolsClient* client) override { - return Status(kOk); - } + Status OnConnected(DevToolsClient* client) override { return Status(kOk); } - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { id_++; Status status = client->SendCommand("hello", params); id_--; @@ -1104,17 +1056,17 @@ namespace { class MockCommandListener : public DevToolsEventListener { public: MockCommandListener() {} - virtual ~MockCommandListener() {} + ~MockCommandListener() override {} - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override { + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override { msgs_.push_back(method); return Status(kOk); } - virtual Status OnCommandSuccess(DevToolsClient* client, - const std::string& method) override { + Status OnCommandSuccess(DevToolsClient* client, + const std::string& method) override { msgs_.push_back(method); if (!callback_.is_null()) callback_.Run(client); diff --git a/chrome/test/chromedriver/chrome/dom_tracker.h b/chrome/test/chromedriver/chrome/dom_tracker.h index d998bfb..9311a52 100644 --- a/chrome/test/chromedriver/chrome/dom_tracker.h +++ b/chrome/test/chromedriver/chrome/dom_tracker.h @@ -24,15 +24,15 @@ class Status; class DomTracker : public DevToolsEventListener { public: explicit DomTracker(DevToolsClient* client); - virtual ~DomTracker(); + ~DomTracker() override; Status GetFrameIdForNode(int node_id, std::string* frame_id); // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: bool ProcessNodeList(const base::Value* nodes); diff --git a/chrome/test/chromedriver/chrome/dom_tracker_unittest.cc b/chrome/test/chromedriver/chrome/dom_tracker_unittest.cc index 4a5b9ae..2deeb09 100644 --- a/chrome/test/chromedriver/chrome/dom_tracker_unittest.cc +++ b/chrome/test/chromedriver/chrome/dom_tracker_unittest.cc @@ -17,7 +17,7 @@ namespace { class FakeDevToolsClient : public StubDevToolsClient { public: FakeDevToolsClient() {} - virtual ~FakeDevToolsClient() {} + ~FakeDevToolsClient() override {} std::string PopSentCommand() { std::string command; @@ -29,12 +29,12 @@ class FakeDevToolsClient : public StubDevToolsClient { } // Overridden from DevToolsClient: - virtual Status SendCommand(const std::string& method, - const base::DictionaryValue& params) override { + Status SendCommand(const std::string& method, + const base::DictionaryValue& params) override { sent_command_queue_.push_back(method); return Status(kOk); } - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { diff --git a/chrome/test/chromedriver/chrome/frame_tracker.h b/chrome/test/chromedriver/chrome/frame_tracker.h index cc0c83f..e5c9e9b 100644 --- a/chrome/test/chromedriver/chrome/frame_tracker.h +++ b/chrome/test/chromedriver/chrome/frame_tracker.h @@ -24,16 +24,16 @@ class Status; class FrameTracker : public DevToolsEventListener { public: explicit FrameTracker(DevToolsClient* client); - virtual ~FrameTracker(); + ~FrameTracker() override; Status GetFrameForContextId(int context_id, std::string* frame_id); Status GetContextIdForFrame(const std::string& frame_id, int* context_id); // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: std::map<std::string, int> frame_to_context_map_; diff --git a/chrome/test/chromedriver/chrome/geolocation_override_manager.h b/chrome/test/chromedriver/chrome/geolocation_override_manager.h index 151bb13..199e680 100644 --- a/chrome/test/chromedriver/chrome/geolocation_override_manager.h +++ b/chrome/test/chromedriver/chrome/geolocation_override_manager.h @@ -25,15 +25,15 @@ class Status; class GeolocationOverrideManager : public DevToolsEventListener { public: explicit GeolocationOverrideManager(DevToolsClient* client); - virtual ~GeolocationOverrideManager(); + ~GeolocationOverrideManager() override; Status OverrideGeolocation(const Geoposition& geoposition); // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: Status ApplyOverrideIfNeeded(); diff --git a/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc b/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc index 0785476..955ced7 100644 --- a/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc +++ b/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc @@ -39,10 +39,10 @@ struct Command { class RecorderDevToolsClient : public StubDevToolsClient { public: RecorderDevToolsClient() {} - virtual ~RecorderDevToolsClient() {} + ~RecorderDevToolsClient() override {} // Overridden from StubDevToolsClient: - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { diff --git a/chrome/test/chromedriver/chrome/heap_snapshot_taker.h b/chrome/test/chromedriver/chrome/heap_snapshot_taker.h index 06b8c25..3a8dd61 100644 --- a/chrome/test/chromedriver/chrome/heap_snapshot_taker.h +++ b/chrome/test/chromedriver/chrome/heap_snapshot_taker.h @@ -24,14 +24,14 @@ class Status; class HeapSnapshotTaker : public DevToolsEventListener { public: explicit HeapSnapshotTaker(DevToolsClient* client); - virtual ~HeapSnapshotTaker(); + ~HeapSnapshotTaker() override; Status TakeSnapshot(scoped_ptr<base::Value>* snapshot); // Overridden from DevToolsEventListener: - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: Status TakeSnapshotInternal(); diff --git a/chrome/test/chromedriver/chrome/heap_snapshot_taker_unittest.cc b/chrome/test/chromedriver/chrome/heap_snapshot_taker_unittest.cc index 2b3aa97..342ae8f 100644 --- a/chrome/test/chromedriver/chrome/heap_snapshot_taker_unittest.cc +++ b/chrome/test/chromedriver/chrome/heap_snapshot_taker_unittest.cc @@ -30,7 +30,7 @@ class DummyDevToolsClient : public StubDevToolsClient { error_after_events_(error_after_events), uid_(1), disabled_(false) {} - virtual ~DummyDevToolsClient() {} + ~DummyDevToolsClient() override {} bool IsDisabled() { return disabled_; } @@ -48,8 +48,8 @@ class DummyDevToolsClient : public StubDevToolsClient { } // Overridden from DevToolsClient: - virtual Status SendCommand(const std::string& method, - const base::DictionaryValue& params) override { + Status SendCommand(const std::string& method, + const base::DictionaryValue& params) override { if (!disabled_) disabled_ = method == "Debugger.disable"; if (method == method_ && !error_after_events_) diff --git a/chrome/test/chromedriver/chrome/javascript_dialog_manager.h b/chrome/test/chromedriver/chrome/javascript_dialog_manager.h index fd8b806..ffab9ba 100644 --- a/chrome/test/chromedriver/chrome/javascript_dialog_manager.h +++ b/chrome/test/chromedriver/chrome/javascript_dialog_manager.h @@ -23,7 +23,7 @@ class Status; class JavaScriptDialogManager : public DevToolsEventListener { public: explicit JavaScriptDialogManager(DevToolsClient* client); - virtual ~JavaScriptDialogManager(); + ~JavaScriptDialogManager() override; bool IsDialogOpen(); @@ -32,10 +32,10 @@ class JavaScriptDialogManager : public DevToolsEventListener { Status HandleDialog(bool accept, const std::string* text); // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: DevToolsClient* client_; diff --git a/chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc b/chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc index 9966672..69ca375 100644 --- a/chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc +++ b/chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc @@ -27,10 +27,10 @@ namespace { class RecorderDevToolsClient : public StubDevToolsClient { public: RecorderDevToolsClient() {} - virtual ~RecorderDevToolsClient() {} + ~RecorderDevToolsClient() override {} // Overridden from StubDevToolsClient: - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -99,14 +99,14 @@ namespace { class FakeDevToolsClient : public StubDevToolsClient { public: FakeDevToolsClient() : listener_(NULL), closing_count_(0) {} - virtual ~FakeDevToolsClient() {} + ~FakeDevToolsClient() override {} void set_closing_count(int closing_count) { closing_count_ = closing_count; } // Overridden from StubDevToolsClient: - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -120,7 +120,7 @@ class FakeDevToolsClient : public StubDevToolsClient { } return Status(kOk); } - virtual void AddListener(DevToolsEventListener* listener) override { + void AddListener(DevToolsEventListener* listener) override { listener_ = listener; } diff --git a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.h b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.h index d10d3fd..6acd603 100644 --- a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.h +++ b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.h @@ -28,13 +28,13 @@ class MobileEmulationOverrideManager : public DevToolsEventListener { MobileEmulationOverrideManager(DevToolsClient* client, const DeviceMetrics* device_metrics, const BrowserInfo* browser_info); - virtual ~MobileEmulationOverrideManager(); + ~MobileEmulationOverrideManager() override; // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; private: Status ApplyOverrideIfNeeded(); diff --git a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc index 32d8bc0..ab9232d 100644 --- a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc +++ b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc @@ -40,10 +40,10 @@ struct Command { class RecorderDevToolsClient : public StubDevToolsClient { public: RecorderDevToolsClient() {} - virtual ~RecorderDevToolsClient() {} + ~RecorderDevToolsClient() override {} // Overridden from StubDevToolsClient: - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.h b/chrome/test/chromedriver/chrome/navigation_tracker.h index f309c59..a75a094 100644 --- a/chrome/test/chromedriver/chrome/navigation_tracker.h +++ b/chrome/test/chromedriver/chrome/navigation_tracker.h @@ -37,19 +37,19 @@ class NavigationTracker : public DevToolsEventListener { LoadingState known_state, const BrowserInfo* browser_info); - virtual ~NavigationTracker(); + ~NavigationTracker() override; // Gets whether a navigation is pending for the specified frame. |frame_id| // may be empty to signify the main frame. Status IsPendingNavigation(const std::string& frame_id, bool* is_pending); // Overridden from DevToolsEventListener: - virtual Status OnConnected(DevToolsClient* client) override; - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; - virtual Status OnCommandSuccess(DevToolsClient* client, - const std::string& method) override; + Status OnConnected(DevToolsClient* client) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; + Status OnCommandSuccess(DevToolsClient* client, + const std::string& method) override; private: DevToolsClient* client_; diff --git a/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc b/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc index ae35e25..bc013de 100644 --- a/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc +++ b/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc @@ -259,9 +259,9 @@ class FailToEvalScriptDevToolsClient : public StubDevToolsClient { public: FailToEvalScriptDevToolsClient() : is_dom_getDocument_requested_(false) {} - virtual ~FailToEvalScriptDevToolsClient() {} + ~FailToEvalScriptDevToolsClient() override {} - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -305,9 +305,9 @@ class DeterminingLoadStateDevToolsClient : public StubDevToolsClient { send_event_first_(send_event_first), send_event_first_params_(send_event_first_params) {} - virtual ~DeterminingLoadStateDevToolsClient() {} + ~DeterminingLoadStateDevToolsClient() override {} - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { diff --git a/chrome/test/chromedriver/chrome/stub_chrome.h b/chrome/test/chromedriver/chrome/stub_chrome.h index 130c1a5..c0b1cb9 100644 --- a/chrome/test/chromedriver/chrome/stub_chrome.h +++ b/chrome/test/chromedriver/chrome/stub_chrome.h @@ -18,20 +18,19 @@ class WebView; class StubChrome : public Chrome { public: StubChrome(); - virtual ~StubChrome(); + ~StubChrome() override; // Overridden from Chrome: - virtual ChromeDesktopImpl* GetAsDesktop() override; - virtual const BrowserInfo* GetBrowserInfo() override; - virtual bool HasCrashedWebView() override; - virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) override; - virtual Status GetWebViewById(const std::string& id, - WebView** web_view) override; - virtual Status CloseWebView(const std::string& id) override; - virtual Status ActivateWebView(const std::string& id) override; - virtual std::string GetOperatingSystemName() override; - virtual bool IsMobileEmulationEnabled() const override; - virtual Status Quit() override; + ChromeDesktopImpl* GetAsDesktop() override; + const BrowserInfo* GetBrowserInfo() override; + bool HasCrashedWebView() override; + Status GetWebViewIds(std::list<std::string>* web_view_ids) override; + Status GetWebViewById(const std::string& id, WebView** web_view) override; + Status CloseWebView(const std::string& id) override; + Status ActivateWebView(const std::string& id) override; + std::string GetOperatingSystemName() override; + bool IsMobileEmulationEnabled() const override; + Status Quit() override; private: BrowserInfo browser_info_; diff --git a/chrome/test/chromedriver/chrome/stub_devtools_client.h b/chrome/test/chromedriver/chrome/stub_devtools_client.h index 66d01f8..6fab0ad 100644 --- a/chrome/test/chromedriver/chrome/stub_devtools_client.h +++ b/chrome/test/chromedriver/chrome/stub_devtools_client.h @@ -22,22 +22,22 @@ class StubDevToolsClient : public DevToolsClient { public: explicit StubDevToolsClient(const std::string& id); StubDevToolsClient(); - virtual ~StubDevToolsClient(); + ~StubDevToolsClient() override; // Overridden from DevToolsClient: - virtual const std::string& GetId() override; - virtual bool WasCrashed() override; - virtual Status ConnectIfNecessary() override; - virtual Status SendCommand(const std::string& method, - const base::DictionaryValue& params) override; - virtual Status SendCommandAndGetResult( + const std::string& GetId() override; + bool WasCrashed() override; + Status ConnectIfNecessary() override; + Status SendCommand(const std::string& method, + const base::DictionaryValue& params) override; + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override; - virtual void AddListener(DevToolsEventListener* listener) override; - virtual Status HandleEventsUntil(const ConditionalFunc& conditional_func, - const base::TimeDelta& timeout) override; - virtual Status HandleReceivedEvents() override; + void AddListener(DevToolsEventListener* listener) override; + Status HandleEventsUntil(const ConditionalFunc& conditional_func, + const base::TimeDelta& timeout) override; + Status HandleReceivedEvents() override; protected: const std::string id_; diff --git a/chrome/test/chromedriver/chrome/stub_web_view.h b/chrome/test/chromedriver/chrome/stub_web_view.h index f282082..b75bcaa 100644 --- a/chrome/test/chromedriver/chrome/stub_web_view.h +++ b/chrome/test/chromedriver/chrome/stub_web_view.h @@ -15,61 +15,57 @@ class StubWebView : public WebView { public: explicit StubWebView(const std::string& id); - virtual ~StubWebView(); + ~StubWebView() override; // Overridden from WebView: - virtual std::string GetId() override; - virtual bool WasCrashed() override; - virtual Status ConnectIfNecessary() override; - virtual Status HandleReceivedEvents() override; - virtual Status Load(const std::string& url) override; - virtual Status Reload() override; - virtual Status EvaluateScript(const std::string& frame, - const std::string& function, - scoped_ptr<base::Value>* result) override; - virtual Status CallFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - scoped_ptr<base::Value>* result) override; - virtual Status CallAsyncFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, + std::string GetId() override; + bool WasCrashed() override; + Status ConnectIfNecessary() override; + Status HandleReceivedEvents() override; + Status Load(const std::string& url) override; + Status Reload() override; + Status EvaluateScript(const std::string& frame, + const std::string& function, + scoped_ptr<base::Value>* result) override; + Status CallFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + scoped_ptr<base::Value>* result) override; + Status CallAsyncFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + const base::TimeDelta& timeout, + scoped_ptr<base::Value>* result) override; + Status CallUserAsyncFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + const base::TimeDelta& timeout, + scoped_ptr<base::Value>* result) override; + Status GetFrameByFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + std::string* out_frame) override; + Status DispatchMouseEvents(const std::list<MouseEvent>& events, + const std::string& frame) override; + Status DispatchTouchEvent(const TouchEvent& event) override; + Status DispatchTouchEvents(const std::list<TouchEvent>& events) override; + Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; + Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; + Status DeleteCookie(const std::string& name, const std::string& url) override; + Status WaitForPendingNavigations(const std::string& frame_id, const base::TimeDelta& timeout, - scoped_ptr<base::Value>* result) override; - virtual Status CallUserAsyncFunction( - const std::string& frame, - const std::string& function, - const base::ListValue& args, - const base::TimeDelta& timeout, - scoped_ptr<base::Value>* result) override; - virtual Status GetFrameByFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - std::string* out_frame) override; - virtual Status DispatchMouseEvents( - const std::list<MouseEvent>& events, const std::string& frame) override; - virtual Status DispatchTouchEvent(const TouchEvent& event) override; - virtual Status DispatchTouchEvents( - const std::list<TouchEvent>& events) override; - virtual Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; - virtual Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; - virtual Status DeleteCookie(const std::string& name, - const std::string& url) override; - virtual Status WaitForPendingNavigations(const std::string& frame_id, - const base::TimeDelta& timeout, - bool stop_load_on_timeout) override; - virtual Status IsPendingNavigation( - const std::string& frame_id, bool* is_pending) override; - virtual JavaScriptDialogManager* GetJavaScriptDialogManager() override; - virtual Status OverrideGeolocation(const Geoposition& geoposition) override; - virtual Status CaptureScreenshot(std::string* screenshot) override; - virtual Status SetFileInputFiles( - const std::string& frame, - const base::DictionaryValue& element, - const std::vector<base::FilePath>& files) override; - virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; - virtual Status StartProfile() override; - virtual Status EndProfile(scoped_ptr<base::Value>* profile_data) override; + bool stop_load_on_timeout) override; + Status IsPendingNavigation(const std::string& frame_id, + bool* is_pending) override; + JavaScriptDialogManager* GetJavaScriptDialogManager() override; + Status OverrideGeolocation(const Geoposition& geoposition) override; + Status CaptureScreenshot(std::string* screenshot) override; + Status SetFileInputFiles(const std::string& frame, + const base::DictionaryValue& element, + const std::vector<base::FilePath>& files) override; + Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; + Status StartProfile() override; + Status EndProfile(scoped_ptr<base::Value>* profile_data) override; private: std::string id_; diff --git a/chrome/test/chromedriver/chrome/web_view_impl.h b/chrome/test/chromedriver/chrome/web_view_impl.h index a9b4532..03f1e0c 100644 --- a/chrome/test/chromedriver/chrome/web_view_impl.h +++ b/chrome/test/chromedriver/chrome/web_view_impl.h @@ -42,61 +42,57 @@ class WebViewImpl : public WebView { const BrowserInfo* browser_info, scoped_ptr<DevToolsClient> client, const DeviceMetrics* device_metrics); - virtual ~WebViewImpl(); + ~WebViewImpl() override; // Overridden from WebView: - virtual std::string GetId() override; - virtual bool WasCrashed() override; - virtual Status ConnectIfNecessary() override; - virtual Status HandleReceivedEvents() override; - virtual Status Load(const std::string& url) override; - virtual Status Reload() override; - virtual Status EvaluateScript(const std::string& frame, - const std::string& expression, - scoped_ptr<base::Value>* result) override; - virtual Status CallFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - scoped_ptr<base::Value>* result) override; - virtual Status CallAsyncFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, + std::string GetId() override; + bool WasCrashed() override; + Status ConnectIfNecessary() override; + Status HandleReceivedEvents() override; + Status Load(const std::string& url) override; + Status Reload() override; + Status EvaluateScript(const std::string& frame, + const std::string& expression, + scoped_ptr<base::Value>* result) override; + Status CallFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + scoped_ptr<base::Value>* result) override; + Status CallAsyncFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + const base::TimeDelta& timeout, + scoped_ptr<base::Value>* result) override; + Status CallUserAsyncFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + const base::TimeDelta& timeout, + scoped_ptr<base::Value>* result) override; + Status GetFrameByFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + std::string* out_frame) override; + Status DispatchMouseEvents(const std::list<MouseEvent>& events, + const std::string& frame) override; + Status DispatchTouchEvent(const TouchEvent& event) override; + Status DispatchTouchEvents(const std::list<TouchEvent>& events) override; + Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; + Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; + Status DeleteCookie(const std::string& name, const std::string& url) override; + Status WaitForPendingNavigations(const std::string& frame_id, const base::TimeDelta& timeout, - scoped_ptr<base::Value>* result) override; - virtual Status CallUserAsyncFunction( - const std::string& frame, - const std::string& function, - const base::ListValue& args, - const base::TimeDelta& timeout, - scoped_ptr<base::Value>* result) override; - virtual Status GetFrameByFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - std::string* out_frame) override; - virtual Status DispatchMouseEvents( - const std::list<MouseEvent>& events, const std::string& frame) override; - virtual Status DispatchTouchEvent(const TouchEvent& event) override; - virtual Status DispatchTouchEvents( - const std::list<TouchEvent>& events) override; - virtual Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; - virtual Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; - virtual Status DeleteCookie(const std::string& name, - const std::string& url) override; - virtual Status WaitForPendingNavigations(const std::string& frame_id, - const base::TimeDelta& timeout, - bool stop_load_on_timeout) override; - virtual Status IsPendingNavigation( - const std::string& frame_id, bool* is_pending) override; - virtual JavaScriptDialogManager* GetJavaScriptDialogManager() override; - virtual Status OverrideGeolocation(const Geoposition& geoposition) override; - virtual Status CaptureScreenshot(std::string* screenshot) override; - virtual Status SetFileInputFiles( - const std::string& frame, - const base::DictionaryValue& element, - const std::vector<base::FilePath>& files) override; - virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; - virtual Status StartProfile() override; - virtual Status EndProfile(scoped_ptr<base::Value>* profile_data) override; + bool stop_load_on_timeout) override; + Status IsPendingNavigation(const std::string& frame_id, + bool* is_pending) override; + JavaScriptDialogManager* GetJavaScriptDialogManager() override; + Status OverrideGeolocation(const Geoposition& geoposition) override; + Status CaptureScreenshot(std::string* screenshot) override; + Status SetFileInputFiles(const std::string& frame, + const base::DictionaryValue& element, + const std::vector<base::FilePath>& files) override; + Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; + Status StartProfile() override; + Status EndProfile(scoped_ptr<base::Value>* profile_data) override; private: Status CallAsyncFunctionInternal(const std::string& frame, diff --git a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc index 9e6663a..febaa7b 100644 --- a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc +++ b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc @@ -18,7 +18,7 @@ namespace { class FakeDevToolsClient : public DevToolsClient { public: FakeDevToolsClient() : id_("fake-id"), status_(kOk) {} - virtual ~FakeDevToolsClient() {} + ~FakeDevToolsClient() override {} void set_status(const Status& status) { status_ = status; @@ -29,20 +29,14 @@ class FakeDevToolsClient : public DevToolsClient { } // Overridden from DevToolsClient: - virtual const std::string& GetId() override { - return id_; - } - virtual bool WasCrashed() override { - return false; - } - virtual Status ConnectIfNecessary() override { - return Status(kOk); - } - virtual Status SendCommand(const std::string& method, - const base::DictionaryValue& params) override { + const std::string& GetId() override { return id_; } + bool WasCrashed() override { return false; } + Status ConnectIfNecessary() override { return Status(kOk); } + Status SendCommand(const std::string& method, + const base::DictionaryValue& params) override { return SendCommandAndGetResult(method, params, NULL); } - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -51,15 +45,12 @@ class FakeDevToolsClient : public DevToolsClient { result->reset(result_.DeepCopy()); return Status(kOk); } - virtual void AddListener(DevToolsEventListener* listener) override {} - virtual Status HandleEventsUntil( - const ConditionalFunc& conditional_func, - const base::TimeDelta& timeout) override { - return Status(kOk); - } - virtual Status HandleReceivedEvents() override { + void AddListener(DevToolsEventListener* listener) override {} + Status HandleEventsUntil(const ConditionalFunc& conditional_func, + const base::TimeDelta& timeout) override { return Status(kOk); } + Status HandleReceivedEvents() override { return Status(kOk); } private: const std::string id_; diff --git a/chrome/test/chromedriver/command_listener_proxy.h b/chrome/test/chromedriver/command_listener_proxy.h index dea8683..213665f 100644 --- a/chrome/test/chromedriver/command_listener_proxy.h +++ b/chrome/test/chromedriver/command_listener_proxy.h @@ -13,13 +13,13 @@ class CommandListenerProxy : public CommandListener { public: - virtual ~CommandListenerProxy(); + ~CommandListenerProxy() override; // |command_listener| must not be null. explicit CommandListenerProxy(CommandListener* command_listener); // Forwards commands to |command_listener_|. - virtual Status BeforeCommand(const std::string& command_name) override; + Status BeforeCommand(const std::string& command_name) override; private: CommandListener* const command_listener_; diff --git a/chrome/test/chromedriver/command_listener_proxy_unittest.cc b/chrome/test/chromedriver/command_listener_proxy_unittest.cc index 1ecf246..0794daa 100644 --- a/chrome/test/chromedriver/command_listener_proxy_unittest.cc +++ b/chrome/test/chromedriver/command_listener_proxy_unittest.cc @@ -15,9 +15,9 @@ namespace { class MockCommandListener : public CommandListener { public: MockCommandListener() : called_(false) {} - virtual ~MockCommandListener() {} + ~MockCommandListener() override {} - virtual Status BeforeCommand(const std::string& command_name) override { + Status BeforeCommand(const std::string& command_name) override { called_ = true; EXPECT_STREQ("cmd", command_name.c_str()); return Status(kOk); diff --git a/chrome/test/chromedriver/commands_unittest.cc b/chrome/test/chromedriver/commands_unittest.cc index c953d19..fa6bd9c 100644 --- a/chrome/test/chromedriver/commands_unittest.cc +++ b/chrome/test/chromedriver/commands_unittest.cc @@ -273,7 +273,7 @@ class FindElementWebView : public StubWebView { } } } - virtual ~FindElementWebView() {} + ~FindElementWebView() override {} void Verify(const std::string& expected_frame, const base::ListValue* expected_args, @@ -292,10 +292,10 @@ class FindElementWebView : public StubWebView { } // Overridden from WebView: - virtual Status CallFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - scoped_ptr<base::Value>* result) override { + Status CallFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + scoped_ptr<base::Value>* result) override { ++current_count_; if (scenario_ == kElementExistsTimeout || (scenario_ == kElementExistsQueryTwice && current_count_ == 1)) { @@ -501,13 +501,13 @@ class ErrorCallFunctionWebView : public StubWebView { public: explicit ErrorCallFunctionWebView(StatusCode code) : StubWebView("1"), code_(code) {} - virtual ~ErrorCallFunctionWebView() {} + ~ErrorCallFunctionWebView() override {} // Overridden from WebView: - virtual Status CallFunction(const std::string& frame, - const std::string& function, - const base::ListValue& args, - scoped_ptr<base::Value>* result) override { + Status CallFunction(const std::string& frame, + const std::string& function, + const base::ListValue& args, + scoped_ptr<base::Value>* result) override { return Status(code_); } @@ -553,9 +553,9 @@ namespace { class MockCommandListener : public CommandListener { public: MockCommandListener() : called_(false) {} - virtual ~MockCommandListener() {} + ~MockCommandListener() override {} - virtual Status BeforeCommand(const std::string& command_name) override { + Status BeforeCommand(const std::string& command_name) override { called_ = true; EXPECT_STREQ("cmd", command_name.c_str()); return Status(kOk); @@ -660,9 +660,9 @@ namespace { class FailingCommandListener : public CommandListener { public: FailingCommandListener() {} - virtual ~FailingCommandListener() {} + ~FailingCommandListener() override {} - virtual Status BeforeCommand(const std::string& command_name) override { + Status BeforeCommand(const std::string& command_name) override { return Status(kUnknownError); } }; diff --git a/chrome/test/chromedriver/logging.h b/chrome/test/chromedriver/logging.h index 83b6d10..7b923e7 100644 --- a/chrome/test/chromedriver/logging.h +++ b/chrome/test/chromedriver/logging.h @@ -33,7 +33,7 @@ class WebDriverLog : public Log { // Creates a WebDriverLog with the given type and minimum level. WebDriverLog(const std::string& type, Level min_level); - virtual ~WebDriverLog(); + ~WebDriverLog() override; // Returns entries accumulated so far, as a ListValue ready for serialization // into the wire protocol response to the "/log" command. @@ -46,10 +46,10 @@ class WebDriverLog : public Log { std::string GetFirstErrorMessage() const; // Translates a Log entry level into a WebDriver level and stores the entry. - virtual void AddEntryTimestamped(const base::Time& timestamp, - Level level, - const std::string& source, - const std::string& message) override; + void AddEntryTimestamped(const base::Time& timestamp, + Level level, + const std::string& source, + const std::string& message) override; const std::string& type() const; void set_min_level(Level min_level); diff --git a/chrome/test/chromedriver/net/net_util.cc b/chrome/test/chromedriver/net/net_util.cc index 518c236..401b20d 100644 --- a/chrome/test/chromedriver/net/net_util.cc +++ b/chrome/test/chromedriver/net/net_util.cc @@ -26,7 +26,7 @@ class SyncUrlFetcher : public net::URLFetcherDelegate { std::string* response) : url_(url), getter_(getter), response_(response), event_(false, false) {} - virtual ~SyncUrlFetcher() {} + ~SyncUrlFetcher() override {} bool Fetch() { getter_->GetNetworkTaskRunner()->PostTask( @@ -42,7 +42,7 @@ class SyncUrlFetcher : public net::URLFetcherDelegate { fetcher_->Start(); } - virtual void OnURLFetchComplete(const net::URLFetcher* source) override { + void OnURLFetchComplete(const net::URLFetcher* source) override { success_ = (source->GetResponseCode() == 200); if (success_) success_ = source->GetResponseAsString(response_); diff --git a/chrome/test/chromedriver/net/net_util_unittest.cc b/chrome/test/chromedriver/net/net_util_unittest.cc index e06de3c..a8960dd 100644 --- a/chrome/test/chromedriver/net/net_util_unittest.cc +++ b/chrome/test/chromedriver/net/net_util_unittest.cc @@ -70,10 +70,10 @@ class FetchUrlTest : public testing::Test, } // Overridden from net::HttpServer::Delegate: - virtual void OnConnect(int connection_id) override {} + void OnConnect(int connection_id) override {} - virtual void OnHttpRequest(int connection_id, - const net::HttpServerRequestInfo& info) override { + void OnHttpRequest(int connection_id, + const net::HttpServerRequestInfo& info) override { switch (response_) { case kSendHello: server_->Send200(connection_id, "hello", "text/plain"); @@ -89,12 +89,11 @@ class FetchUrlTest : public testing::Test, } } - virtual void OnWebSocketRequest( - int connection_id, - const net::HttpServerRequestInfo& info) override {} - virtual void OnWebSocketMessage(int connection_id, - const std::string& data) override {} - virtual void OnClose(int connection_id) override {} + void OnWebSocketRequest(int connection_id, + const net::HttpServerRequestInfo& info) override {} + void OnWebSocketMessage(int connection_id, const std::string& data) override { + } + void OnClose(int connection_id) override {} protected: enum ServerResponse { diff --git a/chrome/test/chromedriver/net/sync_websocket_impl.h b/chrome/test/chromedriver/net/sync_websocket_impl.h index 4a424717..32896ee 100644 --- a/chrome/test/chromedriver/net/sync_websocket_impl.h +++ b/chrome/test/chromedriver/net/sync_websocket_impl.h @@ -32,16 +32,15 @@ class GURL; class SyncWebSocketImpl : public SyncWebSocket { public: explicit SyncWebSocketImpl(net::URLRequestContextGetter* context_getter); - virtual ~SyncWebSocketImpl(); + ~SyncWebSocketImpl() override; // Overridden from SyncWebSocket: - virtual bool IsConnected() override; - virtual bool Connect(const GURL& url) override; - virtual bool Send(const std::string& message) override; - virtual StatusCode ReceiveNextMessage( - std::string* message, - const base::TimeDelta& timeout) override; - virtual bool HasNextMessage() override; + bool IsConnected() override; + bool Connect(const GURL& url) override; + bool Send(const std::string& message) override; + StatusCode ReceiveNextMessage(std::string* message, + const base::TimeDelta& timeout) override; + bool HasNextMessage() override; private: struct CoreTraits; @@ -59,15 +58,15 @@ class SyncWebSocketImpl : public SyncWebSocket { bool HasNextMessage(); // Overriden from WebSocketListener: - virtual void OnMessageReceived(const std::string& message) override; - virtual void OnClose() override; + void OnMessageReceived(const std::string& message) override; + void OnClose() override; private: friend class base::RefCountedThreadSafe<Core, CoreTraits>; friend class base::DeleteHelper<Core>; friend struct CoreTraits; - virtual ~Core(); + ~Core() override; void ConnectOnIO(const GURL& url, bool* success, diff --git a/chrome/test/chromedriver/net/test_http_server.h b/chrome/test/chromedriver/net/test_http_server.h index f2b2913..eefb4df 100644 --- a/chrome/test/chromedriver/net/test_http_server.h +++ b/chrome/test/chromedriver/net/test_http_server.h @@ -61,15 +61,13 @@ class TestHttpServer : public net::HttpServer::Delegate { GURL web_socket_url() const; // Overridden from net::HttpServer::Delegate: - virtual void OnConnect(int connection_id) override; - virtual void OnHttpRequest(int connection_id, - const net::HttpServerRequestInfo& info) override {} - virtual void OnWebSocketRequest( - int connection_id, - const net::HttpServerRequestInfo& info) override; - virtual void OnWebSocketMessage(int connection_id, - const std::string& data) override; - virtual void OnClose(int connection_id) override; + void OnConnect(int connection_id) override; + void OnHttpRequest(int connection_id, + const net::HttpServerRequestInfo& info) override {} + void OnWebSocketRequest(int connection_id, + const net::HttpServerRequestInfo& info) override; + void OnWebSocketMessage(int connection_id, const std::string& data) override; + void OnClose(int connection_id) override; private: void StartOnServerThread(bool* success, base::WaitableEvent* event); diff --git a/chrome/test/chromedriver/net/url_request_context_getter.h b/chrome/test/chromedriver/net/url_request_context_getter.h index 9495f74..72adfc9 100644 --- a/chrome/test/chromedriver/net/url_request_context_getter.h +++ b/chrome/test/chromedriver/net/url_request_context_getter.h @@ -25,12 +25,12 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); // Overridden from 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; private: - virtual ~URLRequestContextGetter(); + ~URLRequestContextGetter() override; scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; diff --git a/chrome/test/chromedriver/net/websocket_unittest.cc b/chrome/test/chromedriver/net/websocket_unittest.cc index d032287..424ccdf 100644 --- a/chrome/test/chromedriver/net/websocket_unittest.cc +++ b/chrome/test/chromedriver/net/websocket_unittest.cc @@ -40,11 +40,9 @@ class Listener : public WebSocketListener { explicit Listener(const std::vector<std::string>& messages) : messages_(messages) {} - virtual ~Listener() { - EXPECT_TRUE(messages_.empty()); - } + ~Listener() override { EXPECT_TRUE(messages_.empty()); } - virtual void OnMessageReceived(const std::string& message) override { + void OnMessageReceived(const std::string& message) override { ASSERT_TRUE(messages_.size()); EXPECT_EQ(messages_[0], message); messages_.erase(messages_.begin()); @@ -52,9 +50,7 @@ class Listener : public WebSocketListener { base::MessageLoop::current()->Quit(); } - virtual void OnClose() override { - EXPECT_TRUE(false); - } + void OnClose() override { EXPECT_TRUE(false); } private: std::vector<std::string> messages_; @@ -65,13 +61,11 @@ class CloseListener : public WebSocketListener { explicit CloseListener(base::RunLoop* run_loop) : run_loop_(run_loop) {} - virtual ~CloseListener() { - EXPECT_FALSE(run_loop_); - } + ~CloseListener() override { EXPECT_FALSE(run_loop_); } - virtual void OnMessageReceived(const std::string& message) override {} + void OnMessageReceived(const std::string& message) override {} - virtual void OnClose() override { + void OnClose() override { EXPECT_TRUE(run_loop_); if (run_loop_) run_loop_->Quit(); diff --git a/chrome/test/chromedriver/performance_logger.h b/chrome/test/chromedriver/performance_logger.h index a673832..2b629f0 100644 --- a/chrome/test/chromedriver/performance_logger.h +++ b/chrome/test/chromedriver/performance_logger.h @@ -39,19 +39,19 @@ class PerformanceLogger : public DevToolsEventListener, public CommandListener { const PerfLoggingPrefs& prefs); // PerformanceLogger subscribes to browser-wide |DevToolsClient| for tracing. - virtual bool subscribes_to_browser() override; + bool subscribes_to_browser() override; // For browser-wide client: enables tracing if trace categories are specified, // sets |browser_client_|. For other clients: calls EnableInspectorDomains. - virtual Status OnConnected(DevToolsClient* client) override; + Status OnConnected(DevToolsClient* client) override; // Calls HandleInspectorEvents or HandleTraceEvents depending on client type. - virtual Status OnEvent(DevToolsClient* client, - const std::string& method, - const base::DictionaryValue& params) override; + Status OnEvent(DevToolsClient* client, + const std::string& method, + const base::DictionaryValue& params) override; // Before whitelisted commands, if tracing enabled, calls CollectTraceEvents. - virtual Status BeforeCommand(const std::string& command_name) override; + Status BeforeCommand(const std::string& command_name) override; private: void AddLogEntry(Log::Level level, diff --git a/chrome/test/chromedriver/performance_logger_unittest.cc b/chrome/test/chromedriver/performance_logger_unittest.cc index 51ebf1c..190fb5e 100644 --- a/chrome/test/chromedriver/performance_logger_unittest.cc +++ b/chrome/test/chromedriver/performance_logger_unittest.cc @@ -35,7 +35,7 @@ class FakeDevToolsClient : public StubDevToolsClient { public: explicit FakeDevToolsClient(const std::string& id) : id_(id), listener_(NULL), command_index_(0) {} - virtual ~FakeDevToolsClient() {} + ~FakeDevToolsClient() override {} bool PopSentCommand(DevToolsCommand** out_command) { if (sent_commands_.size() > command_index_) { @@ -56,11 +56,9 @@ class FakeDevToolsClient : public StubDevToolsClient { } // Overridden from DevToolsClient: - virtual Status ConnectIfNecessary() override { - return listener_->OnConnected(this); - } + Status ConnectIfNecessary() override { return listener_->OnConnected(this); } - virtual Status SendCommandAndGetResult( + Status SendCommandAndGetResult( const std::string& method, const base::DictionaryValue& params, scoped_ptr<base::DictionaryValue>* result) override { @@ -69,14 +67,12 @@ class FakeDevToolsClient : public StubDevToolsClient { return Status(kOk); } - virtual void AddListener(DevToolsEventListener* listener) override { + void AddListener(DevToolsEventListener* listener) override { CHECK(!listener_); listener_ = listener; } - virtual const std::string& GetId() override { - return id_; - } + const std::string& GetId() override { return id_; } private: const std::string id_; // WebView id. @@ -100,10 +96,10 @@ struct LogEntry { class FakeLog : public Log { public: - virtual void AddEntryTimestamped(const base::Time& timestamp, - Level level, - const std::string& source, - const std::string& message) override; + void AddEntryTimestamped(const base::Time& timestamp, + Level level, + const std::string& source, + const std::string& message) override; const ScopedVector<LogEntry>& GetEntries() { return entries_; @@ -253,16 +249,15 @@ class FakeBrowserwideClient : public FakeDevToolsClient { FakeBrowserwideClient() : FakeDevToolsClient(DevToolsClientImpl::kBrowserwideDevToolsClientId), events_handled_(false) {} - virtual ~FakeBrowserwideClient() {} + ~FakeBrowserwideClient() override {} bool events_handled() const { return events_handled_; } // Overridden from DevToolsClient: - virtual Status HandleEventsUntil( - const ConditionalFunc& conditional_func, - const base::TimeDelta& timeout) override { + Status HandleEventsUntil(const ConditionalFunc& conditional_func, + const base::TimeDelta& timeout) override { TriggerEvent("Tracing.tracingComplete"); events_handled_ = true; return Status(kOk); diff --git a/chrome/test/chromedriver/server/chromedriver_server.cc b/chrome/test/chromedriver/server/chromedriver_server.cc index 432d6ef..9684e3c 100644 --- a/chrome/test/chromedriver/server/chromedriver_server.cc +++ b/chrome/test/chromedriver/server/chromedriver_server.cc @@ -65,24 +65,23 @@ class HttpServer : public net::HttpServer::Delegate { } // Overridden from net::HttpServer::Delegate: - virtual void OnConnect(int connection_id) override { + void OnConnect(int connection_id) override { server_->SetSendBufferSize(connection_id, kBufferSize); server_->SetReceiveBufferSize(connection_id, kBufferSize); } - virtual void OnHttpRequest(int connection_id, - const net::HttpServerRequestInfo& info) override { + void OnHttpRequest(int connection_id, + const net::HttpServerRequestInfo& info) override { handle_request_func_.Run( info, base::Bind(&HttpServer::OnResponse, weak_factory_.GetWeakPtr(), connection_id)); } - virtual void OnWebSocketRequest( - int connection_id, - const net::HttpServerRequestInfo& info) override {} - virtual void OnWebSocketMessage(int connection_id, - const std::string& data) override {} - virtual void OnClose(int connection_id) override {} + void OnWebSocketRequest(int connection_id, + const net::HttpServerRequestInfo& info) override {} + void OnWebSocketMessage(int connection_id, const std::string& data) override { + } + void OnClose(int connection_id) override {} private: void OnResponse(int connection_id, diff --git a/chrome/test/chromedriver/session_commands_unittest.cc b/chrome/test/chromedriver/session_commands_unittest.cc index 0ca527d..957da7b 100644 --- a/chrome/test/chromedriver/session_commands_unittest.cc +++ b/chrome/test/chromedriver/session_commands_unittest.cc @@ -47,10 +47,10 @@ namespace { class DetachChrome : public StubChrome { public: DetachChrome() : quit_called_(false) {} - virtual ~DetachChrome() {} + ~DetachChrome() override {} // Overridden from Chrome: - virtual Status Quit() override { + Status Quit() override { quit_called_ = true; return Status(kOk); } @@ -95,12 +95,10 @@ namespace { class FailsToQuitChrome : public StubChrome { public: FailsToQuitChrome() {} - virtual ~FailsToQuitChrome() {} + ~FailsToQuitChrome() override {} // Overridden from Chrome: - virtual Status Quit() override { - return Status(kUnknownError); - } + Status Quit() override { return Status(kUnknownError); } }; } // namespace diff --git a/chrome/test/chromedriver/session_unittest.cc b/chrome/test/chromedriver/session_unittest.cc index 14485f5..8323061 100644 --- a/chrome/test/chromedriver/session_unittest.cc +++ b/chrome/test/chromedriver/session_unittest.cc @@ -16,10 +16,9 @@ namespace { class MockChrome : public StubChrome { public: MockChrome() : web_view_("1") {} - virtual ~MockChrome() {} + ~MockChrome() override {} - virtual Status GetWebViewById(const std::string& id, - WebView** web_view) override { + Status GetWebViewById(const std::string& id, WebView** web_view) override { if (id == web_view_.GetId()) { *web_view = &web_view_; return Status(kOk); diff --git a/chrome/test/data/webui/chrome_send_browsertest.h b/chrome/test/data/webui/chrome_send_browsertest.h index a46077f..51cc337 100644 --- a/chrome/test/data/webui/chrome_send_browsertest.h +++ b/chrome/test/data/webui/chrome_send_browsertest.h @@ -47,7 +47,7 @@ class ChromeSendPassthroughWebUITest : public ChromeSendWebUITest { virtual ~ChromeSendPassthroughWebUITest(); private: - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; DISALLOW_COPY_AND_ASSIGN(ChromeSendPassthroughWebUITest); }; diff --git a/chrome/test/data/webui/history_ui_browsertest.h b/chrome/test/data/webui/history_ui_browsertest.h index 6abf763..1184778 100644 --- a/chrome/test/data/webui/history_ui_browsertest.h +++ b/chrome/test/data/webui/history_ui_browsertest.h @@ -16,7 +16,7 @@ class HistoryUIBrowserTest : public WebUIBrowserTest { HistoryUIBrowserTest(); virtual ~HistoryUIBrowserTest(); - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; protected: // Sets the pref to allow or prohibit deleting history entries. diff --git a/chrome/test/gpu/webgl_infobar_browsertest.cc b/chrome/test/gpu/webgl_infobar_browsertest.cc index 0700d83..74fc80f 100644 --- a/chrome/test/gpu/webgl_infobar_browsertest.cc +++ b/chrome/test/gpu/webgl_infobar_browsertest.cc @@ -53,7 +53,7 @@ void SimulateGPUCrash(Browser* browser) { class WebGLInfoBarTest : public InProcessBrowserTest { protected: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { base::FilePath test_dir; ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); gpu_test_dir_ = test_dir.AppendASCII("gpu"); diff --git a/chrome/test/nacl/nacl_browsertest.cc b/chrome/test/nacl/nacl_browsertest.cc index 53aa273..de90c12 100644 --- a/chrome/test/nacl/nacl_browsertest.cc +++ b/chrome/test/nacl/nacl_browsertest.cc @@ -214,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, RelativeManifest) { // Test with the NaCl debug flag turned on. class NaClBrowserTestPnaclDebug : public NaClBrowserTestPnacl { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { NaClBrowserTestPnacl::SetUpCommandLine(command_line); // Turn on debugging to influence the PNaCl URL loaded command_line->AppendSwitch(switches::kEnableNaClDebug); @@ -278,7 +278,7 @@ class NaClBrowserTestPnaclDebug : public NaClBrowserTestPnacl { // so that nothing is actually debugged. class NaClBrowserTestPnaclDebugMasked : public NaClBrowserTestPnaclDebug { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { NaClBrowserTestPnaclDebug::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kNaClDebugMask, "!<all_urls>"); diff --git a/chrome/test/nacl/nacl_browsertest_uma.cc b/chrome/test/nacl/nacl_browsertest_uma.cc index de7706b..eb1cc17 100644 --- a/chrome/test/nacl/nacl_browsertest_uma.cc +++ b/chrome/test/nacl/nacl_browsertest_uma.cc @@ -82,7 +82,7 @@ NACL_BROWSER_TEST_F(NaClBrowserTest, SuccessfulLoadUMA, { class NaClBrowserTestNewlibVcacheExtension: public NaClBrowserTestNewlibExtension { public: - virtual base::FilePath::StringType Variant() override { + base::FilePath::StringType Variant() override { return FILE_PATH_LITERAL("extension_vcache_test/newlib"); } }; @@ -128,7 +128,7 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibVcacheExtension, class NaClBrowserTestGLibcVcacheExtension: public NaClBrowserTestGLibcExtension { public: - virtual base::FilePath::StringType Variant() override { + base::FilePath::StringType Variant() override { return FILE_PATH_LITERAL("extension_vcache_test/glibc"); } }; diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc index 64c066f..df44a03 100644 --- a/chrome/test/nacl/nacl_browsertest_util.cc +++ b/chrome/test/nacl/nacl_browsertest_util.cc @@ -109,9 +109,8 @@ class NaClIntegrationMessageHandler : public StructuredMessageHandler { void Log(const std::string& message); - virtual MessageResponse HandleStructuredMessage( - const std::string& type, - base::DictionaryValue* msg) override; + MessageResponse HandleStructuredMessage(const std::string& type, + base::DictionaryValue* msg) override; bool test_passed() const { return test_passed_; diff --git a/chrome/test/nacl/nacl_browsertest_util.h b/chrome/test/nacl/nacl_browsertest_util.h index b04e2e5..13ebf8c 100644 --- a/chrome/test/nacl/nacl_browsertest_util.h +++ b/chrome/test/nacl/nacl_browsertest_util.h @@ -14,7 +14,7 @@ // {"type": type_name, ...} class StructuredMessageHandler : public content::TestMessageHandler { public: - virtual MessageResponse HandleMessage(const std::string& json) override; + MessageResponse HandleMessage(const std::string& json) override; // This method provides a higher-level interface for handling JSON messages // from the DOM automation controler. Instead of handling a string @@ -43,9 +43,8 @@ class LoadTestMessageHandler : public StructuredMessageHandler { void Log(const std::string& type, const std::string& message); - virtual MessageResponse HandleStructuredMessage( - const std::string& type, - base::DictionaryValue* msg) override; + MessageResponse HandleStructuredMessage(const std::string& type, + base::DictionaryValue* msg) override; bool test_passed() const { return test_passed_; @@ -62,9 +61,9 @@ class NaClBrowserTestBase : public InProcessBrowserTest { NaClBrowserTestBase(); virtual ~NaClBrowserTestBase(); - virtual void SetUpCommandLine(base::CommandLine* command_line) override; + void SetUpCommandLine(base::CommandLine* command_line) override; - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; // What variant are we running - newlib, glibc, pnacl, etc? // This is used to compute what directory we're pulling data from, but it can @@ -109,38 +108,38 @@ class NaClBrowserTestBase : public InProcessBrowserTest { class NaClBrowserTestNewlib : public NaClBrowserTestBase { public: - virtual base::FilePath::StringType Variant() override; + base::FilePath::StringType Variant() override; }; class NaClBrowserTestGLibc : public NaClBrowserTestBase { public: - virtual base::FilePath::StringType Variant() override; + base::FilePath::StringType Variant() override; }; class NaClBrowserTestPnacl : public NaClBrowserTestBase { public: - virtual base::FilePath::StringType Variant() override; + base::FilePath::StringType Variant() override; - virtual bool IsAPnaclTest() override; + bool IsAPnaclTest() override; }; class NaClBrowserTestPnaclNonSfi : public NaClBrowserTestBase { public: - virtual void SetUpCommandLine(base::CommandLine* command_line) override; - virtual base::FilePath::StringType Variant() override; + void SetUpCommandLine(base::CommandLine* command_line) override; + base::FilePath::StringType Variant() override; }; class NaClBrowserTestNonSfiMode : public NaClBrowserTestBase { public: - virtual void SetUpCommandLine(base::CommandLine* command_line) override; - virtual base::FilePath::StringType Variant() override; + void SetUpCommandLine(base::CommandLine* command_line) override; + base::FilePath::StringType Variant() override; }; // A NaCl browser test only using static files. class NaClBrowserTestStatic : public NaClBrowserTestBase { public: - virtual base::FilePath::StringType Variant() override; - virtual bool GetDocumentRoot(base::FilePath* document_root) override; + base::FilePath::StringType Variant() override; + bool GetDocumentRoot(base::FilePath* document_root) override; }; // A NaCl browser test that loads from an unpacked chrome extension. @@ -148,12 +147,12 @@ class NaClBrowserTestStatic : public NaClBrowserTestBase { // the tester's document root. class NaClBrowserTestNewlibExtension : public NaClBrowserTestNewlib { public: - virtual void SetUpCommandLine(base::CommandLine* command_line) override; + void SetUpCommandLine(base::CommandLine* command_line) override; }; class NaClBrowserTestGLibcExtension : public NaClBrowserTestGLibc { public: - virtual void SetUpCommandLine(base::CommandLine* command_line) override; + void SetUpCommandLine(base::CommandLine* command_line) override; }; // PNaCl tests take a long time on windows debug builds diff --git a/chrome/test/nacl/pnacl_header_test.h b/chrome/test/nacl/pnacl_header_test.h index 1c67df3..f81862c 100644 --- a/chrome/test/nacl/pnacl_header_test.h +++ b/chrome/test/nacl/pnacl_header_test.h @@ -29,9 +29,9 @@ class TestDispatcherHostDelegate : public ResourceDispatcherHostDelegate { explicit TestDispatcherHostDelegate() : ResourceDispatcherHostDelegate(), found_pnacl_header_(false) {} - virtual ~TestDispatcherHostDelegate() {} + ~TestDispatcherHostDelegate() override {} - virtual void RequestBeginning( + void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, diff --git a/chrome/test/perf/browser_perf_test.h b/chrome/test/perf/browser_perf_test.h index 44e7e68..0ca22e7 100644 --- a/chrome/test/perf/browser_perf_test.h +++ b/chrome/test/perf/browser_perf_test.h @@ -18,7 +18,7 @@ class BrowserPerfTest : public InProcessBrowserTest { // Set up common browser perf test flags. Typically call down to this if // overridden. - virtual void SetUpCommandLine(base::CommandLine* command_line) override; + void SetUpCommandLine(base::CommandLine* command_line) override; // Prints IO performance data for use by perf graphs. void PrintIOPerfInfo(const std::string& test_name); diff --git a/chrome/test/remoting/page_load_notification_observer.h b/chrome/test/remoting/page_load_notification_observer.h index 42e3a6c..0a8890b 100644 --- a/chrome/test/remoting/page_load_notification_observer.h +++ b/chrome/test/remoting/page_load_notification_observer.h @@ -21,7 +21,7 @@ class PageLoadNotificationObserver public: explicit PageLoadNotificationObserver(const GURL& target); - virtual ~PageLoadNotificationObserver(); + ~PageLoadNotificationObserver() override; private: bool IsTargetLoaded(); diff --git a/chrome/test/remoting/remote_desktop_browsertest.h b/chrome/test/remoting/remote_desktop_browsertest.h index 18b4d61..19a6789 100644 --- a/chrome/test/remoting/remote_desktop_browsertest.h +++ b/chrome/test/remoting/remote_desktop_browsertest.h @@ -57,14 +57,14 @@ class RemoteDesktopBrowserTest : public extensions::PlatformAppBrowserTest { // InProcessBrowserTest Overrides virtual void SetUp() override; - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; protected: // InProcessBrowserTest Overrides - virtual void SetUpInProcessBrowserTestFixture() override; + void SetUpInProcessBrowserTestFixture() override; // InProcessBrowserTest Overrides - virtual void TearDownInProcessBrowserTestFixture() override; + void TearDownInProcessBrowserTestFixture() override; // The following helpers each perform a simple task. diff --git a/chrome/test/remoting/waiter.h b/chrome/test/remoting/waiter.h index 82fe937..9201d77 100644 --- a/chrome/test/remoting/waiter.h +++ b/chrome/test/remoting/waiter.h @@ -49,13 +49,13 @@ class ConditionalTimeoutWaiter : public TimeoutWaiter { ConditionalTimeoutWaiter(base::TimeDelta timeout, base::TimeDelta interval, const Predicate& callback); - virtual ~ConditionalTimeoutWaiter(); + ~ConditionalTimeoutWaiter() override; // Returns true if |callback_| returned true and false in case of timeout. - virtual bool Wait() override; + bool Wait() override; protected: - virtual void CancelWait() override; + void CancelWait() override; private: // Callback used to cancel the ConditionalTimeoutWaiter::Wait. diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h index a84e6b5..91ed9ff 100644 --- a/chrome/utility/chrome_content_utility_client.h +++ b/chrome/utility/chrome_content_utility_client.h @@ -26,8 +26,8 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient { ChromeContentUtilityClient(); virtual ~ChromeContentUtilityClient(); - virtual void UtilityThreadStarted() override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void UtilityThreadStarted() override; + bool OnMessageReceived(const IPC::Message& message) override; static void PreSandboxStartup(); diff --git a/chrome/utility/extensions/extensions_handler.h b/chrome/utility/extensions/extensions_handler.h index dccace0..90275ae 100644 --- a/chrome/utility/extensions/extensions_handler.h +++ b/chrome/utility/extensions/extensions_handler.h @@ -26,13 +26,13 @@ namespace extensions { class ExtensionsHandler : public UtilityMessageHandler { public: ExtensionsHandler(); - virtual ~ExtensionsHandler(); + ~ExtensionsHandler() override; static void PreSandboxStartup(); static void UtilityThreadStarted(); // IPC::Listener: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: // IPC message handlers. diff --git a/chrome/utility/image_writer/image_writer_handler.h b/chrome/utility/image_writer/image_writer_handler.h index 32b7576..f05c96b 100644 --- a/chrome/utility/image_writer/image_writer_handler.h +++ b/chrome/utility/image_writer/image_writer_handler.h @@ -22,7 +22,7 @@ namespace image_writer { class ImageWriterHandler : public UtilityMessageHandler { public: ImageWriterHandler(); - virtual ~ImageWriterHandler(); + ~ImageWriterHandler() override; // Methods for sending the different messages back to the browser process. // Generally should be called by chrome::image_writer::ImageWriter. @@ -32,7 +32,7 @@ class ImageWriterHandler : public UtilityMessageHandler { virtual void SendProgress(int64 progress); private: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; // Small wrapper for sending on the UtilityProcess. void Send(IPC::Message* msg); diff --git a/chrome/utility/image_writer/image_writer_unittest.cc b/chrome/utility/image_writer/image_writer_unittest.cc index 0aa6742..69439e9 100644 --- a/chrome/utility/image_writer/image_writer_unittest.cc +++ b/chrome/utility/image_writer/image_writer_unittest.cc @@ -67,7 +67,7 @@ class VerifyingHandler : public MockHandler { public: VerifyingHandler() : image_writer_(NULL), verified_(false) {} - virtual void SendSucceeded() override { + void SendSucceeded() override { MockHandler::SendSucceeded(); if (!verified_) { image_writer_->Verify(); diff --git a/chrome/utility/importer/bookmarks_file_importer.h b/chrome/utility/importer/bookmarks_file_importer.h index a4f6d1d..90ed8f9 100644 --- a/chrome/utility/importer/bookmarks_file_importer.h +++ b/chrome/utility/importer/bookmarks_file_importer.h @@ -14,12 +14,12 @@ class BookmarksFileImporter : public Importer { public: BookmarksFileImporter(); - virtual void StartImport(const importer::SourceProfile& source_profile, - uint16 items, - ImporterBridge* bridge) override; + void StartImport(const importer::SourceProfile& source_profile, + uint16 items, + ImporterBridge* bridge) override; private: - virtual ~BookmarksFileImporter(); + ~BookmarksFileImporter() override; DISALLOW_COPY_AND_ASSIGN(BookmarksFileImporter); }; diff --git a/chrome/utility/importer/external_process_importer_bridge.h b/chrome/utility/importer/external_process_importer_bridge.h index a948d64..f20b285 100644 --- a/chrome/utility/importer/external_process_importer_bridge.h +++ b/chrome/utility/importer/external_process_importer_bridge.h @@ -47,45 +47,42 @@ class ExternalProcessImporterBridge : public ImporterBridge { base::TaskRunner* task_runner); // 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>& seach_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 ~ExternalProcessImporterBridge(); + ~ExternalProcessImporterBridge() override; void Send(IPC::Message* message); void SendInternal(IPC::Message* message); diff --git a/chrome/utility/importer/firefox_importer.h b/chrome/utility/importer/firefox_importer.h index cd513a3..d401423 100644 --- a/chrome/utility/importer/firefox_importer.h +++ b/chrome/utility/importer/firefox_importer.h @@ -30,14 +30,14 @@ class FirefoxImporter : public Importer { FirefoxImporter(); // Importer: - virtual void StartImport(const importer::SourceProfile& source_profile, - uint16 items, - ImporterBridge* bridge) override; + void StartImport(const importer::SourceProfile& source_profile, + uint16 items, + ImporterBridge* bridge) override; private: typedef std::map<int64, std::set<GURL> > FaviconMap; - virtual ~FirefoxImporter(); + ~FirefoxImporter() override; void ImportBookmarks(); void ImportPasswords(); diff --git a/chrome/utility/importer/firefox_importer_unittest_utils_mac.cc b/chrome/utility/importer/firefox_importer_unittest_utils_mac.cc index 782acac..2ae60ea 100644 --- a/chrome/utility/importer/firefox_importer_unittest_utils_mac.cc +++ b/chrome/utility/importer/firefox_importer_unittest_utils_mac.cc @@ -103,7 +103,7 @@ class FFDecryptorServerChannelListener : public IPC::Listener { sender_->Send(new Msg_Decryptor_Quit()); } - virtual bool OnMessageReceived(const IPC::Message& msg) override { + bool OnMessageReceived(const IPC::Message& msg) override { bool handled = true; IPC_BEGIN_MESSAGE_MAP(FFDecryptorServerChannelListener, msg) IPC_MESSAGE_HANDLER(Msg_Decryptor_InitReturnCode, OnInitDecryptorResponse) @@ -115,7 +115,7 @@ class FFDecryptorServerChannelListener : public IPC::Listener { } // If an error occured, just kill the message Loop. - virtual void OnChannelError() override { + void OnChannelError() override { got_result = false; base::MessageLoop::current()->Quit(); } @@ -264,7 +264,7 @@ class FFDecryptorClientChannelListener : public IPC::Listener { base::MessageLoop::current()->Quit(); } - virtual bool OnMessageReceived(const IPC::Message& msg) override { + bool OnMessageReceived(const IPC::Message& msg) override { bool handled = true; IPC_BEGIN_MESSAGE_MAP(FFDecryptorClientChannelListener, msg) IPC_MESSAGE_HANDLER(Msg_Decryptor_Init, OnDecryptor_Init) @@ -276,9 +276,7 @@ class FFDecryptorClientChannelListener : public IPC::Listener { return handled; } - virtual void OnChannelError() override { - base::MessageLoop::current()->Quit(); - } + void OnChannelError() override { base::MessageLoop::current()->Quit(); } private: NSSDecryptor decryptor_; diff --git a/chrome/utility/importer/safari_importer.h b/chrome/utility/importer/safari_importer.h index c8ecdf2..9fbbe0b 100644 --- a/chrome/utility/importer/safari_importer.h +++ b/chrome/utility/importer/safari_importer.h @@ -40,9 +40,9 @@ class SafariImporter : public Importer { explicit SafariImporter(const base::FilePath& library_dir); // Importer: - virtual void StartImport(const importer::SourceProfile& source_profile, - uint16 items, - ImporterBridge* bridge) override; + void StartImport(const importer::SourceProfile& source_profile, + uint16 items, + ImporterBridge* bridge) override; private: FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, BookmarkImport); @@ -51,7 +51,7 @@ class SafariImporter : public Importer { FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, FaviconImport); FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, HistoryImport); - virtual ~SafariImporter(); + ~SafariImporter() override; // Multiple URLs can share the same favicon; this is a map // of URLs -> IconIDs that we load as a temporary step before diff --git a/chrome/utility/media_galleries/ipc_data_source.h b/chrome/utility/media_galleries/ipc_data_source.h index 955837f..dda9364 100644 --- a/chrome/utility/media_galleries/ipc_data_source.h +++ b/chrome/utility/media_galleries/ipc_data_source.h @@ -28,20 +28,22 @@ class IPCDataSource: public media::DataSource, public: // May only be called on the utility thread. explicit IPCDataSource(int64 total_size); - virtual ~IPCDataSource(); + ~IPCDataSource() override; // Implementation of DataSource. These methods may be called on any single // thread. First usage of these methods attaches a thread checker. - virtual void Stop() override; - virtual void Read(int64 position, int size, uint8* data, - const ReadCB& read_cb) override; - virtual bool GetSize(int64* size_out) override; - virtual bool IsStreaming() override; - virtual void SetBitrate(int bitrate) override; + void Stop() override; + void Read(int64 position, + int size, + uint8* data, + const ReadCB& read_cb) override; + bool GetSize(int64* size_out) override; + bool IsStreaming() override; + void SetBitrate(int bitrate) override; // Implementation of UtilityMessageHandler. May only be called on the utility // thread. - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: struct Request { diff --git a/chrome/utility/media_galleries/iphoto_library_parser.cc b/chrome/utility/media_galleries/iphoto_library_parser.cc index 96a2c6d..ba98d8e 100644 --- a/chrome/utility/media_galleries/iphoto_library_parser.cc +++ b/chrome/utility/media_galleries/iphoto_library_parser.cc @@ -34,7 +34,7 @@ class PhotosXmlDictReader : public iapps::XmlDictReader { PhotosXmlDictReader(XmlReader* reader, PhotoInfo* photo_info) : iapps::XmlDictReader(reader), photo_info_(photo_info) {} - virtual bool HandleKeyImpl(const std::string& key) override { + bool HandleKeyImpl(const std::string& key) override { if (key == "ImagePath") { std::string value; if (!iapps::ReadString(reader_, &value)) @@ -51,9 +51,7 @@ class PhotosXmlDictReader : public iapps::XmlDictReader { return true; } - virtual bool FinishedOk() override { - return Found("ImagePath"); - } + bool FinishedOk() override { return Found("ImagePath"); } private: PhotoInfo* photo_info_; @@ -95,11 +93,11 @@ class AlbumXmlDictReader : public iapps::XmlDictReader { AlbumXmlDictReader(XmlReader* reader, AlbumInfo* album_info) : iapps::XmlDictReader(reader), album_info_(album_info) {} - virtual bool ShouldLoop() override { + bool ShouldLoop() override { return !(Found("AlbumId") && Found("AlbumName") && Found("KeyList")); } - virtual bool HandleKeyImpl(const std::string& key) override { + bool HandleKeyImpl(const std::string& key) override { if (key == "AlbumId") { if (!iapps::ReadInteger(reader_, &album_info_->id)) return false; @@ -117,9 +115,7 @@ class AlbumXmlDictReader : public iapps::XmlDictReader { return true; } - virtual bool FinishedOk() override { - return !ShouldLoop(); - } + bool FinishedOk() override { return !ShouldLoop(); } private: AlbumInfo* album_info_; @@ -198,11 +194,11 @@ class IPhotoLibraryXmlDictReader : public iapps::XmlDictReader { IPhotoLibraryXmlDictReader(XmlReader* reader, parser::Library* library) : iapps::XmlDictReader(reader), library_(library), ok_(true) {} - virtual bool ShouldLoop() override { + bool ShouldLoop() override { return !(Found("List of Albums") && Found("Master Image List")); } - virtual bool HandleKeyImpl(const std::string& key) override { + bool HandleKeyImpl(const std::string& key) override { if (key == "List of Albums") { if (!iapps::SeekToNodeAtCurrentDepth(reader_, "array") || !reader_->Read()) { @@ -231,15 +227,11 @@ class IPhotoLibraryXmlDictReader : public iapps::XmlDictReader { return true; } - virtual bool FinishedOk() override { - return ok_; - } + bool FinishedOk() override { return ok_; } // The IPhotoLibrary allows duplicate "List of Albums" and // "Master Image List" keys (although that seems odd.) - virtual bool AllowRepeats() override { - return true; - } + bool AllowRepeats() override { return true; } private: parser::Library* library_; diff --git a/chrome/utility/media_galleries/itunes_library_parser.cc b/chrome/utility/media_galleries/itunes_library_parser.cc index 60f2809..bf23e6b 100644 --- a/chrome/utility/media_galleries/itunes_library_parser.cc +++ b/chrome/utility/media_galleries/itunes_library_parser.cc @@ -32,12 +32,12 @@ class TrackInfoXmlDictReader : public iapps::XmlDictReader { TrackInfoXmlDictReader(XmlReader* reader, TrackInfo* track_info) : iapps::XmlDictReader(reader), track_info_(track_info) {} - virtual bool ShouldLoop() override { + bool ShouldLoop() override { return !(Found("Track ID") && Found("Location") && Found("Album Artist") && Found("Album")); } - virtual bool HandleKeyImpl(const std::string& key) override { + bool HandleKeyImpl(const std::string& key) override { if (key == "Track ID") { return iapps::ReadInteger(reader_, &track_info_->id); } else if (key == "Location") { @@ -75,9 +75,7 @@ class TrackInfoXmlDictReader : public iapps::XmlDictReader { return true; } - virtual bool FinishedOk() override { - return Found("Track ID") && Found("Location"); - } + bool FinishedOk() override { return Found("Track ID") && Found("Location"); } private: TrackInfo* track_info_; diff --git a/chrome/utility/media_galleries/picasa_albums_indexer.cc b/chrome/utility/media_galleries/picasa_albums_indexer.cc index 420672d..e99a141 100644 --- a/chrome/utility/media_galleries/picasa_albums_indexer.cc +++ b/chrome/utility/media_galleries/picasa_albums_indexer.cc @@ -28,12 +28,12 @@ class PicasaINIParser : public INIParser { : folder_path_(folder_path), albums_images_(albums_images) { } - virtual ~PicasaINIParser() {} + ~PicasaINIParser() override {} private: - virtual void HandleTriplet(const std::string& section, - const std::string& key, - const std::string& value) override { + void HandleTriplet(const std::string& section, + const std::string& key, + const std::string& value) override { if (key != kAlbumsKey) return; diff --git a/chrome/utility/printing_handler.h b/chrome/utility/printing_handler.h index 3891d5e..48b6c34 100644 --- a/chrome/utility/printing_handler.h +++ b/chrome/utility/printing_handler.h @@ -25,12 +25,12 @@ struct PageRange; class PrintingHandler : public UtilityMessageHandler { public: PrintingHandler(); - virtual ~PrintingHandler(); + ~PrintingHandler() override; static void PreSandboxStartup(); // IPC::Listener: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: // IPC message handlers. diff --git a/chrome/utility/profile_import_handler.h b/chrome/utility/profile_import_handler.h index 53d00f2..e0eb94f 100644 --- a/chrome/utility/profile_import_handler.h +++ b/chrome/utility/profile_import_handler.h @@ -27,10 +27,10 @@ struct SourceProfile; class ProfileImportHandler : public UtilityMessageHandler { public: ProfileImportHandler(); - virtual ~ProfileImportHandler(); + ~ProfileImportHandler() override; // IPC::Listener: - virtual bool OnMessageReceived(const IPC::Message& message) override; + bool OnMessageReceived(const IPC::Message& message) override; private: void OnImportStart( |