Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Side by Side Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.cc

Issue 22810002: SyncFS: Reorder initialization sequence of SyncFileSystemService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/canned_syncable_file_system.h" 5 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 base::MessageLoopProxy::current().get(), 227 base::MessageLoopProxy::current().get(),
228 storage_policy.get()); 228 storage_policy.get());
229 229
230 std::vector<std::string> additional_allowed_schemes; 230 std::vector<std::string> additional_allowed_schemes;
231 additional_allowed_schemes.push_back(origin_.scheme()); 231 additional_allowed_schemes.push_back(origin_.scheme());
232 fileapi::FileSystemOptions options( 232 fileapi::FileSystemOptions options(
233 fileapi::FileSystemOptions::PROFILE_MODE_NORMAL, 233 fileapi::FileSystemOptions::PROFILE_MODE_NORMAL,
234 additional_allowed_schemes); 234 additional_allowed_schemes);
235 235
236 ScopedVector<fileapi::FileSystemBackend> additional_backends; 236 ScopedVector<fileapi::FileSystemBackend> additional_backends;
237 additional_backends.push_back(new SyncFileSystemBackend()); 237 additional_backends.push_back(SyncFileSystemBackend::CreateForTesting());
238 238
239 file_system_context_ = new FileSystemContext( 239 file_system_context_ = new FileSystemContext(
240 io_task_runner_.get(), 240 io_task_runner_.get(),
241 file_task_runner_.get(), 241 file_task_runner_.get(),
242 fileapi::ExternalMountPoints::CreateRefCounted().get(), 242 fileapi::ExternalMountPoints::CreateRefCounted().get(),
243 storage_policy.get(), 243 storage_policy.get(),
244 quota_manager_->proxy(), 244 quota_manager_->proxy(),
245 additional_backends.Pass(), 245 additional_backends.Pass(),
246 data_dir_.path(), options); 246 data_dir_.path(), options);
247 247
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 sync_status_ = status; 670 sync_status_ = status;
671 base::MessageLoop::current()->Quit(); 671 base::MessageLoop::current()->Quit();
672 } 672 }
673 673
674 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { 674 void CannedSyncableFileSystem::InitializeSyncStatusObserver() {
675 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); 675 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread());
676 backend()->sync_context()->sync_status()->AddObserver(this); 676 backend()->sync_context()->sync_status()->AddObserver(this);
677 } 677 }
678 678
679 } // namespace sync_file_system 679 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698