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

Side by Side Diff: chrome/browser/net/predictor.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/pref_proxy_config_tracker_impl.h » ('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/net/predictor.h" 5 #include "chrome/browser/net/predictor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <sstream> 10 #include <sstream>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 // static 152 // static
153 Predictor* Predictor::CreatePredictor(bool preconnect_enabled, 153 Predictor* Predictor::CreatePredictor(bool preconnect_enabled,
154 bool simple_shutdown) { 154 bool simple_shutdown) {
155 if (simple_shutdown) 155 if (simple_shutdown)
156 return new SimplePredictor(preconnect_enabled); 156 return new SimplePredictor(preconnect_enabled);
157 return new Predictor(preconnect_enabled); 157 return new Predictor(preconnect_enabled);
158 } 158 }
159 159
160 void Predictor::RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { 160 void Predictor::RegisterProfilePrefs(
161 user_prefs::PrefRegistrySyncable* registry) {
161 registry->RegisterListPref(prefs::kDnsPrefetchingStartupList, 162 registry->RegisterListPref(prefs::kDnsPrefetchingStartupList,
162 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 163 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
163 registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList, 164 registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList,
164 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
165 } 166 }
166 167
167 // --------------------- Start UI methods. ------------------------------------ 168 // --------------------- Start UI methods. ------------------------------------
168 169
169 void Predictor::InitNetworkPredictor(PrefService* user_prefs, 170 void Predictor::InitNetworkPredictor(PrefService* user_prefs,
170 PrefService* local_state, 171 PrefService* local_state,
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 IOThread* io_thread, 1227 IOThread* io_thread,
1227 net::URLRequestContextGetter* getter) { 1228 net::URLRequestContextGetter* getter) {
1228 // Empty function for unittests. 1229 // Empty function for unittests.
1229 } 1230 }
1230 1231
1231 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { 1232 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) {
1232 SetShutdown(true); 1233 SetShutdown(true);
1233 } 1234 }
1234 1235
1235 } // namespace chrome_browser_net 1236 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/pref_proxy_config_tracker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698