Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2884)

Unified Diff: chrome/browser/google/google_update.cc

Issue 6100003: Update checks of multi-installs now use the proper app guid.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/util/helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_update.cc
===================================================================
--- chrome/browser/google/google_update.cc (revision 70612)
+++ chrome/browser/google/google_update.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -231,7 +231,6 @@
bool GoogleUpdate::InitiateGoogleUpdateCheck(bool install_if_newer,
Window* window,
MessageLoop* main_loop) {
-
FilePath chrome_exe_path;
if (!PathService::Get(base::DIR_EXE, &chrome_exe_path)) {
NOTREACHED();
@@ -261,6 +260,8 @@
ScopedComPtr<IGoogleUpdate> on_demand;
+ bool system_level = false;
+
if (InstallUtil::IsPerUserInstall(chrome_exe.c_str())) {
hr = on_demand.CreateInstance(CLSID_OnDemandUserAppsClass);
} else {
@@ -279,16 +280,19 @@
IID_IGoogleUpdate, foreground_hwnd,
reinterpret_cast<void**>(on_demand.Receive()));
}
+ system_level = true;
}
if (hr != S_OK)
return ReportFailure(hr, GOOGLE_UPDATE_ONDEMAND_CLASS_NOT_FOUND, main_loop);
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ std::wstring app_guid = installer::GetAppGuidForUpdates(system_level);
+ DCHECK(!app_guid.empty());
+
if (!install_if_newer)
- hr = on_demand->CheckForUpdate(dist->GetAppGuid().c_str(), job_observer);
+ hr = on_demand->CheckForUpdate(app_guid.c_str(), job_observer);
else
- hr = on_demand->Update(dist->GetAppGuid().c_str(), job_observer);
+ hr = on_demand->Update(app_guid.c_str(), job_observer);
if (hr != S_OK)
return ReportFailure(hr, GOOGLE_UPDATE_ONDEMAND_CLASS_REPORTED_ERROR,
« no previous file with comments | « no previous file | chrome/installer/util/helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698