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/test_mount_point_provider.h" | 5 #include "webkit/fileapi/test_mount_point_provider.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 observers_ = UpdateObserverList(source); | 84 observers_ = UpdateObserverList(source); |
85 } | 85 } |
86 | 86 |
87 TestMountPointProvider::~TestMountPointProvider() { | 87 TestMountPointProvider::~TestMountPointProvider() { |
88 } | 88 } |
89 | 89 |
90 bool TestMountPointProvider::CanHandleType(FileSystemType type) const { | 90 bool TestMountPointProvider::CanHandleType(FileSystemType type) const { |
91 return (type == kFileSystemTypeTest); | 91 return (type == kFileSystemTypeTest); |
92 } | 92 } |
93 | 93 |
94 void TestMountPointProvider::ValidateFileSystemRoot( | 94 void TestMountPointProvider::OpenFileSystem( |
95 const GURL& origin_url, | 95 const GURL& origin_url, |
96 FileSystemType type, | 96 FileSystemType type, |
97 bool create, | 97 OpenFileSystemMode mode, |
98 const ValidateFileSystemCallback& callback) { | 98 const OpenFileSystemCallback& callback) { |
99 callback.Run(base::PLATFORM_FILE_OK); | 99 callback.Run(base::PLATFORM_FILE_OK); |
100 } | 100 } |
101 | 101 |
102 FileSystemFileUtil* TestMountPointProvider::GetFileUtil(FileSystemType type) { | 102 FileSystemFileUtil* TestMountPointProvider::GetFileUtil(FileSystemType type) { |
103 DCHECK(local_file_util_.get()); | 103 DCHECK(local_file_util_.get()); |
104 return local_file_util_->sync_file_util(); | 104 return local_file_util_->sync_file_util(); |
105 } | 105 } |
106 | 106 |
107 AsyncFileUtil* TestMountPointProvider::GetAsyncFileUtil(FileSystemType type) { | 107 AsyncFileUtil* TestMountPointProvider::GetAsyncFileUtil(FileSystemType type) { |
108 return local_file_util_.get(); | 108 return local_file_util_.get(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 NOTREACHED(); | 181 NOTREACHED(); |
182 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 182 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
183 } | 183 } |
184 | 184 |
185 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( | 185 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( |
186 FileSystemType type) const { | 186 FileSystemType type) const { |
187 return &observers_; | 187 return &observers_; |
188 } | 188 } |
189 | 189 |
190 } // namespace fileapi | 190 } // namespace fileapi |
OLD | NEW |