OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/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/logging.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 cur = cur.Append(FILE_PATH_LITERAL("test")); | 206 cur = cur.Append(FILE_PATH_LITERAL("test")); |
207 cur = cur.Append(FILE_PATH_LITERAL("testserver")); | 207 cur = cur.Append(FILE_PATH_LITERAL("testserver")); |
208 cur = cur.Append(FILE_PATH_LITERAL("testserver.py")); | 208 cur = cur.Append(FILE_PATH_LITERAL("testserver.py")); |
209 if (!file_util::PathExists(cur)) // we don't want to create this | 209 if (!file_util::PathExists(cur)) // we don't want to create this |
210 return false; | 210 return false; |
211 break; | 211 break; |
212 default: | 212 default: |
213 return false; | 213 return false; |
214 } | 214 } |
215 | 215 |
216 if (create_dir && !file_util::PathExists(cur) && !file_util::CreateDirectory(c
ur)) | 216 if (create_dir && !file_util::PathExists(cur) && |
| 217 !file_util::CreateDirectory(cur)) |
217 return false; | 218 return false; |
218 | 219 |
219 *result = cur; | 220 *result = cur; |
220 return true; | 221 return true; |
221 } | 222 } |
222 | 223 |
223 // This cannot be done as a static initializer sadly since Visual Studio will | 224 // This cannot be done as a static initializer sadly since Visual Studio will |
224 // eliminate this object file if there is no direct entry point into it. | 225 // eliminate this object file if there is no direct entry point into it. |
225 void RegisterPathProvider() { | 226 void RegisterPathProvider() { |
226 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 227 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
227 } | 228 } |
228 | 229 |
229 } // namespace chrome | 230 } // namespace chrome |
230 | 231 |
OLD | NEW |