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

Side by Side Diff: sync/api/entity_change.cc

Issue 1458013003: [Sync] USS: Add EntityChange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uss-data
Patch Set: s/client_tag/client_key/ etc Created 5 years 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 unified diff | Download patch
« no previous file with comments | « sync/api/entity_change.h ('k') | sync/api/model_type_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "sync/api/entity_change.h"
6
7 namespace syncer_v2 {
8
9 // static
10 EntityChange EntityChange::CreateAdd(std::string client_key,
11 EntityDataPtr data) {
12 return EntityChange(client_key, ACTION_ADD, data);
13 }
14
15 // static
16 EntityChange EntityChange::CreateUpdate(std::string client_key,
17 EntityDataPtr data) {
18 return EntityChange(client_key, ACTION_UPDATE, data);
19 }
20
21 // static
22 EntityChange EntityChange::CreateDelete(std::string client_key) {
23 return EntityChange(client_key, ACTION_DELETE, EntityDataPtr());
24 }
25
26 EntityChange::EntityChange(std::string client_key,
27 ChangeType type,
28 EntityDataPtr data)
29 : client_key_(client_key), type_(type), data_(data){};
30
31 EntityChange::~EntityChange() {}
32
33 } // namespace syncer_v2
OLDNEW
« no previous file with comments | « sync/api/entity_change.h ('k') | sync/api/model_type_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698