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

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

Issue 10827133: [Sync] Rework unit tests for ChromeInvalidationClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 4 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
« no previous file with comments | « sync/notifier/mock_invalidation_state_tracker.cc ('k') | sync/notifier/registration_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // A class that manages the registration of types for server-issued 5 // A class that manages the registration of types for server-issued
6 // notifications. 6 // notifications.
7 7
8 #ifndef SYNC_NOTIFIER_REGISTRATION_MANAGER_H_ 8 #ifndef SYNC_NOTIFIER_REGISTRATION_MANAGER_H_
9 #define SYNC_NOTIFIER_REGISTRATION_MANAGER_H_ 9 #define SYNC_NOTIFIER_REGISTRATION_MANAGER_H_
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 PendingRegistrationMap; 62 PendingRegistrationMap;
63 63
64 // Does not take ownership of |invalidation_client_|. 64 // Does not take ownership of |invalidation_client_|.
65 explicit RegistrationManager( 65 explicit RegistrationManager(
66 invalidation::InvalidationClient* invalidation_client); 66 invalidation::InvalidationClient* invalidation_client);
67 67
68 virtual ~RegistrationManager(); 68 virtual ~RegistrationManager();
69 69
70 // Registers all object IDs included in the given set (that are not 70 // Registers all object IDs included in the given set (that are not
71 // already disabled) and unregisters all other object IDs. 71 // already disabled) and unregisters all other object IDs.
72 void SetRegisteredIds(const ObjectIdSet& ids); 72 void UpdateRegisteredIds(const ObjectIdSet& ids);
73 73
74 // Marks the registration for the |id| lost and re-registers 74 // Marks the registration for the |id| lost and re-registers
75 // it (unless it's disabled). 75 // it (unless it's disabled).
76 void MarkRegistrationLost(const invalidation::ObjectId& id); 76 void MarkRegistrationLost(const invalidation::ObjectId& id);
77 77
78 // Marks registrations lost for all enabled object IDs and re-registers them. 78 // Marks registrations lost for all enabled object IDs and re-registers them.
79 void MarkAllRegistrationsLost(); 79 void MarkAllRegistrationsLost();
80 80
81 // Marks the registration for the |id| permanently lost and blocks any future 81 // Marks the registration for the |id| permanently lost and blocks any future
82 // registration attempts. 82 // registration attempts.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 RegistrationStatusMap registration_statuses_; 176 RegistrationStatusMap registration_statuses_;
177 // Weak pointer. 177 // Weak pointer.
178 invalidation::InvalidationClient* invalidation_client_; 178 invalidation::InvalidationClient* invalidation_client_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(RegistrationManager); 180 DISALLOW_COPY_AND_ASSIGN(RegistrationManager);
181 }; 181 };
182 182
183 } // namespace syncer 183 } // namespace syncer
184 184
185 #endif // SYNC_NOTIFIER_REGISTRATION_MANAGER_H_ 185 #endif // SYNC_NOTIFIER_REGISTRATION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/notifier/mock_invalidation_state_tracker.cc ('k') | sync/notifier/registration_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698