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