Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace base { | |
| 11 class DictionaryValue; | |
| 12 class Value; | |
| 13 } // namespace | |
| 14 | |
| 10 namespace syncer { | 15 namespace syncer { |
| 11 | 16 |
| 12 // Opaque class that represents an ack handle. | 17 // Opaque class that represents an ack handle. |
| 13 // TODO(dcheng): This is just a refactoring change, so the class is empty for | 18 // TODO(dcheng): This is just a refactoring change, so the class is empty for |
| 14 // the moment. It will be filled once we start implementing 'reminders'. | 19 // the moment. It will be filled once we start implementing 'reminders'. |
| 15 class AckHandle { | 20 class AckHandle { |
| 21 public: | |
| 22 bool Equals(const AckHandle& other) const; | |
| 23 | |
| 24 // Caller owns the returned Value. | |
| 25 base::Value* ToValue() const; | |
|
Nicolas Zea
2012/08/29 23:41:05
have these return ScopedPtr's?
akalin
2012/08/30 22:20:38
Done.
| |
| 26 | |
| 27 bool ResetFromValue(const base::Value& value); | |
| 16 }; | 28 }; |
| 17 | 29 |
| 18 struct InvalidationState { | 30 struct InvalidationState { |
| 19 std::string payload; | 31 std::string payload; |
| 20 AckHandle ack_handle; | 32 AckHandle ack_handle; |
| 33 | |
| 34 bool Equals(const InvalidationState& other) const; | |
| 35 | |
| 36 // Caller owns the returned DictionaryValue. | |
| 37 base::DictionaryValue* ToValue() const; | |
| 38 | |
| 39 bool ResetFromValue(const base::DictionaryValue& value); | |
| 21 }; | 40 }; |
| 22 | 41 |
| 23 } // namespace syncer | 42 } // namespace syncer |
| 24 | 43 |
| 25 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | 44 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ |
| OLD | NEW |