| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 InstallUtil::DeleteRegistryValueIf( | 552 InstallUtil::DeleteRegistryValueIf( |
| 553 root, ShellUtil::kRegStartMenuInternet, L"", | 553 root, ShellUtil::kRegStartMenuInternet, L"", |
| 554 InstallUtil::ValueEquals(dist->GetApplicationName() + | 554 InstallUtil::ValueEquals(dist->GetApplicationName() + |
| 555 browser_entry_suffix)); | 555 browser_entry_suffix)); |
| 556 | 556 |
| 557 // Delete each protocol association if it references this Chrome. | 557 // Delete each protocol association if it references this Chrome. |
| 558 ProgramCompare open_command_pred(target_path.Append(kChromeExe)); | 558 ProgramCompare open_command_pred(target_path.Append(kChromeExe)); |
| 559 std::wstring parent_key(ShellUtil::kRegClasses); | 559 std::wstring parent_key(ShellUtil::kRegClasses); |
| 560 const std::wstring::size_type base_length = parent_key.size(); | 560 const std::wstring::size_type base_length = parent_key.size(); |
| 561 std::wstring child_key; | 561 std::wstring child_key; |
| 562 for (const wchar_t* const* proto = &ShellUtil::kProtocolAssociations[0]; | 562 for (const wchar_t* const* proto = |
| 563 *proto != NULL; ++proto) { | 563 &ShellUtil::kPotentialProtocolAssociations[0]; |
| 564 *proto != NULL; |
| 565 ++proto) { |
| 564 parent_key.resize(base_length); | 566 parent_key.resize(base_length); |
| 565 file_util::AppendToPath(&parent_key, *proto); | 567 file_util::AppendToPath(&parent_key, *proto); |
| 566 child_key.assign(parent_key).append(ShellUtil::kRegShellOpen); | 568 child_key.assign(parent_key).append(ShellUtil::kRegShellOpen); |
| 567 InstallUtil::DeleteRegistryKeyIf(root, parent_key, child_key, L"", | 569 InstallUtil::DeleteRegistryKeyIf(root, parent_key, child_key, L"", |
| 568 open_command_pred); | 570 open_command_pred); |
| 569 } | 571 } |
| 570 | 572 |
| 571 // Delete each filetype association if it references this Chrome. | 573 // Delete each filetype association if it references this Chrome. |
| 572 InstallUtil::ValueEquals prog_id_pred(ShellUtil::kChromeHTMLProgId + | 574 InstallUtil::ValueEquals prog_id_pred(ShellUtil::kChromeHTMLProgId + |
| 573 browser_entry_suffix); | 575 browser_entry_suffix); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 861 |
| 860 // Try and delete the preserved local state once the post-install | 862 // Try and delete the preserved local state once the post-install |
| 861 // operations are complete. | 863 // operations are complete. |
| 862 if (!backup_state_file.empty()) | 864 if (!backup_state_file.empty()) |
| 863 file_util::Delete(backup_state_file, false); | 865 file_util::Delete(backup_state_file, false); |
| 864 | 866 |
| 865 return ret; | 867 return ret; |
| 866 } | 868 } |
| 867 | 869 |
| 868 } // namespace installer | 870 } // namespace installer |
| OLD | NEW |