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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 10834215: Remove static variables from HttpStreamFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { 409 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
410 trusted_spdy_proxy = command_line.GetSwitchValueASCII( 410 trusted_spdy_proxy = command_line.GetSwitchValueASCII(
411 switches::kTrustedSpdyProxy); 411 switches::kTrustedSpdyProxy);
412 } 412 }
413 net::HttpCache::DefaultBackend* main_backend = 413 net::HttpCache::DefaultBackend* main_backend =
414 new net::HttpCache::DefaultBackend( 414 new net::HttpCache::DefaultBackend(
415 net::DISK_CACHE, 415 net::DISK_CACHE,
416 lazy_params_->cache_path, 416 lazy_params_->cache_path,
417 lazy_params_->cache_max_size, 417 lazy_params_->cache_max_size,
418 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); 418 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
419
420 net::HttpNetworkSession::Params network_session_params;
421 network_session_params.host_resolver = main_context->host_resolver();
422 network_session_params.cert_verifier = main_context->cert_verifier();
423 network_session_params.server_bound_cert_service =
424 main_context->server_bound_cert_service();
425 network_session_params.transport_security_state =
426 main_context->transport_security_state();
427 network_session_params.proxy_service = main_context->proxy_service();
428 network_session_params.ssl_session_cache_shard =
429 GetSSLSessionCacheShard();
430 network_session_params.ssl_config_service =
431 main_context->ssl_config_service();
432 network_session_params.http_auth_handler_factory =
433 main_context->http_auth_handler_factory();
434 network_session_params.network_delegate =
435 main_context->network_delegate();
436 network_session_params.http_server_properties =
437 main_context->http_server_properties();
438 network_session_params.net_log = main_context->net_log();
439 network_session_params.ignore_certificate_errors =
440 io_thread_globals->ignore_certificate_errors;
441 network_session_params.host_mapping_rules =
442 io_thread_globals->host_mapping_rules.get();
443 network_session_params.http_pipelining_enabled =
444 io_thread_globals->http_pipelining_enabled;
445 network_session_params.testing_fixed_http_port =
446 io_thread_globals->testing_fixed_http_port;
447 network_session_params.testing_fixed_https_port =
448 io_thread_globals->testing_fixed_https_port;
449 network_session_params.trusted_spdy_proxy = trusted_spdy_proxy;
450
419 net::HttpCache* main_cache = new net::HttpCache( 451 net::HttpCache* main_cache = new net::HttpCache(
420 main_context->host_resolver(), 452 network_session_params, main_backend);
421 main_context->cert_verifier(),
422 main_context->server_bound_cert_service(),
423 main_context->transport_security_state(),
424 main_context->proxy_service(),
425 GetSSLSessionCacheShard(),
426 main_context->ssl_config_service(),
427 main_context->http_auth_handler_factory(),
428 main_context->network_delegate(),
429 main_context->http_server_properties(),
430 main_context->net_log(),
431 main_backend,
432 trusted_spdy_proxy);
433 453
434 if (record_mode || playback_mode) { 454 if (record_mode || playback_mode) {
435 main_cache->set_mode( 455 main_cache->set_mode(
436 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); 456 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
437 } 457 }
438 458
439 main_http_factory_.reset(main_cache); 459 main_http_factory_.reset(main_cache);
440 main_context->set_http_transaction_factory(main_cache); 460 main_context->set_http_transaction_factory(main_cache);
441 461
442 ftp_factory_.reset( 462 ftp_factory_.reset(
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 687 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
668 base::Time time) { 688 base::Time time) {
669 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 689 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
670 LazyInitialize(); 690 LazyInitialize();
671 691
672 DCHECK(transport_security_state()); 692 DCHECK(transport_security_state());
673 transport_security_state()->DeleteSince(time); 693 transport_security_state()->DeleteSince(time);
674 DCHECK(http_server_properties_manager()); 694 DCHECK(http_server_properties_manager());
675 http_server_properties_manager()->Clear(); 695 http_server_properties_manager()->Clear();
676 } 696 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698