| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "app/app_paths.h" | 5 #include "app/app_paths.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 11 | 12 |
| 12 namespace app { | 13 namespace app { |
| 13 | 14 |
| 14 bool PathProvider(int key, FilePath* result) { | 15 bool PathProvider(int key, FilePath* result) { |
| 15 // Assume that we will not need to create the directory if it does not exist. | 16 // Assume that we will not need to create the directory if it does not exist. |
| 16 // This flag can be set to true for the cases where we want to create it. | 17 // This flag can be set to true for the cases where we want to create it. |
| 17 bool create_dir = false; | 18 bool create_dir = false; |
| 18 | 19 |
| 19 FilePath cur; | 20 FilePath cur; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 return true; | 80 return true; |
| 80 } | 81 } |
| 81 | 82 |
| 82 // This cannot be done as a static initializer sadly since Visual Studio will | 83 // This cannot be done as a static initializer sadly since Visual Studio will |
| 83 // eliminate this object file if there is no direct entry point into it. | 84 // eliminate this object file if there is no direct entry point into it. |
| 84 void RegisterPathProvider() { | 85 void RegisterPathProvider() { |
| 85 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 86 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 86 } | 87 } |
| 87 | 88 |
| 88 } // namespace app | 89 } // namespace app |
| OLD | NEW |