| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file defines the methods useful for uninstalling Chrome. | 5 // This file defines the methods useful for uninstalling Chrome. |
| 6 | 6 |
| 7 #include "chrome/installer/setup/uninstall.h" | 7 #include "chrome/installer/setup/uninstall.h" |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 DeleteRegistryKey(key, dist->GetVersionKey()); | 242 DeleteRegistryKey(key, dist->GetVersionKey()); |
| 243 | 243 |
| 244 // Delete Software\Classes\ChromeHTML, | 244 // Delete Software\Classes\ChromeHTML, |
| 245 // Software\Clients\StartMenuInternet\chrome.exe and | 245 // Software\Clients\StartMenuInternet\chrome.exe and |
| 246 // Software\RegisteredApplications\Chrome | 246 // Software\RegisteredApplications\Chrome |
| 247 std::wstring html_prog_id(ShellUtil::kRegClasses); | 247 std::wstring html_prog_id(ShellUtil::kRegClasses); |
| 248 file_util::AppendToPath(&html_prog_id, ShellUtil::kChromeHTMLProgId); | 248 file_util::AppendToPath(&html_prog_id, ShellUtil::kChromeHTMLProgId); |
| 249 DeleteRegistryKey(key, html_prog_id); | 249 DeleteRegistryKey(key, html_prog_id); |
| 250 | 250 |
| 251 std::wstring set_access_key(ShellUtil::kRegStartMenuInternet); | 251 std::wstring set_access_key(ShellUtil::kRegStartMenuInternet); |
| 252 file_util::AppendToPath(&set_access_key, installer_util::kChromeExe); | 252 file_util::AppendToPath(&set_access_key, dist->GetApplicationName()); |
| 253 DeleteRegistryKey(key, set_access_key); | 253 DeleteRegistryKey(key, set_access_key); |
| 254 // We have renamed the StartMenuInternet\chrome.exe to |
| 255 // StartMenuInternet\Chromium so for old users we still need to delete |
| 256 // the old key. |
| 257 std::wstring old_set_access_key(ShellUtil::kRegStartMenuInternet); |
| 258 file_util::AppendToPath(&old_set_access_key, installer_util::kChromeExe); |
| 259 DeleteRegistryKey(key, old_set_access_key); |
| 254 | 260 |
| 255 DeleteRegistryValue(reg_root, ShellUtil::kRegRegisteredApplications, | 261 DeleteRegistryValue(reg_root, ShellUtil::kRegRegisteredApplications, |
| 256 dist->GetApplicationName()); | 262 dist->GetApplicationName()); |
| 257 | 263 |
| 258 // Cleanup Software\Classes\Applications\chrome.exe and OpenWithList | 264 // Cleanup Software\Classes\Applications\chrome.exe and OpenWithList |
| 259 RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS); | 265 RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS); |
| 260 std::wstring app_key(ShellUtil::kRegClasses); | 266 std::wstring app_key(ShellUtil::kRegClasses); |
| 261 file_util::AppendToPath(&app_key, L"Applications"); | 267 file_util::AppendToPath(&app_key, L"Applications"); |
| 262 file_util::AppendToPath(&app_key, installer_util::kChromeExe); | 268 file_util::AppendToPath(&app_key, installer_util::kChromeExe); |
| 263 DeleteRegistryKey(key, app_key); | 269 DeleteRegistryKey(key, app_key); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 dist->DoPostUninstallOperations(installed_version, local_state_path); | 324 dist->DoPostUninstallOperations(installed_version, local_state_path); |
| 319 } | 325 } |
| 320 | 326 |
| 321 // Try and delete the preserved local state once the post-install | 327 // Try and delete the preserved local state once the post-install |
| 322 // operations are complete. | 328 // operations are complete. |
| 323 if (!local_state_path.empty()) | 329 if (!local_state_path.empty()) |
| 324 file_util::Delete(local_state_path, false); | 330 file_util::Delete(local_state_path, false); |
| 325 | 331 |
| 326 return installer_util::UNINSTALL_SUCCESSFUL; | 332 return installer_util::UNINSTALL_SUCCESSFUL; |
| 327 } | 333 } |
| OLD | NEW |