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

Unified Diff: chrome/installer/util/install_util.cc

Issue 6490008: Fix user-to-system-level installation delegation. This looks to have been bro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
===================================================================
--- chrome/installer/util/install_util.cc (revision 73979)
+++ chrome/installer/util/install_util.cc (working copy)
@@ -26,10 +26,12 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/l10n_string_util.h"
+#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/util_constants.h"
#include "chrome/installer/util/work_item_list.h"
using base::win::RegKey;
+using installer::ProductState;
bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) {
FilePath::StringType program(cmd.GetProgram().value());
@@ -68,14 +70,13 @@
return true;
}
-std::wstring InstallUtil::GetChromeUninstallCmd(bool system_install,
- BrowserDistribution* dist) {
- DCHECK(dist);
- HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
- RegKey key(root, dist->GetUninstallRegPath().c_str(), KEY_READ);
- std::wstring uninstall_cmd;
- key.ReadValue(installer::kUninstallStringField, &uninstall_cmd);
- return uninstall_cmd;
+CommandLine InstallUtil::GetChromeUninstallCmd(
+ bool system_install, BrowserDistribution::Type distribution_type) {
+ ProductState state;
tommi (sloooow) - chröme 2011/02/10 20:52:37 With this, now Chrome depends on the ProductState
robertshield 2011/02/10 21:09:39 We could, but I'm not sure that's the best way to
+ if (state.Initialize(system_install, distribution_type)) {
+ return state.uninstall_command();
+ }
+ return CommandLine(CommandLine::NO_PROGRAM);
}
Version* InstallUtil::GetChromeVersion(BrowserDistribution* dist,
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698