Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 9909019: Add schema chrome-extension-resource:// for extension resources (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make some test flaky for OSX Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/extensions/csp_validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 .Append(FILE_PATH_LITERAL("resources.pak")); 308 .Append(FILE_PATH_LITERAL("resources.pak"));
309 break; 309 break;
310 } 310 }
311 // If we're not bundled on mac, resources.pak should be next to the 311 // If we're not bundled on mac, resources.pak should be next to the
312 // binary (e.g., for unit tests). 312 // binary (e.g., for unit tests).
313 #endif 313 #endif
314 if (!PathService::Get(base::DIR_MODULE, &cur)) 314 if (!PathService::Get(base::DIR_MODULE, &cur))
315 return false; 315 return false;
316 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); 316 cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
317 break; 317 break;
318 case chrome::DIR_RESOURCES_EXTENSION:
319 if (!PathService::Get(base::DIR_MODULE, &cur))
320 return false;
321 cur = cur.Append(FILE_PATH_LITERAL("resources"))
322 .Append(FILE_PATH_LITERAL("extension"));
323 break;
318 #if defined(OS_CHROMEOS) 324 #if defined(OS_CHROMEOS)
319 case chrome::FILE_CHROMEOS_API: 325 case chrome::FILE_CHROMEOS_API:
320 if (!PathService::Get(base::DIR_MODULE, &cur)) 326 if (!PathService::Get(base::DIR_MODULE, &cur))
321 return false; 327 return false;
322 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); 328 cur = cur.Append(FILE_PATH_LITERAL("chromeos"));
323 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); 329 cur = cur.Append(FILE_PATH_LITERAL("libcros.so"));
324 break; 330 break;
325 #endif 331 #endif
326 // The following are only valid in the development environment, and 332 // The following are only valid in the development environment, and
327 // will fail if executed from an installed executable (because the 333 // will fail if executed from an installed executable (because the
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 return true; 436 return true;
431 } 437 }
432 438
433 // This cannot be done as a static initializer sadly since Visual Studio will 439 // This cannot be done as a static initializer sadly since Visual Studio will
434 // eliminate this object file if there is no direct entry point into it. 440 // eliminate this object file if there is no direct entry point into it.
435 void RegisterPathProvider() { 441 void RegisterPathProvider() {
436 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 442 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
437 } 443 }
438 444
439 } // namespace chrome 445 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/extensions/csp_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698