Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, false)) 1108 if (!base::EndsWith(shortcut_name, installer::kLnkExt,
1109 base::CompareCase::INSENSITIVE_ASCII))
1109 shortcut_name.append(installer::kLnkExt); 1110 shortcut_name.append(installer::kLnkExt);
1110 1111
1111 return shortcut_name; 1112 return shortcut_name;
1112 } 1113 }
1113 1114
1114 // Converts ShellUtil::ShortcutOperation to the best-matching value in 1115 // Converts ShellUtil::ShortcutOperation to the best-matching value in
1115 // base::win::ShortcutOperation. 1116 // base::win::ShortcutOperation.
1116 base::win::ShortcutOperation TranslateShortcutOperation( 1117 base::win::ShortcutOperation TranslateShortcutOperation(
1117 ShellUtil::ShortcutOperation operation) { 1118 ShellUtil::ShortcutOperation operation) {
1118 switch (operation) { 1119 switch (operation) {
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 base::string16 key_path(ShellUtil::kRegClasses); 2514 base::string16 key_path(ShellUtil::kRegClasses);
2514 key_path.push_back(base::FilePath::kSeparators[0]); 2515 key_path.push_back(base::FilePath::kSeparators[0]);
2515 key_path.append(prog_id); 2516 key_path.append(prog_id);
2516 return InstallUtil::DeleteRegistryKey( 2517 return InstallUtil::DeleteRegistryKey(
2517 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default); 2518 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default);
2518 2519
2519 // TODO(mgiuca): Remove the extension association entries. This requires that 2520 // TODO(mgiuca): Remove the extension association entries. This requires that
2520 // the extensions associated with a particular prog_id are stored in that 2521 // the extensions associated with a particular prog_id are stored in that
2521 // prog_id's key. 2522 // prog_id's key.
2522 } 2523 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698