[email protected] | d77ecbf6 | 2013-10-02 06:43:08 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | d77ecbf6 | 2013-10-02 06:43:08 | [diff] [blame] | 5 | #include "content/public/test/test_file_system_backend.h" |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 6 | |
| 7 | #include <set> |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | #include "base/file_util.h" |
[email protected] | fb44196 | 2013-05-08 05:35:24 | [diff] [blame] | 12 | #include "base/sequenced_task_runner.h" |
[email protected] | b8f2f42 | 2013-09-12 17:38:39 | [diff] [blame] | 13 | #include "webkit/browser/blob/file_stream_reader.h" |
[email protected] | 20c2df6 | 2013-05-21 08:26:36 | [diff] [blame] | 14 | #include "webkit/browser/fileapi/copy_or_move_file_validator.h" |
[email protected] | f25e113 | 2013-05-24 13:58:04 | [diff] [blame] | 15 | #include "webkit/browser/fileapi/file_observers.h" |
[email protected] | bd69f57 | 2013-09-09 06:15:23 | [diff] [blame] | 16 | #include "webkit/browser/fileapi/file_system_operation.h" |
[email protected] | c6f9203a | 2013-05-28 02:08:07 | [diff] [blame] | 17 | #include "webkit/browser/fileapi/file_system_operation_context.h" |
[email protected] | 20c2df6 | 2013-05-21 08:26:36 | [diff] [blame] | 18 | #include "webkit/browser/fileapi/file_system_quota_util.h" |
[email protected] | 5a20d04 | 2013-05-22 12:54:18 | [diff] [blame] | 19 | #include "webkit/browser/fileapi/local_file_util.h" |
| 20 | #include "webkit/browser/fileapi/native_file_util.h" |
[email protected] | 6372a70 | 2013-11-12 18:09:07 | [diff] [blame] | 21 | #include "webkit/browser/fileapi/quota/quota_reservation.h" |
[email protected] | 28f051c3 | 2013-05-21 05:15:26 | [diff] [blame] | 22 | #include "webkit/browser/fileapi/sandbox_file_stream_writer.h" |
[email protected] | 7660ec9 | 2013-05-30 05:12:39 | [diff] [blame] | 23 | #include "webkit/browser/quota/quota_manager.h" |
[email protected] | 61d271f3 | 2013-05-28 04:59:23 | [diff] [blame] | 24 | #include "webkit/common/fileapi/file_system_util.h" |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 25 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 26 | using fileapi::FileSystemContext; |
| 27 | using fileapi::FileSystemOperation; |
| 28 | using fileapi::FileSystemOperationContext; |
| 29 | using fileapi::FileSystemType; |
| 30 | using fileapi::FileSystemURL; |
| 31 | |
| 32 | namespace content { |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 33 | |
[email protected] | cb1e98a | 2013-09-12 11:09:06 | [diff] [blame] | 34 | namespace { |
| 35 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 36 | class TestFileUtil : public fileapi::LocalFileUtil { |
[email protected] | cb1e98a | 2013-09-12 11:09:06 | [diff] [blame] | 37 | public: |
| 38 | explicit TestFileUtil(const base::FilePath& base_path) |
| 39 | : base_path_(base_path) {} |
| 40 | virtual ~TestFileUtil() {} |
| 41 | |
| 42 | // LocalFileUtil overrides. |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 43 | virtual base::File::Error GetLocalFilePath( |
[email protected] | cb1e98a | 2013-09-12 11:09:06 | [diff] [blame] | 44 | FileSystemOperationContext* context, |
| 45 | const FileSystemURL& file_system_url, |
| 46 | base::FilePath* local_file_path) OVERRIDE { |
| 47 | *local_file_path = base_path_.Append(file_system_url.path()); |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 48 | return base::File::FILE_OK; |
[email protected] | cb1e98a | 2013-09-12 11:09:06 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | private: |
| 52 | base::FilePath base_path_; |
| 53 | }; |
| 54 | |
| 55 | } // namespace |
| 56 | |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 57 | // This only supports single origin. |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 58 | class TestFileSystemBackend::QuotaUtil |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 59 | : public fileapi::FileSystemQuotaUtil, |
| 60 | public fileapi::FileUpdateObserver { |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 61 | public: |
[email protected] | 6372a70 | 2013-11-12 18:09:07 | [diff] [blame] | 62 | explicit QuotaUtil(base::SequencedTaskRunner* task_runner) |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 63 | : usage_(0), |
| 64 | task_runner_(task_runner) { |
[email protected] | 072865b | 2013-07-12 07:55:08 | [diff] [blame] | 65 | update_observers_ = update_observers_.AddObserver(this, task_runner_.get()); |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 66 | } |
[email protected] | caf6670 | 2012-09-07 07:02:20 | [diff] [blame] | 67 | virtual ~QuotaUtil() {} |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 68 | |
[email protected] | caf6670 | 2012-09-07 07:02:20 | [diff] [blame] | 69 | // FileSystemQuotaUtil overrides. |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 70 | virtual base::File::Error DeleteOriginDataOnFileTaskRunner( |
[email protected] | 2a030ee | 2013-06-18 15:16:48 | [diff] [blame] | 71 | FileSystemContext* context, |
| 72 | quota::QuotaManagerProxy* proxy, |
| 73 | const GURL& origin_url, |
| 74 | FileSystemType type) OVERRIDE { |
| 75 | NOTREACHED(); |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 76 | return base::File::FILE_OK; |
[email protected] | 2a030ee | 2013-06-18 15:16:48 | [diff] [blame] | 77 | } |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 78 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 79 | virtual scoped_refptr<fileapi::QuotaReservation> |
[email protected] | 6372a70 | 2013-11-12 18:09:07 | [diff] [blame] | 80 | CreateQuotaReservationOnFileTaskRunner( |
| 81 | const GURL& origin_url, |
| 82 | FileSystemType type) OVERRIDE { |
| 83 | NOTREACHED(); |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 84 | return scoped_refptr<fileapi::QuotaReservation>(); |
[email protected] | 6372a70 | 2013-11-12 18:09:07 | [diff] [blame] | 85 | } |
| 86 | |
[email protected] | c4ba798 | 2013-12-20 12:27:38 | [diff] [blame] | 87 | virtual void GetOriginsForTypeOnFileTaskRunner( |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 88 | FileSystemType type, |
| 89 | std::set<GURL>* origins) OVERRIDE { |
| 90 | NOTREACHED(); |
| 91 | } |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 92 | |
[email protected] | c4ba798 | 2013-12-20 12:27:38 | [diff] [blame] | 93 | virtual void GetOriginsForHostOnFileTaskRunner( |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 94 | FileSystemType type, |
| 95 | const std::string& host, |
| 96 | std::set<GURL>* origins) OVERRIDE { |
| 97 | NOTREACHED(); |
| 98 | } |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 99 | |
[email protected] | c4ba798 | 2013-12-20 12:27:38 | [diff] [blame] | 100 | virtual int64 GetOriginUsageOnFileTaskRunner( |
[email protected] | 2289452 | 2012-05-23 07:14:58 | [diff] [blame] | 101 | FileSystemContext* context, |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 102 | const GURL& origin_url, |
| 103 | FileSystemType type) OVERRIDE { |
| 104 | return usage_; |
| 105 | } |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 106 | |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 107 | virtual void AddFileUpdateObserver( |
| 108 | FileSystemType type, |
| 109 | FileUpdateObserver* observer, |
| 110 | base::SequencedTaskRunner* task_runner) OVERRIDE { |
| 111 | NOTIMPLEMENTED(); |
| 112 | } |
| 113 | |
| 114 | virtual void AddFileChangeObserver( |
| 115 | FileSystemType type, |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 116 | fileapi::FileChangeObserver* observer, |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 117 | base::SequencedTaskRunner* task_runner) OVERRIDE { |
[email protected] | 072865b | 2013-07-12 07:55:08 | [diff] [blame] | 118 | change_observers_ = change_observers_.AddObserver(observer, task_runner); |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | virtual void AddFileAccessObserver( |
| 122 | FileSystemType type, |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 123 | fileapi::FileAccessObserver* observer, |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 124 | base::SequencedTaskRunner* task_runner) OVERRIDE { |
| 125 | NOTIMPLEMENTED(); |
| 126 | } |
| 127 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 128 | virtual const fileapi::UpdateObserverList* GetUpdateObservers( |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 129 | FileSystemType type) const OVERRIDE { |
| 130 | return &update_observers_; |
| 131 | } |
| 132 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 133 | virtual const fileapi::ChangeObserverList* GetChangeObservers( |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 134 | FileSystemType type) const OVERRIDE { |
| 135 | return &change_observers_; |
| 136 | } |
| 137 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 138 | virtual const fileapi::AccessObserverList* GetAccessObservers( |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 139 | FileSystemType type) const OVERRIDE { |
| 140 | NOTIMPLEMENTED(); |
| 141 | return NULL; |
| 142 | } |
| 143 | |
[email protected] | caf6670 | 2012-09-07 07:02:20 | [diff] [blame] | 144 | // FileUpdateObserver overrides. |
| 145 | virtual void OnStartUpdate(const FileSystemURL& url) OVERRIDE {} |
| 146 | virtual void OnUpdate(const FileSystemURL& url, int64 delta) OVERRIDE { |
| 147 | usage_ += delta; |
| 148 | } |
| 149 | virtual void OnEndUpdate(const FileSystemURL& url) OVERRIDE {} |
| 150 | |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 151 | base::SequencedTaskRunner* task_runner() { return task_runner_.get(); } |
| 152 | |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 153 | private: |
| 154 | int64 usage_; |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 155 | |
| 156 | scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 157 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 158 | fileapi::UpdateObserverList update_observers_; |
| 159 | fileapi::ChangeObserverList change_observers_; |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 160 | }; |
| 161 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 162 | TestFileSystemBackend::TestFileSystemBackend( |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 163 | base::SequencedTaskRunner* task_runner, |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 164 | const base::FilePath& base_path) |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 165 | : base_path_(base_path), |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 166 | file_util_( |
| 167 | new fileapi::AsyncFileUtilAdapter(new TestFileUtil(base_path))), |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 168 | quota_util_(new QuotaUtil(task_runner)), |
[email protected] | c3d638b3 | 2013-04-22 02:18:49 | [diff] [blame] | 169 | require_copy_or_move_validator_(false) { |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 170 | } |
| 171 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 172 | TestFileSystemBackend::~TestFileSystemBackend() { |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 173 | } |
| 174 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 175 | bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 176 | return (type == fileapi::kFileSystemTypeTest); |
[email protected] | 420fb56 | 2013-04-18 01:46:34 | [diff] [blame] | 177 | } |
| 178 | |
[email protected] | 3fc17aed | 2013-07-24 10:01:50 | [diff] [blame] | 179 | void TestFileSystemBackend::Initialize(FileSystemContext* context) { |
| 180 | } |
| 181 | |
| 182 | void TestFileSystemBackend::OpenFileSystem( |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 183 | const GURL& origin_url, |
| 184 | FileSystemType type, |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 185 | fileapi::OpenFileSystemMode mode, |
[email protected] | 3fc17aed | 2013-07-24 10:01:50 | [diff] [blame] | 186 | const OpenFileSystemCallback& callback) { |
[email protected] | a836883d | 2013-07-12 03:50:02 | [diff] [blame] | 187 | callback.Run(GetFileSystemRootURI(origin_url, type), |
| 188 | GetFileSystemName(origin_url, type), |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 189 | base::File::FILE_OK); |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 190 | } |
| 191 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 192 | fileapi::AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil( |
| 193 | FileSystemType type) { |
[email protected] | cb1e98a | 2013-09-12 11:09:06 | [diff] [blame] | 194 | return file_util_.get(); |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 195 | } |
| 196 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 197 | fileapi::CopyOrMoveFileValidatorFactory* |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 198 | TestFileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 199 | FileSystemType type, base::File::Error* error_code) { |
[email protected] | 98407ee | 2013-04-04 08:52:17 | [diff] [blame] | 200 | DCHECK(error_code); |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 201 | *error_code = base::File::FILE_OK; |
[email protected] | c3d638b3 | 2013-04-22 02:18:49 | [diff] [blame] | 202 | if (require_copy_or_move_validator_) { |
| 203 | if (!copy_or_move_file_validator_factory_) |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 204 | *error_code = base::File::FILE_ERROR_SECURITY; |
[email protected] | c3d638b3 | 2013-04-22 02:18:49 | [diff] [blame] | 205 | return copy_or_move_file_validator_factory_.get(); |
| 206 | } |
[email protected] | 98407ee | 2013-04-04 08:52:17 | [diff] [blame] | 207 | return NULL; |
| 208 | } |
| 209 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 210 | void TestFileSystemBackend::InitializeCopyOrMoveFileValidatorFactory( |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 211 | scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory> factory) { |
[email protected] | c3d638b3 | 2013-04-22 02:18:49 | [diff] [blame] | 212 | if (!copy_or_move_file_validator_factory_) |
| 213 | copy_or_move_file_validator_factory_ = factory.Pass(); |
[email protected] | 98407ee | 2013-04-04 08:52:17 | [diff] [blame] | 214 | } |
| 215 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 216 | FileSystemOperation* TestFileSystemBackend::CreateFileSystemOperation( |
[email protected] | 949f25a | 2012-06-27 01:53:09 | [diff] [blame] | 217 | const FileSystemURL& url, |
[email protected] | d23a00cc | 2012-09-11 17:38:13 | [diff] [blame] | 218 | FileSystemContext* context, |
[email protected] | 141bcc5 | 2014-01-27 21:36:00 | [diff] [blame^] | 219 | base::File::Error* error_code) const { |
[email protected] | 75af1a4 | 2012-07-26 04:06:20 | [diff] [blame] | 220 | scoped_ptr<FileSystemOperationContext> operation_context( |
| 221 | new FileSystemOperationContext(context)); |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 222 | operation_context->set_update_observers(*GetUpdateObservers(url.type())); |
| 223 | operation_context->set_change_observers( |
| 224 | *quota_util_->GetChangeObservers(url.type())); |
[email protected] | bd69f57 | 2013-09-09 06:15:23 | [diff] [blame] | 225 | return FileSystemOperation::Create(url, context, operation_context.Pass()); |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 226 | } |
| 227 | |
[email protected] | 3ee9eb0 | 2013-04-10 09:17:05 | [diff] [blame] | 228 | scoped_ptr<webkit_blob::FileStreamReader> |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 229 | TestFileSystemBackend::CreateFileStreamReader( |
[email protected] | 949f25a | 2012-06-27 01:53:09 | [diff] [blame] | 230 | const FileSystemURL& url, |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 231 | int64 offset, |
[email protected] | a105783 | 2012-10-15 13:28:06 | [diff] [blame] | 232 | const base::Time& expected_modification_time, |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 233 | FileSystemContext* context) const { |
[email protected] | 3ee9eb0 | 2013-04-10 09:17:05 | [diff] [blame] | 234 | return scoped_ptr<webkit_blob::FileStreamReader>( |
[email protected] | b8f2f42 | 2013-09-12 17:38:39 | [diff] [blame] | 235 | webkit_blob::FileStreamReader::CreateForFileSystemFile( |
[email protected] | 3ee9eb0 | 2013-04-10 09:17:05 | [diff] [blame] | 236 | context, url, offset, expected_modification_time)); |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 237 | } |
| 238 | |
[email protected] | 3ee9eb0 | 2013-04-10 09:17:05 | [diff] [blame] | 239 | scoped_ptr<fileapi::FileStreamWriter> |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 240 | TestFileSystemBackend::CreateFileStreamWriter( |
[email protected] | 949f25a | 2012-06-27 01:53:09 | [diff] [blame] | 241 | const FileSystemURL& url, |
[email protected] | 7e84b91 | 2012-05-16 04:42:01 | [diff] [blame] | 242 | int64 offset, |
| 243 | FileSystemContext* context) const { |
[email protected] | 3ee9eb0 | 2013-04-10 09:17:05 | [diff] [blame] | 244 | return scoped_ptr<fileapi::FileStreamWriter>( |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 245 | new fileapi::SandboxFileStreamWriter(context, url, offset, |
| 246 | *GetUpdateObservers(url.type()))); |
[email protected] | 7e84b91 | 2012-05-16 04:42:01 | [diff] [blame] | 247 | } |
| 248 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 249 | fileapi::FileSystemQuotaUtil* TestFileSystemBackend::GetQuotaUtil() { |
[email protected] | 6faad82 | 2012-05-11 12:58:29 | [diff] [blame] | 250 | return quota_util_.get(); |
| 251 | } |
| 252 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 253 | const fileapi::UpdateObserverList* TestFileSystemBackend::GetUpdateObservers( |
[email protected] | caf6670 | 2012-09-07 07:02:20 | [diff] [blame] | 254 | FileSystemType type) const { |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 255 | return quota_util_->GetUpdateObservers(type); |
[email protected] | 3a7bf22 | 2013-06-09 14:14:12 | [diff] [blame] | 256 | } |
| 257 | |
[email protected] | f19bbf6 | 2013-07-09 01:22:32 | [diff] [blame] | 258 | void TestFileSystemBackend::AddFileChangeObserver( |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 259 | fileapi::FileChangeObserver* observer) { |
[email protected] | 3c2f5464 | 2013-07-12 05:14:09 | [diff] [blame] | 260 | quota_util_->AddFileChangeObserver( |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 261 | fileapi::kFileSystemTypeTest, observer, quota_util_->task_runner()); |
[email protected] | caf6670 | 2012-09-07 07:02:20 | [diff] [blame] | 262 | } |
| 263 | |
[email protected] | 7ade66ee | 2014-01-16 17:35:53 | [diff] [blame] | 264 | } // namespace content |