diff options
author | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 15:30:04 +0000 |
---|---|---|
committer | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 15:30:04 +0000 |
commit | 72b3a7eea94e94507e8ae7398082e9ffe1cd620f (patch) | |
tree | e67f659eade2654e5137037dc4403b01dd6e1949 /chromeos/network/managed_network_configuration_handler.h | |
parent | 514a497e58caebaca362a42a76d174c593ad00c8 (diff) | |
download | chromium_src-72b3a7eea94e94507e8ae7398082e9ffe1cd620f.zip chromium_src-72b3a7eea94e94507e8ae7398082e9ffe1cd620f.tar.gz chromium_src-72b3a7eea94e94507e8ae7398082e9ffe1cd620f.tar.bz2 |
Automatically resolve ClientCertificatePatterns.
This adds a new ClientCertResolver to chromeos/network, which automatically resolves ClientCertificatePatterns and writes the cert id of the matching certificate to Shill.
This should fix several issues like updating client certs and auto-connect immediately after installing EAP networks from policy.
It's required for Ethernet EAP policies where the current pattern matching on each manual connect isn't sufficient.
BUG=234983, 126870
Review URL: https://chromiumcodereview.appspot.com/22327005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network/managed_network_configuration_handler.h')
-rw-r--r-- | chromeos/network/managed_network_configuration_handler.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chromeos/network/managed_network_configuration_handler.h b/chromeos/network/managed_network_configuration_handler.h index 0ac1e6e..357a0f3 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; @@ -141,6 +152,7 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler } private: + friend class ClientCertResolverTest; friend class NetworkHandler; friend class ManagedNetworkConfigurationHandlerTest; class PolicyApplicator; @@ -151,7 +163,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 +173,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 +185,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_; |