OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 functions that integrate Chrome in Windows shell. These | 5 // This file defines functions that integrate Chrome in Windows shell. These |
6 // functions can be used by Chrome as well as Chrome installer. All of the | 6 // functions can be used by Chrome as well as Chrome installer. All of the |
7 // work is done by the local functions defined in anonymous namespace in | 7 // work is done by the local functions defined in anonymous namespace in |
8 // this class. | 8 // this class. |
9 | 9 |
10 #include "chrome/installer/util/shell_util.h" | 10 #include "chrome/installer/util/shell_util.h" |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 const ShellUtil::ShortcutProperties& properties) { | 1098 const ShellUtil::ShortcutProperties& properties) { |
1099 DCHECK(dist); | 1099 DCHECK(dist); |
1100 base::string16 shortcut_name; | 1100 base::string16 shortcut_name; |
1101 if (properties.has_shortcut_name()) { | 1101 if (properties.has_shortcut_name()) { |
1102 shortcut_name = properties.shortcut_name; | 1102 shortcut_name = properties.shortcut_name; |
1103 } else { | 1103 } else { |
1104 shortcut_name = | 1104 shortcut_name = |
1105 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME); | 1105 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME); |
1106 } | 1106 } |
1107 | 1107 |
1108 if (!base::EndsWith(shortcut_name, installer::kLnkExt, | 1108 if (!base::EndsWith(shortcut_name, installer::kLnkExt, false)) |
1109 base::CompareCase::INSENSITIVE_ASCII)) | |
1110 shortcut_name.append(installer::kLnkExt); | 1109 shortcut_name.append(installer::kLnkExt); |
1111 | 1110 |
1112 return shortcut_name; | 1111 return shortcut_name; |
1113 } | 1112 } |
1114 | 1113 |
1115 // Converts ShellUtil::ShortcutOperation to the best-matching value in | 1114 // Converts ShellUtil::ShortcutOperation to the best-matching value in |
1116 // base::win::ShortcutOperation. | 1115 // base::win::ShortcutOperation. |
1117 base::win::ShortcutOperation TranslateShortcutOperation( | 1116 base::win::ShortcutOperation TranslateShortcutOperation( |
1118 ShellUtil::ShortcutOperation operation) { | 1117 ShellUtil::ShortcutOperation operation) { |
1119 switch (operation) { | 1118 switch (operation) { |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 base::string16 key_path(ShellUtil::kRegClasses); | 2513 base::string16 key_path(ShellUtil::kRegClasses); |
2515 key_path.push_back(base::FilePath::kSeparators[0]); | 2514 key_path.push_back(base::FilePath::kSeparators[0]); |
2516 key_path.append(prog_id); | 2515 key_path.append(prog_id); |
2517 return InstallUtil::DeleteRegistryKey( | 2516 return InstallUtil::DeleteRegistryKey( |
2518 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default); | 2517 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default); |
2519 | 2518 |
2520 // TODO(mgiuca): Remove the extension association entries. This requires that | 2519 // TODO(mgiuca): Remove the extension association entries. This requires that |
2521 // the extensions associated with a particular prog_id are stored in that | 2520 // the extensions associated with a particular prog_id are stored in that |
2522 // prog_id's key. | 2521 // prog_id's key. |
2523 } | 2522 } |
OLD | NEW |