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_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 quota_manager_ = new QuotaManager(false /* is_incognito */, | 203 quota_manager_ = new QuotaManager(false /* is_incognito */, |
204 data_dir_.path(), | 204 data_dir_.path(), |
205 io_task_runner_.get(), | 205 io_task_runner_.get(), |
206 base::MessageLoopProxy::current(), | 206 base::MessageLoopProxy::current(), |
207 storage_policy.get()); | 207 storage_policy.get()); |
208 | 208 |
209 file_system_context_ = new FileSystemContext( | 209 file_system_context_ = new FileSystemContext( |
210 make_scoped_ptr( | 210 make_scoped_ptr( |
211 new fileapi::FileSystemTaskRunners(io_task_runner_.get(), | 211 new fileapi::FileSystemTaskRunners(io_task_runner_.get(), |
212 file_task_runner_.get(), | |
213 file_task_runner_.get())), | 212 file_task_runner_.get())), |
214 fileapi::ExternalMountPoints::CreateRefCounted().get(), | 213 fileapi::ExternalMountPoints::CreateRefCounted().get(), |
215 storage_policy.get(), | 214 storage_policy.get(), |
216 quota_manager_->proxy(), | 215 quota_manager_->proxy(), |
217 ScopedVector<fileapi::FileSystemMountPointProvider>(), | 216 ScopedVector<fileapi::FileSystemMountPointProvider>(), |
218 data_dir_.path(), | 217 data_dir_.path(), |
219 fileapi::CreateAllowFileAccessOptions()); | 218 fileapi::CreateAllowFileAccessOptions()); |
220 | 219 |
221 // In testing we override this setting to support directory operations | 220 // In testing we override this setting to support directory operations |
222 // by default. | 221 // by default. |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 sync_status_ = status; | 623 sync_status_ = status; |
625 base::MessageLoop::current()->Quit(); | 624 base::MessageLoop::current()->Quit(); |
626 } | 625 } |
627 | 626 |
628 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 627 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
629 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 628 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
630 file_system_context_->sync_context()->sync_status()->AddObserver(this); | 629 file_system_context_->sync_context()->sync_status()->AddObserver(this); |
631 } | 630 } |
632 | 631 |
633 } // namespace sync_file_system | 632 } // namespace sync_file_system |
OLD | NEW |