| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |