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

Side by Side Diff: components/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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "sync/api/sync_merge_result.h" 7 #include "components/sync/api/sync_merge_result.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
11 SyncMergeResult::SyncMergeResult(ModelType type) 11 SyncMergeResult::SyncMergeResult(ModelType type)
12 : model_type_(type), 12 : model_type_(type),
13 num_items_before_association_(0), 13 num_items_before_association_(0),
14 num_items_after_association_(0), 14 num_items_after_association_(0),
15 num_items_added_(0), 15 num_items_added_(0),
16 num_items_deleted_(0), 16 num_items_deleted_(0),
17 num_items_modified_(0), 17 num_items_modified_(0),
18 pre_association_version_(0) { 18 pre_association_version_(0) {}
19 }
20 19
21 SyncMergeResult::SyncMergeResult(const SyncMergeResult& other) = default; 20 SyncMergeResult::SyncMergeResult(const SyncMergeResult& other) = default;
22 21
23 SyncMergeResult::~SyncMergeResult() { 22 SyncMergeResult::~SyncMergeResult() {}
24 }
25 23
26 // Setters. 24 // Setters.
27 void SyncMergeResult::set_error(SyncError error) { 25 void SyncMergeResult::set_error(SyncError error) {
28 DCHECK(!error.IsSet() || model_type_ == error.model_type()); 26 DCHECK(!error.IsSet() || model_type_ == error.model_type());
29 error_ = error; 27 error_ = error;
30 } 28 }
31 29
32 void SyncMergeResult::set_num_items_before_association( 30 void SyncMergeResult::set_num_items_before_association(
33 int num_items_before_association) { 31 int num_items_before_association) {
34 num_items_before_association_ = num_items_before_association; 32 num_items_before_association_ = num_items_before_association;
35 } 33 }
36 34
37 void SyncMergeResult::set_num_items_after_association( 35 void SyncMergeResult::set_num_items_after_association(
38 int num_items_after_association) { 36 int num_items_after_association) {
39 num_items_after_association_ = num_items_after_association; 37 num_items_after_association_ = num_items_after_association;
40 } 38 }
41 39
42 void SyncMergeResult::set_num_items_added(int num_items_added) { 40 void SyncMergeResult::set_num_items_added(int num_items_added) {
43 num_items_added_ = num_items_added; 41 num_items_added_ = num_items_added;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 79
82 int SyncMergeResult::num_items_modified() const { 80 int SyncMergeResult::num_items_modified() const {
83 return num_items_modified_; 81 return num_items_modified_;
84 } 82 }
85 83
86 int64_t SyncMergeResult::pre_association_version() const { 84 int64_t SyncMergeResult::pre_association_version() const {
87 return pre_association_version_; 85 return pre_association_version_;
88 } 86 }
89 87
90 } // namespace syncer 88 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/api/sync_merge_result.h ('k') | components/sync/api/sync_merge_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698