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

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

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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/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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 Predictor* Predictor::CreatePredictor(bool preconnect_enabled, 169 Predictor* Predictor::CreatePredictor(bool preconnect_enabled,
170 bool predictor_enabled, 170 bool predictor_enabled,
171 bool simple_shutdown) { 171 bool simple_shutdown) {
172 if (simple_shutdown) 172 if (simple_shutdown)
173 return new SimplePredictor(preconnect_enabled, predictor_enabled); 173 return new SimplePredictor(preconnect_enabled, predictor_enabled);
174 return new Predictor(preconnect_enabled, predictor_enabled); 174 return new Predictor(preconnect_enabled, predictor_enabled);
175 } 175 }
176 176
177 void Predictor::RegisterProfilePrefs( 177 void Predictor::RegisterProfilePrefs(
178 user_prefs::PrefRegistrySyncable* registry) { 178 user_prefs::PrefRegistrySyncable* registry) {
179 registry->RegisterListPref(prefs::kDnsPrefetchingStartupList, 179 registry->RegisterListPref(prefs::kDnsPrefetchingStartupList);
180 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 180 registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList);
181 registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList,
182 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
183 } 181 }
184 182
185 // --------------------- Start UI methods. ------------------------------------ 183 // --------------------- Start UI methods. ------------------------------------
186 184
187 void Predictor::InitNetworkPredictor(PrefService* user_prefs, 185 void Predictor::InitNetworkPredictor(PrefService* user_prefs,
188 PrefService* local_state, 186 PrefService* local_state,
189 IOThread* io_thread, 187 IOThread* io_thread,
190 net::URLRequestContextGetter* getter, 188 net::URLRequestContextGetter* getter,
191 ProfileIOData* profile_io_data) { 189 ProfileIOData* profile_io_data) {
192 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 190 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 } 1317 }
1320 1318
1321 void SimplePredictor::ShutdownOnUIThread() { 1319 void SimplePredictor::ShutdownOnUIThread() {
1322 SetShutdown(true); 1320 SetShutdown(true);
1323 } 1321 }
1324 1322
1325 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } 1323 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; }
1326 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } 1324 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; }
1327 1325
1328 } // namespace chrome_browser_net 1326 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/browser/net/pref_proxy_config_tracker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698