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

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

Issue 380003002: Improve testing for SDCH. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Isolation test for ChromeOS. 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
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/chrome_tests.gypi » ('j') | 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 "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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 network_delegate(), 565 network_delegate(),
566 ftp_factory_.get()); 566 ftp_factory_.get());
567 main_context->set_job_factory(main_job_factory_.get()); 567 main_context->set_job_factory(main_job_factory_.get());
568 568
569 #if defined(ENABLE_EXTENSIONS) 569 #if defined(ENABLE_EXTENSIONS)
570 InitializeExtensionsRequestContext(profile_params); 570 InitializeExtensionsRequestContext(profile_params);
571 #endif 571 #endif
572 572
573 // Setup the SDCHManager for this profile. 573 // Setup the SDCHManager for this profile.
574 sdch_manager_.reset(new net::SdchManager); 574 sdch_manager_.reset(new net::SdchManager);
575 sdch_manager_->set_sdch_fetcher( 575
576 new net::SdchDictionaryFetcher( 576 scoped_refptr<net::URLRequestContextGetter> getter(
577 sdch_manager_.get(), 577 new net::TrivialURLRequestContextGetter(
578 // SdchDictionaryFetcher takes a reference to the Getter, and 578 main_context,
579 // hence implicitly takes ownership. 579 content::BrowserThread::GetMessageLoopProxyForThread(
580 new net::TrivialURLRequestContextGetter( 580 content::BrowserThread::IO)));
581 main_context, 581
582 content::BrowserThread::GetMessageLoopProxyForThread( 582 sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>(
583 content::BrowserThread::IO)))); 583 new net::SdchDictionaryFetcher(sdch_manager_.get(), getter)).Pass());
584
584 main_context->set_sdch_manager(sdch_manager_.get()); 585 main_context->set_sdch_manager(sdch_manager_.get());
585 586
586 // Create a media request context based on the main context, but using a 587 // Create a media request context based on the main context, but using a
587 // media cache. It shares the same job factory as the main context. 588 // media cache. It shares the same job factory as the main context.
588 StoragePartitionDescriptor details(profile_path_, false); 589 StoragePartitionDescriptor details(profile_path_, false);
589 media_request_context_.reset(InitializeMediaRequestContext(main_context, 590 media_request_context_.reset(InitializeMediaRequestContext(main_context,
590 details)); 591 details));
591 592
592 if (domain_reliability_monitor_) { 593 if (domain_reliability_monitor_) {
593 domain_reliability_monitor_->Init( 594 domain_reliability_monitor_->Init(
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 const base::Closure& completion) { 827 const base::Closure& completion) {
827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 828 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
828 DCHECK(initialized()); 829 DCHECK(initialized());
829 830
830 DCHECK(transport_security_state()); 831 DCHECK(transport_security_state());
831 // Completes synchronously. 832 // Completes synchronously.
832 transport_security_state()->DeleteAllDynamicDataSince(time); 833 transport_security_state()->DeleteAllDynamicDataSince(time);
833 DCHECK(http_server_properties_manager_); 834 DCHECK(http_server_properties_manager_);
834 http_server_properties_manager_->Clear(completion); 835 http_server_properties_manager_->Clear(completion);
835 } 836 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698