| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 return false; | 291 return false; |
| 292 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); | 292 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); |
| 293 break; | 293 break; |
| 294 #if defined(OS_CHROMEOS) | 294 #if defined(OS_CHROMEOS) |
| 295 case chrome::FILE_CHROMEOS_API: | 295 case chrome::FILE_CHROMEOS_API: |
| 296 if (!PathService::Get(base::DIR_MODULE, &cur)) | 296 if (!PathService::Get(base::DIR_MODULE, &cur)) |
| 297 return false; | 297 return false; |
| 298 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); | 298 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); |
| 299 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); | 299 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); |
| 300 break; | 300 break; |
| 301 case chrome::DIR_USER_POLICY: |
| 302 cur = FilePath(FILE_PATH_LITERAL("/home/chronos/root/enterprise")); |
| 303 break; |
| 301 #endif | 304 #endif |
| 302 // The following are only valid in the development environment, and | 305 // The following are only valid in the development environment, and |
| 303 // will fail if executed from an installed executable (because the | 306 // will fail if executed from an installed executable (because the |
| 304 // generated path won't exist). | 307 // generated path won't exist). |
| 305 case chrome::DIR_TEST_DATA: | 308 case chrome::DIR_TEST_DATA: |
| 306 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) | 309 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) |
| 307 return false; | 310 return false; |
| 308 cur = cur.Append(FILE_PATH_LITERAL("chrome")); | 311 cur = cur.Append(FILE_PATH_LITERAL("chrome")); |
| 309 cur = cur.Append(FILE_PATH_LITERAL("test")); | 312 cur = cur.Append(FILE_PATH_LITERAL("test")); |
| 310 cur = cur.Append(FILE_PATH_LITERAL("data")); | 313 cur = cur.Append(FILE_PATH_LITERAL("data")); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return true; | 390 return true; |
| 388 } | 391 } |
| 389 | 392 |
| 390 // This cannot be done as a static initializer sadly since Visual Studio will | 393 // This cannot be done as a static initializer sadly since Visual Studio will |
| 391 // eliminate this object file if there is no direct entry point into it. | 394 // eliminate this object file if there is no direct entry point into it. |
| 392 void RegisterPathProvider() { | 395 void RegisterPathProvider() { |
| 393 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 396 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 394 } | 397 } |
| 395 | 398 |
| 396 } // namespace chrome | 399 } // namespace chrome |
| OLD | NEW |