| OLD | NEW |
| 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 #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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "sync/base/sync_export.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class DictionaryValue; | 16 class DictionaryValue; |
| 16 } // namespace | 17 } // namespace |
| 17 | 18 |
| 18 namespace syncer { | 19 namespace syncer { |
| 19 | 20 |
| 20 // Opaque class that represents a local ack handle. We don't reuse the | 21 // Opaque class that represents a local ack handle. We don't reuse the |
| 21 // invalidation ack handles to avoid unnecessary dependencies. | 22 // invalidation ack handles to avoid unnecessary dependencies. |
| 22 class AckHandle { | 23 class SYNC_EXPORT AckHandle { |
| 23 public: | 24 public: |
| 24 static AckHandle CreateUnique(); | 25 static AckHandle CreateUnique(); |
| 25 static AckHandle InvalidAckHandle(); | 26 static AckHandle InvalidAckHandle(); |
| 26 | 27 |
| 27 bool Equals(const AckHandle& other) const; | 28 bool Equals(const AckHandle& other) const; |
| 28 | 29 |
| 29 scoped_ptr<base::DictionaryValue> ToValue() const; | 30 scoped_ptr<base::DictionaryValue> ToValue() const; |
| 30 bool ResetFromValue(const base::DictionaryValue& value); | 31 bool ResetFromValue(const base::DictionaryValue& value); |
| 31 | 32 |
| 32 bool IsValid() const; | 33 bool IsValid() const; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 scoped_ptr<base::DictionaryValue> ToValue() const; | 53 scoped_ptr<base::DictionaryValue> ToValue() const; |
| 53 bool ResetFromValue(const base::DictionaryValue& value); | 54 bool ResetFromValue(const base::DictionaryValue& value); |
| 54 | 55 |
| 55 std::string payload; | 56 std::string payload; |
| 56 AckHandle ack_handle; | 57 AckHandle ack_handle; |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace syncer | 60 } // namespace syncer |
| 60 | 61 |
| 61 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ | 62 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ |
| OLD | NEW |