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/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) | 401 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) |
402 return false; | 402 return false; |
403 #else | 403 #else |
404 // If we're not bundled on mac or Android, resources.pak should be next | 404 // If we're not bundled on mac or Android, resources.pak should be next |
405 // to the binary (e.g., for unit tests). | 405 // to the binary (e.g., for unit tests). |
406 if (!PathService::Get(base::DIR_MODULE, &cur)) | 406 if (!PathService::Get(base::DIR_MODULE, &cur)) |
407 return false; | 407 return false; |
408 #endif | 408 #endif |
409 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); | 409 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); |
410 break; | 410 break; |
411 case chrome::DIR_RESOURCES_EXTENSION: | |
412 if (!PathService::Get(base::DIR_MODULE, &cur)) | |
413 return false; | |
414 cur = cur.Append(FILE_PATH_LITERAL("resources")) | |
415 .Append(FILE_PATH_LITERAL("extension")); | |
416 break; | |
417 #if defined(OS_CHROMEOS) | 411 #if defined(OS_CHROMEOS) |
418 case chrome::DIR_CHROMEOS_WALLPAPERS: | 412 case chrome::DIR_CHROMEOS_WALLPAPERS: |
419 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 413 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
420 return false; | 414 return false; |
421 cur = cur.Append(FILE_PATH_LITERAL("wallpapers")); | 415 cur = cur.Append(FILE_PATH_LITERAL("wallpapers")); |
422 break; | 416 break; |
423 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS: | 417 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS: |
424 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 418 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
425 return false; | 419 return false; |
426 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails")); | 420 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails")); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 600 |
607 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
608 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 602 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
609 } | 603 } |
610 | 604 |
611 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 605 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
612 return g_invalid_specified_user_data_dir.Get(); | 606 return g_invalid_specified_user_data_dir.Get(); |
613 } | 607 } |
614 | 608 |
615 } // namespace chrome | 609 } // namespace chrome |
OLD | NEW |