| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "storage/browser/fileapi/sandbox_file_system_backend.h" | 5 #include "storage/browser/fileapi/sandbox_file_system_backend.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const GURL& origin_url, | 64 const GURL& origin_url, |
| 65 const std::string& name, | 65 const std::string& name, |
| 66 base::File::Error error) { | 66 base::File::Error error) { |
| 67 *error_out = error; | 67 *error_out = error; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 | 71 |
| 72 class SandboxFileSystemBackendTest : public testing::Test { | 72 class SandboxFileSystemBackendTest : public testing::Test { |
| 73 protected: | 73 protected: |
| 74 virtual void SetUp() { | 74 void SetUp() override { |
| 75 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 75 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 76 SetUpNewDelegate(CreateAllowFileAccessOptions()); | 76 SetUpNewDelegate(CreateAllowFileAccessOptions()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void SetUpNewDelegate(const storage::FileSystemOptions& options) { | 79 void SetUpNewDelegate(const storage::FileSystemOptions& options) { |
| 80 delegate_.reset(new SandboxFileSystemBackendDelegate( | 80 delegate_.reset(new SandboxFileSystemBackendDelegate( |
| 81 NULL /* quota_manager_proxy */, | 81 NULL /* quota_manager_proxy */, |
| 82 base::MessageLoopProxy::current().get(), | 82 base::MessageLoopProxy::current().get(), |
| 83 data_dir_.path(), | 83 data_dir_.path(), |
| 84 NULL /* special_storage_policy */, | 84 NULL /* special_storage_policy */, |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, | 303 storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, |
| 304 &root_path)); | 304 &root_path)); |
| 305 base::FilePath expected = file_system_path().AppendASCII( | 305 base::FilePath expected = file_system_path().AppendASCII( |
| 306 kRootPathFileURITestCases[i].expected_path); | 306 kRootPathFileURITestCases[i].expected_path); |
| 307 EXPECT_EQ(expected.value(), root_path.value()); | 307 EXPECT_EQ(expected.value(), root_path.value()); |
| 308 EXPECT_TRUE(base::DirectoryExists(root_path)); | 308 EXPECT_TRUE(base::DirectoryExists(root_path)); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace content | 312 } // namespace content |
| OLD | NEW |