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

Unified Diff: trunk/src/chrome/browser/chrome_content_browser_client.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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: trunk/src/chrome/browser/chrome_content_browser_client.cc
===================================================================
--- trunk/src/chrome/browser/chrome_content_browser_client.cc (revision 219785)
+++ trunk/src/chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -116,7 +116,6 @@
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/child_process_security_policy.h"
-#include "content/public/browser/cookie_store_factory.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_context.h"
@@ -124,7 +123,6 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/child_process_host.h"
-#include "content/public/common/content_constants.h"
#include "content/public/common/content_descriptors.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/constants.h"
@@ -135,7 +133,6 @@
#include "net/base/mime_util.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_options.h"
-#include "net/cookies/cookie_store.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
#include "ui/base/l10n/l10n_util.h"
@@ -1653,6 +1650,18 @@
return allow;
}
+net::URLRequestContext*
+ChromeContentBrowserClient::OverrideRequestContextForURL(
+ const GURL& url, content::ResourceContext* context) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (url.SchemeIs(extensions::kExtensionScheme)) {
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
+ return io_data->extensions_request_context();
+ }
+
+ return NULL;
+}
+
QuotaPermissionContext*
ChromeContentBrowserClient::CreateQuotaPermissionContext() {
return new ChromeQuotaPermissionContext();
« no previous file with comments | « trunk/src/chrome/browser/chrome_content_browser_client.h ('k') | trunk/src/chrome/browser/diagnostics/sqlite_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698