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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « sync/api/sync_merge_result.h ('k') | sync/api/sync_merge_result_unittest.cc » ('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 (c) 2012 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 <stdint.h>
6
7 #include "sync/api/sync_merge_result.h"
8
9 namespace syncer {
10
11 SyncMergeResult::SyncMergeResult(ModelType type)
12 : model_type_(type),
13 num_items_before_association_(0),
14 num_items_after_association_(0),
15 num_items_added_(0),
16 num_items_deleted_(0),
17 num_items_modified_(0),
18 pre_association_version_(0) {
19 }
20
21 SyncMergeResult::SyncMergeResult(const SyncMergeResult& other) = default;
22
23 SyncMergeResult::~SyncMergeResult() {
24 }
25
26 // Setters.
27 void SyncMergeResult::set_error(SyncError error) {
28 DCHECK(!error.IsSet() || model_type_ == error.model_type());
29 error_ = error;
30 }
31
32 void SyncMergeResult::set_num_items_before_association(
33 int num_items_before_association) {
34 num_items_before_association_ = num_items_before_association;
35 }
36
37 void SyncMergeResult::set_num_items_after_association(
38 int num_items_after_association) {
39 num_items_after_association_ = num_items_after_association;
40 }
41
42 void SyncMergeResult::set_num_items_added(int num_items_added) {
43 num_items_added_ = num_items_added;
44 }
45
46 void SyncMergeResult::set_num_items_deleted(int num_items_deleted) {
47 num_items_deleted_ = num_items_deleted;
48 }
49
50 void SyncMergeResult::set_num_items_modified(int num_items_modified) {
51 num_items_modified_ = num_items_modified;
52 }
53
54 void SyncMergeResult::set_pre_association_version(int64_t version) {
55 pre_association_version_ = version;
56 }
57
58 ModelType SyncMergeResult::model_type() const {
59 return model_type_;
60 }
61
62 SyncError SyncMergeResult::error() const {
63 return error_;
64 }
65
66 int SyncMergeResult::num_items_before_association() const {
67 return num_items_before_association_;
68 }
69
70 int SyncMergeResult::num_items_after_association() const {
71 return num_items_after_association_;
72 }
73
74 int SyncMergeResult::num_items_added() const {
75 return num_items_added_;
76 }
77
78 int SyncMergeResult::num_items_deleted() const {
79 return num_items_deleted_;
80 }
81
82 int SyncMergeResult::num_items_modified() const {
83 return num_items_modified_;
84 }
85
86 int64_t SyncMergeResult::pre_association_version() const {
87 return pre_association_version_;
88 }
89
90 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/sync_merge_result.h ('k') | sync/api/sync_merge_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698