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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.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/drive_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 1685c5f9a00f71630e0b7e1c08f3ee448eb446cc..70c93fbe048366bcd85e7ab730f041b4409fe0bb 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -275,14 +275,29 @@ void SyncEngine::SetSyncEnabled(bool enabled) {
OnRemoteServiceStateUpdated(GetCurrentState(), status_message));
}
+SyncStatusCode SyncEngine::SetDefaultConflictResolutionPolicy(
+ ConflictResolutionPolicy policy) {
+ default_conflict_resolution_policy_ = policy;
+ return SYNC_STATUS_OK;
+}
+
SyncStatusCode SyncEngine::SetConflictResolutionPolicy(
+ const GURL& origin,
ConflictResolutionPolicy policy) {
- conflict_resolution_policy_ = policy;
+ NOTIMPLEMENTED();
+ default_conflict_resolution_policy_ = policy;
return SYNC_STATUS_OK;
}
-ConflictResolutionPolicy SyncEngine::GetConflictResolutionPolicy() const {
- return conflict_resolution_policy_;
+ConflictResolutionPolicy SyncEngine::GetDefaultConflictResolutionPolicy()
+ const {
+ return default_conflict_resolution_policy_;
+}
+
+ConflictResolutionPolicy SyncEngine::GetConflictResolutionPolicy(
+ const GURL& origin) const {
+ NOTIMPLEMENTED();
+ return default_conflict_resolution_policy_;
}
void SyncEngine::GetRemoteVersions(
@@ -441,7 +456,8 @@ SyncEngine::SyncEngine(
should_check_remote_change_(true),
listing_remote_changes_(false),
sync_enabled_(false),
- conflict_resolution_policy_(CONFLICT_RESOLUTION_POLICY_LAST_WRITE_WIN),
+ default_conflict_resolution_policy_(
+ CONFLICT_RESOLUTION_POLICY_LAST_WRITE_WIN),
network_available_(false),
weak_ptr_factory_(this) {
}

Powered by Google App Engine
This is Rietveld 408576698