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

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

Issue 10704021: Switched from having one URLRequestJobFactory per profile to having one per context. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed merge with NetworkDelegate cl Created 8 years, 6 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/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index c33f78c2c4b2fbdacaa4c59c3bbeffe6e40468c9..7128a0bedad30e84c0d12310dcb8d299d4834c64 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -27,6 +27,7 @@
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
#include "net/http/http_server_properties_impl.h"
+#include "net/url_request/url_request_job_factory.h"
#include "webkit/database/database_tracker.h"
using content::BrowserThread;
@@ -246,8 +247,19 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
main_context->set_chrome_url_data_manager_backend(
chrome_url_data_manager_backend());
- main_context->set_job_factory(job_factory());
- extensions_context->set_job_factory(job_factory());
+ main_job_factory_.reset(new net::URLRequestJobFactory);
+ extensions_job_factory_.reset(new net::URLRequestJobFactory);
+
+ net::URLRequestJobFactory* job_factories[2];
+ job_factories[0] = main_job_factory_.get();
+ job_factories[1] = extensions_job_factory_.get();
+
+ for (int i = 0; i < 2; i++) {
+ SetUpJobFactoryDefaults(job_factories[i]);
+ }
+
+ main_context->set_job_factory(main_job_factory_.get());
+ extensions_context->set_job_factory(extensions_job_factory_.get());
}
ChromeURLRequestContext*

Powered by Google App Engine
This is Rietveld 408576698