summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-05 00:32:38 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-05 00:32:38 +0000
commit3cab160cf0f9901cec25936a4fc835bc049d0377 (patch)
treed40f710ac61a61c9363c1ed7704452bd0c2b5423 /chrome
parentda6dd6f429d5d72f02c926a416b76ab872b5ab06 (diff)
downloadchromium_src-3cab160cf0f9901cec25936a4fc835bc049d0377.zip
chromium_src-3cab160cf0f9901cec25936a4fc835bc049d0377.tar.gz
chromium_src-3cab160cf0f9901cec25936a4fc835bc049d0377.tar.bz2
* 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
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/google_update.cc11
1 files changed, 7 insertions, 4 deletions
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;
}
-