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 "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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 base::MessageLoopProxy::current(), |
118 NULL /* notification_manager */, | 118 NULL /* notification_manager */, |
119 extension_service_.get(), | 119 extension_service_.get(), |
120 NULL /* signin_manager */)); | 120 NULL /* signin_manager */)); |
121 sync_engine_->Initialize(profile_dir_.path(), | 121 sync_engine_->Initialize(profile_dir_.path(), |
122 base::MessageLoopProxy::current(), | 122 base::MessageLoopProxy::current(), |
| 123 true /* pass_service_to_worker */, |
123 in_memory_env_.get()); | 124 in_memory_env_.get()); |
124 sync_engine_->SetSyncEnabled(true); | 125 sync_engine_->SetSyncEnabled(true); |
125 base::RunLoop().RunUntilIdle(); | 126 base::RunLoop().RunUntilIdle(); |
126 } | 127 } |
127 | 128 |
128 virtual void TearDown() OVERRIDE { | 129 virtual void TearDown() OVERRIDE { |
129 sync_engine_.reset(); | 130 sync_engine_.reset(); |
130 extension_service_.reset(); | 131 extension_service_.reset(); |
131 base::RunLoop().RunUntilIdle(); | 132 base::RunLoop().RunUntilIdle(); |
132 } | 133 } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 base::Bind(&SyncEngineTest::CheckServiceState, | 373 base::Bind(&SyncEngineTest::CheckServiceState, |
373 AsWeakPtr(), | 374 AsWeakPtr(), |
374 SYNC_STATUS_OK, | 375 SYNC_STATUS_OK, |
375 REMOTE_SERVICE_OK)); | 376 REMOTE_SERVICE_OK)); |
376 | 377 |
377 base::RunLoop().RunUntilIdle(); | 378 base::RunLoop().RunUntilIdle(); |
378 } | 379 } |
379 | 380 |
380 } // namespace drive_backend | 381 } // namespace drive_backend |
381 } // namespace sync_file_system | 382 } // namespace sync_file_system |
OLD | NEW |