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

Unified Diff: content/shell/browser/shell_url_request_context_getter.cc

Issue 282103004: Rename ProtocolInterceptJobFactory and make it not use ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to jam's comments (And a merge) Created 6 years, 7 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 | « content/shell/browser/shell_url_request_context_getter.h ('k') | net/net.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_url_request_context_getter.cc
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index 084b017f059ade1f8dd074dcb5bbbd8da555d3cc..95a8ba4788eb7bd84a850ab82b0775c0f214e63a 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -32,10 +32,10 @@
#include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/file_protocol_handler.h"
-#include "net/url_request/protocol_intercept_job_factory.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h"
+#include "net/url_request/url_request_intercepting_job_factory.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "url/url_constants.h"
@@ -64,14 +64,14 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter(
base::MessageLoop* io_loop,
base::MessageLoop* file_loop,
ProtocolHandlerMap* protocol_handlers,
- ProtocolHandlerScopedVector protocol_interceptors,
+ URLRequestInterceptorScopedVector request_interceptors,
net::NetLog* net_log)
: ignore_certificate_errors_(ignore_certificate_errors),
base_path_(base_path),
io_loop_(io_loop),
file_loop_(file_loop),
net_log_(net_log),
- protocol_interceptors_(protocol_interceptors.Pass()) {
+ request_interceptors_(request_interceptors.Pass()) {
// Must first be created on the UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -104,8 +104,7 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
url_request_context_->set_network_delegate(network_delegate_.get());
storage_.reset(
new net::URLRequestContextStorage(url_request_context_.get()));
- storage_->set_cookie_store(
- content::CreateCookieStore(content::CookieStoreConfig()));
+ storage_->set_cookie_store(CreateCookieStore(CookieStoreConfig()));
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
@@ -212,22 +211,21 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
set_protocol = job_factory->SetProtocolHandler(
url::kFileScheme,
new net::FileProtocolHandler(
- content::BrowserThread::GetBlockingPool()->
- GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
+ BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
DCHECK(set_protocol);
// Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory =
job_factory.PassAs<net::URLRequestJobFactory>();
- for (ProtocolHandlerScopedVector::reverse_iterator i =
- protocol_interceptors_.rbegin();
- i != protocol_interceptors_.rend();
+ for (URLRequestInterceptorScopedVector::reverse_iterator i =
+ request_interceptors_.rbegin();
+ i != request_interceptors_.rend();
++i) {
- top_job_factory.reset(new net::ProtocolInterceptJobFactory(
+ top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
top_job_factory.Pass(), make_scoped_ptr(*i)));
}
- protocol_interceptors_.weak_clear();
+ request_interceptors_.weak_clear();
storage_->set_job_factory(top_job_factory.release());
}
« no previous file with comments | « content/shell/browser/shell_url_request_context_getter.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698