| 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 #ifndef CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ | 6 #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 11 #include "chrome/browser/api/prefs/pref_member.h" | 9 #include "chrome/browser/api/prefs/pref_member.h" |
| 12 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| 13 | 11 |
| 14 namespace chrome_browser_net { | 12 namespace chrome_browser_net { |
| 15 class Predictor; | 13 class Predictor; |
| 16 } | 14 } |
| 17 | 15 |
| 18 namespace prerender { | 16 namespace prerender { |
| 19 class PrerenderManager; | 17 class PrerenderManager; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 35 virtual ~NetPrefObserver(); | 33 virtual ~NetPrefObserver(); |
| 36 | 34 |
| 37 // content::NotificationObserver | 35 // content::NotificationObserver |
| 38 virtual void Observe(int type, | 36 virtual void Observe(int type, |
| 39 const content::NotificationSource& source, | 37 const content::NotificationSource& source, |
| 40 const content::NotificationDetails& details) OVERRIDE; | 38 const content::NotificationDetails& details) OVERRIDE; |
| 41 | 39 |
| 42 static void RegisterPrefs(PrefService* prefs); | 40 static void RegisterPrefs(PrefService* prefs); |
| 43 | 41 |
| 44 private: | 42 private: |
| 45 // If |pref_name| is NULL, all monitored preferences will be applied. | 43 void ApplySettings(); |
| 46 void ApplySettings(const std::string* pref_name); | |
| 47 | 44 |
| 48 BooleanPrefMember network_prediction_enabled_; | 45 BooleanPrefMember network_prediction_enabled_; |
| 49 BooleanPrefMember spdy_disabled_; | 46 BooleanPrefMember spdy_disabled_; |
| 50 prerender::PrerenderManager* prerender_manager_; | 47 prerender::PrerenderManager* prerender_manager_; |
| 51 chrome_browser_net::Predictor* predictor_; | 48 chrome_browser_net::Predictor* predictor_; |
| 52 | 49 |
| 53 DISALLOW_COPY_AND_ASSIGN(NetPrefObserver); | 50 DISALLOW_COPY_AND_ASSIGN(NetPrefObserver); |
| 54 }; | 51 }; |
| 55 | 52 |
| 56 #endif // CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ | 53 #endif // CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ |
| OLD | NEW |