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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 100573002: Move directory creation functions to 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
« no previous file with comments | « chrome/common/auto_start_linux.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 #endif 511 #endif
512 break; 512 break;
513 513
514 default: 514 default:
515 return false; 515 return false;
516 } 516 }
517 517
518 // TODO(bauerb): http://crbug.com/259796 518 // TODO(bauerb): http://crbug.com/259796
519 base::ThreadRestrictions::ScopedAllowIO allow_io; 519 base::ThreadRestrictions::ScopedAllowIO allow_io;
520 if (create_dir && !base::PathExists(cur) && 520 if (create_dir && !base::PathExists(cur) &&
521 !file_util::CreateDirectory(cur)) 521 !base::CreateDirectory(cur))
522 return false; 522 return false;
523 523
524 *result = cur; 524 *result = cur;
525 return true; 525 return true;
526 } 526 }
527 527
528 // This cannot be done as a static initializer sadly since Visual Studio will 528 // This cannot be done as a static initializer sadly since Visual Studio will
529 // eliminate this object file if there is no direct entry point into it. 529 // eliminate this object file if there is no direct entry point into it.
530 void RegisterPathProvider() { 530 void RegisterPathProvider() {
531 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 531 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
532 } 532 }
533 533
534 } // namespace chrome 534 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/auto_start_linux.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698