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

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

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 ChromeNetworkDelegate::InitializePrefsOnUIThread( 476 ChromeNetworkDelegate::InitializePrefsOnUIThread(
477 &enable_referrers_, 477 &enable_referrers_,
478 &enable_do_not_track_, 478 &enable_do_not_track_,
479 &force_google_safesearch_, 479 &force_google_safesearch_,
480 &force_youtube_safety_mode_, 480 &force_youtube_safety_mode_,
481 &allowed_domains_for_apps_, 481 &allowed_domains_for_apps_,
482 pref_service); 482 pref_service);
483 483
484 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 484 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
485 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 485 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
486 486
487 chrome_http_user_agent_settings_.reset( 487 chrome_http_user_agent_settings_.reset(
488 new ChromeHttpUserAgentSettings(pref_service)); 488 new ChromeHttpUserAgentSettings(pref_service));
489 489
490 // These members are used only for sign in, which is not enabled 490 // These members are used only for sign in, which is not enabled
491 // in incognito mode. So no need to initialize them. 491 // in incognito mode. So no need to initialize them.
492 if (!IsOffTheRecord()) { 492 if (!IsOffTheRecord()) {
493 google_services_user_account_id_.Init( 493 google_services_user_account_id_.Init(
494 prefs::kGoogleServicesUserAccountId, pref_service); 494 prefs::kGoogleServicesUserAccountId, pref_service);
495 google_services_user_account_id_.MoveToThread(io_task_runner); 495 google_services_user_account_id_.MoveToThread(io_task_runner);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 888
889 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { 889 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
890 DCHECK_CURRENTLY_ON(BrowserThread::UI); 890 DCHECK_CURRENTLY_ON(BrowserThread::UI);
891 #if BUILDFLAG(ANDROID_JAVA_UI) 891 #if BUILDFLAG(ANDROID_JAVA_UI)
892 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion 892 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion
893 // in crbugs.com/246495. 893 // in crbugs.com/246495.
894 // Android has it's own preferences for metrics / crash uploading. 894 // Android has it's own preferences for metrics / crash uploading.
895 enable_metrics_.Init(prefs::kCrashReportingEnabled, 895 enable_metrics_.Init(prefs::kCrashReportingEnabled,
896 g_browser_process->local_state()); 896 g_browser_process->local_state());
897 enable_metrics_.MoveToThread( 897 enable_metrics_.MoveToThread(
898 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 898 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
899 #else 899 #else
900 // Prep the PrefMember and send it to the IO thread, since this value will be 900 // Prep the PrefMember and send it to the IO thread, since this value will be
901 // read from there. 901 // read from there.
902 enable_metrics_.Init(metrics::prefs::kMetricsReportingEnabled, 902 enable_metrics_.Init(metrics::prefs::kMetricsReportingEnabled,
903 g_browser_process->local_state()); 903 g_browser_process->local_state());
904 enable_metrics_.MoveToThread( 904 enable_metrics_.MoveToThread(
905 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 905 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
906 #endif // BUILDFLAG(ANDROID_JAVA_UI) 906 #endif // BUILDFLAG(ANDROID_JAVA_UI)
907 } 907 }
908 908
909 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const { 909 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const {
910 DCHECK_CURRENTLY_ON(BrowserThread::IO); 910 DCHECK_CURRENTLY_ON(BrowserThread::IO);
911 return enable_metrics_.GetValue(); 911 return enable_metrics_.GetValue();
912 } 912 }
913 913
914 bool ProfileIOData::IsDataReductionProxyEnabled() const { 914 bool ProfileIOData::IsDataReductionProxyEnabled() const {
915 return data_reduction_proxy_io_data() && 915 return data_reduction_proxy_io_data() &&
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 void ProfileIOData::SetCookieSettingsForTesting( 1375 void ProfileIOData::SetCookieSettingsForTesting(
1376 content_settings::CookieSettings* cookie_settings) { 1376 content_settings::CookieSettings* cookie_settings) {
1377 DCHECK(!cookie_settings_.get()); 1377 DCHECK(!cookie_settings_.get());
1378 cookie_settings_ = cookie_settings; 1378 cookie_settings_ = cookie_settings;
1379 } 1379 }
1380 1380
1381 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1381 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1382 const GURL& url) const { 1382 const GURL& url) const {
1383 return url_blacklist_manager_->GetURLBlacklistState(url); 1383 return url_blacklist_manager_->GetURLBlacklistState(url);
1384 } 1384 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_statistics_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698