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

Side by Side Diff: sync/notifier/invalidator.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 // Interface to the invalidator, which is an object that receives 5 // Interface to the invalidator, which is an object that receives
6 // invalidations for registered object IDs. The corresponding 6 // invalidations for registered object IDs. The corresponding
7 // InvalidationHandler is notifier when such an event occurs. 7 // InvalidationHandler is notifier when such an event occurs.
8 8
9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_ 9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_
10 #define SYNC_NOTIFIER_INVALIDATOR_H_ 10 #define SYNC_NOTIFIER_INVALIDATOR_H_
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "sync/internal_api/public/base/model_type.h" 14 #include "sync/internal_api/public/base/model_type.h"
15 #include "sync/notifier/invalidation_util.h" 15 #include "sync/notifier/invalidation_util.h"
16 #include "sync/notifier/object_id_state_map.h"
Nicolas Zea 2012/08/29 23:41:05 forward declare?
akalin 2012/08/30 22:20:38 can't, it's a typedef
16 17
17 namespace syncer { 18 namespace syncer {
18 class InvalidationHandler; 19 class InvalidationHandler;
19 20
20 class Invalidator { 21 class Invalidator {
21 public: 22 public:
22 Invalidator() {} 23 Invalidator() {}
23 virtual ~Invalidator() {} 24 virtual ~Invalidator() {}
24 25
25 // Clients should follow the pattern below: 26 // Clients should follow the pattern below:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // The observers won't be notified of any notifications until 76 // The observers won't be notified of any notifications until
76 // UpdateCredentials is called at least once. It can be called more than 77 // UpdateCredentials is called at least once. It can be called more than
77 // once. 78 // once.
78 virtual void UpdateCredentials( 79 virtual void UpdateCredentials(
79 const std::string& email, const std::string& token) = 0; 80 const std::string& email, const std::string& token) = 0;
80 81
81 // This is here only to support the old p2p notification implementation, 82 // This is here only to support the old p2p notification implementation,
82 // which is still used by sync integration tests. 83 // which is still used by sync integration tests.
83 // TODO(akalin): Remove this once we move the integration tests off p2p 84 // TODO(akalin): Remove this once we move the integration tests off p2p
84 // notifications. 85 // notifications.
85 virtual void SendNotification(ModelTypeSet changed_types) = 0; 86 virtual void SendNotification(const ObjectIdStateMap& id_state_map) = 0;
86 }; 87 };
87 } // namespace syncer 88 } // namespace syncer
88 89
89 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ 90 #endif // SYNC_NOTIFIER_INVALIDATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698