| 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_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 chromeos::SessionManagerClient* session_manager_client, | 45 chromeos::SessionManagerClient* session_manager_client, |
| 46 scoped_refptr<base::SequencedTaskRunner> background_task_runner, | 46 scoped_refptr<base::SequencedTaskRunner> background_task_runner, |
| 47 const std::string& username, | 47 const std::string& username, |
| 48 const base::FilePath& user_policy_key_dir, | 48 const base::FilePath& user_policy_key_dir, |
| 49 const base::FilePath& legacy_token_cache_file, | 49 const base::FilePath& legacy_token_cache_file, |
| 50 const base::FilePath& legacy_policy_cache_file); | 50 const base::FilePath& legacy_policy_cache_file); |
| 51 virtual ~UserCloudPolicyStoreChromeOS(); | 51 virtual ~UserCloudPolicyStoreChromeOS(); |
| 52 | 52 |
| 53 // CloudPolicyStore: | 53 // CloudPolicyStore: |
| 54 virtual void Store( | 54 virtual void Store( |
| 55 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; | 55 const enterprise_management::PolicyFetchResponse& policy) override; |
| 56 virtual void Load() OVERRIDE; | 56 virtual void Load() override; |
| 57 | 57 |
| 58 // Loads the policy synchronously on the current thread. | 58 // Loads the policy synchronously on the current thread. |
| 59 void LoadImmediately(); | 59 void LoadImmediately(); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 // Starts validation of |policy| before storing it. | 62 // Starts validation of |policy| before storing it. |
| 63 void ValidatePolicyForStore( | 63 void ValidatePolicyForStore( |
| 64 scoped_ptr<enterprise_management::PolicyFetchResponse> policy); | 64 scoped_ptr<enterprise_management::PolicyFetchResponse> policy); |
| 65 | 65 |
| 66 // Completion handler for policy validation on the Store() path. | 66 // Completion handler for policy validation on the Store() path. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 std::string policy_key_; | 139 std::string policy_key_; |
| 140 | 140 |
| 141 base::WeakPtrFactory<UserCloudPolicyStoreChromeOS> weak_factory_; | 141 base::WeakPtrFactory<UserCloudPolicyStoreChromeOS> weak_factory_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); | 143 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace policy | 146 } // namespace policy |
| 147 | 147 |
| 148 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 148 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| OLD | NEW |