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

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

Issue 236313009: [SyncFS] Post tasks between SyncEngine and SyncWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work for comments Created 6 years, 8 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
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.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/drive/drive_uploader.h" 10 #include "chrome/browser/drive/drive_uploader.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); 107 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir());
108 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); 108 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
109 109
110 extension_service_.reset(new MockExtensionService); 110 extension_service_.reset(new MockExtensionService);
111 scoped_ptr<drive::FakeDriveService> fake_drive_service( 111 scoped_ptr<drive::FakeDriveService> fake_drive_service(
112 new drive::FakeDriveService); 112 new drive::FakeDriveService);
113 113
114 sync_engine_.reset(new drive_backend::SyncEngine( 114 sync_engine_.reset(new drive_backend::SyncEngine(
115 fake_drive_service.PassAs<drive::DriveServiceInterface>(), 115 fake_drive_service.PassAs<drive::DriveServiceInterface>(),
116 scoped_ptr<drive::DriveUploaderInterface>(), 116 scoped_ptr<drive::DriveUploaderInterface>(),
117 base::MessageLoopProxy::current(),
117 NULL /* notification_manager */, 118 NULL /* notification_manager */,
118 extension_service_.get(), 119 extension_service_.get(),
119 NULL /* signin_manager */)); 120 NULL /* signin_manager */));
120 sync_engine_->Initialize(profile_dir_.path(), 121 sync_engine_->Initialize(profile_dir_.path(),
121 base::MessageLoopProxy::current(), 122 base::MessageLoopProxy::current(),
122 in_memory_env_.get()); 123 in_memory_env_.get());
123 sync_engine_->SetSyncEnabled(true); 124 sync_engine_->SetSyncEnabled(true);
124 base::RunLoop().RunUntilIdle(); 125 base::RunLoop().RunUntilIdle();
125 } 126 }
126 127
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 base::Bind(&SyncEngineTest::CheckServiceState, 372 base::Bind(&SyncEngineTest::CheckServiceState,
372 AsWeakPtr(), 373 AsWeakPtr(),
373 SYNC_STATUS_OK, 374 SYNC_STATUS_OK,
374 REMOTE_SERVICE_OK)); 375 REMOTE_SERVICE_OK));
375 376
376 base::RunLoop().RunUntilIdle(); 377 base::RunLoop().RunUntilIdle();
377 } 378 }
378 379
379 } // namespace drive_backend 380 } // namespace drive_backend
380 } // namespace sync_file_system 381 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698