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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 22793018: <webview>: Implement support for package-local chrome-extension:// URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a comment Created 7 years, 3 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 | « chrome/browser/guestview/webview/webview_guest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index a096dd17c7b32a2df962dbdce61b56194fbd7778..f8d352996c372d8e513830a606f005cb51062ab1 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
+#include "chrome/browser/extensions/extension_protocols.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/chrome_network_delegate.h"
@@ -593,6 +594,15 @@ ProfileImplIOData::InitializeAppRequestContext(
network_delegate(),
ftp_factory_.get());
} else {
+ // TODO(fsamuel): It's always safe to install an extension protocol handler
+ // here because the decision whether to allow a resource load happens in
+ // ExtensionProtocolHandler::MaybeCreateJob. However, this code needs to be
+ // refactored so that it does not depend on whether or not the partition
+ // is in memory.
+ job_factory->SetProtocolHandler(
+ extensions::kExtensionScheme,
+ CreateExtensionProtocolHandler(is_incognito(),
+ GetExtensionInfoMap()));
top_job_factory = job_factory.PassAs<net::URLRequestJobFactory>();
}
context->SetJobFactory(top_job_factory.Pass());
« no previous file with comments | « chrome/browser/guestview/webview/webview_guest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698