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

Side by Side Diff: sync/internal_api/public/base/invalidation.h

Issue 40303005: Add code for new invalidation local ack system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
OLDNEW
1 // Copyright 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_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 int64 version() const; 47 int64 version() const;
48 48
49 // Safe to call only if is_unknown_version() returns false. 49 // Safe to call only if is_unknown_version() returns false.
50 const std::string& payload() const; 50 const std::string& payload() const;
51 51
52 const AckHandle& ack_handle() const; 52 const AckHandle& ack_handle() const;
53 53
54 // TODO(rlarocque): Remove this method and use AckHandlers instead. 54 // TODO(rlarocque): Remove this method and use AckHandlers instead.
55 void set_ack_handle(const AckHandle& ack_handle); 55 void set_ack_handle(const AckHandle& ack_handle);
56 56
57 // Functions from the alternative ack tracking framework.
58 // Currently unused.
57 void set_ack_handler(syncer::WeakHandle<AckHandler> ack_handler); 59 void set_ack_handler(syncer::WeakHandle<AckHandler> ack_handler);
58
59 // True if this class has a valid AckHandler.
60 bool SupportsAcknowledgement() const; 60 bool SupportsAcknowledgement() const;
61 61 void Acknowledge() const;
62 // TODO(rlarocque): Re-enable these when we switch to AckHandlers. 62 void Drop(DroppedInvalidationTracker* tracker) const;
tim (not reviewing) 2013/10/29 17:21:57 Comment param.
rlarocque 2013/10/30 00:49:26 Done.
63 // void Acknowledge() const;
64 // void Drop(DroppedInvalidationTracker* tracker) const;
65 63
66 scoped_ptr<base::DictionaryValue> ToValue() const; 64 scoped_ptr<base::DictionaryValue> ToValue() const;
67 std::string ToString() const; 65 std::string ToString() const;
68 66
69 private: 67 private:
70 Invalidation(const invalidation::ObjectId& id, 68 Invalidation(const invalidation::ObjectId& id,
71 bool is_unknown_version, 69 bool is_unknown_version,
72 int64 version, 70 int64 version,
73 const std::string& payload, 71 const std::string& payload,
74 AckHandle ack_handle); 72 AckHandle ack_handle);
(...skipping 13 matching lines...) Expand all
88 std::string payload_; 86 std::string payload_;
89 87
90 // A locally generated unique ID used to manage local acknowledgements. 88 // A locally generated unique ID used to manage local acknowledgements.
91 AckHandle ack_handle_; 89 AckHandle ack_handle_;
92 syncer::WeakHandle<AckHandler> ack_handler_; 90 syncer::WeakHandle<AckHandler> ack_handler_;
93 }; 91 };
94 92
95 } // namespace syncer 93 } // namespace syncer
96 94
97 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ 95 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
OLDNEW
« no previous file with comments | « no previous file | sync/internal_api/public/base/invalidation.cc » ('j') | sync/notifier/dropped_invalidation_tracker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698