summaryrefslogtreecommitdiffstats
path: root/chrome/installer
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
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')
-rw-r--r--chrome/installer/util/helper.cc13
-rw-r--r--chrome/installer/util/helper.h8
-rw-r--r--chrome/installer/util/package_properties.cc6
-rw-r--r--chrome/installer/util/package_properties.h4
4 files changed, 27 insertions, 4 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.
diff --git a/chrome/installer/util/helper.h b/chrome/installer/util/helper.h
index e5f19ae..bcee4c6 100644
--- a/chrome/installer/util/helper.h
+++ b/chrome/installer/util/helper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 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.
//
@@ -8,6 +8,8 @@
#define CHROME_INSTALLER_UTIL_HELPER_H_
#pragma once
+#include <string>
+
class BrowserDistribution;
class CommandLine;
class FilePath;
@@ -51,6 +53,10 @@ FilePath GetChromeUserDataPath(BrowserDistribution* dist);
FilePath GetChromeFrameInstallPath(bool multi_install, bool system_install,
BrowserDistribution* dist);
+// Returns the app guid under which the current process receives updates from
+// Google Update.
+std::wstring GetAppGuidForUpdates(bool system_install);
+
} // namespace installer
#endif // CHROME_INSTALLER_UTIL_HELPER_H_
diff --git a/chrome/installer/util/package_properties.cc b/chrome/installer/util/package_properties.cc
index 2ab87cb..e33c2f9 100644
--- a/chrome/installer/util/package_properties.cc
+++ b/chrome/installer/util/package_properties.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.
@@ -42,6 +42,10 @@ PackagePropertiesImpl::PackagePropertiesImpl(
PackagePropertiesImpl::~PackagePropertiesImpl() {
}
+const std::wstring& PackagePropertiesImpl::GetAppGuid() {
+ return guid_;
+}
+
const std::wstring& PackagePropertiesImpl::GetStateKey() {
return state_key_;
}
diff --git a/chrome/installer/util/package_properties.h b/chrome/installer/util/package_properties.h
index a3f7714..5fd5e5f5 100644
--- a/chrome/installer/util/package_properties.h
+++ b/chrome/installer/util/package_properties.h
@@ -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.
@@ -36,6 +36,7 @@ class PackageProperties {
virtual bool ReceivesUpdates() const = 0;
// Equivalent to BrowserDistribution::GetAppGuid()
+ virtual const std::wstring& GetAppGuid() = 0;
virtual const std::wstring& GetStateKey() = 0;
virtual const std::wstring& GetStateMediumKey() = 0;
virtual const std::wstring& GetVersionKey() = 0;
@@ -54,6 +55,7 @@ class PackagePropertiesImpl : public PackageProperties {
const std::wstring& version_key);
virtual ~PackagePropertiesImpl();
+ virtual const std::wstring& GetAppGuid();
virtual const std::wstring& GetStateKey();
virtual const std::wstring& GetStateMediumKey();
virtual const std::wstring& GetVersionKey();