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

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: typo Created 8 years, 3 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 lazy_params_->server_bound_cert_path, 399 lazy_params_->server_bound_cert_path,
400 new ClearOnExitPolicy(lazy_params_->special_storage_policy)); 400 new ClearOnExitPolicy(lazy_params_->special_storage_policy));
401 server_bound_cert_service = new net::ServerBoundCertService( 401 server_bound_cert_service = new net::ServerBoundCertService(
402 new net::DefaultServerBoundCertStore(server_bound_cert_db.get()), 402 new net::DefaultServerBoundCertStore(server_bound_cert_db.get()),
403 base::WorkerPool::GetTaskRunner(true)); 403 base::WorkerPool::GetTaskRunner(true));
404 } 404 }
405 405
406 set_server_bound_cert_service(server_bound_cert_service); 406 set_server_bound_cert_service(server_bound_cert_service);
407 main_context->set_server_bound_cert_service(server_bound_cert_service); 407 main_context->set_server_bound_cert_service(server_bound_cert_service);
408 408
409 std::string trusted_spdy_proxy;
410 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
411 trusted_spdy_proxy = command_line.GetSwitchValueASCII(
412 switches::kTrustedSpdyProxy);
413 }
414 net::HttpCache::DefaultBackend* main_backend = 409 net::HttpCache::DefaultBackend* main_backend =
415 new net::HttpCache::DefaultBackend( 410 new net::HttpCache::DefaultBackend(
416 net::DISK_CACHE, 411 net::DISK_CACHE,
417 lazy_params_->cache_path, 412 lazy_params_->cache_path,
418 lazy_params_->cache_max_size, 413 lazy_params_->cache_max_size,
419 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); 414 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
415 net::HttpNetworkSession::Params network_session_params;
416 PopulateNetworkSessionParams(profile_params, &network_session_params);
420 net::HttpCache* main_cache = new net::HttpCache( 417 net::HttpCache* main_cache = new net::HttpCache(
421 main_context->host_resolver(), 418 network_session_params, main_backend);
422 main_context->cert_verifier(),
423 main_context->server_bound_cert_service(),
424 main_context->transport_security_state(),
425 main_context->proxy_service(),
426 GetSSLSessionCacheShard(),
427 main_context->ssl_config_service(),
428 main_context->http_auth_handler_factory(),
429 main_context->network_delegate(),
430 main_context->http_server_properties(),
431 main_context->net_log(),
432 main_backend,
433 trusted_spdy_proxy);
434 419
435 if (record_mode || playback_mode) { 420 if (record_mode || playback_mode) {
436 main_cache->set_mode( 421 main_cache->set_mode(
437 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); 422 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
438 } 423 }
439 424
440 main_http_factory_.reset(main_cache); 425 main_http_factory_.reset(main_cache);
441 main_context->set_http_transaction_factory(main_cache); 426 main_context->set_http_transaction_factory(main_cache);
442 427
443 #if !defined(DISABLE_FTP_SUPPORT) 428 #if !defined(DISABLE_FTP_SUPPORT)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 659 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
675 base::Time time) { 660 base::Time time) {
676 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 661 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
677 LazyInitialize(); 662 LazyInitialize();
678 663
679 DCHECK(transport_security_state()); 664 DCHECK(transport_security_state());
680 transport_security_state()->DeleteSince(time); 665 transport_security_state()->DeleteSince(time);
681 DCHECK(http_server_properties_manager()); 666 DCHECK(http_server_properties_manager());
682 http_server_properties_manager()->Clear(); 667 http_server_properties_manager()->Clear();
683 } 668 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698