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

Side by Side Diff: chrome/browser/net/net_pref_observer.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/net_pref_observer.h ('k') | chrome/browser/net/predictor.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/net_pref_observer.h" 5 #include "chrome/browser/net/net_pref_observer.h"
6 6
7 #include "chrome/browser/net/predictor.h" 7 #include "chrome/browser/net/predictor.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prerender/prerender_manager.h" 9 #include "chrome/browser/prerender/prerender_manager.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 29 matching lines...) Expand all
40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
41 41
42 predictor_->EnablePredictor(*network_prediction_enabled_); 42 predictor_->EnablePredictor(*network_prediction_enabled_);
43 if (prerender_manager_) 43 if (prerender_manager_)
44 prerender_manager_->set_enabled(*network_prediction_enabled_); 44 prerender_manager_->set_enabled(*network_prediction_enabled_);
45 if (spdy_disabled_.IsManaged()) 45 if (spdy_disabled_.IsManaged())
46 net::HttpStreamFactory::set_spdy_enabled(!*spdy_disabled_); 46 net::HttpStreamFactory::set_spdy_enabled(!*spdy_disabled_);
47 } 47 }
48 48
49 // static 49 // static
50 void NetPrefObserver::RegisterPrefs(PrefService* prefs) { 50 void NetPrefObserver::RegisterUserPrefs(PrefServiceSyncable* prefs) {
51 prefs->RegisterBooleanPref(prefs::kNetworkPredictionEnabled, 51 prefs->RegisterBooleanPref(prefs::kNetworkPredictionEnabled,
52 true, 52 true,
53 PrefService::SYNCABLE_PREF); 53 PrefServiceSyncable::SYNCABLE_PREF);
54 prefs->RegisterBooleanPref(prefs::kDisableSpdy, 54 prefs->RegisterBooleanPref(prefs::kDisableSpdy,
55 false, 55 false,
56 PrefService::UNSYNCABLE_PREF); 56 PrefServiceSyncable::UNSYNCABLE_PREF);
57 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/net/net_pref_observer.h ('k') | chrome/browser/net/predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698