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

Unified Diff: components/sync/api/conflict_resolution.h

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 years, 2 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 | « components/sync/api/attachments/attachment_unittest.cc ('k') | components/sync/api/conflict_resolution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/api/conflict_resolution.h
diff --git a/components/sync/api/conflict_resolution.h b/components/sync/api/conflict_resolution.h
deleted file mode 100644
index 1f6c77b5279ea90ba317540a92dd387842dcbc47..0000000000000000000000000000000000000000
--- a/components/sync/api/conflict_resolution.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_SYNC_API_CONFLICT_RESOLUTION_H_
-#define COMPONENTS_SYNC_API_CONFLICT_RESOLUTION_H_
-
-#include <memory>
-
-#include "components/sync/api/entity_data.h"
-
-namespace syncer {
-
-// A simple class to represent the resolution of a data conflict. We either:
-// 1) Use the local client data and update the server.
-// 2) Use the remote server data and update the client.
-// 3) Use newly created data and update both.
-class ConflictResolution {
- public:
- // This enum is used in histograms.xml and entries shouldn't be renumbered or
- // removed. New entries must be added at the end, before TYPE_SIZE.
- enum Type {
- CHANGES_MATCH, // Exists for logging purposes.
- USE_LOCAL,
- USE_REMOTE,
- USE_NEW,
- IGNORE_LOCAL_ENCRYPTION, // Exists for logging purposes.
- IGNORE_REMOTE_ENCRYPTION, // Exists for logging purposes.
- TYPE_SIZE,
- };
-
- // Convenience functions for brevity.
- static ConflictResolution UseLocal();
- static ConflictResolution UseRemote();
- static ConflictResolution UseNew(std::unique_ptr<EntityData> data);
-
- // Move constructor since we can't copy a unique_ptr.
- ConflictResolution(ConflictResolution&& other);
- ~ConflictResolution();
-
- Type type() const { return type_; }
-
- // Get the data for USE_NEW, or nullptr. Can only be called once.
- std::unique_ptr<EntityData> ExtractData();
-
- private:
- ConflictResolution(Type type, std::unique_ptr<EntityData> data);
-
- const Type type_;
- std::unique_ptr<EntityData> data_;
-
- DISALLOW_COPY_AND_ASSIGN(ConflictResolution);
-};
-
-} // namespace syncer
-
-#endif // COMPONENTS_SYNC_API_CONFLICT_RESOLUTION_H_
« no previous file with comments | « components/sync/api/attachments/attachment_unittest.cc ('k') | components/sync/api/conflict_resolution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698