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

Side by Side Diff: net/url_request/url_request_context.cc

Issue 1239393003: Refactor main URLRequestContext creation to use URLRequestContextBuilder Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_context.h" 5 #include "net/url_request/url_request_context.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 22 matching lines...) Expand all
33 throttler_manager_(nullptr), 33 throttler_manager_(nullptr),
34 sdch_manager_(nullptr), 34 sdch_manager_(nullptr),
35 network_quality_estimator_(nullptr), 35 network_quality_estimator_(nullptr),
36 url_requests_(new std::set<const URLRequest*>) { 36 url_requests_(new std::set<const URLRequest*>) {
37 } 37 }
38 38
39 URLRequestContext::~URLRequestContext() { 39 URLRequestContext::~URLRequestContext() {
40 AssertNoURLRequests(); 40 AssertNoURLRequests();
41 } 41 }
42 42
43 URLRequestContextStorage* URLRequestContext::storage() {
44 return nullptr;
45 }
46
43 void URLRequestContext::CopyFrom(const URLRequestContext* other) { 47 void URLRequestContext::CopyFrom(const URLRequestContext* other) {
44 // Copy URLRequestContext parameters. 48 // Copy URLRequestContext parameters.
45 set_net_log(other->net_log_); 49 set_net_log(other->net_log_);
46 set_host_resolver(other->host_resolver_); 50 set_host_resolver(other->host_resolver_);
47 set_cert_verifier(other->cert_verifier_); 51 set_cert_verifier(other->cert_verifier_);
48 set_channel_id_service(other->channel_id_service_); 52 set_channel_id_service(other->channel_id_service_);
49 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter_); 53 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter_);
50 set_http_auth_handler_factory(other->http_auth_handler_factory_); 54 set_http_auth_handler_factory(other->http_auth_handler_factory_);
51 set_proxy_service(other->proxy_service_); 55 set_proxy_service(other->proxy_service_);
52 set_ssl_config_service(other->ssl_config_service_.get()); 56 set_ssl_config_service(other->ssl_config_service_.get());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 base::debug::Alias(&num_requests); 107 base::debug::Alias(&num_requests);
104 base::debug::Alias(&has_delegate); 108 base::debug::Alias(&has_delegate);
105 base::debug::Alias(&load_flags); 109 base::debug::Alias(&load_flags);
106 base::debug::Alias(&stack_trace); 110 base::debug::Alias(&stack_trace);
107 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " 111 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
108 << request->url().spec().c_str() << "."; 112 << request->url().spec().c_str() << ".";
109 } 113 }
110 } 114 }
111 115
112 } // namespace net 116 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698