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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "webkit/browser/fileapi/test_file_set.h" | 30 #include "webkit/browser/fileapi/test_file_set.h" |
31 #include "webkit/browser/quota/mock_special_storage_policy.h" | 31 #include "webkit/browser/quota/mock_special_storage_policy.h" |
32 #include "webkit/browser/quota/quota_manager.h" | 32 #include "webkit/browser/quota/quota_manager.h" |
33 #include "webkit/common/quota/quota_types.h" | 33 #include "webkit/common/quota/quota_types.h" |
34 | 34 |
35 namespace fileapi { | 35 namespace fileapi { |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 bool FileExists(const base::FilePath& path) { | 39 bool FileExists(const base::FilePath& path) { |
40 return base::PathExists(path) && !file_util::DirectoryExists(path); | 40 return base::PathExists(path) && !base::DirectoryExists(path); |
41 } | 41 } |
42 | 42 |
43 int64 GetSize(const base::FilePath& path) { | 43 int64 GetSize(const base::FilePath& path) { |
44 int64 size; | 44 int64 size; |
45 EXPECT_TRUE(file_util::GetFileSize(path, &size)); | 45 EXPECT_TRUE(file_util::GetFileSize(path, &size)); |
46 return size; | 46 return size; |
47 } | 47 } |
48 | 48 |
49 // After a move, the dest exists and the source doesn't. | 49 // After a move, the dest exists and the source doesn't. |
50 // After a copy, both source and dest exist. | 50 // After a copy, both source and dest exist. |
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 // Remove isolated. | 2321 // Remove isolated. |
2322 storage_policy_->RemoveIsolated(origin_); | 2322 storage_policy_->RemoveIsolated(origin_); |
2323 | 2323 |
2324 // This should still get the same database. | 2324 // This should still get the same database. |
2325 SandboxDirectoryDatabase* db2 = file_util.GetDirectoryDatabase( | 2325 SandboxDirectoryDatabase* db2 = file_util.GetDirectoryDatabase( |
2326 origin_, kFileSystemTypePersistent, false /* create */); | 2326 origin_, kFileSystemTypePersistent, false /* create */); |
2327 ASSERT_EQ(db, db2); | 2327 ASSERT_EQ(db, db2); |
2328 } | 2328 } |
2329 | 2329 |
2330 } // namespace fileapi | 2330 } // namespace fileapi |
OLD | NEW |