summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/helper.cc
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 18:25:59 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 18:25:59 +0000
commit5bf70ed54eb5dd8182157b20443be4153f7f6266 (patch)
treed6b905cd8708b9e2fafa997de8ab682844b3b14f /chrome/installer/util/helper.cc
parente966b8943fa470a6dc085324c1fb461137655e7f (diff)
downloadchromium_src-5bf70ed54eb5dd8182157b20443be4153f7f6266.zip
chromium_src-5bf70ed54eb5dd8182157b20443be4153f7f6266.tar.gz
chromium_src-5bf70ed54eb5dd8182157b20443be4153f7f6266.tar.bz2
Update checks of multi-installs now use the proper app guid.
BUG=61609 TEST=install Chrome with --multi-install, monitor GoogleUpdate's log (e.g., via Sawbuck), and confirm that an update check uses the multi-installer package's app guid. Review URL: http://codereview.chromium.org/6100003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/helper.cc')
-rw-r--r--chrome/installer/util/helper.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index aa6a264..6cddf25 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -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.
@@ -12,6 +12,7 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/master_preferences.h"
+#include "chrome/installer/util/package_properties.h"
using base::win::RegKey;
@@ -126,4 +127,14 @@ FilePath GetChromeFrameInstallPath(bool multi_install, bool system_install,
return GetChromeInstallPath(system_install, chrome);
}
+std::wstring GetAppGuidForUpdates(bool system_install) {
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+
+ // If we're part of a multi-install, we need to poll using the multi-installer
+ // package's app guid rather than the browser's or Chrome Frame's app guid.
+ return IsInstalledAsMulti(system_install, dist) ?
+ ActivePackageProperties().GetAppGuid() :
+ dist->GetAppGuid();
+}
+
} // namespace installer.