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

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

Issue 357723003: Implement prediction_options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 6 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 <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); 425 signin_allowed_.Init(prefs::kSigninAllowed, pref_service);
426 signin_allowed_.MoveToThread(io_message_loop_proxy); 426 signin_allowed_.MoveToThread(io_message_loop_proxy);
427 } 427 }
428 428
429 quick_check_enabled_.Init(prefs::kQuickCheckEnabled, 429 quick_check_enabled_.Init(prefs::kQuickCheckEnabled,
430 local_state_pref_service); 430 local_state_pref_service);
431 quick_check_enabled_.MoveToThread(io_message_loop_proxy); 431 quick_check_enabled_.MoveToThread(io_message_loop_proxy);
432 432
433 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord()); 433 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord());
434 434
435 // TODO(bnc): remove per https://crbug.com/334602.
435 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled, 436 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled,
436 pref_service); 437 pref_service);
437 network_prediction_enabled_.MoveToThread(io_message_loop_proxy); 438 network_prediction_enabled_.MoveToThread(io_message_loop_proxy);
438 439
440 network_prediction_options_.Init(prefs::kNetworkPredictionOptions,
441 pref_service);
mmenke 2014/06/27 18:52:05 nit: +2 indent
Bence 2014/06/27 19:10:24 Done.
442
443 network_prediction_options_.MoveToThread(io_message_loop_proxy);
444
439 #if defined(OS_CHROMEOS) 445 #if defined(OS_CHROMEOS)
440 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); 446 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile);
441 #endif 447 #endif
442 // The URLBlacklistManager has to be created on the UI thread to register 448 // The URLBlacklistManager has to be created on the UI thread to register
443 // observers of |pref_service|, and it also has to clean up on 449 // observers of |pref_service|, and it also has to clean up on
444 // ShutdownOnUIThread to release these observers on the right thread. 450 // ShutdownOnUIThread to release these observers on the right thread.
445 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, 451 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
446 // in particular when this ProfileIOData isn't |initialized_| during deletion. 452 // in particular when this ProfileIOData isn't |initialized_| during deletion.
447 #if defined(ENABLE_CONFIGURATION_POLICY) 453 #if defined(ENABLE_CONFIGURATION_POLICY)
448 policy::URLBlacklist::SegmentURLCallback callback = 454 policy::URLBlacklist::SegmentURLCallback callback =
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 enable_do_not_track_.Destroy(); 1166 enable_do_not_track_.Destroy();
1161 force_safesearch_.Destroy(); 1167 force_safesearch_.Destroy();
1162 #if !defined(OS_CHROMEOS) 1168 #if !defined(OS_CHROMEOS)
1163 enable_metrics_.Destroy(); 1169 enable_metrics_.Destroy();
1164 #endif 1170 #endif
1165 safe_browsing_enabled_.Destroy(); 1171 safe_browsing_enabled_.Destroy();
1166 data_reduction_proxy_enabled_.Destroy(); 1172 data_reduction_proxy_enabled_.Destroy();
1167 printing_enabled_.Destroy(); 1173 printing_enabled_.Destroy();
1168 sync_disabled_.Destroy(); 1174 sync_disabled_.Destroy();
1169 signin_allowed_.Destroy(); 1175 signin_allowed_.Destroy();
1176 // TODO(bnc): remove per https://crbug.com/334602.
1170 network_prediction_enabled_.Destroy(); 1177 network_prediction_enabled_.Destroy();
1178 network_prediction_options_.Destroy();
1171 quick_check_enabled_.Destroy(); 1179 quick_check_enabled_.Destroy();
1172 if (media_device_id_salt_) 1180 if (media_device_id_salt_)
1173 media_device_id_salt_->ShutdownOnUIThread(); 1181 media_device_id_salt_->ShutdownOnUIThread();
1174 session_startup_pref_.Destroy(); 1182 session_startup_pref_.Destroy();
1175 #if defined(ENABLE_CONFIGURATION_POLICY) 1183 #if defined(ENABLE_CONFIGURATION_POLICY)
1176 if (url_blacklist_manager_) 1184 if (url_blacklist_manager_)
1177 url_blacklist_manager_->ShutdownOnUIThread(); 1185 url_blacklist_manager_->ShutdownOnUIThread();
1178 #endif 1186 #endif
1179 if (chrome_http_user_agent_settings_) 1187 if (chrome_http_user_agent_settings_)
1180 chrome_http_user_agent_settings_->CleanupOnUIThread(); 1188 chrome_http_user_agent_settings_->CleanupOnUIThread();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 void ProfileIOData::SetCookieSettingsForTesting( 1244 void ProfileIOData::SetCookieSettingsForTesting(
1237 CookieSettings* cookie_settings) { 1245 CookieSettings* cookie_settings) {
1238 DCHECK(!cookie_settings_.get()); 1246 DCHECK(!cookie_settings_.get());
1239 cookie_settings_ = cookie_settings; 1247 cookie_settings_ = cookie_settings;
1240 } 1248 }
1241 1249
1242 void ProfileIOData::set_signin_names_for_testing( 1250 void ProfileIOData::set_signin_names_for_testing(
1243 SigninNamesOnIOThread* signin_names) { 1251 SigninNamesOnIOThread* signin_names) {
1244 signin_names_.reset(signin_names); 1252 signin_names_.reset(signin_names);
1245 } 1253 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698