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

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

Issue 11515009: [sync] Componentize sync: Part 2: Add SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR Feedback Created 8 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 | Annotate | Revision Log
« no previous file with comments | « sync/api/sync_error_factory.h ('k') | sync/api/syncable_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef SYNC_API_SYNC_MERGE_RESULT_H_ 5 #ifndef SYNC_API_SYNC_MERGE_RESULT_H_
6 #define SYNC_API_SYNC_MERGE_RESULT_H_ 6 #define SYNC_API_SYNC_MERGE_RESULT_H_
7 7
8 #include "sync/api/sync_error.h" 8 #include "sync/api/sync_error.h"
9 #include "sync/base/sync_export.h"
9 #include "sync/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
10 11
11 namespace syncer { 12 namespace syncer {
12 13
13 // A model-type-specific view of a sync merge. This class encapsulates the 14 // A model-type-specific view of a sync merge. This class encapsulates the
14 // state before and after the merge as well as the deltas and any error that 15 // state before and after the merge as well as the deltas and any error that
15 // occurred. 16 // occurred.
16 // Note: This class only tracks one side of the merge. In other words, if built 17 // Note: This class only tracks one side of the merge. In other words, if built
17 // by the local SyncableService, all values correspond to the local state before 18 // by the local SyncableService, all values correspond to the local state before
18 // and after merging, and the delta's applied to that state. Sync's change 19 // and after merging, and the delta's applied to that state. Sync's change
19 // processor will create a separate merge result. 20 // processor will create a separate merge result.
20 class SyncMergeResult { 21 class SYNC_EXPORT SyncMergeResult {
21 public: 22 public:
22 // Initialize an empty merge result for model type |type|. 23 // Initialize an empty merge result for model type |type|.
23 explicit SyncMergeResult(ModelType type); 24 explicit SyncMergeResult(ModelType type);
24 ~SyncMergeResult(); 25 ~SyncMergeResult();
25 26
26 // Default copy and assign welcome. 27 // Default copy and assign welcome.
27 28
28 // Setters. 29 // Setters.
29 // Note: if |error.IsSet()| is true, |error.type()| must match model_type_ 30 // Note: if |error.IsSet()| is true, |error.type()| must match model_type_
30 void set_error(SyncError error); 31 void set_error(SyncError error);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // The changes that took place during association. In a correctly working 64 // The changes that took place during association. In a correctly working
64 // system these should be the deltas between before and after. 65 // system these should be the deltas between before and after.
65 int num_items_added_; 66 int num_items_added_;
66 int num_items_deleted_; 67 int num_items_deleted_;
67 int num_items_modified_; 68 int num_items_modified_;
68 }; 69 };
69 70
70 } // namespace syncer 71 } // namespace syncer
71 72
72 #endif // SYNC_API_SYNC_MERGE_RESULT_H_ 73 #endif // SYNC_API_SYNC_MERGE_RESULT_H_
OLDNEW
« no previous file with comments | « sync/api/sync_error_factory.h ('k') | sync/api/syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698