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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 return false; | 452 return false; |
453 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences")); | 453 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences")); |
454 char* login = getlogin(); | 454 char* login = getlogin(); |
455 if (!login) | 455 if (!login) |
456 return false; | 456 return false; |
457 cur = cur.AppendASCII(login); | 457 cur = cur.AppendASCII(login); |
458 if (!base::PathExists(cur)) // We don't want to create this. | 458 if (!base::PathExists(cur)) // We don't want to create this. |
459 return false; | 459 return false; |
460 break; | 460 break; |
461 } | 461 } |
462 case chrome::DIR_USER_LIBRARY { | |
463 if (!GetLocalLibraryDirectory(&cur)) | |
Mark Mentovai
2014/02/25 14:02:50
The comment in the .h said that you wanted the use
| |
464 return false; | |
465 if (!base::PathExists(cur)) // We don't want to create this. | |
466 return false; | |
467 break; | |
468 } | |
462 #endif | 469 #endif |
463 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 470 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
464 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { | 471 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { |
465 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 472 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
466 return false; | 473 return false; |
467 cur = cur.Append(FILE_PATH_LITERAL("External Extensions")); | 474 cur = cur.Append(FILE_PATH_LITERAL("External Extensions")); |
468 break; | 475 break; |
469 } | 476 } |
470 #endif | 477 #endif |
471 #if defined(OS_LINUX) | 478 #if defined(OS_LINUX) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 return true; | 552 return true; |
546 } | 553 } |
547 | 554 |
548 // This cannot be done as a static initializer sadly since Visual Studio will | 555 // This cannot be done as a static initializer sadly since Visual Studio will |
549 // eliminate this object file if there is no direct entry point into it. | 556 // eliminate this object file if there is no direct entry point into it. |
550 void RegisterPathProvider() { | 557 void RegisterPathProvider() { |
551 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 558 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
552 } | 559 } |
553 | 560 |
554 } // namespace chrome | 561 } // namespace chrome |
OLD | NEW |