OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ | 5 #ifndef COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ |
6 #define COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ | 6 #define COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 // Factory functions. | 30 // Factory functions. |
31 static Invalidation Init(const invalidation::ObjectId& id, | 31 static Invalidation Init(const invalidation::ObjectId& id, |
32 int64_t version, | 32 int64_t version, |
33 const std::string& payload); | 33 const std::string& payload); |
34 static Invalidation InitUnknownVersion(const invalidation::ObjectId& id); | 34 static Invalidation InitUnknownVersion(const invalidation::ObjectId& id); |
35 static Invalidation InitFromDroppedInvalidation(const Invalidation& dropped); | 35 static Invalidation InitFromDroppedInvalidation(const Invalidation& dropped); |
36 static scoped_ptr<Invalidation> InitFromValue( | 36 static scoped_ptr<Invalidation> InitFromValue( |
37 const base::DictionaryValue& value); | 37 const base::DictionaryValue& value); |
38 | 38 |
| 39 Invalidation(const Invalidation& other); |
39 ~Invalidation(); | 40 ~Invalidation(); |
40 | 41 |
41 // Compares two invalidations. The comparison ignores ack-tracking state. | 42 // Compares two invalidations. The comparison ignores ack-tracking state. |
42 bool Equals(const Invalidation& other) const; | 43 bool Equals(const Invalidation& other) const; |
43 | 44 |
44 invalidation::ObjectId object_id() const; | 45 invalidation::ObjectId object_id() const; |
45 bool is_unknown_version() const; | 46 bool is_unknown_version() const; |
46 | 47 |
47 // Safe to call only if is_unknown_version() returns false. | 48 // Safe to call only if is_unknown_version() returns false. |
48 int64_t version() const; | 49 int64_t version() const; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 AckHandle ack_handle_; | 120 AckHandle ack_handle_; |
120 | 121 |
121 // The acknowledgement tracking handler and its thread. | 122 // The acknowledgement tracking handler and its thread. |
122 base::WeakPtr<AckHandler> ack_handler_; | 123 base::WeakPtr<AckHandler> ack_handler_; |
123 scoped_refptr<base::SequencedTaskRunner> ack_handler_task_runner_; | 124 scoped_refptr<base::SequencedTaskRunner> ack_handler_task_runner_; |
124 }; | 125 }; |
125 | 126 |
126 } // namespace syncer | 127 } // namespace syncer |
127 | 128 |
128 #endif // COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ | 129 #endif // COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_H_ |
OLD | NEW |