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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 SyncStatusCode sync_status) { | 149 SyncStatusCode sync_status) { |
150 EXPECT_EQ(expected_sync_status, sync_status); | 150 EXPECT_EQ(expected_sync_status, sync_status); |
151 EXPECT_EQ(expected_service_status, sync_engine_->GetCurrentState()); | 151 EXPECT_EQ(expected_service_status, sync_engine_->GetCurrentState()); |
152 } | 152 } |
153 | 153 |
154 MetadataDatabase* metadata_database() { | 154 MetadataDatabase* metadata_database() { |
155 return sync_engine_->sync_worker_->GetMetadataDatabase(); | 155 return sync_engine_->sync_worker_->GetMetadataDatabase(); |
156 } | 156 } |
157 | 157 |
158 void SetHasRefreshToken(bool has_refresh_token) { | 158 void SetHasRefreshToken(bool has_refresh_token) { |
159 sync_engine_->sync_worker_->has_refresh_token_ = has_refresh_token; | 159 sync_engine_->sync_worker_->SetHasRefreshToken(has_refresh_token); |
160 } | 160 } |
161 | 161 |
162 private: | 162 private: |
163 content::TestBrowserThreadBundle browser_threads_; | 163 content::TestBrowserThreadBundle browser_threads_; |
164 base::ScopedTempDir profile_dir_; | 164 base::ScopedTempDir profile_dir_; |
165 scoped_ptr<leveldb::Env> in_memory_env_; | 165 scoped_ptr<leveldb::Env> in_memory_env_; |
166 | 166 |
167 scoped_ptr<MockExtensionService> extension_service_; | 167 scoped_ptr<MockExtensionService> extension_service_; |
168 scoped_ptr<drive_backend::SyncEngine> sync_engine_; | 168 scoped_ptr<drive_backend::SyncEngine> sync_engine_; |
169 | 169 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 base::Bind(&SyncEngineTest::CheckServiceState, | 384 base::Bind(&SyncEngineTest::CheckServiceState, |
385 AsWeakPtr(), | 385 AsWeakPtr(), |
386 SYNC_STATUS_OK, | 386 SYNC_STATUS_OK, |
387 REMOTE_SERVICE_OK)); | 387 REMOTE_SERVICE_OK)); |
388 | 388 |
389 base::RunLoop().RunUntilIdle(); | 389 base::RunLoop().RunUntilIdle(); |
390 } | 390 } |
391 | 391 |
392 } // namespace drive_backend | 392 } // namespace drive_backend |
393 } // namespace sync_file_system | 393 } // namespace sync_file_system |
OLD | NEW |