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, |