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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 bool AssembleAndSignPolicyAsync( | 79 bool AssembleAndSignPolicyAsync( |
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 |
Mattias Nissler (ping if slow)
2014/10/24 08:08:02
Can we put a comment here saying that this functio
| |
90 // Sets policy. | |
91 virtual bool SetPolicy( | |
92 scoped_ptr<enterprise_management::PolicyData> policy) = 0; | |
93 | |
90 bool SetBoolean(const std::string& setting, bool value); | 94 bool SetBoolean(const std::string& setting, bool value); |
91 bool SetInteger(const std::string& setting, int value); | 95 bool SetInteger(const std::string& setting, int value); |
92 bool SetDouble(const std::string& setting, double value); | 96 bool SetDouble(const std::string& setting, double value); |
93 bool SetString(const std::string& setting, const std::string& value); | 97 bool SetString(const std::string& setting, const std::string& value); |
94 | 98 |
95 protected: | 99 protected: |
96 void ReloadKeypair(); | 100 void ReloadKeypair(); |
97 | 101 |
98 void OnKeypairLoaded(const scoped_refptr<PublicKey>& public_key, | 102 void OnKeypairLoaded(const scoped_refptr<PublicKey>& public_key, |
99 const scoped_refptr<PrivateKey>& private_key); | 103 const scoped_refptr<PrivateKey>& private_key); |
(...skipping 20 matching lines...) Expand all Loading... | |
120 | 124 |
121 private: | 125 private: |
122 base::WeakPtrFactory<OwnerSettingsService> weak_factory_; | 126 base::WeakPtrFactory<OwnerSettingsService> weak_factory_; |
123 | 127 |
124 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService); | 128 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService); |
125 }; | 129 }; |
126 | 130 |
127 } // namespace ownership | 131 } // namespace ownership |
128 | 132 |
129 #endif // COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ | 133 #endif // COMPONENTS_OWNERSHIP_OWNER_SETTINGS_SERVICE_H_ |
OLD | NEW |