| 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 "webkit/browser/fileapi/syncable/canned_syncable_file_system.h" | 5 #include "webkit/browser/fileapi/syncable/canned_syncable_file_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 void OnCreateSnapshotFile( | 113 void OnCreateSnapshotFile( |
| 114 base::PlatformFileInfo* file_info_out, | 114 base::PlatformFileInfo* file_info_out, |
| 115 base::FilePath* platform_path_out, | 115 base::FilePath* platform_path_out, |
| 116 const CannedSyncableFileSystem::StatusCallback& callback, | 116 const CannedSyncableFileSystem::StatusCallback& callback, |
| 117 base::PlatformFileError result, | 117 base::PlatformFileError result, |
| 118 const base::PlatformFileInfo& file_info, | 118 const base::PlatformFileInfo& file_info, |
| 119 const base::FilePath& platform_path, | 119 const base::FilePath& platform_path, |
| 120 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { | 120 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { |
| 121 DCHECK(!file_ref); | 121 DCHECK(!file_ref.get()); |
| 122 DCHECK(file_info_out); | 122 DCHECK(file_info_out); |
| 123 DCHECK(platform_path_out); | 123 DCHECK(platform_path_out); |
| 124 *file_info_out = file_info; | 124 *file_info_out = file_info; |
| 125 *platform_path_out = platform_path; | 125 *platform_path_out = platform_path; |
| 126 callback.Run(result); | 126 callback.Run(result); |
| 127 } | 127 } |
| 128 | 128 |
| 129 class WriteHelper { | 129 class WriteHelper { |
| 130 public: | 130 public: |
| 131 WriteHelper() : bytes_written_(0) {} | 131 WriteHelper() : bytes_written_(0) {} |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 sync_status_ = status; | 626 sync_status_ = status; |
| 627 base::MessageLoop::current()->Quit(); | 627 base::MessageLoop::current()->Quit(); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 630 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
| 631 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 631 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
| 632 file_system_context_->sync_context()->sync_status()->AddObserver(this); | 632 file_system_context_->sync_context()->sync_status()->AddObserver(this); |
| 633 } | 633 } |
| 634 | 634 |
| 635 } // namespace sync_file_system | 635 } // namespace sync_file_system |
| OLD | NEW |