| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_POLICY_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // profile. Alternatively, a login can be simulated, which makes it | 42 // profile. Alternatively, a login can be simulated, which makes it |
| 43 // unnecessary to call this function. | 43 // unnecessary to call this function. |
| 44 void WaitForInitialPolicy(Profile* profile); | 44 void WaitForInitialPolicy(Profile* profile); |
| 45 | 45 |
| 46 // Update the policy test server with the given policy. Then refresh and wait | 46 // Update the policy test server with the given policy. Then refresh and wait |
| 47 // for the new policy being applied to |profile|. | 47 // for the new policy being applied to |profile|. |
| 48 void UpdatePolicy(const base::DictionaryValue& mandatory_policy, | 48 void UpdatePolicy(const base::DictionaryValue& mandatory_policy, |
| 49 const base::DictionaryValue& recommended_policy, | 49 const base::DictionaryValue& recommended_policy, |
| 50 Profile* profile); | 50 Profile* profile); |
| 51 | 51 |
| 52 void DeletePolicyFile(); |
| 53 |
| 52 private: | 54 private: |
| 53 void WritePolicyFile(const base::DictionaryValue& mandatory, | 55 void WritePolicyFile(const base::DictionaryValue& mandatory, |
| 54 const base::DictionaryValue& recommended); | 56 const base::DictionaryValue& recommended); |
| 55 base::FilePath PolicyFilePath() const; | 57 base::FilePath PolicyFilePath() const; |
| 56 | 58 |
| 57 const std::string account_id_; | 59 const std::string account_id_; |
| 58 base::ScopedTempDir temp_dir_; | 60 base::ScopedTempDir temp_dir_; |
| 59 scoped_ptr<LocalPolicyTestServer> test_server_; | 61 scoped_ptr<LocalPolicyTestServer> test_server_; |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(UserPolicyTestHelper); | 63 DISALLOW_COPY_AND_ASSIGN(UserPolicyTestHelper); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace policy | 66 } // namespace policy |
| 65 | 67 |
| 66 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ |
| OLD | NEW |