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