summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 23:32:01 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 23:32:01 +0000
commit76658fb7b8c2739e851ae294c60116d2bdfcaf89 (patch)
tree1c3bcd05f5bacd46e1767fa0c27e94d93945865f
parent78f346a6f58cd39450c86e65fe85eca4bb458e05 (diff)
downloadchromium_src-76658fb7b8c2739e851ae294c60116d2bdfcaf89.zip
chromium_src-76658fb7b8c2739e851ae294c60116d2bdfcaf89.tar.gz
chromium_src-76658fb7b8c2739e851ae294c60116d2bdfcaf89.tar.bz2
* Write installer result to ClientState key instead of Clients key.
Review URL: http://codereview.chromium.org/13685 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6655 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/util/browser_distribution.cc4
-rw-r--r--chrome/installer/util/browser_distribution.h2
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc7
-rw-r--r--chrome/installer/util/google_chrome_distribution.h2
-rw-r--r--chrome/installer/util/install_util.cc2
5 files changed, 16 insertions, 1 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index 914179c..c24d3c8 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -43,6 +43,10 @@ int BrowserDistribution::GetInstallReturnCode(
return install_status;
}
+std::wstring BrowserDistribution::GetStateKey() {
+ return L"Software\\Chromium";
+}
+
std::wstring BrowserDistribution::GetUninstallLinkName() {
return L"Uninstall Chromium";
}
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index 627ae75..930f372 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -28,6 +28,8 @@ class BrowserDistribution {
virtual int GetInstallReturnCode(
installer_util::InstallStatus install_status);
+ virtual std::wstring GetStateKey();
+
virtual std::wstring GetUninstallLinkName();
virtual std::wstring GetUninstallRegPath();
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index e711c95..77d0501 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -125,6 +125,13 @@ int GoogleChromeDistribution::GetInstallReturnCode(
}
}
+std::wstring GoogleChromeDistribution::GetStateKey() {
+ std::wstring key(google_update::kRegPathClientState);
+ key.append(L"\\");
+ key.append(google_update::kChromeGuid);
+ return key;
+}
+
std::wstring GoogleChromeDistribution::GetUninstallLinkName() {
const std::wstring& link_name =
installer_util::GetLocalizedString(IDS_UNINSTALL_CHROME_BASE);
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index 9e803e0..635e5aa 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -39,6 +39,8 @@ class GoogleChromeDistribution : public BrowserDistribution {
virtual int GetInstallReturnCode(
installer_util::InstallStatus install_status);
+ virtual std::wstring GetStateKey();
+
virtual std::wstring GetUninstallLinkName();
virtual std::wstring GetUninstallRegPath();
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index dbd3a26..708d0ae 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -92,7 +92,7 @@ void InstallUtil::WriteInstallerResult(bool system_install,
const std::wstring* const launch_cmd) {
HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- std::wstring key = dist->GetVersionKey();
+ std::wstring key = dist->GetStateKey();
int installer_result = (dist->GetInstallReturnCode(status) == 0) ? 0 : 1;
scoped_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList());
install_list->AddCreateRegKeyWorkItem(root, key);