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

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

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 3 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 (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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698