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

Unified Diff: content/shell/shell_url_request_context_getter.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 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/shell_content_browser_client.cc ('k') | net/ftp/ftp_network_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_url_request_context_getter.cc
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc
index c529daf9d4afd0a4d05ea6a8501059c76da01a4a..3f5f6bcecadaca369ef74d33345831500c066094 100644
--- a/content/shell/shell_url_request_context_getter.cc
+++ b/content/shell/shell_url_request_context_getter.cc
@@ -19,7 +19,6 @@
#include "net/cookies/cookie_monster.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mapped_host_resolver.h"
-#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
@@ -28,6 +27,8 @@
#include "net/ssl/default_server_bound_cert_store.h"
#include "net/ssl/server_bound_cert_service.h"
#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"
@@ -175,14 +176,19 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
network_session_params, main_backend);
storage_->set_http_transaction_factory(main_cache);
-#if !defined(DISABLE_FTP_SUPPORT)
- storage_->set_ftp_transaction_factory(
- new net::FtpNetworkLayer(network_session_params.host_resolver));
-#endif
-
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
+ // Keep ProtocolHandlers added in sync with
+ // ShellContentBrowserClient::IsHandledURL().
InstallProtocolHandlers(job_factory.get(), &protocol_handlers_);
+ bool set_protocol = job_factory->SetProtocolHandler(
+ chrome::kDataScheme,
+ new net::DataProtocolHandler);
+ DCHECK(set_protocol);
+ set_protocol = job_factory->SetProtocolHandler(
+ chrome::kFileScheme,
+ new net::FileProtocolHandler);
+ DCHECK(set_protocol);
storage_->set_job_factory(job_factory.release());
}
« no previous file with comments | « content/shell/shell_content_browser_client.cc ('k') | net/ftp/ftp_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698