Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "content/public/browser/notification_observer.h" | |
| 10 #include "content/public/browser/notification_registrar.h" | |
| 11 | |
| 12 class Profile; | |
| 13 | |
| 14 namespace chromeos { | |
| 15 | |
| 16 // Class to update NetworkHandler when the PrefService state changes. The | |
| 17 // implementation currently relies on g_browser_process since it holds the | |
| 18 // default PrefService. | |
| 19 | |
|
James Cook
2016/11/01 23:02:03
nit: no blank line
stevenjb
2016/11/01 23:55:11
Done.
| |
| 20 class NetworkPrefStateObserver : public content::NotificationObserver { | |
| 21 public: | |
| 22 NetworkPrefStateObserver(); | |
| 23 ~NetworkPrefStateObserver() override; | |
| 24 | |
| 25 // content::NotificationObserver | |
| 26 void Observe(int type, | |
| 27 const content::NotificationSource& source, | |
| 28 const content::NotificationDetails& details) override; | |
| 29 | |
| 30 private: | |
| 31 void InitializeNetworkPrefServices(Profile* profile); | |
| 32 | |
| 33 content::NotificationRegistrar notification_registrar_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(NetworkPrefStateObserver); | |
| 36 }; | |
| 37 | |
| 38 } // namespace chromeos | |
| 39 | |
| 40 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_ | |
| OLD | NEW |