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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 12304013: Introduce Image loader extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index 247eecca860406511bf7ac5ca619431fb23cee94..cf1f4daaf11cd8f2b19deb4782c1c8df4b01897f 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -254,6 +254,22 @@ void ComponentLoader::AddFileManagerExtension() {
#endif // defined(FILE_MANAGER_EXTENSION)
}
+void ComponentLoader::AddImageLoaderExtension() {
+#if defined(IMAGE_LOADER_EXTENSION)
+#ifndef NDEBUG
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kImageLoaderExtensionPath)) {
+ base::FilePath image_loader_extension_path(
+ command_line->GetSwitchValuePath(switches::kImageLoaderExtensionPath));
+ Add(IDR_IMAGE_LOADER_MANIFEST, image_loader_extension_path);
+ return;
+ }
+#endif // NDEBUG
+ Add(IDR_IMAGE_LOADER_MANIFEST,
+ base::FilePath(FILE_PATH_LITERAL("image_loader")));
+#endif // defined(IMAGE_LOADER_EXTENSION)
+}
+
#if defined(OS_CHROMEOS)
void ComponentLoader::AddGaiaAuthExtension() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
@@ -390,6 +406,7 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
}
AddFileManagerExtension();
+ AddImageLoaderExtension();
#if defined(ENABLE_SETTINGS_APP)
Add(IDR_SETTINGS_APP_MANIFEST,
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | chrome/browser/resources/component_extension_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698