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

Side by Side Diff: components/invalidation/impl/registration_manager.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_ 8 #ifndef COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_
9 #define COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_ 9 #define COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::Time last_registration_request; 137 base::Time last_registration_request;
138 // When we last tried to register. 138 // When we last tried to register.
139 base::Time last_registration_attempt; 139 base::Time last_registration_attempt;
140 // The calculated delay of any pending registration (which may be 140 // The calculated delay of any pending registration (which may be
141 // negative). 141 // negative).
142 base::TimeDelta delay; 142 base::TimeDelta delay;
143 // The minimum time to wait until any next registration attempt. 143 // The minimum time to wait until any next registration attempt.
144 // Increased after each consecutive failure. 144 // Increased after each consecutive failure.
145 base::TimeDelta next_delay; 145 base::TimeDelta next_delay;
146 // The actual timer for registration. 146 // The actual timer for registration.
147 base::OneShotTimer<RegistrationStatus> registration_timer; 147 base::OneShotTimer registration_timer;
148 148
149 DISALLOW_COPY_AND_ASSIGN(RegistrationStatus); 149 DISALLOW_COPY_AND_ASSIGN(RegistrationStatus);
150 }; 150 };
151 typedef std::map<invalidation::ObjectId, 151 typedef std::map<invalidation::ObjectId,
152 RegistrationStatus*, 152 RegistrationStatus*,
153 ObjectIdLessThan> 153 ObjectIdLessThan>
154 RegistrationStatusMap; 154 RegistrationStatusMap;
155 155
156 // Does nothing if the given id is disabled. Otherwise, if 156 // Does nothing if the given id is disabled. Otherwise, if
157 // |is_retry| is not set, registers the given type immediately and 157 // |is_retry| is not set, registers the given type immediately and
(...skipping 21 matching lines...) Expand all
179 RegistrationStatusMap registration_statuses_; 179 RegistrationStatusMap registration_statuses_;
180 // Weak pointer. 180 // Weak pointer.
181 invalidation::InvalidationClient* invalidation_client_; 181 invalidation::InvalidationClient* invalidation_client_;
182 182
183 DISALLOW_COPY_AND_ASSIGN(RegistrationManager); 183 DISALLOW_COPY_AND_ASSIGN(RegistrationManager);
184 }; 184 };
185 185
186 } // namespace syncer 186 } // namespace syncer
187 187
188 #endif // COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_ 188 #endif // COMPONENTS_INVALIDATION_IMPL_REGISTRATION_MANAGER_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/top_sites_impl.h ('k') | components/invalidation/impl/ticl_invalidation_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698