OLD | NEW |
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 Loading... |
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::RegisterPrefs(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 } |
OLD | NEW |