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

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

Issue 731593003: Disable channel id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_builder.h ('k') | no next file » | 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_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 URLRequestContextBuilder::URLRequestContextBuilder() 208 URLRequestContextBuilder::URLRequestContextBuilder()
209 : data_enabled_(false), 209 : data_enabled_(false),
210 #if !defined(DISABLE_FILE_SUPPORT) 210 #if !defined(DISABLE_FILE_SUPPORT)
211 file_enabled_(false), 211 file_enabled_(false),
212 #endif 212 #endif
213 #if !defined(DISABLE_FTP_SUPPORT) 213 #if !defined(DISABLE_FTP_SUPPORT)
214 ftp_enabled_(false), 214 ftp_enabled_(false),
215 #endif 215 #endif
216 http_cache_enabled_(true), 216 http_cache_enabled_(true),
217 throttling_enabled_(false) { 217 throttling_enabled_(false),
218 channel_id_enabled_(true) {
218 } 219 }
219 220
220 URLRequestContextBuilder::~URLRequestContextBuilder() {} 221 URLRequestContextBuilder::~URLRequestContextBuilder() {}
221 222
222 void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) { 223 void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) {
223 http_cache_enabled_ = true; 224 http_cache_enabled_ = true;
224 http_cache_params_ = params; 225 http_cache_params_ = params;
225 } 226 }
226 227
227 void URLRequestContextBuilder::DisableHttpCache() { 228 void URLRequestContextBuilder::DisableHttpCache() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 net::HttpAuthHandlerRegistryFactory::CreateDefault( 290 net::HttpAuthHandlerRegistryFactory::CreateDefault(
290 context->host_resolver()); 291 context->host_resolver());
291 for (size_t i = 0; i < extra_http_auth_handlers_.size(); ++i) { 292 for (size_t i = 0; i < extra_http_auth_handlers_.size(); ++i) {
292 http_auth_handler_registry_factory->RegisterSchemeFactory( 293 http_auth_handler_registry_factory->RegisterSchemeFactory(
293 extra_http_auth_handlers_[i].scheme, 294 extra_http_auth_handlers_[i].scheme,
294 extra_http_auth_handlers_[i].factory); 295 extra_http_auth_handlers_[i].factory);
295 } 296 }
296 storage->set_http_auth_handler_factory(http_auth_handler_registry_factory); 297 storage->set_http_auth_handler_factory(http_auth_handler_registry_factory);
297 storage->set_cookie_store(new CookieMonster(NULL, NULL)); 298 storage->set_cookie_store(new CookieMonster(NULL, NULL));
298 299
299 // TODO(mmenke): This always creates a file thread, even when it ends up 300 if (channel_id_enabled_) {
300 // not being used. Consider lazily creating the thread. 301 // TODO(mmenke): This always creates a file thread, even when it ends up
301 storage->set_channel_id_service( 302 // not being used. Consider lazily creating the thread.
302 new ChannelIDService( 303 storage->set_channel_id_service(
303 new DefaultChannelIDStore(NULL), 304 new ChannelIDService(
304 context->GetFileThread()->message_loop_proxy())); 305 new DefaultChannelIDStore(NULL),
306 context->GetFileThread()->message_loop_proxy()));
307 }
305 308
306 storage->set_transport_security_state(new net::TransportSecurityState()); 309 storage->set_transport_security_state(new net::TransportSecurityState());
307 if (!transport_security_persister_path_.empty()) { 310 if (!transport_security_persister_path_.empty()) {
308 context->set_transport_security_persister( 311 context->set_transport_security_persister(
309 make_scoped_ptr<TransportSecurityPersister>( 312 make_scoped_ptr<TransportSecurityPersister>(
310 new TransportSecurityPersister( 313 new TransportSecurityPersister(
311 context->transport_security_state(), 314 context->transport_security_state(),
312 transport_security_persister_path_, 315 transport_security_persister_path_,
313 context->GetFileThread()->message_loop_proxy(), 316 context->GetFileThread()->message_loop_proxy(),
314 false))); 317 false)));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 #endif // !defined(DISABLE_FTP_SUPPORT) 404 #endif // !defined(DISABLE_FTP_SUPPORT)
402 405
403 storage->set_job_factory(job_factory); 406 storage->set_job_factory(job_factory);
404 407
405 // TODO(willchan): Support sdch. 408 // TODO(willchan): Support sdch.
406 409
407 return context; 410 return context;
408 } 411 }
409 412
410 } // namespace net 413 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698