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

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

Issue 298063006: Make SdchManager per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bugs found through smoke testing and incorporated comments. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 13 matching lines...) Expand all
24 fraudulent_certificate_reporter_(NULL), 24 fraudulent_certificate_reporter_(NULL),
25 http_auth_handler_factory_(NULL), 25 http_auth_handler_factory_(NULL),
26 proxy_service_(NULL), 26 proxy_service_(NULL),
27 network_delegate_(NULL), 27 network_delegate_(NULL),
28 http_user_agent_settings_(NULL), 28 http_user_agent_settings_(NULL),
29 transport_security_state_(NULL), 29 transport_security_state_(NULL),
30 cert_transparency_verifier_(NULL), 30 cert_transparency_verifier_(NULL),
31 http_transaction_factory_(NULL), 31 http_transaction_factory_(NULL),
32 job_factory_(NULL), 32 job_factory_(NULL),
33 throttler_manager_(NULL), 33 throttler_manager_(NULL),
34 sdch_manager_(NULL),
34 url_requests_(new std::set<const URLRequest*>) { 35 url_requests_(new std::set<const URLRequest*>) {
35 } 36 }
36 37
37 URLRequestContext::~URLRequestContext() { 38 URLRequestContext::~URLRequestContext() {
38 AssertNoURLRequests(); 39 AssertNoURLRequests();
39 } 40 }
40 41
41 void URLRequestContext::CopyFrom(const URLRequestContext* other) { 42 void URLRequestContext::CopyFrom(const URLRequestContext* other) {
42 // Copy URLRequestContext parameters. 43 // Copy URLRequestContext parameters.
43 set_net_log(other->net_log_); 44 set_net_log(other->net_log_);
44 set_host_resolver(other->host_resolver_); 45 set_host_resolver(other->host_resolver_);
45 set_cert_verifier(other->cert_verifier_); 46 set_cert_verifier(other->cert_verifier_);
46 set_server_bound_cert_service(other->server_bound_cert_service_); 47 set_server_bound_cert_service(other->server_bound_cert_service_);
47 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter_); 48 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter_);
48 set_http_auth_handler_factory(other->http_auth_handler_factory_); 49 set_http_auth_handler_factory(other->http_auth_handler_factory_);
49 set_proxy_service(other->proxy_service_); 50 set_proxy_service(other->proxy_service_);
50 set_ssl_config_service(other->ssl_config_service_.get()); 51 set_ssl_config_service(other->ssl_config_service_.get());
51 set_network_delegate(other->network_delegate_); 52 set_network_delegate(other->network_delegate_);
52 set_http_server_properties(other->http_server_properties_); 53 set_http_server_properties(other->http_server_properties_);
53 set_cookie_store(other->cookie_store_.get()); 54 set_cookie_store(other->cookie_store_.get());
54 set_transport_security_state(other->transport_security_state_); 55 set_transport_security_state(other->transport_security_state_);
55 set_cert_transparency_verifier(other->cert_transparency_verifier_); 56 set_cert_transparency_verifier(other->cert_transparency_verifier_);
56 set_http_transaction_factory(other->http_transaction_factory_); 57 set_http_transaction_factory(other->http_transaction_factory_);
57 set_job_factory(other->job_factory_); 58 set_job_factory(other->job_factory_);
58 set_throttler_manager(other->throttler_manager_); 59 set_throttler_manager(other->throttler_manager_);
60 set_sdch_manager(other->sdch_manager_);
59 set_http_user_agent_settings(other->http_user_agent_settings_); 61 set_http_user_agent_settings(other->http_user_agent_settings_);
60 } 62 }
61 63
62 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams( 64 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams(
63 ) const { 65 ) const {
64 HttpTransactionFactory* transaction_factory = http_transaction_factory(); 66 HttpTransactionFactory* transaction_factory = http_transaction_factory();
65 if (!transaction_factory) 67 if (!transaction_factory)
66 return NULL; 68 return NULL;
67 HttpNetworkSession* network_session = transaction_factory->GetSession(); 69 HttpNetworkSession* network_session = transaction_factory->GetSession();
68 if (!network_session) 70 if (!network_session)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::debug::Alias(&num_requests); 102 base::debug::Alias(&num_requests);
101 base::debug::Alias(&has_delegate); 103 base::debug::Alias(&has_delegate);
102 base::debug::Alias(&load_flags); 104 base::debug::Alias(&load_flags);
103 base::debug::Alias(&stack_trace); 105 base::debug::Alias(&stack_trace);
104 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " 106 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
105 << request->url().spec().c_str() << "."; 107 << request->url().spec().c_str() << ".";
106 } 108 }
107 } 109 }
108 110
109 } // namespace net 111 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698