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

Side by Side Diff: chromeos/network/managed_network_configuration_handler_impl.h

Issue 23522004: Separate PolicyApplicator from ManagedNetworkConfigurationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang compilation. Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/network/managed_network_configuration_handler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ 5 #ifndef CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_
6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chromeos/chromeos_export.h" 14 #include "chromeos/chromeos_export.h"
15 #include "chromeos/network/managed_network_configuration_handler.h" 15 #include "chromeos/network/managed_network_configuration_handler.h"
16 #include "chromeos/network/network_handler_callbacks.h" 16 #include "chromeos/network/network_handler_callbacks.h"
17 #include "chromeos/network/network_profile_observer.h" 17 #include "chromeos/network/network_profile_observer.h"
18 #include "chromeos/network/policy_applicator.h"
18 19
19 namespace base { 20 namespace base {
20 class DictionaryValue; 21 class DictionaryValue;
21 } 22 }
22 23
23 namespace chromeos { 24 namespace chromeos {
24 25
25 class NetworkConfigurationHandler; 26 class NetworkConfigurationHandler;
26 struct NetworkProfile; 27 struct NetworkProfile;
27 class NetworkProfileHandler; 28 class NetworkProfileHandler;
28 class NetworkStateHandler; 29 class NetworkStateHandler;
29 30
30 class CHROMEOS_EXPORT ManagedNetworkConfigurationHandlerImpl 31 class CHROMEOS_EXPORT ManagedNetworkConfigurationHandlerImpl
31 : public ManagedNetworkConfigurationHandler, 32 : public ManagedNetworkConfigurationHandler,
32 public NetworkProfileObserver { 33 public NetworkProfileObserver,
34 public PolicyApplicator::ConfigurationHandler {
33 public: 35 public:
34 typedef std::map<std::string, const base::DictionaryValue*> GuidToPolicyMap; 36 typedef std::map<std::string, const base::DictionaryValue*> GuidToPolicyMap;
35 typedef std::map<std::string, GuidToPolicyMap> UserToPoliciesMap; 37 typedef std::map<std::string, GuidToPolicyMap> UserToPoliciesMap;
36 38
37 virtual ~ManagedNetworkConfigurationHandlerImpl(); 39 virtual ~ManagedNetworkConfigurationHandlerImpl();
38 40
39 // ManagedNetworkConfigurationHandler overrides 41 // ManagedNetworkConfigurationHandler overrides
40 virtual void AddObserver(NetworkPolicyObserver* observer) OVERRIDE; 42 virtual void AddObserver(NetworkPolicyObserver* observer) OVERRIDE;
41 virtual void RemoveObserver(NetworkPolicyObserver* observer) OVERRIDE; 43 virtual void RemoveObserver(NetworkPolicyObserver* observer) OVERRIDE;
42 44
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 onc::ONCSource* onc_source) const OVERRIDE; 80 onc::ONCSource* onc_source) const OVERRIDE;
79 81
80 virtual const base::DictionaryValue* FindPolicyByGuidAndProfile( 82 virtual const base::DictionaryValue* FindPolicyByGuidAndProfile(
81 const std::string& guid, 83 const std::string& guid,
82 const std::string& profile_path) const OVERRIDE; 84 const std::string& profile_path) const OVERRIDE;
83 85
84 // NetworkProfileObserver overrides 86 // NetworkProfileObserver overrides
85 virtual void OnProfileAdded(const NetworkProfile& profile) OVERRIDE; 87 virtual void OnProfileAdded(const NetworkProfile& profile) OVERRIDE;
86 virtual void OnProfileRemoved(const NetworkProfile& profile) OVERRIDE; 88 virtual void OnProfileRemoved(const NetworkProfile& profile) OVERRIDE;
87 89
88 NetworkConfigurationHandler* network_configuration_handler() { 90 // PolicyApplicator::ConfigurationHandler overrides
89 return network_configuration_handler_; 91 virtual void CreateConfigurationFromPolicy(
90 } 92 const base::DictionaryValue& shill_properties) OVERRIDE;
91 93
92 private: 94 private:
93 friend class ClientCertResolverTest; 95 friend class ClientCertResolverTest;
94 friend class NetworkHandler; 96 friend class NetworkHandler;
95 friend class ManagedNetworkConfigurationHandlerTest; 97 friend class ManagedNetworkConfigurationHandlerTest;
96 class PolicyApplicator;
97 98
98 ManagedNetworkConfigurationHandlerImpl(); 99 ManagedNetworkConfigurationHandlerImpl();
99 100
100 void Init(NetworkStateHandler* network_state_handler, 101 void Init(NetworkStateHandler* network_state_handler,
101 NetworkProfileHandler* network_profile_handler, 102 NetworkProfileHandler* network_profile_handler,
102 NetworkConfigurationHandler* network_configuration_handler); 103 NetworkConfigurationHandler* network_configuration_handler);
103 104
104 void GetManagedPropertiesCallback( 105 void GetManagedPropertiesCallback(
105 const network_handler::DictionaryResultCallback& callback, 106 const network_handler::DictionaryResultCallback& callback,
106 const network_handler::ErrorCallback& error_callback, 107 const network_handler::ErrorCallback& error_callback,
(...skipping 21 matching lines...) Expand all
128 // For Shill client callbacks 129 // For Shill client callbacks
129 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl> 130 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl>
130 weak_ptr_factory_; 131 weak_ptr_factory_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl); 133 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl);
133 }; 134 };
134 135
135 } // namespace chromeos 136 } // namespace chromeos
136 137
137 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ 138 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/network/managed_network_configuration_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698