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

Unified Diff: chrome/browser/chromeos/net/network_pref_state_observer.h

Issue 2446893008: NetworkHandler: Add ui_proxy_config_service (Closed)
Patch Set: Add NetworkHandler::ShutdownPrefServices Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/net/network_pref_state_observer.h
diff --git a/chrome/browser/chromeos/net/network_pref_state_observer.h b/chrome/browser/chromeos/net/network_pref_state_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..a34f0079e28ba979a8666f675d00b6fc6c8e5bc0
--- /dev/null
+++ b/chrome/browser/chromeos/net/network_pref_state_observer.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_
+#define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_
+
+#include "base/macros.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+
+class Profile;
+
+namespace chromeos {
+
+// Class to update NetworkHandler when the PrefService state changes. The
+// implementation currently relies on g_browser_process since it holds the
+// default PrefService.
+class NetworkPrefStateObserver : public content::NotificationObserver {
+ public:
+ NetworkPrefStateObserver();
+ ~NetworkPrefStateObserver() override;
+
+ // content::NotificationObserver
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
+ private:
+ void InitializeNetworkPrefServices(Profile* profile);
+
+ content::NotificationRegistrar notification_registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(NetworkPrefStateObserver);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PREF_STATE_OBSERVER_H_
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/net/network_pref_state_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698