| 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/browser/fileapi/test_file_system_backend.h" | 5 #include "webkit/browser/fileapi/test_file_system_backend.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { | 98 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { |
| 99 return (type == kFileSystemTypeTest); | 99 return (type == kFileSystemTypeTest); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void TestFileSystemBackend::OpenFileSystem( | 102 void TestFileSystemBackend::OpenFileSystem( |
| 103 const GURL& origin_url, | 103 const GURL& origin_url, |
| 104 FileSystemType type, | 104 FileSystemType type, |
| 105 OpenFileSystemMode mode, | 105 OpenFileSystemMode mode, |
| 106 const OpenFileSystemCallback& callback) { | 106 const OpenFileSystemCallback& callback) { |
| 107 callback.Run(base::PLATFORM_FILE_OK); | 107 callback.Run(GetFileSystemRootURI(origin_url, type), |
| 108 GetFileSystemName(origin_url, type), |
| 109 base::PLATFORM_FILE_OK); |
| 108 } | 110 } |
| 109 | 111 |
| 110 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { | 112 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { |
| 111 DCHECK(local_file_util_.get()); | 113 DCHECK(local_file_util_.get()); |
| 112 return local_file_util_->sync_file_util(); | 114 return local_file_util_->sync_file_util(); |
| 113 } | 115 } |
| 114 | 116 |
| 115 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { | 117 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { |
| 116 return local_file_util_.get(); | 118 return local_file_util_.get(); |
| 117 } | 119 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 183 } |
| 182 | 184 |
| 183 void TestFileSystemBackend::AddFileChangeObserver( | 185 void TestFileSystemBackend::AddFileChangeObserver( |
| 184 FileChangeObserver* observer) { | 186 FileChangeObserver* observer) { |
| 185 ChangeObserverList::Source source = change_observers_.source(); | 187 ChangeObserverList::Source source = change_observers_.source(); |
| 186 source.AddObserver(observer, task_runner_.get()); | 188 source.AddObserver(observer, task_runner_.get()); |
| 187 change_observers_ = ChangeObserverList(source); | 189 change_observers_ = ChangeObserverList(source); |
| 188 } | 190 } |
| 189 | 191 |
| 190 } // namespace fileapi | 192 } // namespace fileapi |
| OLD | NEW |