From 3cab160cf0f9901cec25936a4fc835bc049d0377 Mon Sep 17 00:00:00 2001 From: "kuchhal@chromium.org" Date: Fri, 5 Dec 2008 00:32:38 +0000 Subject: * Do not try to update distribution other than Google Chrome. BUG=5109 Review URL: http://codereview.chromium.org/13140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6400 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/google_update.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'chrome/browser/google_update.cc') diff --git a/chrome/browser/google_update.cc b/chrome/browser/google_update.cc index a609fb4..da82ae5 100644 --- a/chrome/browser/google_update.cc +++ b/chrome/browser/google_update.cc @@ -22,10 +22,13 @@ #include "google_update_idl_i.c" namespace { -// Check if the currently running Chrome can be updated by Google Update by -// checking if it is running from the standard location. Return true if running -// from the standard location, otherwise return false. +// Check if the currently running instance can be updated by Google Update. +// Returns true only if the instance running is a Google Chrome +// distribution installed in a standard location. bool CanUpdateCurrentChrome(const std::wstring& chrome_exe_path) { +#if !defined(GOOGLE_CHROME_BUILD) + return false; +#else std::wstring user_exe_path = installer::GetChromeInstallPath(false); std::wstring machine_exe_path = installer::GetChromeInstallPath(true); std::transform(user_exe_path.begin(), user_exe_path.end(), @@ -42,6 +45,7 @@ bool CanUpdateCurrentChrome(const std::wstring& chrome_exe_path) { } return true; +#endif } // Creates an instance of a COM Local Server class using either plain vanilla @@ -319,4 +323,3 @@ bool GoogleUpdate::ReportFailure(HRESULT hr, GoogleUpdateErrorCode error_code, &GoogleUpdate::ReportResults, UPGRADE_ERROR, error_code)); return false; } - -- cgit v1.1