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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 .Append(FILE_PATH_LITERAL("resources.pak")); | 286 .Append(FILE_PATH_LITERAL("resources.pak")); |
287 break; | 287 break; |
288 } | 288 } |
289 // If we're not bundled on mac, resources.pak should be next to the | 289 // If we're not bundled on mac, resources.pak should be next to the |
290 // binary (e.g., for unit tests). | 290 // binary (e.g., for unit tests). |
291 #endif | 291 #endif |
292 if (!PathService::Get(base::DIR_MODULE, &cur)) | 292 if (!PathService::Get(base::DIR_MODULE, &cur)) |
293 return false; | 293 return false; |
294 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); | 294 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); |
295 break; | 295 break; |
| 296 case chrome::DIR_RESOURCES_EXTENSION: |
| 297 if (!PathService::Get(base::DIR_MODULE, &cur)) |
| 298 return false; |
| 299 cur = cur.Append(FILE_PATH_LITERAL("resources")) |
| 300 .Append(FILE_PATH_LITERAL("extension")); |
| 301 break; |
296 #if defined(OS_CHROMEOS) | 302 #if defined(OS_CHROMEOS) |
297 case chrome::FILE_CHROMEOS_API: | 303 case chrome::FILE_CHROMEOS_API: |
298 if (!PathService::Get(base::DIR_MODULE, &cur)) | 304 if (!PathService::Get(base::DIR_MODULE, &cur)) |
299 return false; | 305 return false; |
300 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); | 306 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); |
301 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); | 307 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); |
302 break; | 308 break; |
303 #endif | 309 #endif |
304 // The following are only valid in the development environment, and | 310 // The following are only valid in the development environment, and |
305 // will fail if executed from an installed executable (because the | 311 // will fail if executed from an installed executable (because the |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 return true; | 408 return true; |
403 } | 409 } |
404 | 410 |
405 // This cannot be done as a static initializer sadly since Visual Studio will | 411 // This cannot be done as a static initializer sadly since Visual Studio will |
406 // eliminate this object file if there is no direct entry point into it. | 412 // eliminate this object file if there is no direct entry point into it. |
407 void RegisterPathProvider() { | 413 void RegisterPathProvider() { |
408 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 414 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
409 } | 415 } |
410 | 416 |
411 } // namespace chrome | 417 } // namespace chrome |
OLD | NEW |