Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / invalidation / public / ack_handle.h
blobb40e94dc4e03976cf3e19d5ef9247d1ecdf4e449
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_INVALIDATION_PUBLIC_ACK_HANDLE_H_
6 #define COMPONENTS_INVALIDATION_PUBLIC_ACK_HANDLE_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h"
13 #include "components/invalidation/public/invalidation_export.h"
15 namespace base {
16 class DictionaryValue;
19 namespace syncer {
21 // Opaque class that represents a local ack handle. We don't reuse the
22 // invalidation ack handles to avoid unnecessary dependencies.
23 class INVALIDATION_EXPORT AckHandle {
24 public:
25 static AckHandle CreateUnique();
26 static AckHandle InvalidAckHandle();
28 bool Equals(const AckHandle& other) const;
30 scoped_ptr<base::DictionaryValue> ToValue() const;
31 bool ResetFromValue(const base::DictionaryValue& value);
33 bool IsValid() const;
35 ~AckHandle();
37 private:
38 // Explicitly copyable and assignable for STL containers.
39 AckHandle(const std::string& state, base::Time timestamp);
41 std::string state_;
42 base::Time timestamp_;
45 } // namespace syncer
47 #endif // COMPONENTS_INVALIDATION_PUBLIC_ACK_HANDLE_H_