| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 break; | 287 break; |
| 288 case chrome::DIR_TEST_TOOLS: | 288 case chrome::DIR_TEST_TOOLS: |
| 289 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) | 289 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) |
| 290 return false; | 290 return false; |
| 291 cur = cur.Append(FILE_PATH_LITERAL("chrome")); | 291 cur = cur.Append(FILE_PATH_LITERAL("chrome")); |
| 292 cur = cur.Append(FILE_PATH_LITERAL("tools")); | 292 cur = cur.Append(FILE_PATH_LITERAL("tools")); |
| 293 cur = cur.Append(FILE_PATH_LITERAL("test")); | 293 cur = cur.Append(FILE_PATH_LITERAL("test")); |
| 294 if (!file_util::PathExists(cur)) // we don't want to create this | 294 if (!file_util::PathExists(cur)) // we don't want to create this |
| 295 return false; | 295 return false; |
| 296 break; | 296 break; |
| 297 #if !defined(OS_MACOSX) && defined(OS_POSIX) | 297 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 298 case chrome::DIR_POLICY_FILES: { | 298 case chrome::DIR_POLICY_FILES: { |
| 299 #if defined(GOOGLE_CHROME_BUILD) | 299 #if defined(GOOGLE_CHROME_BUILD) |
| 300 cur = FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")); | 300 cur = FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")); |
| 301 #else | 301 #else |
| 302 cur = FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); | 302 cur = FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); |
| 303 #endif | 303 #endif |
| 304 if (!file_util::PathExists(cur)) // we don't want to create this | 304 if (!file_util::PathExists(cur)) // we don't want to create this |
| 305 return false; | 305 return false; |
| 306 break; | 306 break; |
| 307 } | 307 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 return true; | 340 return true; |
| 341 } | 341 } |
| 342 | 342 |
| 343 // This cannot be done as a static initializer sadly since Visual Studio will | 343 // This cannot be done as a static initializer sadly since Visual Studio will |
| 344 // eliminate this object file if there is no direct entry point into it. | 344 // eliminate this object file if there is no direct entry point into it. |
| 345 void RegisterPathProvider() { | 345 void RegisterPathProvider() { |
| 346 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 346 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace chrome | 349 } // namespace chrome |
| OLD | NEW |