| 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 #include "chrome/browser/chromeos/policy/user_policy_test_helper.h" | 5 #include "chrome/browser/chromeos/policy/user_policy_test_helper.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const base::DictionaryValue& mandatory, | 137 const base::DictionaryValue& mandatory, |
| 138 const base::DictionaryValue& recommended) { | 138 const base::DictionaryValue& recommended) { |
| 139 const std::string policy = BuildPolicy( | 139 const std::string policy = BuildPolicy( |
| 140 mandatory, recommended, dm_protocol::kChromeUserPolicyType, account_id_); | 140 mandatory, recommended, dm_protocol::kChromeUserPolicyType, account_id_); |
| 141 const int bytes_written = | 141 const int bytes_written = |
| 142 base::WriteFile(PolicyFilePath(), policy.data(), policy.size()); | 142 base::WriteFile(PolicyFilePath(), policy.data(), policy.size()); |
| 143 ASSERT_EQ(static_cast<int>(policy.size()), bytes_written); | 143 ASSERT_EQ(static_cast<int>(policy.size()), bytes_written); |
| 144 } | 144 } |
| 145 | 145 |
| 146 base::FilePath UserPolicyTestHelper::PolicyFilePath() const { | 146 base::FilePath UserPolicyTestHelper::PolicyFilePath() const { |
| 147 return temp_dir_.path().AppendASCII("policy.json"); | 147 return temp_dir_.GetPath().AppendASCII("policy.json"); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace policy | 150 } // namespace policy |
| OLD | NEW |