Chromium Code Reviews| Index: chrome/installer/mini_installer/mini_installer.cc |
| diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc |
| index 28a8057627e67353dc4fb8d737337f467ea22a56..ac79fcba3bf204e0853b1cab244828ce7f23b713 100644 |
| --- a/chrome/installer/mini_installer/mini_installer.cc |
| +++ b/chrome/installer/mini_installer/mini_installer.cc |
| @@ -229,8 +229,19 @@ bool GetSetupExePathForGuidFromRegistry(bool system_level, |
| size_t size) { |
| const HKEY root_key = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
| RegKey key; |
| - return OpenClientStateKey(root_key, app_guid, KEY_QUERY_VALUE, &key) && |
| - (key.ReadValue(kUninstallRegistryValueName, path, size) == ERROR_SUCCESS); |
| + wchar_t unquoted_path[MAX_PATH] = {0}; |
|
grt (UTC plus 2)
2014/02/05 03:13:50
{0} -> {}
Cris Neckar
2014/02/06 20:56:23
Done.
|
| + if (!OpenClientStateKey(root_key, app_guid, KEY_QUERY_VALUE, &key) || |
| + (key.ReadValue(kUninstallRegistryValueName, |
| + unquoted_path, |
| + MAX_PATH) != ERROR_SUCCESS)) { |
|
grt (UTC plus 2)
2014/02/05 03:13:50
MAX_PATH -> arraysize(unquoted_path)
Cris Neckar
2014/02/06 20:56:23
Done.
|
| + return false; |
| + } |
| + if (unquoted_path[0] == '\"') |
| + return SafeStrCopy(path, size, unquoted_path); |
| + |
| + return SafeStrCopy(path, size, L"\"") && |
| + SafeStrCat(path, size, unquoted_path) && |
|
grt (UTC plus 2)
2014/02/05 03:13:50
nit: either four-space indent, or add parens for:
Cris Neckar
2014/02/06 20:56:23
Done.
|
| + SafeStrCat(path, size, L"\""); |
| } |
| // Gets the setup.exe path from Registry by looking the value of Uninstall |