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

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

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 "apps/app_shim/app_shim_mac.h" 10 #include "apps/app_shim/app_shim_mac.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 NSString* strings_path = base::mac::FilePathToNSString( 274 NSString* strings_path = base::mac::FilePathToNSString(
275 localized.Append(locale + ".strings")); 275 localized.Append(locale + ".strings"));
276 [strings_dict writeToFile:strings_path 276 [strings_dict writeToFile:strings_path
277 atomically:YES]; 277 atomically:YES];
278 } 278 }
279 279
280 void DeletePathAndParentIfEmpty(const base::FilePath& app_path) { 280 void DeletePathAndParentIfEmpty(const base::FilePath& app_path) {
281 DCHECK(!app_path.empty()); 281 DCHECK(!app_path.empty());
282 base::DeleteFile(app_path, true); 282 base::DeleteFile(app_path, true);
283 base::FilePath apps_folder = app_path.DirName(); 283 base::FilePath apps_folder = app_path.DirName();
284 if (file_util::IsDirectoryEmpty(apps_folder)) 284 if (base::IsDirectoryEmpty(apps_folder))
285 base::DeleteFile(apps_folder, false); 285 base::DeleteFile(apps_folder, false);
286 } 286 }
287 287
288 bool IsShimForProfile(const base::FilePath& base_name, 288 bool IsShimForProfile(const base::FilePath& base_name,
289 const std::string& profile_base_name) { 289 const std::string& profile_base_name) {
290 if (!StartsWithASCII(base_name.value(), profile_base_name, true)) 290 if (!StartsWithASCII(base_name.value(), profile_base_name, true))
291 return false; 291 return false;
292 292
293 if (base_name.Extension() != ".app") 293 if (base_name.Extension() != ".app")
294 return false; 294 return false;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ShellIntegration::ShortcutInfo shortcut_info = 783 ShellIntegration::ShortcutInfo shortcut_info =
784 BuildShortcutInfoFromBundle(*it); 784 BuildShortcutInfoFromBundle(*it);
785 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info); 785 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info);
786 shortcut_creator.DeleteShortcuts(); 786 shortcut_creator.DeleteShortcuts();
787 } 787 }
788 } 788 }
789 789
790 } // namespace internals 790 } // namespace internals
791 791
792 } // namespace web_app 792 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/screenshot_taker.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698