OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 5 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 storage::FileSystemContext* context) const { | 204 storage::FileSystemContext* context) const { |
205 DCHECK(CanHandleType(url.type())); | 205 DCHECK(CanHandleType(url.type())); |
206 return GetDelegate()->CreateFileStreamWriter( | 206 return GetDelegate()->CreateFileStreamWriter( |
207 url, offset, context, storage::kFileSystemTypeSyncableForInternalSync); | 207 url, offset, context, storage::kFileSystemTypeSyncableForInternalSync); |
208 } | 208 } |
209 | 209 |
210 storage::FileSystemQuotaUtil* SyncFileSystemBackend::GetQuotaUtil() { | 210 storage::FileSystemQuotaUtil* SyncFileSystemBackend::GetQuotaUtil() { |
211 return GetDelegate(); | 211 return GetDelegate(); |
212 } | 212 } |
213 | 213 |
| 214 const storage::UpdateObserverList* SyncFileSystemBackend::GetUpdateObservers( |
| 215 storage::FileSystemType type) const { |
| 216 return GetDelegate()->GetUpdateObservers(type); |
| 217 } |
| 218 |
| 219 const storage::ChangeObserverList* SyncFileSystemBackend::GetChangeObservers( |
| 220 storage::FileSystemType type) const { |
| 221 return GetDelegate()->GetChangeObservers(type); |
| 222 } |
| 223 |
| 224 const storage::AccessObserverList* SyncFileSystemBackend::GetAccessObservers( |
| 225 storage::FileSystemType type) const { |
| 226 return GetDelegate()->GetAccessObservers(type); |
| 227 } |
| 228 |
214 // static | 229 // static |
215 SyncFileSystemBackend* SyncFileSystemBackend::GetBackend( | 230 SyncFileSystemBackend* SyncFileSystemBackend::GetBackend( |
216 const storage::FileSystemContext* file_system_context) { | 231 const storage::FileSystemContext* file_system_context) { |
217 DCHECK(file_system_context); | 232 DCHECK(file_system_context); |
218 return static_cast<SyncFileSystemBackend*>( | 233 return static_cast<SyncFileSystemBackend*>( |
219 file_system_context->GetFileSystemBackend( | 234 file_system_context->GetFileSystemBackend( |
220 storage::kFileSystemTypeSyncable)); | 235 storage::kFileSystemTypeSyncable)); |
221 } | 236 } |
222 | 237 |
223 void SyncFileSystemBackend::SetLocalFileChangeTracker( | 238 void SyncFileSystemBackend::SetLocalFileChangeTracker( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 SyncStatusCodeToFileError(status)); | 313 SyncStatusCodeToFileError(status)); |
299 return; | 314 return; |
300 } | 315 } |
301 | 316 |
302 callback.Run(GetSyncableFileSystemRootURI(origin_url), | 317 callback.Run(GetSyncableFileSystemRootURI(origin_url), |
303 GetFileSystemName(origin_url, type), | 318 GetFileSystemName(origin_url, type), |
304 base::File::FILE_OK); | 319 base::File::FILE_OK); |
305 } | 320 } |
306 | 321 |
307 } // namespace sync_file_system | 322 } // namespace sync_file_system |
OLD | NEW |