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

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

Issue 1922403002: Move bool enable_brotli from HttpNetworkSession::Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittest fix Created 4 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_http_job.cc » ('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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 17 matching lines...) Expand all
28 cookie_store_(nullptr), 28 cookie_store_(nullptr),
29 transport_security_state_(nullptr), 29 transport_security_state_(nullptr),
30 cert_transparency_verifier_(nullptr), 30 cert_transparency_verifier_(nullptr),
31 http_transaction_factory_(nullptr), 31 http_transaction_factory_(nullptr),
32 job_factory_(nullptr), 32 job_factory_(nullptr),
33 throttler_manager_(nullptr), 33 throttler_manager_(nullptr),
34 backoff_manager_(nullptr), 34 backoff_manager_(nullptr),
35 sdch_manager_(nullptr), 35 sdch_manager_(nullptr),
36 network_quality_estimator_(nullptr), 36 network_quality_estimator_(nullptr),
37 url_requests_(new std::set<const URLRequest*>), 37 url_requests_(new std::set<const URLRequest*>),
38 has_known_mismatched_cookie_store_(false) {} 38 has_known_mismatched_cookie_store_(false),
39 enable_brotli_(false) {}
39 40
40 URLRequestContext::~URLRequestContext() { 41 URLRequestContext::~URLRequestContext() {
41 AssertNoURLRequests(); 42 AssertNoURLRequests();
42 } 43 }
43 44
44 void URLRequestContext::CopyFrom(const URLRequestContext* other) { 45 void URLRequestContext::CopyFrom(const URLRequestContext* other) {
45 // Copy URLRequestContext parameters. 46 // Copy URLRequestContext parameters.
46 set_net_log(other->net_log_); 47 set_net_log(other->net_log_);
47 set_host_resolver(other->host_resolver_); 48 set_host_resolver(other->host_resolver_);
48 set_cert_verifier(other->cert_verifier_); 49 set_cert_verifier(other->cert_verifier_);
49 set_channel_id_service(other->channel_id_service_); 50 set_channel_id_service(other->channel_id_service_);
50 set_http_auth_handler_factory(other->http_auth_handler_factory_); 51 set_http_auth_handler_factory(other->http_auth_handler_factory_);
51 set_proxy_service(other->proxy_service_); 52 set_proxy_service(other->proxy_service_);
52 set_ssl_config_service(other->ssl_config_service_.get()); 53 set_ssl_config_service(other->ssl_config_service_.get());
53 set_network_delegate(other->network_delegate_); 54 set_network_delegate(other->network_delegate_);
54 set_http_server_properties(other->http_server_properties_); 55 set_http_server_properties(other->http_server_properties_);
55 set_cookie_store(other->cookie_store_); 56 set_cookie_store(other->cookie_store_);
56 set_transport_security_state(other->transport_security_state_); 57 set_transport_security_state(other->transport_security_state_);
57 set_cert_transparency_verifier(other->cert_transparency_verifier_); 58 set_cert_transparency_verifier(other->cert_transparency_verifier_);
58 set_http_transaction_factory(other->http_transaction_factory_); 59 set_http_transaction_factory(other->http_transaction_factory_);
59 set_job_factory(other->job_factory_); 60 set_job_factory(other->job_factory_);
60 set_throttler_manager(other->throttler_manager_); 61 set_throttler_manager(other->throttler_manager_);
61 set_backoff_manager(other->backoff_manager_); 62 set_backoff_manager(other->backoff_manager_);
62 set_sdch_manager(other->sdch_manager_); 63 set_sdch_manager(other->sdch_manager_);
63 set_http_user_agent_settings(other->http_user_agent_settings_); 64 set_http_user_agent_settings(other->http_user_agent_settings_);
64 set_network_quality_estimator(other->network_quality_estimator_); 65 set_network_quality_estimator(other->network_quality_estimator_);
66 set_enable_brotli(other->enable_brotli_);
65 } 67 }
66 68
67 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams( 69 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams(
68 ) const { 70 ) const {
69 HttpTransactionFactory* transaction_factory = http_transaction_factory(); 71 HttpTransactionFactory* transaction_factory = http_transaction_factory();
70 if (!transaction_factory) 72 if (!transaction_factory)
71 return nullptr; 73 return nullptr;
72 HttpNetworkSession* network_session = transaction_factory->GetSession(); 74 HttpNetworkSession* network_session = transaction_factory->GetSession();
73 if (!network_session) 75 if (!network_session)
74 return nullptr; 76 return nullptr;
(...skipping 23 matching lines...) Expand all
98 int load_flags = request->load_flags(); 100 int load_flags = request->load_flags();
99 base::debug::Alias(url_buf); 101 base::debug::Alias(url_buf);
100 base::debug::Alias(&num_requests); 102 base::debug::Alias(&num_requests);
101 base::debug::Alias(&load_flags); 103 base::debug::Alias(&load_flags);
102 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " 104 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
103 << request->url().spec().c_str() << "."; 105 << request->url().spec().c_str() << ".";
104 } 106 }
105 } 107 }
106 108
107 } // namespace net 109 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698