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