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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 break; | 399 break; |
400 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS: | 400 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS: |
401 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 401 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
402 return false; | 402 return false; |
403 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); | 403 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); |
404 break; | 404 break; |
405 case chrome::FILE_DEFAULT_APP_ORDER: | 405 case chrome::FILE_DEFAULT_APP_ORDER: |
406 cur = base::FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName)); | 406 cur = base::FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName)); |
407 break; | 407 break; |
408 #endif | 408 #endif |
| 409 #if defined(ENABLE_MANAGED_USERS) |
| 410 case chrome::DIR_MANAGED_USERS_DEFAULT_APPS: |
| 411 if (!PathService::Get(chrome::DIR_EXTERNAL_EXTENSIONS, &cur)) |
| 412 return false; |
| 413 cur = cur.Append(FILE_PATH_LITERAL("managed_users")); |
| 414 break; |
| 415 #endif |
409 // The following are only valid in the development environment, and | 416 // The following are only valid in the development environment, and |
410 // will fail if executed from an installed executable (because the | 417 // will fail if executed from an installed executable (because the |
411 // generated path won't exist). | 418 // generated path won't exist). |
412 case chrome::DIR_GEN_TEST_DATA: | 419 case chrome::DIR_GEN_TEST_DATA: |
413 if (!PathService::Get(base::DIR_MODULE, &cur)) | 420 if (!PathService::Get(base::DIR_MODULE, &cur)) |
414 return false; | 421 return false; |
415 cur = cur.Append(FILE_PATH_LITERAL("test_data")); | 422 cur = cur.Append(FILE_PATH_LITERAL("test_data")); |
416 if (!file_util::PathExists(cur)) // We don't want to create this. | 423 if (!file_util::PathExists(cur)) // We don't want to create this. |
417 return false; | 424 return false; |
418 break; | 425 break; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 return true; | 520 return true; |
514 } | 521 } |
515 | 522 |
516 // This cannot be done as a static initializer sadly since Visual Studio will | 523 // This cannot be done as a static initializer sadly since Visual Studio will |
517 // eliminate this object file if there is no direct entry point into it. | 524 // eliminate this object file if there is no direct entry point into it. |
518 void RegisterPathProvider() { | 525 void RegisterPathProvider() { |
519 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 526 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
520 } | 527 } |
521 | 528 |
522 } // namespace chrome | 529 } // namespace chrome |
OLD | NEW |