Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: chrome/browser/chromeos/policy/user_policy_test_helper.cc

Issue 2318023002: //chrome/browser/chromeos: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Address comment and also remove non-trivial cases Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698