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_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 scoped_ptr<enterprise_management::PolicyData> new_policy); | 182 scoped_ptr<enterprise_management::PolicyData> new_policy); |
183 virtual ~SignAndStoreSettingsOperation(); | 183 virtual ~SignAndStoreSettingsOperation(); |
184 | 184 |
185 // SessionManagerOperation: | 185 // SessionManagerOperation: |
186 virtual void Run() override; | 186 virtual void Run() override; |
187 | 187 |
188 private: | 188 private: |
189 void StartSigning(bool has_private_key); | 189 void StartSigning(bool has_private_key); |
190 | 190 |
191 // Stores the signed device settings blob. | 191 // Stores the signed device settings blob. |
192 void StoreDeviceSettingsBlob(std::string device_settings_blob); | 192 void StoreDeviceSettings( |
| 193 scoped_ptr<enterprise_management::PolicyFetchResponse> policy_response); |
193 | 194 |
194 // Handles the result of the store operation and triggers the load. | 195 // Handles the result of the store operation and triggers the load. |
195 void HandleStoreResult(bool success); | 196 void HandleStoreResult(bool success); |
196 | 197 |
197 scoped_ptr<enterprise_management::PolicyData> new_policy_; | 198 scoped_ptr<enterprise_management::PolicyData> new_policy_; |
198 | 199 |
199 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_; | 200 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_; |
200 | 201 |
201 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation); | 202 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation); |
202 }; | 203 }; |
203 | 204 |
204 } // namespace chromeos | 205 } // namespace chromeos |
205 | 206 |
206 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 207 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
OLD | NEW |