| Index: mojo/edk/test/scoped_test_dir.cc
|
| diff --git a/mojo/edk/test/scoped_test_dir.cc b/mojo/edk/test/scoped_test_dir.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5bd768b352a14432f7d9b49882e10b210dff64bf
|
| --- /dev/null
|
| +++ b/mojo/edk/test/scoped_test_dir.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "mojo/edk/test/scoped_test_dir.h"
|
| +
|
| +#include "base/files/file_path.h"
|
| +#include "base/files/file_util.h"
|
| +#include "base/logging.h"
|
| +
|
| +namespace mojo {
|
| +namespace test {
|
| +
|
| +ScopedTestDir::ScopedTestDir() {
|
| + CHECK(temp_dir_.CreateUniqueTempDir());
|
| +}
|
| +
|
| +ScopedTestDir::~ScopedTestDir() {}
|
| +
|
| +util::ScopedFILE ScopedTestDir::CreateFile() {
|
| + base::FilePath unused;
|
| + return util::ScopedFILE(
|
| + base::CreateAndOpenTemporaryFileInDir(temp_dir_.path(), &unused));
|
| +}
|
| +
|
| +} // namespace test
|
| +} // namespace mojo
|
|
|