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

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

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 const ShellUtil::ShortcutProperties& properties) { 1094 const ShellUtil::ShortcutProperties& properties) {
1095 DCHECK(dist); 1095 DCHECK(dist);
1096 base::string16 shortcut_name; 1096 base::string16 shortcut_name;
1097 if (properties.has_shortcut_name()) { 1097 if (properties.has_shortcut_name()) {
1098 shortcut_name = properties.shortcut_name; 1098 shortcut_name = properties.shortcut_name;
1099 } else { 1099 } else {
1100 shortcut_name = 1100 shortcut_name =
1101 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME); 1101 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME);
1102 } 1102 }
1103 1103
1104 if (!EndsWith(shortcut_name, installer::kLnkExt, false)) 1104 if (!base::EndsWith(shortcut_name, installer::kLnkExt, false))
1105 shortcut_name.append(installer::kLnkExt); 1105 shortcut_name.append(installer::kLnkExt);
1106 1106
1107 return shortcut_name; 1107 return shortcut_name;
1108 } 1108 }
1109 1109
1110 // Converts ShellUtil::ShortcutOperation to the best-matching value in 1110 // Converts ShellUtil::ShortcutOperation to the best-matching value in
1111 // base::win::ShortcutOperation. 1111 // base::win::ShortcutOperation.
1112 base::win::ShortcutOperation TranslateShortcutOperation( 1112 base::win::ShortcutOperation TranslateShortcutOperation(
1113 ShellUtil::ShortcutOperation operation) { 1113 ShellUtil::ShortcutOperation operation) {
1114 switch (operation) { 1114 switch (operation) {
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 base::string16 key_path(ShellUtil::kRegClasses); 2511 base::string16 key_path(ShellUtil::kRegClasses);
2512 key_path.push_back(base::FilePath::kSeparators[0]); 2512 key_path.push_back(base::FilePath::kSeparators[0]);
2513 key_path.append(prog_id); 2513 key_path.append(prog_id);
2514 return InstallUtil::DeleteRegistryKey( 2514 return InstallUtil::DeleteRegistryKey(
2515 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default); 2515 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default);
2516 2516
2517 // TODO(mgiuca): Remove the extension association entries. This requires that 2517 // TODO(mgiuca): Remove the extension association entries. This requires that
2518 // the extensions associated with a particular prog_id are stored in that 2518 // the extensions associated with a particular prog_id are stored in that
2519 // prog_id's key. 2519 // prog_id's key.
2520 } 2520 }
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