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

Unified Diff: ios/web/shell/shell_url_request_context_getter.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Lots of fixes driven by try jobs. Created 5 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: ios/web/shell/shell_url_request_context_getter.cc
diff --git a/ios/web/shell/shell_url_request_context_getter.cc b/ios/web/shell/shell_url_request_context_getter.cc
index 8cffb68fae6fa84c9860aa7764ee0a0b8d4e6c5c..9af7dab702d7cc51258e2ad44d437420a6488ec0 100644
--- a/ios/web/shell/shell_url_request_context_getter.cc
+++ b/ios/web/shell/shell_url_request_context_getter.cc
@@ -7,6 +7,7 @@
#include "base/base_paths.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/threading/worker_pool.h"
#include "ios/net/cookies/cookie_store_ios.h"
@@ -83,7 +84,8 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
std::string user_agent = web::GetWebClient()->GetUserAgent(false);
storage_->set_http_user_agent_settings(
- new net::StaticHttpUserAgentSettings("en-us,en", user_agent));
+ scoped_ptr<net::HttpUserAgentSettings>(
+ new net::StaticHttpUserAgentSettings("en-us,en", user_agent)));
storage_->set_proxy_service(
net::ProxyService::CreateUsingSystemProxyResolver(
proxy_config_service_.release(), 0,
@@ -91,11 +93,11 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
- net::TransportSecurityState* transport_security_state =
- new net::TransportSecurityState();
- storage_->set_transport_security_state(transport_security_state);
+ storage_->set_transport_security_state(
+ make_scoped_ptr(new net::TransportSecurityState()));
transport_security_persister_.reset(new net::TransportSecurityPersister(
- transport_security_state, base_path_, file_task_runner_, false));
+ url_request_context_->transport_security_state(), base_path_,
+ file_task_runner_, false));
storage_->set_channel_id_service(make_scoped_ptr(
new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr),
base::WorkerPool::GetTaskRunner(true))));
@@ -135,9 +137,9 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
net::CACHE_BACKEND_DEFAULT,
cache_path, 0, cache_task_runner_);
- net::HttpCache* main_cache =
- new net::HttpCache(network_session_params, main_backend);
- storage_->set_http_transaction_factory(main_cache);
+ storage_->set_http_transaction_factory(
+ scoped_ptr<net::HttpTransactionFactory>(
+ new net::HttpCache(network_session_params, main_backend)));
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
@@ -145,7 +147,7 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
job_factory->SetProtocolHandler("data", new net::DataProtocolHandler);
DCHECK(set_protocol);
- storage_->set_job_factory(job_factory.release());
+ storage_->set_job_factory(job_factory.Pass());
}
return url_request_context_.get();

Powered by Google App Engine
This is Rietveld 408576698