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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc

Issue 322813002: [SyncFS] Drop test only un-thread-safe getters from SyncEngine (4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
index b4d2e450e2ee4b09486ea659a9f5e77c0e0be5ed..9ad334988d6b3ec9e5272b942e7be2ff7d50c9e7 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
#include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
#include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
+#include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h"
#include "chrome/browser/sync_file_system/drive_backend/sync_worker.h"
#include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
#include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
@@ -560,7 +561,7 @@ class DriveBackendSyncTest : public testing::Test,
drive::FakeDriveService* fake_drive_service() {
return static_cast<drive::FakeDriveService*>(
- remote_sync_service_->GetDriveService());
+ remote_sync_service_->drive_service_.get());
}
FakeDriveServiceHelper* fake_drive_service_helper() {
@@ -568,10 +569,16 @@ class DriveBackendSyncTest : public testing::Test,
}
private:
- // NOTE: Member functions of MetadataDatabase class must not be called
- // directly through this method. Call them via PostTask.
+ // SyncEngineContext is normally used on the worker thread.
+ // Use this only when there is no task running on the worker.
+ SyncEngineContext* context() {
peria 2014/06/10 03:18:15 This method is used only in metadata_database(). W
tzik 2014/06/10 03:53:22 Done.
+ return remote_sync_service_->sync_worker_->context_.get();
+ }
+
+ // MetadataDatabase is normally used on the worker thread.
+ // Use this only when there is no task running on the worker.
MetadataDatabase* metadata_database() {
peria 2014/06/10 03:18:15 This change seems to be independent from the objec
tzik 2014/06/10 03:53:23 Done.
- return remote_sync_service_->sync_worker_->GetMetadataDatabase();
+ return context()->metadata_database_.get();
}
content::TestBrowserThreadBundle thread_bundle_;
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698