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

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: Yet another rebase. 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 allow_network_prediction_.Init(prefs::kAllowNetworkPrediction,
441 pref_service);
jkarlin 2014/06/26 16:28:52 formatting. Please run 'git cl format'
Bence 2014/06/26 20:02:06 Done.
442 allow_network_prediction_.MoveToThread(io_message_loop_proxy);
443
439 #if defined(OS_CHROMEOS) 444 #if defined(OS_CHROMEOS)
440 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); 445 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile);
441 #endif 446 #endif
442 // The URLBlacklistManager has to be created on the UI thread to register 447 // 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 448 // observers of |pref_service|, and it also has to clean up on
444 // ShutdownOnUIThread to release these observers on the right thread. 449 // 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, 450 // 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. 451 // in particular when this ProfileIOData isn't |initialized_| during deletion.
447 #if defined(ENABLE_CONFIGURATION_POLICY) 452 #if defined(ENABLE_CONFIGURATION_POLICY)
448 policy::URLBlacklist::SegmentURLCallback callback = 453 policy::URLBlacklist::SegmentURLCallback callback =
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 enable_do_not_track_.Destroy(); 1165 enable_do_not_track_.Destroy();
1161 force_safesearch_.Destroy(); 1166 force_safesearch_.Destroy();
1162 #if !defined(OS_CHROMEOS) 1167 #if !defined(OS_CHROMEOS)
1163 enable_metrics_.Destroy(); 1168 enable_metrics_.Destroy();
1164 #endif 1169 #endif
1165 safe_browsing_enabled_.Destroy(); 1170 safe_browsing_enabled_.Destroy();
1166 data_reduction_proxy_enabled_.Destroy(); 1171 data_reduction_proxy_enabled_.Destroy();
1167 printing_enabled_.Destroy(); 1172 printing_enabled_.Destroy();
1168 sync_disabled_.Destroy(); 1173 sync_disabled_.Destroy();
1169 signin_allowed_.Destroy(); 1174 signin_allowed_.Destroy();
1175 // TODO(bnc): remove per https://crbug.com/334602.
1170 network_prediction_enabled_.Destroy(); 1176 network_prediction_enabled_.Destroy();
1177 allow_network_prediction_.Destroy();
1171 quick_check_enabled_.Destroy(); 1178 quick_check_enabled_.Destroy();
1172 if (media_device_id_salt_) 1179 if (media_device_id_salt_)
1173 media_device_id_salt_->ShutdownOnUIThread(); 1180 media_device_id_salt_->ShutdownOnUIThread();
1174 session_startup_pref_.Destroy(); 1181 session_startup_pref_.Destroy();
1175 #if defined(ENABLE_CONFIGURATION_POLICY) 1182 #if defined(ENABLE_CONFIGURATION_POLICY)
1176 if (url_blacklist_manager_) 1183 if (url_blacklist_manager_)
1177 url_blacklist_manager_->ShutdownOnUIThread(); 1184 url_blacklist_manager_->ShutdownOnUIThread();
1178 #endif 1185 #endif
1179 if (chrome_http_user_agent_settings_) 1186 if (chrome_http_user_agent_settings_)
1180 chrome_http_user_agent_settings_->CleanupOnUIThread(); 1187 chrome_http_user_agent_settings_->CleanupOnUIThread();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 void ProfileIOData::SetCookieSettingsForTesting( 1243 void ProfileIOData::SetCookieSettingsForTesting(
1237 CookieSettings* cookie_settings) { 1244 CookieSettings* cookie_settings) {
1238 DCHECK(!cookie_settings_.get()); 1245 DCHECK(!cookie_settings_.get());
1239 cookie_settings_ = cookie_settings; 1246 cookie_settings_ = cookie_settings;
1240 } 1247 }
1241 1248
1242 void ProfileIOData::set_signin_names_for_testing( 1249 void ProfileIOData::set_signin_names_for_testing(
1243 SigninNamesOnIOThread* signin_names) { 1250 SigninNamesOnIOThread* signin_names) {
1244 signin_names_.reset(signin_names); 1251 signin_names_.reset(signin_names);
1245 } 1252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698