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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const std::string& account_id, | 42 const std::string& account_id, |
43 chromeos::SessionManagerClient* client, | 43 chromeos::SessionManagerClient* client, |
44 chromeos::DeviceSettingsService* device_settings_service, | 44 chromeos::DeviceSettingsService* device_settings_service, |
45 scoped_refptr<base::SequencedTaskRunner> background_task_runner); | 45 scoped_refptr<base::SequencedTaskRunner> background_task_runner); |
46 virtual ~DeviceLocalAccountPolicyStore(); | 46 virtual ~DeviceLocalAccountPolicyStore(); |
47 | 47 |
48 const std::string& account_id() const { return account_id_; } | 48 const std::string& account_id() const { return account_id_; } |
49 | 49 |
50 // CloudPolicyStore: | 50 // CloudPolicyStore: |
51 virtual void Store( | 51 virtual void Store( |
52 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; | 52 const enterprise_management::PolicyFetchResponse& policy) override; |
53 virtual void Load() OVERRIDE; | 53 virtual void Load() override; |
54 | 54 |
55 private: | 55 private: |
56 // Called back by |session_manager_client_| after policy retrieval. Checks for | 56 // Called back by |session_manager_client_| after policy retrieval. Checks for |
57 // success and triggers policy validation. | 57 // success and triggers policy validation. |
58 void ValidateLoadedPolicyBlob(const std::string& policy_blob); | 58 void ValidateLoadedPolicyBlob(const std::string& policy_blob); |
59 | 59 |
60 // Updates state after validation and notifies observers. | 60 // Updates state after validation and notifies observers. |
61 void UpdatePolicy(UserCloudPolicyValidator* validator); | 61 void UpdatePolicy(UserCloudPolicyValidator* validator); |
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. |
(...skipping 23 matching lines...) Expand all Loading... |
87 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; | 87 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; |
88 | 88 |
89 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; | 89 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); | 91 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace policy | 94 } // namespace policy |
95 | 95 |
96 #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 |