OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ | 5 #ifndef COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ |
6 #define COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ | 6 #define COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 base::TaskRunner* task_runner, | 80 base::TaskRunner* task_runner, |
81 scoped_ptr<enterprise_management::PolicyData> policy, | 81 scoped_ptr<enterprise_management::PolicyData> policy, |
82 const AssembleAndSignPolicyAsyncCallback& callback); | 82 const AssembleAndSignPolicyAsyncCallback& callback); |
83 | 83 |
84 // Checks whether |setting| is handled by OwnerSettingsService. | 84 // Checks whether |setting| is handled by OwnerSettingsService. |
85 virtual bool HandlesSetting(const std::string& setting) = 0; | 85 virtual bool HandlesSetting(const std::string& setting) = 0; |
86 | 86 |
87 // Sets |setting| value to |value|. | 87 // Sets |setting| value to |value|. |
88 virtual bool Set(const std::string& setting, const base::Value& value) = 0; | 88 virtual bool Set(const std::string& setting, const base::Value& value) = 0; |
89 | 89 |
| 90 // Sets a bunch of device settings accumulated before ownership gets |
| 91 // established. |
| 92 // Note that this is a temporary solution and should be removed soon. |
| 93 virtual bool CommitTentativeDeviceSettings( |
| 94 scoped_ptr<enterprise_management::PolicyData> policy) = 0; |
| 95 |
90 bool SetBoolean(const std::string& setting, bool value); | 96 bool SetBoolean(const std::string& setting, bool value); |
91 bool SetInteger(const std::string& setting, int value); | 97 bool SetInteger(const std::string& setting, int value); |
92 bool SetDouble(const std::string& setting, double value); | 98 bool SetDouble(const std::string& setting, double value); |
93 bool SetString(const std::string& setting, const std::string& value); | 99 bool SetString(const std::string& setting, const std::string& value); |
94 | 100 |
95 protected: | 101 protected: |
96 void ReloadKeypair(); | 102 void ReloadKeypair(); |
97 | 103 |
98 void OnKeypairLoaded(const scoped_refptr<PublicKey>& public_key, | 104 void OnKeypairLoaded(const scoped_refptr<PublicKey>& public_key, |
99 const scoped_refptr<PrivateKey>& private_key); | 105 const scoped_refptr<PrivateKey>& private_key); |
(...skipping 20 matching lines...) Expand all Loading... |
120 | 126 |
121 private: | 127 private: |
122 base::WeakPtrFactory<OwnerSettingsService> weak_factory_; | 128 base::WeakPtrFactory<OwnerSettingsService> weak_factory_; |
123 | 129 |
124 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService); | 130 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService); |
125 }; | 131 }; |
126 | 132 |
127 } // namespace ownership | 133 } // namespace ownership |
128 | 134 |
129 #endif // COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ | 135 #endif // COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ |
OLD | NEW |