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

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

Issue 356713005: Rename ServerBoundCert => ChannelID to reflect the current name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix cookies_list.js Created 6 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 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_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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "net/base/cache_type.h" 15 #include "net/base/cache_type.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/base/network_delegate.h" 17 #include "net/base/network_delegate.h"
18 #include "net/cert/cert_verifier.h" 18 #include "net/cert/cert_verifier.h"
19 #include "net/cookies/cookie_monster.h" 19 #include "net/cookies/cookie_monster.h"
20 #include "net/dns/host_resolver.h" 20 #include "net/dns/host_resolver.h"
21 #include "net/ftp/ftp_network_layer.h" 21 #include "net/ftp/ftp_network_layer.h"
22 #include "net/http/http_auth_handler_factory.h" 22 #include "net/http/http_auth_handler_factory.h"
23 #include "net/http/http_cache.h" 23 #include "net/http/http_cache.h"
24 #include "net/http/http_network_layer.h" 24 #include "net/http/http_network_layer.h"
25 #include "net/http/http_network_session.h" 25 #include "net/http/http_network_session.h"
26 #include "net/http/http_server_properties_impl.h" 26 #include "net/http/http_server_properties_impl.h"
27 #include "net/http/transport_security_persister.h" 27 #include "net/http/transport_security_persister.h"
28 #include "net/http/transport_security_state.h" 28 #include "net/http/transport_security_state.h"
29 #include "net/ssl/default_server_bound_cert_store.h" 29 #include "net/ssl/channel_id_service.h"
30 #include "net/ssl/server_bound_cert_service.h" 30 #include "net/ssl/default_channel_id_store.h"
31 #include "net/ssl/ssl_config_service_defaults.h" 31 #include "net/ssl/ssl_config_service_defaults.h"
32 #include "net/url_request/data_protocol_handler.h" 32 #include "net/url_request/data_protocol_handler.h"
33 #include "net/url_request/static_http_user_agent_settings.h" 33 #include "net/url_request/static_http_user_agent_settings.h"
34 #include "net/url_request/url_request_context.h" 34 #include "net/url_request/url_request_context.h"
35 #include "net/url_request/url_request_context_storage.h" 35 #include "net/url_request/url_request_context_storage.h"
36 #include "net/url_request/url_request_job_factory_impl.h" 36 #include "net/url_request/url_request_job_factory_impl.h"
37 #include "net/url_request/url_request_throttler_manager.h" 37 #include "net/url_request/url_request_throttler_manager.h"
38 38
39 #if !defined(DISABLE_FILE_SUPPORT) 39 #if !defined(DISABLE_FILE_SUPPORT)
40 #include "net/url_request/file_protocol_handler.h" 40 #include "net/url_request/file_protocol_handler.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 for (size_t i = 0; i < extra_http_auth_handlers_.size(); ++i) { 293 for (size_t i = 0; i < extra_http_auth_handlers_.size(); ++i) {
294 http_auth_handler_registry_factory->RegisterSchemeFactory( 294 http_auth_handler_registry_factory->RegisterSchemeFactory(
295 extra_http_auth_handlers_[i].scheme, 295 extra_http_auth_handlers_[i].scheme,
296 extra_http_auth_handlers_[i].factory); 296 extra_http_auth_handlers_[i].factory);
297 } 297 }
298 storage->set_http_auth_handler_factory(http_auth_handler_registry_factory); 298 storage->set_http_auth_handler_factory(http_auth_handler_registry_factory);
299 storage->set_cookie_store(new CookieMonster(NULL, NULL)); 299 storage->set_cookie_store(new CookieMonster(NULL, NULL));
300 300
301 // TODO(mmenke): This always creates a file thread, even when it ends up 301 // TODO(mmenke): This always creates a file thread, even when it ends up
302 // not being used. Consider lazily creating the thread. 302 // not being used. Consider lazily creating the thread.
303 storage->set_server_bound_cert_service( 303 storage->set_channel_id_service(
304 new ServerBoundCertService( 304 new ChannelIDService(
305 new DefaultServerBoundCertStore(NULL), 305 new DefaultChannelIDStore(NULL),
306 context->GetFileThread()->message_loop_proxy())); 306 context->GetFileThread()->message_loop_proxy()));
307 307
308 storage->set_transport_security_state(new net::TransportSecurityState()); 308 storage->set_transport_security_state(new net::TransportSecurityState());
309 if (!transport_security_persister_path_.empty()) { 309 if (!transport_security_persister_path_.empty()) {
310 context->set_transport_security_persister( 310 context->set_transport_security_persister(
311 make_scoped_ptr<TransportSecurityPersister>( 311 make_scoped_ptr<TransportSecurityPersister>(
312 new TransportSecurityPersister( 312 new TransportSecurityPersister(
313 context->transport_security_state(), 313 context->transport_security_state(),
314 transport_security_persister_path_, 314 transport_security_persister_path_,
315 context->GetFileThread()->message_loop_proxy(), 315 context->GetFileThread()->message_loop_proxy(),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 network_session_params.testing_fixed_https_port = 348 network_session_params.testing_fixed_https_port =
349 http_network_session_params_.testing_fixed_https_port; 349 http_network_session_params_.testing_fixed_https_port;
350 network_session_params.use_alternate_protocols = 350 network_session_params.use_alternate_protocols =
351 http_network_session_params_.use_alternate_protocols; 351 http_network_session_params_.use_alternate_protocols;
352 network_session_params.trusted_spdy_proxy = 352 network_session_params.trusted_spdy_proxy =
353 http_network_session_params_.trusted_spdy_proxy; 353 http_network_session_params_.trusted_spdy_proxy;
354 network_session_params.next_protos = http_network_session_params_.next_protos; 354 network_session_params.next_protos = http_network_session_params_.next_protos;
355 355
356 HttpTransactionFactory* http_transaction_factory = NULL; 356 HttpTransactionFactory* http_transaction_factory = NULL;
357 if (http_cache_enabled_) { 357 if (http_cache_enabled_) {
358 network_session_params.server_bound_cert_service = 358 network_session_params.channel_id_service =
359 context->server_bound_cert_service(); 359 context->channel_id_service();
360 HttpCache::BackendFactory* http_cache_backend = NULL; 360 HttpCache::BackendFactory* http_cache_backend = NULL;
361 if (http_cache_params_.type == HttpCacheParams::DISK) { 361 if (http_cache_params_.type == HttpCacheParams::DISK) {
362 http_cache_backend = new HttpCache::DefaultBackend( 362 http_cache_backend = new HttpCache::DefaultBackend(
363 DISK_CACHE, 363 DISK_CACHE,
364 net::CACHE_BACKEND_DEFAULT, 364 net::CACHE_BACKEND_DEFAULT,
365 http_cache_params_.path, 365 http_cache_params_.path,
366 http_cache_params_.max_size, 366 http_cache_params_.max_size,
367 context->GetCacheThread()->message_loop_proxy().get()); 367 context->GetCacheThread()->message_loop_proxy().get());
368 } else { 368 } else {
369 http_cache_backend = 369 http_cache_backend =
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 #endif // !defined(DISABLE_FTP_SUPPORT) 402 #endif // !defined(DISABLE_FTP_SUPPORT)
403 403
404 storage->set_job_factory(job_factory); 404 storage->set_job_factory(job_factory);
405 405
406 // TODO(willchan): Support sdch. 406 // TODO(willchan): Support sdch.
407 407
408 return context; 408 return context;
409 } 409 }
410 410
411 } // namespace net 411 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698