OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 #include <functional> | 6 #include <functional> |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "content/browser/fileapi/sandbox_database_test_helper.h" | 16 #include "content/browser/fileapi/sandbox_database_test_helper.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/leveldatabase/src/db/filename.h" | 18 #include "third_party/leveldatabase/src/db/filename.h" |
19 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 19 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
20 #include "webkit/browser/fileapi/sandbox_origin_database.h" | 20 #include "storage/browser/fileapi/sandbox_origin_database.h" |
21 #include "webkit/common/fileapi/file_system_util.h" | 21 #include "storage/common/fileapi/file_system_util.h" |
22 | 22 |
23 using fileapi::SandboxOriginDatabase; | 23 using storage::SandboxOriginDatabase; |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 namespace { | 27 namespace { |
28 const base::FilePath::CharType kFileSystemDirName[] = | 28 const base::FilePath::CharType kFileSystemDirName[] = |
29 FILE_PATH_LITERAL("File System"); | 29 FILE_PATH_LITERAL("File System"); |
30 const base::FilePath::CharType kOriginDatabaseName[] = | 30 const base::FilePath::CharType kOriginDatabaseName[] = |
31 FILE_PATH_LITERAL("Origins"); | 31 FILE_PATH_LITERAL("Origins"); |
32 } // namespace | 32 } // namespace |
33 | 33 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 const std::string kOrigin2("piyo.example.org"); | 297 const std::string kOrigin2("piyo.example.org"); |
298 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); | 298 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); |
299 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); | 299 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); |
300 EXPECT_FALSE(path.empty()); | 300 EXPECT_FALSE(path.empty()); |
301 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); | 301 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 } // namespace content | 305 } // namespace content |
OLD | NEW |