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

Side by Side Diff: sync/notifier/invalidator_registrar.h

Issue 12114012: Remove syncer::IncomingInvalidationSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update DriveSystemService Created 7 years, 10 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_NOTIFIER_INVALIDATOR_REGISTRAR_H_ 5 #ifndef SYNC_NOTIFIER_INVALIDATOR_REGISTRAR_H_
6 #define SYNC_NOTIFIER_INVALIDATOR_REGISTRAR_H_ 6 #define SYNC_NOTIFIER_INVALIDATOR_REGISTRAR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Returns the set of all IDs that are registered to some handler (even 52 // Returns the set of all IDs that are registered to some handler (even
53 // handlers that have been unregistered). 53 // handlers that have been unregistered).
54 ObjectIdSet GetAllRegisteredIds() const; 54 ObjectIdSet GetAllRegisteredIds() const;
55 55
56 // Sorts incoming invalidations into a bucket for each handler and then 56 // Sorts incoming invalidations into a bucket for each handler and then
57 // dispatches the batched invalidations to the corresponding handler. 57 // dispatches the batched invalidations to the corresponding handler.
58 // Invalidations for IDs with no corresponding handler are dropped, as are 58 // Invalidations for IDs with no corresponding handler are dropped, as are
59 // invalidations for handlers that are not added. 59 // invalidations for handlers that are not added.
60 void DispatchInvalidationsToHandlers( 60 void DispatchInvalidationsToHandlers(
61 const ObjectIdInvalidationMap& invalidation_map, 61 const ObjectIdInvalidationMap& invalidation_map);
62 IncomingInvalidationSource source);
63 62
64 // Updates the invalidator state to the given one and then notifies 63 // Updates the invalidator state to the given one and then notifies
65 // all handlers. Note that the order is important; handlers that 64 // all handlers. Note that the order is important; handlers that
66 // call GetInvalidatorState() when notified will see the new state. 65 // call GetInvalidatorState() when notified will see the new state.
67 void UpdateInvalidatorState(InvalidatorState state); 66 void UpdateInvalidatorState(InvalidatorState state);
68 67
69 // Returns the current invalidator state. When called from within 68 // Returns the current invalidator state. When called from within
70 // InvalidationHandler::OnInvalidatorStateChange(), this returns the 69 // InvalidationHandler::OnInvalidatorStateChange(), this returns the
71 // updated state. 70 // updated state.
72 InvalidatorState GetInvalidatorState() const; 71 InvalidatorState GetInvalidatorState() const;
(...skipping 14 matching lines...) Expand all
87 ObserverList<InvalidationHandler> handlers_; 86 ObserverList<InvalidationHandler> handlers_;
88 IdHandlerMap id_to_handler_map_; 87 IdHandlerMap id_to_handler_map_;
89 InvalidatorState state_; 88 InvalidatorState state_;
90 89
91 DISALLOW_COPY_AND_ASSIGN(InvalidatorRegistrar); 90 DISALLOW_COPY_AND_ASSIGN(InvalidatorRegistrar);
92 }; 91 };
93 92
94 } // namespace syncer 93 } // namespace syncer
95 94
96 #endif // SYNC_NOTIFIER_INVALIDATOR_REGISTRAR_H_ 95 #endif // SYNC_NOTIFIER_INVALIDATOR_REGISTRAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698