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

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

Issue 318353002: [SyncFS] Create SyncWorkerInterface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build errors 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.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 RemoteServiceState expected_service_status, 150 RemoteServiceState expected_service_status,
151 SyncStatusCode sync_status) { 151 SyncStatusCode sync_status) {
152 EXPECT_EQ(expected_sync_status, sync_status); 152 EXPECT_EQ(expected_sync_status, sync_status);
153 EXPECT_EQ(expected_service_status, sync_engine_->GetCurrentState()); 153 EXPECT_EQ(expected_service_status, sync_engine_->GetCurrentState());
154 } 154 }
155 155
156 MetadataDatabase* metadata_database() { 156 MetadataDatabase* metadata_database() {
157 return sync_engine_->sync_worker_->GetMetadataDatabase(); 157 return sync_engine_->sync_worker_->GetMetadataDatabase();
158 } 158 }
159 159
160 void SetHasRefreshToken(bool has_refresh_token) {
161 sync_engine_->sync_worker_->SetHasRefreshToken(has_refresh_token);
162 }
163
160 private: 164 private:
161 content::TestBrowserThreadBundle browser_threads_; 165 content::TestBrowserThreadBundle browser_threads_;
162 base::ScopedTempDir profile_dir_; 166 base::ScopedTempDir profile_dir_;
163 scoped_ptr<leveldb::Env> in_memory_env_; 167 scoped_ptr<leveldb::Env> in_memory_env_;
164 168
165 scoped_ptr<MockExtensionService> extension_service_; 169 scoped_ptr<MockExtensionService> extension_service_;
166 scoped_ptr<drive_backend::SyncEngine> sync_engine_; 170 scoped_ptr<drive_backend::SyncEngine> sync_engine_;
167 171
168 DISALLOW_COPY_AND_ASSIGN(SyncEngineTest); 172 DISALLOW_COPY_AND_ASSIGN(SyncEngineTest);
169 }; 173 };
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 base::Bind(&SyncEngineTest::CheckServiceState, 341 base::Bind(&SyncEngineTest::CheckServiceState,
338 AsWeakPtr(), 342 AsWeakPtr(),
339 SYNC_STATUS_OK, 343 SYNC_STATUS_OK,
340 REMOTE_SERVICE_OK)); 344 REMOTE_SERVICE_OK));
341 345
342 base::RunLoop().RunUntilIdle(); 346 base::RunLoop().RunUntilIdle();
343 } 347 }
344 348
345 } // namespace drive_backend 349 } // namespace drive_backend
346 } // namespace sync_file_system 350 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698