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

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

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 2 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 initialized_ = true; 343 initialized_ = true;
344 PrefService* pref_service = profile_->GetPrefs(); 344 PrefService* pref_service = profile_->GetPrefs();
345 io_data_->http_server_properties_manager_ = 345 io_data_->http_server_properties_manager_ =
346 chrome_browser_net::HttpServerPropertiesManagerFactory::CreateManager( 346 chrome_browser_net::HttpServerPropertiesManagerFactory::CreateManager(
347 pref_service); 347 pref_service);
348 io_data_->set_http_server_properties( 348 io_data_->set_http_server_properties(
349 scoped_ptr<net::HttpServerProperties>( 349 scoped_ptr<net::HttpServerProperties>(
350 io_data_->http_server_properties_manager_)); 350 io_data_->http_server_properties_manager_));
351 io_data_->session_startup_pref()->Init( 351 io_data_->session_startup_pref()->Init(
352 prefs::kRestoreOnStartup, pref_service); 352 prefs::kRestoreOnStartup, pref_service);
353 io_data_->session_startup_pref()->MoveToThread( 353 io_data_->session_startup_pref()->UseAlternateTaskRunner(
354 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 354 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
355 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) 355 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
356 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, 356 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled,
357 pref_service); 357 pref_service);
358 io_data_->safe_browsing_enabled()->MoveToThread( 358 io_data_->safe_browsing_enabled()->UseAlternateTaskRunner(
359 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 359 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
360 #endif 360 #endif
361 io_data_->data_reduction_proxy_enabled()->Init( 361 io_data_->data_reduction_proxy_enabled()->Init(
362 data_reduction_proxy::prefs::kDataReductionProxyEnabled, pref_service); 362 data_reduction_proxy::prefs::kDataReductionProxyEnabled, pref_service);
363 io_data_->data_reduction_proxy_enabled()->MoveToThread( 363 io_data_->data_reduction_proxy_enabled()->UseAlternateTaskRunner(
364 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 364 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
365 io_data_->InitializeOnUIThread(profile_); 365 io_data_->InitializeOnUIThread(profile_);
366 } 366 }
367 367
368 scoped_ptr<ProfileIOData::ChromeURLRequestContextGetterVector> 368 scoped_ptr<ProfileIOData::ChromeURLRequestContextGetterVector>
369 ProfileImplIOData::Handle::GetAllContextGetters() { 369 ProfileImplIOData::Handle::GetAllContextGetters() {
370 ChromeURLRequestContextGetterMap::iterator iter; 370 ChromeURLRequestContextGetterMap::iterator iter;
371 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters( 371 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters(
372 new ChromeURLRequestContextGetterVector()); 372 new ChromeURLRequestContextGetterVector());
373 373
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 transport_security_state()->DeleteAllDynamicDataSince(time); 830 transport_security_state()->DeleteAllDynamicDataSince(time);
831 DCHECK(http_server_properties_manager_); 831 DCHECK(http_server_properties_manager_);
832 http_server_properties_manager_->Clear(completion); 832 http_server_properties_manager_->Clear(completion);
833 } 833 }
834 834
835 bool ProfileImplIOData::IsDataReductionProxyEnabled() const { 835 bool ProfileImplIOData::IsDataReductionProxyEnabled() const {
836 return data_reduction_proxy_enabled_.GetValue() || 836 return data_reduction_proxy_enabled_.GetValue() ||
837 CommandLine::ForCurrentProcess()->HasSwitch( 837 CommandLine::ForCurrentProcess()->HasSwitch(
838 data_reduction_proxy::switches::kEnableDataReductionProxy); 838 data_reduction_proxy::switches::kEnableDataReductionProxy);
839 } 839 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698