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

Side by Side Diff: chrome/browser/web_applications/web_app_mac.mm

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 #import "chrome/browser/web_applications/web_app_mac.h" 5 #import "chrome/browser/web_applications/web_app_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const std::string& extension_id, 177 const std::string& extension_id,
178 const base::FilePath& own_basename) { 178 const base::FilePath& own_basename) {
179 // Check if there any any other shims for the same extension. 179 // Check if there any any other shims for the same extension.
180 base::FileEnumerator enumerator(destination_directory, 180 base::FileEnumerator enumerator(destination_directory,
181 false /* recursive */, 181 false /* recursive */,
182 base::FileEnumerator::DIRECTORIES); 182 base::FileEnumerator::DIRECTORIES);
183 for (base::FilePath shim_path = enumerator.Next(); 183 for (base::FilePath shim_path = enumerator.Next();
184 !shim_path.empty(); shim_path = enumerator.Next()) { 184 !shim_path.empty(); shim_path = enumerator.Next()) {
185 if (shim_path.BaseName() != own_basename && 185 if (shim_path.BaseName() != own_basename &&
186 base::EndsWith(shim_path.RemoveExtension().value(), 186 base::EndsWith(shim_path.RemoveExtension().value(),
187 extension_id, 187 extension_id,
188 true /* case_sensitive */)) { 188 base::CompareCase::SENSITIVE)) {
189 return true; 189 return true;
190 } 190 }
191 } 191 }
192 192
193 return false; 193 return false;
194 } 194 }
195 195
196 // Given the path to an app bundle, return the path to the Info.plist file. 196 // Given the path to an app bundle, return the path to the Info.plist file.
197 NSString* GetPlistPath(const base::FilePath& bundle_path) { 197 NSString* GetPlistPath(const base::FilePath& bundle_path) {
198 return base::mac::FilePathToNSString( 198 return base::mac::FilePathToNSString(
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 web_app::GetShortcutInfoForApp( 1212 web_app::GetShortcutInfoForApp(
1213 app, 1213 app,
1214 profile, 1214 profile,
1215 base::Bind(&web_app::CreateAppShortcutInfoLoaded, 1215 base::Bind(&web_app::CreateAppShortcutInfoLoaded,
1216 profile, 1216 profile,
1217 app, 1217 app,
1218 close_callback)); 1218 close_callback));
1219 } 1219 }
1220 1220
1221 } // namespace chrome 1221 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/profiler_ui.cc ('k') | chrome/common/extensions/api/networking_private/networking_private_crypto.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698