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

Side by Side Diff: sync/notifier/invalidation_state_tracker.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/notifier/DEPS ('k') | sync/notifier/invalidation_util.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 // An InvalidationStateTracker is an interface that handles persisting state 5 // An InvalidationStateTracker is an interface that handles persisting state
6 // needed for invalidations. Currently, it is responsible for managing the 6 // needed for invalidations. Currently, it is responsible for managing the
7 // following information: 7 // following information:
8 // - Max version seen from the invalidation server to help dedupe invalidations. 8 // - Max version seen from the invalidation server to help dedupe invalidations.
9 // - Bootstrap data for the invalidation client. 9 // - Bootstrap data for the invalidation client.
10 // - Payloads and locally generated ack handles, to support local acking. 10 // - Payloads and locally generated ack handles, to support local acking.
11 11
12 #ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 12 #ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
13 #define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 13 #define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
14 14
15 #include <map> 15 #include <map>
16 #include <string> 16 #include <string>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/callback_forward.h" 19 #include "base/callback_forward.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "google/cacheinvalidation/include/types.h" 21 #include "google/cacheinvalidation/include/types.h"
22 #include "sync/base/sync_export.h"
22 #include "sync/internal_api/public/base/invalidation.h" 23 #include "sync/internal_api/public/base/invalidation.h"
23 #include "sync/notifier/invalidation_util.h" 24 #include "sync/notifier/invalidation_util.h"
24 25
25 namespace base { 26 namespace base {
26 class TaskRunner; 27 class TaskRunner;
27 } // namespace base 28 } // namespace base
28 29
29 namespace syncer { 30 namespace syncer {
30 31
31 struct InvalidationState { 32 struct SYNC_EXPORT InvalidationState {
32 InvalidationState(); 33 InvalidationState();
33 ~InvalidationState(); 34 ~InvalidationState();
34 35
35 int64 version; 36 int64 version;
36 std::string payload; 37 std::string payload;
37 AckHandle expected; 38 AckHandle expected;
38 AckHandle current; 39 AckHandle current;
39 }; 40 };
40 41
41 // TODO(dcheng): Remove this in favor of adding an Equals() method. 42 // TODO(dcheng): Remove this in favor of adding an Equals() method.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual void Acknowledge(const invalidation::ObjectId& id, 83 virtual void Acknowledge(const invalidation::ObjectId& id,
83 const AckHandle& ack_handle) = 0; 84 const AckHandle& ack_handle) = 0;
84 85
85 protected: 86 protected:
86 virtual ~InvalidationStateTracker() {} 87 virtual ~InvalidationStateTracker() {}
87 }; 88 };
88 89
89 } // namespace syncer 90 } // namespace syncer
90 91
91 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 92 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/notifier/DEPS ('k') | sync/notifier/invalidation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698