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

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

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move bookmark change into separate patch Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sync/api/sync_error_unittest.cc ('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
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 "sync/api/sync_merge_result.h" 5 #include "sync/api/sync_merge_result.h"
6 6
7 namespace syncer { 7 namespace syncer {
8 8
9 SyncMergeResult::SyncMergeResult(ModelType type) 9 SyncMergeResult::SyncMergeResult(ModelType type)
10 : model_type_(type), 10 : model_type_(type),
11 num_items_before_association_(0), 11 num_items_before_association_(0),
12 num_items_after_association_(0), 12 num_items_after_association_(0),
13 num_items_added_(0), 13 num_items_added_(0),
14 num_items_deleted_(0), 14 num_items_deleted_(0),
15 num_items_modified_(0), 15 num_items_modified_(0),
16 pre_association_version_(0) { 16 pre_association_version_(0) {
17 } 17 }
18 18
19 SyncMergeResult::~SyncMergeResult() { 19 SyncMergeResult::~SyncMergeResult() {
20 } 20 }
21 21
22 // Setters. 22 // Setters.
23 void SyncMergeResult::set_error(SyncError error) { 23 void SyncMergeResult::set_error(SyncError error) {
24 DCHECK(!error.IsSet() || model_type_ == error.type()); 24 DCHECK(!error.IsSet() || model_type_ == error.model_type());
25 error_ = error; 25 error_ = error;
26 } 26 }
27 27
28 void SyncMergeResult::set_num_items_before_association( 28 void SyncMergeResult::set_num_items_before_association(
29 int num_items_before_association) { 29 int num_items_before_association) {
30 num_items_before_association_ = num_items_before_association; 30 num_items_before_association_ = num_items_before_association;
31 } 31 }
32 32
33 void SyncMergeResult::set_num_items_after_association( 33 void SyncMergeResult::set_num_items_after_association(
34 int num_items_after_association) { 34 int num_items_after_association) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 int SyncMergeResult::num_items_modified() const { 78 int SyncMergeResult::num_items_modified() const {
79 return num_items_modified_; 79 return num_items_modified_;
80 } 80 }
81 81
82 int64 SyncMergeResult::pre_association_version() const { 82 int64 SyncMergeResult::pre_association_version() const {
83 return pre_association_version_; 83 return pre_association_version_;
84 } 84 }
85 85
86 } // namespace syncer 86 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/sync_error_unittest.cc ('k') | sync/api/sync_merge_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698