diff options
-rw-r--r-- | chrome/browser/BUILD.gn | 15 | ||||
-rw-r--r-- | chrome/browser/first_run/upgrade_util_win.cc | 7 | ||||
-rw-r--r-- | chrome/browser/google/google_update_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/google/google_update_win_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/BUILD.gn | 8 | ||||
-rw-r--r-- | chrome/browser/ui/webui/help/version_updater_win.cc | 14 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 5 | ||||
-rw-r--r-- | chrome/chrome_browser_ui.gypi | 12 | ||||
-rw-r--r-- | chrome/chrome_tests_unit.gypi | 5 | ||||
-rw-r--r-- | chrome/test/BUILD.gn | 3 | ||||
-rw-r--r-- | remoting/host/setup/BUILD.gn | 5 | ||||
-rw-r--r-- | remoting/host/setup/DEPS | 3 | ||||
-rw-r--r-- | remoting/remoting_host.gypi | 1 | ||||
-rw-r--r-- | win8/delegate_execute/chrome_util.cc | 3 | ||||
-rw-r--r-- | win8/delegate_execute/delegate_execute.gyp | 5 | ||||
-rw-r--r-- | win8/metro_driver/metro_driver.gyp | 1 |
16 files changed, 57 insertions, 38 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index e614053..e44ef2c 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -679,12 +679,6 @@ source_set("browser") { if (is_win) { sources += rebase_path(gypi_values.chrome_browser_win_sources, ".", "//chrome") - if (!is_chrome_branded) { - sources -= [ - "google/did_run_updater_win.cc", - "google/did_run_updater_win.h", - ] - } public_deps += [ "//ui/views", "//ui/views/controls/webview", @@ -709,6 +703,15 @@ source_set("browser") { "credui.lib", "netapi32.lib", ] + if (!is_chrome_branded) { + deps -= [ "//google_update" ] + sources -= [ + "google/did_run_updater_win.cc", + "google/did_run_updater_win.h", + "google/google_update_win.cc", + "google/google_update_win.h", + ] + } } else { # Non-Windows. sources += diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index 1fa59aa..e5933c7 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc @@ -39,9 +39,12 @@ #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/shell_util.h" #include "chrome/installer/util/util_constants.h" -#include "google_update/google_update_idl.h" #include "ui/base/ui_base_switches.h" +#if defined(GOOGLE_CHROME_BUILD) +#include "google_update/google_update_idl.h" +#endif + namespace { bool GetNewerChromeFile(base::FilePath* path) { @@ -52,6 +55,7 @@ bool GetNewerChromeFile(base::FilePath* path) { } bool InvokeGoogleUpdateForRename() { +#if defined(GOOGLE_CHROME_BUILD) base::win::ScopedComPtr<IProcessLauncher> ipl; if (!FAILED(ipl.CreateInstance(__uuidof(ProcessLauncherClass)))) { ULONG_PTR phandle = NULL; @@ -70,6 +74,7 @@ bool InvokeGoogleUpdateForRename() { return true; } } +#endif // GOOGLE_CHROME_BUILD return false; } diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc index 78630f1..664b8be 100644 --- a/chrome/browser/google/google_update_win.cc +++ b/chrome/browser/google/google_update_win.cc @@ -67,9 +67,6 @@ const HRESULT GOOPDATEINSTALL_E_INSTALLER_FAILED = 0x80040902; GoogleUpdateErrorCode CanUpdateCurrentChrome( const base::FilePath& chrome_exe_path, bool system_level_install) { -#if !defined(GOOGLE_CHROME_BUILD) - return CANNOT_UPGRADE_CHROME_IN_THIS_DIRECTORY; -#else DCHECK_NE(InstallUtil::IsPerUserInstall(chrome_exe_path), system_level_install); BrowserDistribution* dist = BrowserDistribution::GetDistribution(); @@ -83,7 +80,6 @@ GoogleUpdateErrorCode CanUpdateCurrentChrome( } return GOOGLE_UPDATE_NO_ERROR; -#endif } // Creates an instance of a COM Local Server class using either plain vanilla diff --git a/chrome/browser/google/google_update_win_unittest.cc b/chrome/browser/google/google_update_win_unittest.cc index f6be486..3b63c21d 100644 --- a/chrome/browser/google/google_update_win_unittest.cc +++ b/chrome/browser/google/google_update_win_unittest.cc @@ -663,8 +663,6 @@ TEST_P(GoogleUpdateWinTest, InvalidInstallDirectory) { task_runner_->RunUntilIdle(); } -#if defined(GOOGLE_CHROME_BUILD) - // Test the case where the GoogleUpdate class can't be created for an update // check. TEST_P(GoogleUpdateWinTest, NoGoogleUpdateForCheck) { @@ -828,8 +826,6 @@ TEST_P(GoogleUpdateWinTest, UpdateFailed) { task_runner_->RunUntilIdle(); } -#endif // defined(GOOGLE_CHROME_BUILD) - INSTANTIATE_TEST_CASE_P(UserLevel, GoogleUpdateWinTest, Values(false)); INSTANTIATE_TEST_CASE_P(SystemLevel, GoogleUpdateWinTest, Values(true)); diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 3a16f27..02e05b7 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn @@ -347,6 +347,14 @@ source_set("ui") { "//third_party/isimpledom", "//ui/app_list", ] + if (!is_chrome_branded) { + deps -= [ "//google_update" ] + sources -= [ "webui/help/version_updater_win.cc" ] + sources += [ + "webui/help/version_updater_basic.cc", + "webui/help/version_updater_basic.h", + ] + } } else { # 'OS!="win" if (toolkit_views) { public_deps += [ diff --git a/chrome/browser/ui/webui/help/version_updater_win.cc b/chrome/browser/ui/webui/help/version_updater_win.cc index 9e47d47..b62c7af 100644 --- a/chrome/browser/ui/webui/help/version_updater_win.cc +++ b/chrome/browser/ui/webui/help/version_updater_win.cc @@ -46,9 +46,7 @@ class VersionUpdaterWin : public VersionUpdater, public UpdateCheckDelegate { const base::string16& new_version) override; private: -#if defined(GOOGLE_CHROME_BUILD) void BeginUpdateCheckOnFileThread(bool install_update_if_possible); -#endif // GOOGLE_CHROME_BUILD // A task run on the UI thread with the result of checking for a pending // restart. @@ -75,7 +73,6 @@ VersionUpdaterWin::~VersionUpdaterWin() { void VersionUpdaterWin::CheckForUpdate(const StatusCallback& callback) { // There is no supported integration with Google Update for Chromium. -#if defined(GOOGLE_CHROME_BUILD) callback_ = callback; // On-demand updates for Chrome don't work in Vista RTM when UAC is turned @@ -89,7 +86,6 @@ void VersionUpdaterWin::CheckForUpdate(const StatusCallback& callback) { callback_.Run(CHECKING, 0, base::string16()); BeginUpdateCheckOnFileThread(false /* !install_update_if_possible */); } -#endif } void VersionUpdaterWin::RelaunchBrowser() const { @@ -98,7 +94,6 @@ void VersionUpdaterWin::RelaunchBrowser() const { void VersionUpdaterWin::OnUpdateCheckComplete( const base::string16& new_version) { -#if defined(GOOGLE_CHROME_BUILD) DCHECK_CURRENTLY_ON(content::BrowserThread::UI); Status status = CHECKING; if (new_version.empty()) { @@ -123,28 +118,22 @@ void VersionUpdaterWin::OnUpdateCheckComplete( BeginUpdateCheckOnFileThread(true /* install_update_if_possible */); } callback_.Run(status, 0, base::string16()); -#endif // GOOGLE_CHROME_BUILD } void VersionUpdaterWin::OnUpgradeProgress(int progress, const base::string16& new_version) { -#if defined(GOOGLE_CHROME_BUILD) DCHECK_CURRENTLY_ON(content::BrowserThread::UI); callback_.Run(UPDATING, progress, base::string16()); -#endif // GOOGLE_CHROME_BUILD } void VersionUpdaterWin::OnUpgradeComplete(const base::string16& new_version) { -#if defined(GOOGLE_CHROME_BUILD) DCHECK_CURRENTLY_ON(content::BrowserThread::UI); callback_.Run(NEARLY_UPDATED, 0, base::string16()); -#endif // GOOGLE_CHROME_BUILD } void VersionUpdaterWin::OnError(GoogleUpdateErrorCode error_code, const base::string16& error_message, const base::string16& new_version) { -#if defined(GOOGLE_CHROME_BUILD) DCHECK_CURRENTLY_ON(content::BrowserThread::UI); base::string16 message; @@ -159,10 +148,8 @@ void VersionUpdaterWin::OnError(GoogleUpdateErrorCode error_code, IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK, error_message); } callback_.Run(FAILED, 0, message); -#endif // GOOGLE_CHROME_BUILD } -#if defined(GOOGLE_CHROME_BUILD) void VersionUpdaterWin::BeginUpdateCheckOnFileThread( bool install_update_if_possible) { BeginUpdateCheck(content::BrowserThread::GetMessageLoopProxyForThread( @@ -171,7 +158,6 @@ void VersionUpdaterWin::BeginUpdateCheckOnFileThread( install_update_if_possible, owner_widget_, weak_factory_.GetWeakPtr()); } -#endif // GOOGLE_CHROME_BUILD void VersionUpdaterWin::OnPendingRestartCheck(bool is_update_pending_restart) { callback_.Run(is_update_pending_restart ? NEARLY_UPDATED : UPDATED, 0, diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index ce70b6d..96d69b4 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -3645,9 +3645,14 @@ ], }], ['branding!="Chrome"', { + 'dependencies!': [ + '../google_update/google_update.gyp:google_update', + ], 'sources!': [ 'browser/google/did_run_updater_win.cc', 'browser/google/did_run_updater_win.h', + 'browser/google/google_update_win.cc', + 'browser/google/google_update_win.h', ], }], ], diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 26896f3..3ef23d9 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -3061,6 +3061,18 @@ '<(allocator_target)', ], }], + ['branding!="Chrome"', { + 'dependencies!': [ + '../google_update/google_update.gyp:google_update', + ], + 'sources!': [ + 'browser/ui/webui/help/version_updater_win.cc', + ], + 'sources': [ + 'browser/ui/webui/help/version_updater_basic.cc', + 'browser/ui/webui/help/version_updater_basic.h', + ], + }], ], }, { # 'OS!="win" 'conditions': [ diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index af217161..4f3e609 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -2547,6 +2547,11 @@ '<(allocator_target)', ], }], + ['branding!="Chrome"', { + 'sources!': [ + 'browser/google/google_update_win_unittest.cc', + ], + }], ], 'include_dirs': [ '<(DEPTH)/third_party/wtl/include', diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index de3eddf..f509f46 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn @@ -1677,6 +1677,9 @@ if (!is_android) { "urlmon.lib", "winmm.lib", ] + if (!is_chrome_branded) { + sources -= [ "../browser/google/google_update_win_unittest.cc" ] + } } if (is_android || is_ios) { sources -= [ diff --git a/remoting/host/setup/BUILD.gn b/remoting/host/setup/BUILD.gn index 5fa8a36..a2bb36e 100644 --- a/remoting/host/setup/BUILD.gn +++ b/remoting/host/setup/BUILD.gn @@ -24,9 +24,6 @@ source_set("setup") { ] if (is_win) { - deps += [ - "//google_update", - "//remoting/host:remoting_lib_idl", - ] + deps += [ "//remoting/host:remoting_lib_idl" ] } } diff --git a/remoting/host/setup/DEPS b/remoting/host/setup/DEPS deleted file mode 100644 index 7251c42..0000000 --- a/remoting/host/setup/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+google_update", -] diff --git a/remoting/remoting_host.gypi b/remoting/remoting_host.gypi index 79374ed..34e0aad 100644 --- a/remoting/remoting_host.gypi +++ b/remoting/remoting_host.gypi @@ -220,7 +220,6 @@ 'conditions': [ ['OS=="win"', { 'dependencies': [ - '../google_update/google_update.gyp:google_update', 'remoting_lib_idl', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. diff --git a/win8/delegate_execute/chrome_util.cc b/win8/delegate_execute/chrome_util.cc index 489e9fb..858a2ca 100644 --- a/win8/delegate_execute/chrome_util.cc +++ b/win8/delegate_execute/chrome_util.cc @@ -27,7 +27,10 @@ #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/util_constants.h" + +#if defined(GOOGLE_CHROME_BUILD) #include "google_update/google_update_idl.h" +#endif namespace { diff --git a/win8/delegate_execute/delegate_execute.gyp b/win8/delegate_execute/delegate_execute.gyp index 0138cb4..7247e08 100644 --- a/win8/delegate_execute/delegate_execute.gyp +++ b/win8/delegate_execute/delegate_execute.gyp @@ -77,6 +77,11 @@ '../win8.gyp:metro_viewer_constants', ], }], + ['branding!="Chrome"', { + 'dependencies!': [ + '../../google_update/google_update.gyp:google_update', + ], + }], ], }, { diff --git a/win8/metro_driver/metro_driver.gyp b/win8/metro_driver/metro_driver.gyp index 1a815e4..2720bb5 100644 --- a/win8/metro_driver/metro_driver.gyp +++ b/win8/metro_driver/metro_driver.gyp @@ -51,7 +51,6 @@ '../../chrome/common_constants.gyp:common_constants', '../../chrome/chrome.gyp:installer_util', '../../crypto/crypto.gyp:crypto', - '../../google_update/google_update.gyp:google_update', '../../ipc/ipc.gyp:ipc', '../../sandbox/sandbox.gyp:sandbox', '../../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', |