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

Side by Side Diff: chrome/browser/policy/network_configuration_updater.h

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ 5 #ifndef CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_
6 #define CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ 6 #define CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 // Keeps track of the network configuration policy settings and updates the 21 // Keeps track of the network configuration policy settings and updates the
22 // network definitions whenever the configuration changes. 22 // network definitions whenever the configuration changes.
23 class NetworkConfigurationUpdater 23 class NetworkConfigurationUpdater
24 : public ConfigurationPolicyProvider::Observer { 24 : public ConfigurationPolicyProvider::Observer {
25 public: 25 public:
26 NetworkConfigurationUpdater(ConfigurationPolicyProvider* provider, 26 NetworkConfigurationUpdater(ConfigurationPolicyProvider* provider,
27 chromeos::NetworkLibrary* network_library); 27 chromeos::NetworkLibrary* network_library);
28 virtual ~NetworkConfigurationUpdater(); 28 virtual ~NetworkConfigurationUpdater();
29 29
30 // ConfigurationPolicyProvider::Observer: 30 // ConfigurationPolicyProvider::Observer:
31 virtual void OnUpdatePolicy() OVERRIDE; 31 virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) OVERRIDE;
32 32
33 private: 33 private:
34 // Grabs network configuration from policy and applies it. 34 // Grabs network configuration from policy and applies it.
35 void Update(); 35 void Update();
36 36
37 // Extracts ONC string from |policy_map| and pushes the configuration to 37 // Extracts ONC string from |policy_map| and pushes the configuration to
38 // |network_library_| if it's different from |*cached_value| (which is 38 // |network_library_| if it's different from |*cached_value| (which is
39 // updated). 39 // updated).
40 void ApplyNetworkConfiguration(const PolicyMap& policy_map, 40 void ApplyNetworkConfiguration(const PolicyMap& policy_map,
41 ConfigurationPolicyType policy_type, 41 ConfigurationPolicyType policy_type,
42 std::string* cached_value); 42 std::string* cached_value);
43 43
44 // Wraps the provider we read network configuration from. 44 // Wraps the provider we read network configuration from.
45 ConfigurationPolicyObserverRegistrar provider_registrar_; 45 ConfigurationPolicyObserverRegistrar provider_registrar_;
46 46
47 // Network library to write network configuration to. 47 // Network library to write network configuration to.
48 chromeos::NetworkLibrary* network_library_; 48 chromeos::NetworkLibrary* network_library_;
49 49
50 // Current settings. 50 // Current settings.
51 std::string device_network_config_; 51 std::string device_network_config_;
52 std::string user_network_config_; 52 std::string user_network_config_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater); 54 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater);
55 }; 55 };
56 56
57 } // namespace policy 57 } // namespace policy
58 58
59 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ 59 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698