| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/task.h" | 7 #include "base/task.h" |
| 8 #include "chrome/browser/net/predictor_api.h" | 8 #include "chrome/browser/net/predictor_api.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/prerender/prerender_manager.h" | 10 #include "chrome/browser/prerender/prerender_manager.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (!pref_name || *pref_name == prefs::kHttpThrottlingEnabled) { | 64 if (!pref_name || *pref_name == prefs::kHttpThrottlingEnabled) { |
| 65 BrowserThread::PostTask( | 65 BrowserThread::PostTask( |
| 66 BrowserThread::IO, FROM_HERE, | 66 BrowserThread::IO, FROM_HERE, |
| 67 NewRunnableFunction(SetEnforceThrottlingOnThrottlerManager, | 67 NewRunnableFunction(SetEnforceThrottlingOnThrottlerManager, |
| 68 *http_throttling_enabled_)); | 68 *http_throttling_enabled_)); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 void NetPrefObserver::RegisterPrefs(PrefService* prefs) { | 73 void NetPrefObserver::RegisterPrefs(PrefService* prefs) { |
| 74 prefs->RegisterBooleanPref(prefs::kNetworkPredictionEnabled, true); | 74 prefs->RegisterBooleanPref(prefs::kNetworkPredictionEnabled, |
| 75 prefs->RegisterBooleanPref(prefs::kDisableSpdy, false); | 75 true, |
| 76 prefs->RegisterBooleanPref(prefs::kHttpThrottlingEnabled, false); | 76 PrefService::SYNCABLE_PREF); |
| 77 prefs->RegisterBooleanPref(prefs::kDisableSpdy, |
| 78 false, |
| 79 PrefService::UNSYNCABLE_PREF); |
| 80 prefs->RegisterBooleanPref(prefs::kHttpThrottlingEnabled, |
| 81 false, |
| 82 PrefService::UNSYNCABLE_PREF); |
| 77 } | 83 } |
| OLD | NEW |