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

Unified Diff: chromeos/network/managed_network_configuration_handler.h

Issue 22327005: Automatically resolve ClientCertificatePatterns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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: chromeos/network/managed_network_configuration_handler.h
diff --git a/chromeos/network/managed_network_configuration_handler.h b/chromeos/network/managed_network_configuration_handler.h
index 0ac1e6e69111113b5e53a7571bcc0bd606ebaeec..7cc3656deb54b2141d859304a4d40674daa2fcec 100644
--- a/chromeos/network/managed_network_configuration_handler.h
+++ b/chromeos/network/managed_network_configuration_handler.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/network/network_handler.h"
#include "chromeos/network/network_handler_callbacks.h"
@@ -26,6 +27,7 @@ class ListValue;
namespace chromeos {
class NetworkConfigurationHandler;
+class NetworkPolicyObserver;
class NetworkProfileHandler;
class NetworkStateHandler;
class NetworkUIData;
@@ -69,6 +71,9 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler
static scoped_ptr<NetworkUIData> GetUIData(
const base::DictionaryValue& shill_dictionary);
+ void AddObserver(NetworkPolicyObserver* observer);
+ void RemoveObserver(NetworkPolicyObserver* observer);
+
// Provides the properties of the network with |service_path| to |callback|.
void GetProperties(
const std::string& service_path,
@@ -132,7 +137,13 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler
const std::string& guid,
onc::ONCSource* onc_source) const;
- // NetworkProfileObserver overrides
+ // Returns the policy with |guid| for profile |profile_path|. If such
+ // doesn't exist, returns NULL.
+ const base::DictionaryValue* FindPolicyByGuidAndProfile(
+ const std::string& guid,
+ const std::string& profile_path) const;
+
+ // NetworkProfileObserver overrides
virtual void OnProfileAdded(const NetworkProfile& profile) OVERRIDE;
virtual void OnProfileRemoved(const NetworkProfile& profile) OVERRIDE;
@@ -151,7 +162,6 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler
NetworkProfileHandler* network_profile_handler,
NetworkConfigurationHandler* network_configuration_handler);
-
void GetManagedPropertiesCallback(
const network_handler::DictionaryResultCallback& callback,
const network_handler::ErrorCallback& error_callback,
@@ -162,6 +172,8 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler
const GuidToPolicyMap* GetPoliciesForProfile(
const NetworkProfile& profile) const;
+ void OnPolicyApplied(const std::string& service_path);
+
// The DictionaryValues of the nested maps are owned by this class and are
// explicitly deleted where necessary. If present, the empty string maps to
// the device policy.
@@ -172,6 +184,8 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler
NetworkProfileHandler* network_profile_handler_;
NetworkConfigurationHandler* network_configuration_handler_;
+ ObserverList<NetworkPolicyObserver> observers_;
+
// For Shill client callbacks
base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698