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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 // static 149 // static
150 Predictor* Predictor::CreatePredictor(bool preconnect_enabled, 150 Predictor* Predictor::CreatePredictor(bool preconnect_enabled,
151 bool simple_shutdown) { 151 bool simple_shutdown) {
152 if (simple_shutdown) 152 if (simple_shutdown)
153 return new SimplePredictor(preconnect_enabled); 153 return new SimplePredictor(preconnect_enabled);
154 return new Predictor(preconnect_enabled); 154 return new Predictor(preconnect_enabled);
155 } 155 }
156 156
157 void Predictor::RegisterUserPrefs(PrefService* user_prefs) { 157 void Predictor::RegisterUserPrefs(PrefServiceSyncable* user_prefs) {
158 user_prefs->RegisterListPref(prefs::kDnsPrefetchingStartupList, 158 user_prefs->RegisterListPref(prefs::kDnsPrefetchingStartupList,
159 PrefService::UNSYNCABLE_PREF); 159 PrefServiceSyncable::UNSYNCABLE_PREF);
160 user_prefs->RegisterListPref(prefs::kDnsPrefetchingHostReferralList, 160 user_prefs->RegisterListPref(prefs::kDnsPrefetchingHostReferralList,
161 PrefService::UNSYNCABLE_PREF); 161 PrefServiceSyncable::UNSYNCABLE_PREF);
162 } 162 }
163 163
164 // --------------------- Start UI methods. ------------------------------------ 164 // --------------------- Start UI methods. ------------------------------------
165 165
166 void Predictor::InitNetworkPredictor(PrefService* user_prefs, 166 void Predictor::InitNetworkPredictor(PrefService* user_prefs,
167 PrefService* local_state, 167 PrefService* local_state,
168 IOThread* io_thread, 168 IOThread* io_thread,
169 net::URLRequestContextGetter* getter) { 169 net::URLRequestContextGetter* getter) {
170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
171 171
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 IOThread* io_thread, 1185 IOThread* io_thread,
1186 net::URLRequestContextGetter* getter) { 1186 net::URLRequestContextGetter* getter) {
1187 // Empty function for unittests. 1187 // Empty function for unittests.
1188 } 1188 }
1189 1189
1190 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { 1190 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) {
1191 SetShutdown(true); 1191 SetShutdown(true);
1192 } 1192 }
1193 1193
1194 } // namespace chrome_browser_net 1194 } // 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