| 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/fileapi/file_system_database_test_helper.h" | 18 #include "webkit/browser/fileapi/file_system_database_test_helper.h" |
| 19 #include "webkit/fileapi/file_system_origin_database.h" | 19 #include "webkit/browser/fileapi/file_system_origin_database.h" |
| 20 #include "webkit/fileapi/file_system_util.h" | 20 #include "webkit/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[] = FILE_PATH_LITERAL("Origin
s"); | 27 const base::FilePath::CharType kOriginDatabaseName[] = FILE_PATH_LITERAL("Origin
s"); |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 const std::string kOrigin2("piyo.example.org"); | 298 const std::string kOrigin2("piyo.example.org"); |
| 299 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); | 299 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); |
| 300 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); | 300 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); |
| 301 EXPECT_FALSE(path.empty()); | 301 EXPECT_FALSE(path.empty()); |
| 302 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); | 302 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace fileapi | 306 } // namespace fileapi |
| OLD | NEW |