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

Unified Diff: chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc

Issue 286203007: [SyncFS] Drop manual conflict resolution policy support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop more unused Created 6 years, 7 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/extensions/api/sync_file_system/sync_file_system_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc
index dac14c1665d22aff45a74b058cc4afb71b0cf9d9..e4398a66f3fbb77456b74817bf4af1422396d783 100644
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc
@@ -345,32 +345,18 @@ bool SyncFileSystemSetConflictResolutionPolicyFunction::RunSync() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &policy_string));
ConflictResolutionPolicy policy = ExtensionEnumToConflictResolutionPolicy(
api::sync_file_system::ParseConflictResolutionPolicy(policy_string));
- if (policy == sync_file_system::CONFLICT_RESOLUTION_POLICY_UNKNOWN) {
+ if (policy != sync_file_system::CONFLICT_RESOLUTION_POLICY_LAST_WRITE_WIN) {
SetError(base::StringPrintf(kUnsupportedConflictResolutionPolicy,
policy_string.c_str()));
return false;
}
- sync_file_system::SyncFileSystemService* service =
- GetSyncFileSystemService(GetProfile());
- DCHECK(service);
- SyncStatusCode status = service->SetConflictResolutionPolicy(
- source_url().GetOrigin(), policy);
- if (status != sync_file_system::SYNC_STATUS_OK) {
- SetError(ErrorToString(status));
- return false;
- }
return true;
}
bool SyncFileSystemGetConflictResolutionPolicyFunction::RunSync() {
- sync_file_system::SyncFileSystemService* service =
- GetSyncFileSystemService(GetProfile());
- DCHECK(service);
- api::sync_file_system::ConflictResolutionPolicy policy =
- ConflictResolutionPolicyToExtensionEnum(
- service->GetConflictResolutionPolicy(source_url().GetOrigin()));
SetResult(new base::StringValue(
- api::sync_file_system::ToString(policy)));
+ api::sync_file_system::ToString(
+ api::sync_file_system::CONFLICT_RESOLUTION_POLICY_LAST_WRITE_WIN)));
return true;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698