| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "mojo/edk/test/scoped_test_dir.h" | |
| 6 | |
| 7 #include "base/files/file_path.h" | |
| 8 #include "base/files/file_util.h" | |
| 9 #include "base/logging.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 namespace test { | |
| 13 | |
| 14 ScopedTestDir::ScopedTestDir() { | |
| 15 CHECK(temp_dir_.CreateUniqueTempDir()); | |
| 16 } | |
| 17 | |
| 18 ScopedTestDir::~ScopedTestDir() {} | |
| 19 | |
| 20 util::ScopedFILE ScopedTestDir::CreateFile() { | |
| 21 base::FilePath unused; | |
| 22 return util::ScopedFILE( | |
| 23 base::CreateAndOpenTemporaryFileInDir(temp_dir_.path(), &unused)); | |
| 24 } | |
| 25 | |
| 26 } // namespace test | |
| 27 } // namespace mojo | |
| OLD | NEW |