OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/cros/network_constants.h" | 10 #include "chrome/browser/chromeos/cros/network_constants.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // device and user policy are applied as described in the class comment. This | 42 // device and user policy are applied as described in the class comment. This |
43 // function also triggers an immediate policy application of both device and | 43 // function also triggers an immediate policy application of both device and |
44 // user policy. | 44 // user policy. |
45 void OnUserPolicyInitialized(); | 45 void OnUserPolicyInitialized(); |
46 | 46 |
47 // Web trust isn't given to certificates imported from ONC by default. Setting | 47 // Web trust isn't given to certificates imported from ONC by default. Setting |
48 // |allow_web_trust| to true allows giving Web trust to the certificates that | 48 // |allow_web_trust| to true allows giving Web trust to the certificates that |
49 // request it. | 49 // request it. |
50 void set_allow_web_trust(bool allow) { allow_web_trust_ = allow; } | 50 void set_allow_web_trust(bool allow) { allow_web_trust_ = allow; } |
51 | 51 |
52 // Empty network configuration blob. | |
53 static const char kEmptyConfiguration[]; | |
54 | |
55 private: | 52 private: |
56 // Callback that's called by |policy_service_| if the respective ONC policy | 53 // Callback that's called by |policy_service_| if the respective ONC policy |
57 // changed. | 54 // changed. |
58 void OnPolicyChanged(chromeos::onc::ONCSource onc_source, | 55 void OnPolicyChanged(chromeos::onc::ONCSource onc_source, |
59 const base::Value* previous, | 56 const base::Value* previous, |
60 const base::Value* current); | 57 const base::Value* current); |
61 | 58 |
62 // Retrieves the ONC policies from |policy_service_| and pushes the | 59 // Retrieves the ONC policies from |policy_service_| and pushes the |
63 // configurations to |network_library_|. Ensures that a device policy is | 60 // configurations to |network_library_|. Ensures that a device policy is |
64 // always overwritten by a user policy. | 61 // always overwritten by a user policy. |
(...skipping 18 matching lines...) Expand all Loading... |
83 | 80 |
84 // The policy service storing the ONC policies. | 81 // The policy service storing the ONC policies. |
85 PolicyService* policy_service_; | 82 PolicyService* policy_service_; |
86 | 83 |
87 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater); | 84 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater); |
88 }; | 85 }; |
89 | 86 |
90 } // namespace policy | 87 } // namespace policy |
91 | 88 |
92 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ | 89 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ |
OLD | NEW |