| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); | 76 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); |
| 77 create_dir = true; | 77 create_dir = true; |
| 78 break; | 78 break; |
| 79 case chrome::DIR_USER_DESKTOP: | 79 case chrome::DIR_USER_DESKTOP: |
| 80 if (!GetUserDesktop(&cur)) | 80 if (!GetUserDesktop(&cur)) |
| 81 return false; | 81 return false; |
| 82 break; | 82 break; |
| 83 case chrome::DIR_RESOURCES: | 83 case chrome::DIR_RESOURCES: |
| 84 if (!PathService::Get(chrome::DIR_APP, &cur)) | 84 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 85 return false; | 85 return false; |
| 86 cur = cur.Append(FILE_PATH_LITERAL("Resources")); | 86 cur = cur.Append(FILE_PATH_LITERAL("resources")); |
| 87 create_dir = true; | 87 create_dir = true; |
| 88 break; | 88 break; |
| 89 case chrome::DIR_INSPECTOR: | 89 case chrome::DIR_INSPECTOR: |
| 90 if (!PathService::Get(chrome::DIR_APP, &cur)) | 90 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 91 return false; | 91 return false; |
| 92 cur = cur.Append(FILE_PATH_LITERAL("Resources")); | 92 cur = cur.Append(FILE_PATH_LITERAL("resources")); |
| 93 cur = cur.Append(FILE_PATH_LITERAL("Inspector")); | 93 cur = cur.Append(FILE_PATH_LITERAL("inspector")); |
| 94 break; | 94 break; |
| 95 case chrome::DIR_THEMES: | 95 case chrome::DIR_THEMES: |
| 96 if (!PathService::Get(chrome::DIR_APP, &cur)) | 96 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 97 return false; | 97 return false; |
| 98 cur = cur.Append(FILE_PATH_LITERAL("themes")); | 98 cur = cur.Append(FILE_PATH_LITERAL("themes")); |
| 99 create_dir = true; | 99 create_dir = true; |
| 100 break; | 100 break; |
| 101 case chrome::DIR_LOCALES: | 101 case chrome::DIR_LOCALES: |
| 102 if (!PathService::Get(chrome::DIR_APP, &cur)) | 102 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 103 return false; | 103 return false; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return true; | 203 return true; |
| 204 } | 204 } |
| 205 | 205 |
| 206 // This cannot be done as a static initializer sadly since Visual Studio will | 206 // This cannot be done as a static initializer sadly since Visual Studio will |
| 207 // eliminate this object file if there is no direct entry point into it. | 207 // eliminate this object file if there is no direct entry point into it. |
| 208 void RegisterPathProvider() { | 208 void RegisterPathProvider() { |
| 209 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 209 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace chrome | 212 } // namespace chrome |
| OLD | NEW |