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

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

Issue 243583005: Revert of [SyncFS] Post tasks between SyncEngine and SyncWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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(),
118 NULL /* notification_manager */, 117 NULL /* notification_manager */,
119 extension_service_.get(), 118 extension_service_.get(),
120 NULL /* signin_manager */)); 119 NULL /* signin_manager */));
121 sync_engine_->Initialize(profile_dir_.path(), 120 sync_engine_->Initialize(profile_dir_.path(),
122 base::MessageLoopProxy::current(), 121 base::MessageLoopProxy::current(),
123 in_memory_env_.get()); 122 in_memory_env_.get());
124 sync_engine_->SetSyncEnabled(true); 123 sync_engine_->SetSyncEnabled(true);
125 base::RunLoop().RunUntilIdle(); 124 base::RunLoop().RunUntilIdle();
126 } 125 }
127 126
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 base::Bind(&SyncEngineTest::CheckServiceState, 371 base::Bind(&SyncEngineTest::CheckServiceState,
373 AsWeakPtr(), 372 AsWeakPtr(),
374 SYNC_STATUS_OK, 373 SYNC_STATUS_OK,
375 REMOTE_SERVICE_OK)); 374 REMOTE_SERVICE_OK));
376 375
377 base::RunLoop().RunUntilIdle(); 376 base::RunLoop().RunUntilIdle();
378 } 377 }
379 378
380 } // namespace drive_backend 379 } // namespace drive_backend
381 } // namespace sync_file_system 380 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698