Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: sync/internal_api/public/base/invalidation.h

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (no code changes) Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 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"
(...skipping 14 matching lines...) Expand all
25 static AckHandle CreateUnique(); 25 static AckHandle CreateUnique();
26 static AckHandle InvalidAckHandle(); 26 static AckHandle InvalidAckHandle();
27 27
28 bool Equals(const AckHandle& other) const; 28 bool Equals(const AckHandle& other) const;
29 29
30 scoped_ptr<base::DictionaryValue> ToValue() const; 30 scoped_ptr<base::DictionaryValue> ToValue() const;
31 bool ResetFromValue(const base::DictionaryValue& value); 31 bool ResetFromValue(const base::DictionaryValue& value);
32 32
33 bool IsValid() const; 33 bool IsValid() const;
34 34
35 ~AckHandle();
36
35 private: 37 private:
36 // Explicitly copyable and assignable for STL containers. 38 // Explicitly copyable and assignable for STL containers.
37 AckHandle(const std::string& state, base::Time timestamp); 39 AckHandle(const std::string& state, base::Time timestamp);
38 40
39 std::string state_; 41 std::string state_;
40 base::Time timestamp_; 42 base::Time timestamp_;
41 }; 43 };
42 44
43 // Represents a local invalidation, and is roughly analogous to 45 // Represents a local invalidation, and is roughly analogous to
44 // invalidation::Invalidation. It contains a payload (which may be empty) and an 46 // invalidation::Invalidation. It contains a payload (which may be empty) and an
45 // associated ack handle that an InvalidationHandler implementation can use to 47 // associated ack handle that an InvalidationHandler implementation can use to
46 // acknowledge receipt of the invalidation. It does not embed the object ID, 48 // acknowledge receipt of the invalidation. It does not embed the object ID,
47 // since it is typically associated with it through ObjectIdInvalidationMap. 49 // since it is typically associated with it through ObjectIdInvalidationMap.
48 struct Invalidation { 50 struct SYNC_EXPORT Invalidation {
49 Invalidation(); 51 Invalidation();
52 ~Invalidation();
50 53
51 bool Equals(const Invalidation& other) const; 54 bool Equals(const Invalidation& other) const;
52 55
53 scoped_ptr<base::DictionaryValue> ToValue() const; 56 scoped_ptr<base::DictionaryValue> ToValue() const;
54 bool ResetFromValue(const base::DictionaryValue& value); 57 bool ResetFromValue(const base::DictionaryValue& value);
55 58
56 std::string payload; 59 std::string payload;
57 AckHandle ack_handle; 60 AckHandle ack_handle;
58 }; 61 };
59 62
60 } // namespace syncer 63 } // namespace syncer
61 64
62 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_ 65 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/js_sync_manager_observer.h ('k') | sync/internal_api/public/base/invalidation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698