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 "webkit/fileapi/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 CreateAllowFileAccessOptions())); | 32 CreateAllowFileAccessOptions())); |
33 } | 33 } |
34 | 34 |
35 SandboxMountPointProvider::OriginEnumerator* CreateEnumerator() const { | 35 SandboxMountPointProvider::OriginEnumerator* CreateEnumerator() const { |
36 return sandbox_provider_->CreateOriginEnumerator(); | 36 return sandbox_provider_->CreateOriginEnumerator(); |
37 } | 37 } |
38 | 38 |
39 protected: | 39 protected: |
40 void CreateOriginTypeDirectory(const GURL& origin, | 40 void CreateOriginTypeDirectory(const GURL& origin, |
41 fileapi::FileSystemType type) { | 41 fileapi::FileSystemType type) { |
42 FilePath target = sandbox_provider_-> | 42 base::FilePath target = sandbox_provider_-> |
43 GetBaseDirectoryForOriginAndType(origin, type, true); | 43 GetBaseDirectoryForOriginAndType(origin, type, true); |
44 ASSERT_TRUE(!target.empty()); | 44 ASSERT_TRUE(!target.empty()); |
45 ASSERT_TRUE(file_util::DirectoryExists(target)); | 45 ASSERT_TRUE(file_util::DirectoryExists(target)); |
46 } | 46 } |
47 | 47 |
48 base::ScopedTempDir data_dir_; | 48 base::ScopedTempDir data_dir_; |
49 MessageLoop message_loop_; | 49 MessageLoop message_loop_; |
50 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; | 50 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; |
51 }; | 51 }; |
52 | 52 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 ASSERT_TRUE(persistent_set.find(current) != persistent_set.end()); | 98 ASSERT_TRUE(persistent_set.find(current) != persistent_set.end()); |
99 ++persistent_actual_size; | 99 ++persistent_actual_size; |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 EXPECT_EQ(temporary_size, temporary_actual_size); | 103 EXPECT_EQ(temporary_size, temporary_actual_size); |
104 EXPECT_EQ(persistent_size, persistent_actual_size); | 104 EXPECT_EQ(persistent_size, persistent_actual_size); |
105 } | 105 } |
106 | 106 |
107 } // namespace fileapi | 107 } // namespace fileapi |
OLD | NEW |