diff options
Diffstat (limited to 'chrome/installer/util')
19 files changed, 189 insertions, 199 deletions
diff --git a/chrome/installer/util/advanced_firewall_manager_win_unittest.cc b/chrome/installer/util/advanced_firewall_manager_win_unittest.cc index 5920ea2..08037f7 100644 --- a/chrome/installer/util/advanced_firewall_manager_win_unittest.cc +++ b/chrome/installer/util/advanced_firewall_manager_win_unittest.cc @@ -17,11 +17,11 @@ class AdvancedFirewallManagerTest : public ::testing::Test { protected: // Sets up the test fixture. - virtual void SetUp() override { + void SetUp() override { if (base::GetCurrentProcessIntegrityLevel() != base::HIGH_INTEGRITY) { LOG(WARNING) << "XP or not elevated. Skipping the test."; return; - }; + } skip_test_ = false; base::FilePath exe_path; PathService::Get(base::FILE_EXE, &exe_path); @@ -30,7 +30,7 @@ class AdvancedFirewallManagerTest : public ::testing::Test { } // Tears down the test fixture. - virtual void TearDown() override { + void TearDown() override { if (!skip_test_) manager_.DeleteAllRules(); } diff --git a/chrome/installer/util/callback_work_item.h b/chrome/installer/util/callback_work_item.h index c81d02a..3cc22f6 100644 --- a/chrome/installer/util/callback_work_item.h +++ b/chrome/installer/util/callback_work_item.h @@ -33,10 +33,10 @@ // } class CallbackWorkItem : public WorkItem { public: - virtual ~CallbackWorkItem(); + ~CallbackWorkItem() override; - virtual bool Do() override; - virtual void Rollback() override; + bool Do() override; + void Rollback() override; bool IsRollback() const; diff --git a/chrome/installer/util/chrome_binaries_operations.h b/chrome/installer/util/chrome_binaries_operations.h index f0929f7..88b8199 100644 --- a/chrome/installer/util/chrome_binaries_operations.h +++ b/chrome/installer/util/chrome_binaries_operations.h @@ -17,42 +17,40 @@ class ChromeBinariesOperations : public ProductOperations { public: ChromeBinariesOperations() {} - virtual void ReadOptions(const MasterPreferences& prefs, - std::set<base::string16>* options) const override; + void ReadOptions(const MasterPreferences& prefs, + std::set<base::string16>* options) const override; - virtual void ReadOptions(const base::CommandLine& uninstall_command, - std::set<base::string16>* options) const override; + void ReadOptions(const base::CommandLine& uninstall_command, + std::set<base::string16>* options) const override; - virtual void AddKeyFiles( - const std::set<base::string16>& options, - std::vector<base::FilePath>* key_files) const override; + void AddKeyFiles(const std::set<base::string16>& options, + std::vector<base::FilePath>* key_files) const override; - virtual void AddComDllList( - const std::set<base::string16>& options, - std::vector<base::FilePath>* com_dll_list) const override; + void AddComDllList(const std::set<base::string16>& options, + std::vector<base::FilePath>* com_dll_list) const override; - virtual void AppendProductFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendProductFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual void AppendRenameFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendRenameFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual bool SetChannelFlags(const std::set<base::string16>& options, - bool set, - ChannelInfo* channel_info) const override; + bool SetChannelFlags(const std::set<base::string16>& options, + bool set, + ChannelInfo* channel_info) const override; - virtual bool ShouldCreateUninstallEntry( + bool ShouldCreateUninstallEntry( const std::set<base::string16>& options) const override; - virtual void AddDefaultShortcutProperties( + void AddDefaultShortcutProperties( BrowserDistribution* dist, const base::FilePath& target_exe, ShellUtil::ShortcutProperties* properties) const override; - virtual void LaunchUserExperiment(const base::FilePath& setup_path, - const std::set<base::string16>& options, - InstallStatus status, - bool system_level) const override; + void LaunchUserExperiment(const base::FilePath& setup_path, + const std::set<base::string16>& options, + InstallStatus status, + bool system_level) const override; private: DISALLOW_COPY_AND_ASSIGN(ChromeBinariesOperations); diff --git a/chrome/installer/util/chrome_browser_operations.h b/chrome/installer/util/chrome_browser_operations.h index eb695c7..fe17c91 100644 --- a/chrome/installer/util/chrome_browser_operations.h +++ b/chrome/installer/util/chrome_browser_operations.h @@ -16,42 +16,40 @@ class ChromeBrowserOperations : public ProductOperations { public: ChromeBrowserOperations() {} - virtual void ReadOptions(const MasterPreferences& prefs, - std::set<base::string16>* options) const override; + void ReadOptions(const MasterPreferences& prefs, + std::set<base::string16>* options) const override; - virtual void ReadOptions(const base::CommandLine& uninstall_command, - std::set<base::string16>* options) const override; + void ReadOptions(const base::CommandLine& uninstall_command, + std::set<base::string16>* options) const override; - virtual void AddKeyFiles( - const std::set<base::string16>& options, - std::vector<base::FilePath>* key_files) const override; + void AddKeyFiles(const std::set<base::string16>& options, + std::vector<base::FilePath>* key_files) const override; - virtual void AddComDllList( - const std::set<base::string16>& options, - std::vector<base::FilePath>* com_dll_list) const override; + void AddComDllList(const std::set<base::string16>& options, + std::vector<base::FilePath>* com_dll_list) const override; - virtual void AppendProductFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendProductFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual void AppendRenameFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendRenameFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual bool SetChannelFlags(const std::set<base::string16>& options, - bool set, - ChannelInfo* channel_info) const override; + bool SetChannelFlags(const std::set<base::string16>& options, + bool set, + ChannelInfo* channel_info) const override; - virtual bool ShouldCreateUninstallEntry( + bool ShouldCreateUninstallEntry( const std::set<base::string16>& options) const override; - virtual void AddDefaultShortcutProperties( + void AddDefaultShortcutProperties( BrowserDistribution* dist, const base::FilePath& target_exe, ShellUtil::ShortcutProperties* properties) const override; - virtual void LaunchUserExperiment(const base::FilePath& setup_path, - const std::set<base::string16>& options, - InstallStatus status, - bool system_level) const override; + void LaunchUserExperiment(const base::FilePath& setup_path, + const std::set<base::string16>& options, + InstallStatus status, + bool system_level) const override; private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserOperations); diff --git a/chrome/installer/util/chrome_browser_sxs_operations.h b/chrome/installer/util/chrome_browser_sxs_operations.h index f60a485..06893f1 100644 --- a/chrome/installer/util/chrome_browser_sxs_operations.h +++ b/chrome/installer/util/chrome_browser_sxs_operations.h @@ -16,11 +16,11 @@ class ChromeBrowserSxSOperations : public ChromeBrowserOperations { public: ChromeBrowserSxSOperations() {} - virtual void AppendProductFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendProductFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual void AppendRenameFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendRenameFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserSxSOperations); diff --git a/chrome/installer/util/chrome_frame_distribution.h b/chrome/installer/util/chrome_frame_distribution.h index 9088fe2..ac3b879 100644 --- a/chrome/installer/util/chrome_frame_distribution.h +++ b/chrome/installer/util/chrome_frame_distribution.h @@ -13,46 +13,45 @@ class ChromeFrameDistribution : public BrowserDistribution { public: - virtual base::string16 GetBrowserProgIdPrefix() override; + base::string16 GetBrowserProgIdPrefix() override; - virtual base::string16 GetBrowserProgIdDesc() override; + base::string16 GetBrowserProgIdDesc() override; - virtual base::string16 GetDisplayName() override; + base::string16 GetDisplayName() override; - virtual base::string16 GetShortcutName(ShortcutType shortcut_type) override; + base::string16 GetShortcutName(ShortcutType shortcut_type) override; - virtual int GetIconIndex(ShortcutType shortcut_type) override; + int GetIconIndex(ShortcutType shortcut_type) override; - virtual base::string16 GetBaseAppName() override; + base::string16 GetBaseAppName() override; - virtual base::string16 GetInstallSubDir() override; + base::string16 GetInstallSubDir() override; - virtual base::string16 GetPublisherName() override; + base::string16 GetPublisherName() override; - virtual base::string16 GetAppDescription() override; + base::string16 GetAppDescription() override; - virtual base::string16 GetLongAppDescription() override; + base::string16 GetLongAppDescription() override; - virtual std::string GetSafeBrowsingName() override; + std::string GetSafeBrowsingName() override; - virtual std::string GetNetworkStatsServer() const override; + std::string GetNetworkStatsServer() const override; - virtual base::string16 GetUninstallLinkName() override; + base::string16 GetUninstallLinkName() override; - virtual base::string16 GetUninstallRegPath() override; + base::string16 GetUninstallRegPath() override; - virtual base::string16 GetIconFilename() override; + base::string16 GetIconFilename() override; - virtual DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; + DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; - virtual bool CanCreateDesktopShortcuts() override; + bool CanCreateDesktopShortcuts() override; - virtual bool GetCommandExecuteImplClsid( - base::string16* handler_class_uuid) override; + bool GetCommandExecuteImplClsid(base::string16* handler_class_uuid) override; - virtual void UpdateInstallStatus(bool system_install, - installer::ArchiveType archive_type, - installer::InstallStatus install_status) override; + void UpdateInstallStatus(bool system_install, + installer::ArchiveType archive_type, + installer::InstallStatus install_status) override; protected: friend class BrowserDistribution; diff --git a/chrome/installer/util/chrome_frame_operations.h b/chrome/installer/util/chrome_frame_operations.h index 60d0dec..407890b 100644 --- a/chrome/installer/util/chrome_frame_operations.h +++ b/chrome/installer/util/chrome_frame_operations.h @@ -16,42 +16,40 @@ class ChromeFrameOperations : public ProductOperations { public: ChromeFrameOperations() {} - virtual void ReadOptions(const MasterPreferences& prefs, - std::set<base::string16>* options) const override; + void ReadOptions(const MasterPreferences& prefs, + std::set<base::string16>* options) const override; - virtual void ReadOptions(const base::CommandLine& uninstall_command, - std::set<base::string16>* options) const override; + void ReadOptions(const base::CommandLine& uninstall_command, + std::set<base::string16>* options) const override; - virtual void AddKeyFiles( - const std::set<base::string16>& options, - std::vector<base::FilePath>* key_files) const override; + void AddKeyFiles(const std::set<base::string16>& options, + std::vector<base::FilePath>* key_files) const override; - virtual void AddComDllList( - const std::set<base::string16>& options, - std::vector<base::FilePath>* com_dll_list) const override; + void AddComDllList(const std::set<base::string16>& options, + std::vector<base::FilePath>* com_dll_list) const override; - virtual void AppendProductFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendProductFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual void AppendRenameFlags(const std::set<base::string16>& options, - base::CommandLine* cmd_line) const override; + void AppendRenameFlags(const std::set<base::string16>& options, + base::CommandLine* cmd_line) const override; - virtual bool SetChannelFlags(const std::set<base::string16>& options, - bool set, - ChannelInfo* channel_info) const override; + bool SetChannelFlags(const std::set<base::string16>& options, + bool set, + ChannelInfo* channel_info) const override; - virtual bool ShouldCreateUninstallEntry( + bool ShouldCreateUninstallEntry( const std::set<base::string16>& options) const override; - virtual void AddDefaultShortcutProperties( + void AddDefaultShortcutProperties( BrowserDistribution* dist, const base::FilePath& target_exe, ShellUtil::ShortcutProperties* properties) const override; - virtual void LaunchUserExperiment(const base::FilePath& setup_path, - const std::set<base::string16>& options, - InstallStatus status, - bool system_level) const override; + void LaunchUserExperiment(const base::FilePath& setup_path, + const std::set<base::string16>& options, + InstallStatus status, + bool system_level) const override; private: DISALLOW_COPY_AND_ASSIGN(ChromeFrameOperations); diff --git a/chrome/installer/util/chromium_binaries_distribution.h b/chrome/installer/util/chromium_binaries_distribution.h index 2d440be..986b8f3 100644 --- a/chrome/installer/util/chromium_binaries_distribution.h +++ b/chrome/installer/util/chromium_binaries_distribution.h @@ -14,40 +14,39 @@ class ChromiumBinariesDistribution : public BrowserDistribution { public: - virtual base::string16 GetBrowserProgIdPrefix() override; + base::string16 GetBrowserProgIdPrefix() override; - virtual base::string16 GetBrowserProgIdDesc() override; + base::string16 GetBrowserProgIdDesc() override; - virtual base::string16 GetDisplayName() override; + base::string16 GetDisplayName() override; - virtual base::string16 GetShortcutName(ShortcutType shortcut_type) override; + base::string16 GetShortcutName(ShortcutType shortcut_type) override; - virtual int GetIconIndex(ShortcutType shortcut_type) override; + int GetIconIndex(ShortcutType shortcut_type) override; - virtual base::string16 GetBaseAppName() override; + base::string16 GetBaseAppName() override; - virtual base::string16 GetBaseAppId() override; + base::string16 GetBaseAppId() override; - virtual base::string16 GetInstallSubDir() override; + base::string16 GetInstallSubDir() override; - virtual base::string16 GetPublisherName() override; + base::string16 GetPublisherName() override; - virtual base::string16 GetAppDescription() override; + base::string16 GetAppDescription() override; - virtual base::string16 GetLongAppDescription() override; + base::string16 GetLongAppDescription() override; - virtual std::string GetSafeBrowsingName() override; + std::string GetSafeBrowsingName() override; - virtual base::string16 GetUninstallLinkName() override; + base::string16 GetUninstallLinkName() override; - virtual base::string16 GetUninstallRegPath() override; + base::string16 GetUninstallRegPath() override; - virtual DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; + DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; - virtual bool GetChromeChannel(base::string16* channel) override; + bool GetChromeChannel(base::string16* channel) override; - virtual bool GetCommandExecuteImplClsid( - base::string16* handler_class_uuid) override; + bool GetCommandExecuteImplClsid(base::string16* handler_class_uuid) override; protected: friend class BrowserDistribution; diff --git a/chrome/installer/util/delete_reg_key_work_item.h b/chrome/installer/util/delete_reg_key_work_item.h index 0fc11f6..54cddba 100644 --- a/chrome/installer/util/delete_reg_key_work_item.h +++ b/chrome/installer/util/delete_reg_key_work_item.h @@ -21,11 +21,11 @@ class RegistryKeyBackup; // the key and its subkeys take on their default security descriptors. class DeleteRegKeyWorkItem : public WorkItem { public: - virtual ~DeleteRegKeyWorkItem(); + ~DeleteRegKeyWorkItem() override; - virtual bool Do() override; + bool Do() override; - virtual void Rollback() override; + void Rollback() override; private: friend class WorkItem; diff --git a/chrome/installer/util/firewall_manager_win.cc b/chrome/installer/util/firewall_manager_win.cc index 0171a6f..202d062 100644 --- a/chrome/installer/util/firewall_manager_win.cc +++ b/chrome/installer/util/firewall_manager_win.cc @@ -23,23 +23,23 @@ const uint16 kDefaultMdnsPort = 5353; class FirewallManagerAdvancedImpl : public FirewallManager { public: FirewallManagerAdvancedImpl() {} - virtual ~FirewallManagerAdvancedImpl() {} + ~FirewallManagerAdvancedImpl() override {} bool Init(const base::string16& app_name, const base::FilePath& app_path) { return manager_.Init(app_name, app_path); } // FirewallManager methods. - virtual bool CanUseLocalPorts() override { + bool CanUseLocalPorts() override { return !manager_.IsFirewallEnabled() || manager_.HasAnyRule(); }; - virtual bool AddFirewallRules() override { + bool AddFirewallRules() override { return manager_.AddUDPRule(GetMdnsRuleName(), GetMdnsRuleDescription(), kDefaultMdnsPort); } - virtual void RemoveFirewallRules() override { + void RemoveFirewallRules() override { manager_.DeleteAllRules(); } @@ -67,25 +67,25 @@ class FirewallManagerAdvancedImpl : public FirewallManager { class FirewallManagerLegacyImpl : public FirewallManager { public: FirewallManagerLegacyImpl() {} - virtual ~FirewallManagerLegacyImpl() {} + ~FirewallManagerLegacyImpl() override {} bool Init(const base::string16& app_name, const base::FilePath& app_path) { return manager_.Init(app_name, app_path); } // FirewallManager methods. - virtual bool CanUseLocalPorts() override { + bool CanUseLocalPorts() override { return !manager_.IsFirewallEnabled() || manager_.GetAllowIncomingConnection(NULL); }; - virtual bool AddFirewallRules() override { + bool AddFirewallRules() override { // Change nothing if rule is set. return manager_.GetAllowIncomingConnection(NULL) || manager_.SetAllowIncomingConnection(true); } - virtual void RemoveFirewallRules() override { + void RemoveFirewallRules() override { manager_.DeleteRule(); } diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h index d6611ba..18076da 100644 --- a/chrome/installer/util/google_chrome_distribution.h +++ b/chrome/installer/util/google_chrome_distribution.h @@ -29,57 +29,56 @@ class GoogleChromeDistribution : public BrowserDistribution { // distribution_data contains Google Update related data that will be // concatenated to the survey url if the file in local_data_path indicates // the user has opted in to providing anonymous usage data. - virtual void DoPostUninstallOperations( + void DoPostUninstallOperations( const Version& version, const base::FilePath& local_data_path, const base::string16& distribution_data) override; - virtual base::string16 GetActiveSetupGuid() override; + base::string16 GetActiveSetupGuid() override; - virtual base::string16 GetShortcutName(ShortcutType shortcut_type) override; + base::string16 GetShortcutName(ShortcutType shortcut_type) override; - virtual base::string16 GetIconFilename() override; + base::string16 GetIconFilename() override; - virtual int GetIconIndex(ShortcutType shortcut_type) override; + int GetIconIndex(ShortcutType shortcut_type) override; - virtual base::string16 GetBaseAppName() override; + base::string16 GetBaseAppName() override; - virtual base::string16 GetBaseAppId() override; + base::string16 GetBaseAppId() override; - virtual base::string16 GetBrowserProgIdPrefix() override; + base::string16 GetBrowserProgIdPrefix() override; - virtual base::string16 GetBrowserProgIdDesc() override; + base::string16 GetBrowserProgIdDesc() override; - virtual base::string16 GetInstallSubDir() override; + base::string16 GetInstallSubDir() override; - virtual base::string16 GetPublisherName() override; + base::string16 GetPublisherName() override; - virtual base::string16 GetAppDescription() override; + base::string16 GetAppDescription() override; - virtual std::string GetSafeBrowsingName() override; + std::string GetSafeBrowsingName() override; - virtual std::string GetNetworkStatsServer() const override; + std::string GetNetworkStatsServer() const override; // This method reads data from the Google Update ClientState key for // potential use in the uninstall survey. It must be called before the // key returned by GetVersionKey() is deleted. - virtual base::string16 GetDistributionData(HKEY root_key) override; + base::string16 GetDistributionData(HKEY root_key) override; - virtual base::string16 GetUninstallLinkName() override; + base::string16 GetUninstallLinkName() override; - virtual base::string16 GetUninstallRegPath() override; + base::string16 GetUninstallRegPath() override; - virtual bool GetCommandExecuteImplClsid( - base::string16* handler_class_uuid) override; + bool GetCommandExecuteImplClsid(base::string16* handler_class_uuid) override; - virtual void UpdateInstallStatus( + void UpdateInstallStatus( bool system_install, installer::ArchiveType archive_type, installer::InstallStatus install_status) override; - virtual bool ShouldSetExperimentLabels() override; + bool ShouldSetExperimentLabels() override; - virtual bool HasUserExperiments() override; + bool HasUserExperiments() override; protected: // Disallow construction from others. diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h index c1be524..9ae8c3a 100644 --- a/chrome/installer/util/google_chrome_sxs_distribution.h +++ b/chrome/installer/util/google_chrome_sxs_distribution.h @@ -19,22 +19,21 @@ // system level install and setting as default browser. class GoogleChromeSxSDistribution : public GoogleChromeDistribution { public: - virtual base::string16 GetBaseAppName() override; - virtual base::string16 GetShortcutName(ShortcutType shortcut_type) override; - virtual int GetIconIndex(ShortcutType shortcut_type) override; - virtual base::string16 GetStartMenuShortcutSubfolder( + base::string16 GetBaseAppName() override; + base::string16 GetShortcutName(ShortcutType shortcut_type) override; + int GetIconIndex(ShortcutType shortcut_type) override; + base::string16 GetStartMenuShortcutSubfolder( Subfolder subfolder_type) override; - virtual base::string16 GetBaseAppId() override; - virtual base::string16 GetBrowserProgIdPrefix() override; - virtual base::string16 GetBrowserProgIdDesc() override; - virtual base::string16 GetInstallSubDir() override; - virtual base::string16 GetUninstallRegPath() override; - virtual DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; - virtual bool GetChromeChannel(base::string16* channel) override; - virtual bool GetCommandExecuteImplClsid( - base::string16* handler_class_uuid) override; - virtual bool ShouldSetExperimentLabels() override; - virtual bool HasUserExperiments() override; + base::string16 GetBaseAppId() override; + base::string16 GetBrowserProgIdPrefix() override; + base::string16 GetBrowserProgIdDesc() override; + base::string16 GetInstallSubDir() override; + base::string16 GetUninstallRegPath() override; + DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy() override; + bool GetChromeChannel(base::string16* channel) override; + bool GetCommandExecuteImplClsid(base::string16* handler_class_uuid) override; + bool ShouldSetExperimentLabels() override; + bool HasUserExperiments() override; // returns the channel name for GoogleChromeSxSDistribution static base::string16 ChannelName(); private: diff --git a/chrome/installer/util/google_update_settings_unittest.cc b/chrome/installer/util/google_update_settings_unittest.cc index 024cf5b..46b933b 100644 --- a/chrome/installer/util/google_update_settings_unittest.cc +++ b/chrome/installer/util/google_update_settings_unittest.cc @@ -988,7 +988,7 @@ class GetUninstallCommandLine : public GoogleUpdateSettingsTest, protected: static const wchar_t kDummyCommand[]; - virtual void SetUp() override { + void SetUp() override { GoogleUpdateSettingsTest::SetUp(); system_install_ = GetParam(); root_key_ = system_install_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; @@ -1047,7 +1047,7 @@ class GetGoogleUpdateVersion : public GoogleUpdateSettingsTest, protected: static const wchar_t kDummyVersion[]; - virtual void SetUp() override { + void SetUp() override { GoogleUpdateSettingsTest::SetUp(); system_install_ = GetParam(); root_key_ = system_install_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; @@ -1165,7 +1165,7 @@ class CollectStatsConsent : public ::testing::TestWithParam<StatsState> { static void SetUpTestCase(); static void TearDownTestCase(); protected: - virtual void SetUp() override; + void SetUp() override; static void MakeChromeMultiInstall(HKEY root_key); static void ApplySetting(StatsState::StateSetting setting, HKEY root_key, diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index edc6e36..5a26967 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -165,7 +165,7 @@ class InstallUtil { public: explicit ValueEquals(const base::string16& value_to_match) : value_to_match_(value_to_match) { } - virtual bool Evaluate(const base::string16& value) const override; + bool Evaluate(const base::string16& value) const override; protected: base::string16 value_to_match_; private: @@ -190,8 +190,8 @@ class InstallUtil { class ProgramCompare : public RegistryValuePredicate { public: explicit ProgramCompare(const base::FilePath& path_to_match); - virtual ~ProgramCompare(); - virtual bool Evaluate(const base::string16& value) const override; + ~ProgramCompare() override; + bool Evaluate(const base::string16& value) const override; bool EvaluatePath(const base::FilePath& path) const; protected: diff --git a/chrome/installer/util/installation_validator.h b/chrome/installer/util/installation_validator.h index 28e7a83..b66a253 100644 --- a/chrome/installer/util/installation_validator.h +++ b/chrome/installer/util/installation_validator.h @@ -99,40 +99,40 @@ class InstallationValidator { // Validation rules for the Chrome browser. class ChromeRules : public ProductRules { public: - virtual BrowserDistribution::Type distribution_type() const override; - virtual void AddUninstallSwitchExpectations( + BrowserDistribution::Type distribution_type() const override; + void AddUninstallSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual void AddRenameSwitchExpectations( + void AddRenameSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual bool UsageStatsAllowed(const ProductContext& ctx) const override; + bool UsageStatsAllowed(const ProductContext& ctx) const override; }; // Validation rules for Chrome Frame. class ChromeFrameRules : public ProductRules { public: - virtual BrowserDistribution::Type distribution_type() const override; - virtual void AddUninstallSwitchExpectations( + BrowserDistribution::Type distribution_type() const override; + void AddUninstallSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual void AddRenameSwitchExpectations( + void AddRenameSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual bool UsageStatsAllowed(const ProductContext& ctx) const override; + bool UsageStatsAllowed(const ProductContext& ctx) const override; }; // Validation rules for the multi-install Chrome binaries. class ChromeBinariesRules : public ProductRules { public: - virtual BrowserDistribution::Type distribution_type() const override; - virtual void AddUninstallSwitchExpectations( + BrowserDistribution::Type distribution_type() const override; + void AddUninstallSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual void AddRenameSwitchExpectations( + void AddRenameSwitchExpectations( const ProductContext& ctx, SwitchExpectations* expectations) const override; - virtual bool UsageStatsAllowed(const ProductContext& ctx) const override; + bool UsageStatsAllowed(const ProductContext& ctx) const override; }; struct ProductContext { diff --git a/chrome/installer/util/legacy_firewall_manager_win_unittest.cc b/chrome/installer/util/legacy_firewall_manager_win_unittest.cc index 5fd4638..61e5c24 100644 --- a/chrome/installer/util/legacy_firewall_manager_win_unittest.cc +++ b/chrome/installer/util/legacy_firewall_manager_win_unittest.cc @@ -16,7 +16,7 @@ class LegacyFirewallManagerTest : public ::testing::Test { protected: // Sets up the test fixture. - virtual void SetUp() override { + void SetUp() override { if (base::GetCurrentProcessIntegrityLevel() != base::HIGH_INTEGRITY) { LOG(WARNING) << "Not elevated. Skipping the test."; return; @@ -29,7 +29,7 @@ class LegacyFirewallManagerTest : public ::testing::Test { } // Tears down the test fixture. - virtual void TearDown() override { + void TearDown() override { if (!skip_test_) manager_.DeleteRule(); } diff --git a/chrome/installer/util/non_updating_app_registration_data.h b/chrome/installer/util/non_updating_app_registration_data.h index f5d7558..a25f97a 100644 --- a/chrome/installer/util/non_updating_app_registration_data.h +++ b/chrome/installer/util/non_updating_app_registration_data.h @@ -14,11 +14,11 @@ class NonUpdatingAppRegistrationData : public AppRegistrationData { public: explicit NonUpdatingAppRegistrationData(const base::string16& key_path); - virtual ~NonUpdatingAppRegistrationData(); - virtual base::string16 GetAppGuid() const override; - virtual base::string16 GetStateKey() const override; - virtual base::string16 GetStateMediumKey() const override; - virtual base::string16 GetVersionKey() const override; + ~NonUpdatingAppRegistrationData() override; + base::string16 GetAppGuid() const override; + base::string16 GetStateKey() const override; + base::string16 GetStateMediumKey() const override; + base::string16 GetVersionKey() const override; private: const base::string16 key_path_; diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc index 1897e8b3..0294c43 100644 --- a/chrome/installer/util/shell_util_unittest.cc +++ b/chrome/installer/util/shell_util_unittest.cc @@ -52,7 +52,7 @@ class ShellUtilShortcutTest : public testing::Test { protected: ShellUtilShortcutTest() : test_properties_(ShellUtil::CURRENT_USER) {} - virtual void SetUp() override { + void SetUp() override { dist_ = BrowserDistribution::GetDistribution(); ASSERT_TRUE(dist_ != NULL); product_.reset(new installer::Product(dist_)); @@ -811,7 +811,7 @@ class ShellUtilRegistryTest : public testing::Test { ShellUtilRegistryTest() {} protected: - virtual void SetUp() override { + void SetUp() override { registry_overrides_.OverrideRegistry(HKEY_CURRENT_USER); // .test2 files already have a default application. diff --git a/chrome/installer/util/updating_app_registration_data.h b/chrome/installer/util/updating_app_registration_data.h index e8afdd3..d9114b9 100644 --- a/chrome/installer/util/updating_app_registration_data.h +++ b/chrome/installer/util/updating_app_registration_data.h @@ -14,11 +14,11 @@ class UpdatingAppRegistrationData : public AppRegistrationData { public: explicit UpdatingAppRegistrationData(const base::string16& app_guid); - virtual ~UpdatingAppRegistrationData(); - virtual base::string16 GetAppGuid() const override; - virtual base::string16 GetStateKey() const override; - virtual base::string16 GetStateMediumKey() const override; - virtual base::string16 GetVersionKey() const override; + ~UpdatingAppRegistrationData() override; + base::string16 GetAppGuid() const override; + base::string16 GetStateKey() const override; + base::string16 GetStateMediumKey() const override; + base::string16 GetVersionKey() const override; private: const base::string16 app_guid_; |