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

Unified Diff: chrome/browser/sync_file_system/mock_remote_file_sync_service.cc

Issue 185563011: [SyncFS] Change RemoteFileSyncService interface to accept per-app conflict resolution policy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc b/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
index b414fa9aba669b9b6391e542878e13e466f43114..a6f933bebd92032a1ed16ad98a47043629f3630b 100644
--- a/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
@@ -39,9 +39,15 @@ MockRemoteFileSyncService::MockRemoteFileSyncService()
.WillByDefault(Return(false));
ON_CALL(*this, GetCurrentState())
.WillByDefault(Invoke(this, &self::GetCurrentStateStub));
- ON_CALL(*this, SetConflictResolutionPolicy(_))
+ ON_CALL(*this, SetDefaultConflictResolutionPolicy(_))
+ .WillByDefault(
+ Invoke(this, &self::SetDefaultConflictResolutionPolicyStub));
+ ON_CALL(*this, SetConflictResolutionPolicy(_, _))
.WillByDefault(Invoke(this, &self::SetConflictResolutionPolicyStub));
- ON_CALL(*this, GetConflictResolutionPolicy())
+ ON_CALL(*this, GetDefaultConflictResolutionPolicy())
+ .WillByDefault(
+ Invoke(this, &self::GetDefaultConflictResolutionPolicyStub));
+ ON_CALL(*this, GetConflictResolutionPolicy(_))
.WillByDefault(Invoke(this, &self::GetConflictResolutionPolicyStub));
}
@@ -118,14 +124,28 @@ void MockRemoteFileSyncService::ProcessRemoteChangeStub(
fileapi::FileSystemURL()));
}
+SyncStatusCode
+MockRemoteFileSyncService::SetDefaultConflictResolutionPolicyStub(
+ ConflictResolutionPolicy policy) {
+ conflict_resolution_policy_ = policy;
+ return SYNC_STATUS_OK;
+}
+
SyncStatusCode MockRemoteFileSyncService::SetConflictResolutionPolicyStub(
+ const GURL& origin,
ConflictResolutionPolicy policy) {
conflict_resolution_policy_ = policy;
return SYNC_STATUS_OK;
}
ConflictResolutionPolicy
-MockRemoteFileSyncService::GetConflictResolutionPolicyStub() const {
+MockRemoteFileSyncService::GetDefaultConflictResolutionPolicyStub() const {
+ return conflict_resolution_policy_;
+}
+
+ConflictResolutionPolicy
+MockRemoteFileSyncService::GetConflictResolutionPolicyStub(
+ const GURL& origin) const {
return conflict_resolution_policy_;
}

Powered by Google App Engine
This is Rietveld 408576698