| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 {storage::kFileSystemTypeTemporary, "https://foo:2/", "002" PS "t"}, | 49 {storage::kFileSystemTypeTemporary, "https://foo:2/", "002" PS "t"}, |
| 50 {storage::kFileSystemTypePersistent, "https://foo:2/", "002" PS "p"}, | 50 {storage::kFileSystemTypePersistent, "https://foo:2/", "002" PS "p"}, |
| 51 {storage::kFileSystemTypeTemporary, "https://bar.com/", "003" PS "t"}, | 51 {storage::kFileSystemTypeTemporary, "https://bar.com/", "003" PS "t"}, |
| 52 {storage::kFileSystemTypePersistent, "https://bar.com/", "003" PS "p"}, | 52 {storage::kFileSystemTypePersistent, "https://bar.com/", "003" PS "p"}, |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 const struct RootPathFileURITest { | 55 const struct RootPathFileURITest { |
| 56 storage::FileSystemType type; | 56 storage::FileSystemType type; |
| 57 const char* origin_url; | 57 const char* origin_url; |
| 58 const char* expected_path; | 58 const char* expected_path; |
| 59 const char* virtual_path; | |
| 60 } kRootPathFileURITestCases[] = { | 59 } kRootPathFileURITestCases[] = { |
| 61 {storage::kFileSystemTypeTemporary, "file:///", "000" PS "t", NULL}, | 60 {storage::kFileSystemTypeTemporary, "file:///", "000" PS "t"}, |
| 62 {storage::kFileSystemTypePersistent, "file:///", "000" PS "p", NULL}, | 61 {storage::kFileSystemTypePersistent, "file:///", "000" PS "p"}}; |
| 63 }; | |
| 64 | 62 |
| 65 void DidOpenFileSystem(base::File::Error* error_out, | 63 void DidOpenFileSystem(base::File::Error* error_out, |
| 66 const GURL& origin_url, | 64 const GURL& origin_url, |
| 67 const std::string& name, | 65 const std::string& name, |
| 68 base::File::Error error) { | 66 base::File::Error error) { |
| 69 *error_out = error; | 67 *error_out = error; |
| 70 } | 68 } |
| 71 | 69 |
| 72 } // namespace | 70 } // namespace |
| 73 | 71 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, | 301 storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, |
| 304 &root_path)); | 302 &root_path)); |
| 305 base::FilePath expected = file_system_path().AppendASCII( | 303 base::FilePath expected = file_system_path().AppendASCII( |
| 306 kRootPathFileURITestCases[i].expected_path); | 304 kRootPathFileURITestCases[i].expected_path); |
| 307 EXPECT_EQ(expected.value(), root_path.value()); | 305 EXPECT_EQ(expected.value(), root_path.value()); |
| 308 EXPECT_TRUE(base::DirectoryExists(root_path)); | 306 EXPECT_TRUE(base::DirectoryExists(root_path)); |
| 309 } | 307 } |
| 310 } | 308 } |
| 311 | 309 |
| 312 } // namespace content | 310 } // namespace content |
| OLD | NEW |