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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" |
9 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 9 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
10 #include "chrome/browser/sync_file_system/local/syncable_file_system_operation.h
" | 10 #include "chrome/browser/sync_file_system/local/syncable_file_system_operation.h
" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const GURL& origin_url, | 54 const GURL& origin_url, |
55 fileapi::FileSystemType type, | 55 fileapi::FileSystemType type, |
56 fileapi::OpenFileSystemMode mode, | 56 fileapi::OpenFileSystemMode mode, |
57 const OpenFileSystemCallback& callback) { | 57 const OpenFileSystemCallback& callback) { |
58 DCHECK(CanHandleType(type)); | 58 DCHECK(CanHandleType(type)); |
59 DCHECK(delegate_); | 59 DCHECK(delegate_); |
60 delegate_->OpenFileSystem(origin_url, type, mode, callback, | 60 delegate_->OpenFileSystem(origin_url, type, mode, callback, |
61 GetSyncableFileSystemRootURI(origin_url)); | 61 GetSyncableFileSystemRootURI(origin_url)); |
62 } | 62 } |
63 | 63 |
64 fileapi::FileSystemFileUtil* SyncFileSystemBackend::GetFileUtil( | |
65 fileapi::FileSystemType type) { | |
66 DCHECK(delegate_); | |
67 return delegate_->sync_file_util(); | |
68 } | |
69 | |
70 fileapi::AsyncFileUtil* SyncFileSystemBackend::GetAsyncFileUtil( | 64 fileapi::AsyncFileUtil* SyncFileSystemBackend::GetAsyncFileUtil( |
71 fileapi::FileSystemType type) { | 65 fileapi::FileSystemType type) { |
72 DCHECK(delegate_); | 66 DCHECK(delegate_); |
73 return delegate_->file_util(); | 67 return delegate_->file_util(); |
74 } | 68 } |
75 | 69 |
76 fileapi::CopyOrMoveFileValidatorFactory* | 70 fileapi::CopyOrMoveFileValidatorFactory* |
77 SyncFileSystemBackend::GetCopyOrMoveFileValidatorFactory( | 71 SyncFileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
78 fileapi::FileSystemType type, | 72 fileapi::FileSystemType type, |
79 base::PlatformFileError* error_code) { | 73 base::PlatformFileError* error_code) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 delegate_->file_task_runner()); | 153 delegate_->file_task_runner()); |
160 } | 154 } |
161 | 155 |
162 void SyncFileSystemBackend::set_sync_context( | 156 void SyncFileSystemBackend::set_sync_context( |
163 LocalFileSyncContext* sync_context) { | 157 LocalFileSyncContext* sync_context) { |
164 DCHECK(!sync_context_); | 158 DCHECK(!sync_context_); |
165 sync_context_ = sync_context; | 159 sync_context_ = sync_context; |
166 } | 160 } |
167 | 161 |
168 } // namespace sync_file_system | 162 } // namespace sync_file_system |
OLD | NEW |