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

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

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DevTools part of patch. Resolved some comments Created 6 years, 9 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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 main_context->set_server_bound_cert_service(server_bound_cert_service); 442 main_context->set_server_bound_cert_service(server_bound_cert_service);
443 443
444 net::HttpCache::DefaultBackend* main_backend = 444 net::HttpCache::DefaultBackend* main_backend =
445 new net::HttpCache::DefaultBackend( 445 new net::HttpCache::DefaultBackend(
446 net::DISK_CACHE, 446 net::DISK_CACHE,
447 ChooseCacheBackendType(), 447 ChooseCacheBackendType(),
448 lazy_params_->cache_path, 448 lazy_params_->cache_path,
449 lazy_params_->cache_max_size, 449 lazy_params_->cache_max_size,
450 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE) 450 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
451 .get()); 451 .get());
452 net::HttpNetworkSession::Params network_session_params; 452 net::HttpCache* main_cache = CreateMainHttpFactory(
453 PopulateNetworkSessionParams(profile_params, &network_session_params); 453 profile_params, main_backend);
454 net::HttpCache* main_cache = new net::HttpCache(
455 network_session_params, main_backend);
456 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); 454 main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path);
457 455
458 #if defined(OS_ANDROID) || defined(OS_IOS) 456 #if defined(OS_ANDROID) || defined(OS_IOS)
459 DataReductionProxySettings::InitDataReductionProxySession( 457 DataReductionProxySettings::InitDataReductionProxySession(
460 main_cache->GetSession()); 458 main_cache->GetSession());
461 #endif 459 #endif
462 460
463 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) { 461 if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) {
464 main_cache->set_mode( 462 main_cache->set_mode(
465 chrome_browser_net::IsCookieRecordMode() ? 463 chrome_browser_net::IsCookieRecordMode() ?
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 const base::Closure& completion) { 716 const base::Closure& completion) {
719 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 717 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
720 DCHECK(initialized()); 718 DCHECK(initialized());
721 719
722 DCHECK(transport_security_state()); 720 DCHECK(transport_security_state());
723 // Completes synchronously. 721 // Completes synchronously.
724 transport_security_state()->DeleteAllDynamicDataSince(time); 722 transport_security_state()->DeleteAllDynamicDataSince(time);
725 DCHECK(http_server_properties_manager_); 723 DCHECK(http_server_properties_manager_);
726 http_server_properties_manager_->Clear(completion); 724 http_server_properties_manager_->Clear(completion);
727 } 725 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698