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

Unified Diff: apps/shell/browser/shell_content_browser_client.cc

Issue 229733002: Toro: Move ExtensionProtocolHandler to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (extension-protocols) Created 6 years, 8 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
« no previous file with comments | « apps/shell/DEPS ('k') | apps/shell/browser/shell_extensions_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/browser/shell_content_browser_client.cc
diff --git a/apps/shell/browser/shell_content_browser_client.cc b/apps/shell/browser/shell_content_browser_client.cc
index dfafc535aab09b3b4a5d59d2f71908b7f5a216b0..ca9db4e8686fc7c58513bb6e871f253342b7597b 100644
--- a/apps/shell/browser/shell_content_browser_client.cc
+++ b/apps/shell/browser/shell_content_browser_client.cc
@@ -8,8 +8,6 @@
#include "apps/shell/browser/shell_browser_main_parts.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "base/command_line.h"
-#include "chrome/browser/extensions/extension_protocols.h"
-#include "chrome/browser/extensions/extension_resource_protocols.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h"
@@ -17,6 +15,7 @@
#include "content/public/common/url_constants.h"
#include "content/shell/browser/shell_browser_context.h"
#include "extensions/browser/extension_message_filter.h"
+#include "extensions/browser/extension_protocols.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/info_map.h"
#include "extensions/browser/process_map.h"
@@ -79,16 +78,15 @@ net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext(
content::BrowserContext* content_browser_context,
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
- // Handle chrome-extension: and chrome-extension-resource: requests.
+ // Handle only chrome-extension:// requests. app_shell does not support
+ // chrome-extension-resource:// requests (it does not store shared extension
+ // data in its installation directory).
extensions::InfoMap* extension_info_map =
browser_main_parts_->extension_system()->info_map();
(*protocol_handlers)[extensions::kExtensionScheme] =
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
- CreateExtensionProtocolHandler(Profile::REGULAR_PROFILE,
- extension_info_map));
- (*protocol_handlers)[extensions::kExtensionResourceScheme] =
- linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
- CreateExtensionResourceProtocolHandler());
+ extensions::CreateExtensionProtocolHandler(false /* is_incognito */,
+ extension_info_map));
// Let content::ShellBrowserContext handle the rest of the setup.
return browser_main_parts_->browser_context()->CreateRequestContext(
protocol_handlers, protocol_interceptors.Pass());
« no previous file with comments | « apps/shell/DEPS ('k') | apps/shell/browser/shell_extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698