| 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/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 9 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" |
| 10 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 10 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 delegate->AddFileUpdateObserver(storage::kFileSystemTypeSyncable, | 223 delegate->AddFileUpdateObserver(storage::kFileSystemTypeSyncable, |
| 224 change_tracker_.get(), | 224 change_tracker_.get(), |
| 225 delegate->file_task_runner()); | 225 delegate->file_task_runner()); |
| 226 delegate->AddFileChangeObserver(storage::kFileSystemTypeSyncable, | 226 delegate->AddFileChangeObserver(storage::kFileSystemTypeSyncable, |
| 227 change_tracker_.get(), | 227 change_tracker_.get(), |
| 228 delegate->file_task_runner()); | 228 delegate->file_task_runner()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void SyncFileSystemBackend::set_sync_context( | 231 void SyncFileSystemBackend::set_sync_context( |
| 232 LocalFileSyncContext* sync_context) { | 232 LocalFileSyncContext* sync_context) { |
| 233 DCHECK(!sync_context_); | 233 DCHECK(!sync_context_.get()); |
| 234 sync_context_ = sync_context; | 234 sync_context_ = sync_context; |
| 235 } | 235 } |
| 236 | 236 |
| 237 storage::SandboxFileSystemBackendDelegate* SyncFileSystemBackend::GetDelegate() | 237 storage::SandboxFileSystemBackendDelegate* SyncFileSystemBackend::GetDelegate() |
| 238 const { | 238 const { |
| 239 DCHECK(context_); | 239 DCHECK(context_); |
| 240 DCHECK(context_->sandbox_delegate()); | 240 DCHECK(context_->sandbox_delegate()); |
| 241 return context_->sandbox_delegate(); | 241 return context_->sandbox_delegate(); |
| 242 } | 242 } |
| 243 | 243 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 SyncStatusCodeToFileError(status)); | 291 SyncStatusCodeToFileError(status)); |
| 292 return; | 292 return; |
| 293 } | 293 } |
| 294 | 294 |
| 295 callback.Run(GetSyncableFileSystemRootURI(origin_url), | 295 callback.Run(GetSyncableFileSystemRootURI(origin_url), |
| 296 GetFileSystemName(origin_url, type), | 296 GetFileSystemName(origin_url, type), |
| 297 base::File::FILE_OK); | 297 base::File::FILE_OK); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace sync_file_system | 300 } // namespace sync_file_system |
| OLD | NEW |