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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc

Issue 334053008: [SyncFS] Make task invocation in SyncTaskRunner async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/drive_backend/sync_engine_initializer. h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/drive/drive_api_util.h" 10 #include "chrome/browser/drive/drive_api_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 sync_context_.reset(new SyncEngineContext( 54 sync_context_.reset(new SyncEngineContext(
55 fake_drive_service.Pass(), 55 fake_drive_service.Pass(),
56 scoped_ptr<drive::DriveUploaderInterface>(), 56 scoped_ptr<drive::DriveUploaderInterface>(),
57 NULL, 57 NULL,
58 base::MessageLoopProxy::current(), 58 base::MessageLoopProxy::current(),
59 base::MessageLoopProxy::current(), 59 base::MessageLoopProxy::current(),
60 base::MessageLoopProxy::current())); 60 base::MessageLoopProxy::current()));
61 61
62 sync_task_manager_.reset(new SyncTaskManager( 62 sync_task_manager_.reset(new SyncTaskManager(
63 base::WeakPtr<SyncTaskManager::Client>(), 63 base::WeakPtr<SyncTaskManager::Client>(),
64 1 /* maximum_parallel_task */)); 64 1 /* maximum_parallel_task */,
65 base::MessageLoopProxy::current()));
65 sync_task_manager_->Initialize(SYNC_STATUS_OK); 66 sync_task_manager_->Initialize(SYNC_STATUS_OK);
66 } 67 }
67 68
68 virtual void TearDown() OVERRIDE { 69 virtual void TearDown() OVERRIDE {
69 sync_task_manager_.reset(); 70 sync_task_manager_.reset();
70 metadata_database_.reset(); 71 metadata_database_.reset();
71 sync_context_.reset(); 72 sync_context_.reset();
72 base::RunLoop().RunUntilIdle(); 73 base::RunLoop().RunUntilIdle();
73 } 74 }
74 75
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 351
351 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); 352 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id()));
352 EXPECT_FALSE(HasNoParent(sync_root->file_id())); 353 EXPECT_FALSE(HasNoParent(sync_root->file_id()));
353 354
354 EXPECT_EQ(1u, CountFileMetadata()); 355 EXPECT_EQ(1u, CountFileMetadata());
355 EXPECT_EQ(1u, CountFileTracker()); 356 EXPECT_EQ(1u, CountFileTracker());
356 } 357 }
357 358
358 } // namespace drive_backend 359 } // namespace drive_backend
359 } // namespace sync_file_system 360 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698