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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); | 409 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); |
410 break; | 410 break; |
411 #endif | 411 #endif |
412 #if defined(OS_LINUX) && defined(ENABLE_MANAGED_USERS) | 412 #if defined(OS_LINUX) && defined(ENABLE_MANAGED_USERS) |
413 case chrome::DIR_MANAGED_USERS_DEFAULT_APPS: | 413 case chrome::DIR_MANAGED_USERS_DEFAULT_APPS: |
414 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur)) | 414 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur)) |
415 return false; | 415 return false; |
416 cur = cur.Append(FILE_PATH_LITERAL("managed_users")); | 416 cur = cur.Append(FILE_PATH_LITERAL("managed_users")); |
417 break; | 417 break; |
418 #endif | 418 #endif |
| 419 case chrome::FILE_LIBADDRESSINPUT_CACHE: |
| 420 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 421 return false; |
| 422 cur = cur.Append(FILE_PATH_LITERAL("libaddressinput")); |
| 423 break; |
419 // The following are only valid in the development environment, and | 424 // The following are only valid in the development environment, and |
420 // will fail if executed from an installed executable (because the | 425 // will fail if executed from an installed executable (because the |
421 // generated path won't exist). | 426 // generated path won't exist). |
422 case chrome::DIR_GEN_TEST_DATA: | 427 case chrome::DIR_GEN_TEST_DATA: |
423 if (!PathService::Get(base::DIR_MODULE, &cur)) | 428 if (!PathService::Get(base::DIR_MODULE, &cur)) |
424 return false; | 429 return false; |
425 cur = cur.Append(FILE_PATH_LITERAL("test_data")); | 430 cur = cur.Append(FILE_PATH_LITERAL("test_data")); |
426 if (!base::PathExists(cur)) // We don't want to create this. | 431 if (!base::PathExists(cur)) // We don't want to create this. |
427 return false; | 432 return false; |
428 break; | 433 break; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 return true; | 530 return true; |
526 } | 531 } |
527 | 532 |
528 // This cannot be done as a static initializer sadly since Visual Studio will | 533 // This cannot be done as a static initializer sadly since Visual Studio will |
529 // eliminate this object file if there is no direct entry point into it. | 534 // eliminate this object file if there is no direct entry point into it. |
530 void RegisterPathProvider() { | 535 void RegisterPathProvider() { |
531 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 536 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
532 } | 537 } |
533 | 538 |
534 } // namespace chrome | 539 } // namespace chrome |
OLD | NEW |