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_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Sends the policy blob to session_manager for storing after validation. | 63 // Sends the policy blob to session_manager for storing after validation. |
64 void StoreValidatedPolicy(UserCloudPolicyValidator* validator); | 64 void StoreValidatedPolicy(UserCloudPolicyValidator* validator); |
65 | 65 |
66 // Called back when a store operation completes, updates state and reloads the | 66 // Called back when a store operation completes, updates state and reloads the |
67 // policy if applicable. | 67 // policy if applicable. |
68 void HandleStoreResult(bool result); | 68 void HandleStoreResult(bool result); |
69 | 69 |
70 // Gets the owner key and triggers policy validation. | 70 // Gets the owner key and triggers policy validation. |
71 void CheckKeyAndValidate( | 71 void CheckKeyAndValidate( |
| 72 bool valid_timestamp_required, |
72 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, | 73 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, |
73 const UserCloudPolicyValidator::CompletionCallback& callback); | 74 const UserCloudPolicyValidator::CompletionCallback& callback); |
74 | 75 |
75 // Triggers policy validation. | 76 // Triggers policy validation. |
76 void Validate( | 77 void Validate( |
| 78 bool valid_timestamp_required, |
77 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, | 79 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, |
78 const UserCloudPolicyValidator::CompletionCallback& callback, | 80 const UserCloudPolicyValidator::CompletionCallback& callback, |
79 chromeos::DeviceSettingsService::OwnershipStatus ownership_status); | 81 chromeos::DeviceSettingsService::OwnershipStatus ownership_status); |
80 | 82 |
81 const std::string account_id_; | 83 const std::string account_id_; |
82 chromeos::SessionManagerClient* session_manager_client_; | 84 chromeos::SessionManagerClient* session_manager_client_; |
83 chromeos::DeviceSettingsService* device_settings_service_; | 85 chromeos::DeviceSettingsService* device_settings_service_; |
84 | 86 |
85 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; | 87 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; |
86 | 88 |
87 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; | 89 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; |
88 | 90 |
89 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); | 91 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); |
90 }; | 92 }; |
91 | 93 |
92 } // namespace policy | 94 } // namespace policy |
93 | 95 |
94 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ | 96 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ |
OLD | NEW |