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

Side by Side Diff: google_apis/gcm/engine/connection_factory_impl.h

Issue 2624653003: Provide correct guard for GCM connection tracking of login failures. (Closed)
Patch Set: Comment cleanup Created 3 years, 11 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_
6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_
7 7
8 #include "google_apis/gcm/engine/connection_factory.h" 8 #include "google_apis/gcm/engine/connection_factory.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Whether the client is waiting for backoff to finish before attempting to 176 // Whether the client is waiting for backoff to finish before attempting to
177 // connect. Canary jobs are able to preempt connections pending backoff 177 // connect. Canary jobs are able to preempt connections pending backoff
178 // expiration. 178 // expiration.
179 bool waiting_for_backoff_; 179 bool waiting_for_backoff_;
180 180
181 // Whether the NetworkChangeNotifier has informed the client that there is 181 // Whether the NetworkChangeNotifier has informed the client that there is
182 // no current connection. No connection attempts will be made until the 182 // no current connection. No connection attempts will be made until the
183 // client is informed of a valid connection type. 183 // client is informed of a valid connection type.
184 bool waiting_for_network_online_; 184 bool waiting_for_network_online_;
185 185
186 // Whether login successfully completed after the connection was established. 186 // Whether handshake successfully completed after the connection was
Nicolas Zea 2017/01/12 18:00:57 nit: given this is "in progress", perhaps just rew
harkness 2017/01/13 08:28:08 Done.
187 // If a connection reset happens while attempting to log in, the current 187 // established. If a connection reset happens while attempting to complete
188 // backoff entry is reused (after incrementing with a new failure). 188 // the handshake, the current backoff entry is reused (after incrementing
189 bool logging_in_; 189 // with a new failure).
190 bool handshake_in_progress_;
190 191
191 // The time of the last login completion. Used for calculating whether to 192 // The time of the last login completion. Used for calculating whether to
192 // restore a previous backoff entry and for measuring uptime. 193 // restore a previous backoff entry and for measuring uptime.
193 base::TimeTicks last_login_time_; 194 base::TimeTicks last_login_time_;
194 195
195 // Cached callbacks. Set at |Initialize| time, consumed at first |Connect| 196 // Cached callbacks. Set at |Initialize| time, consumed at first |Connect|
196 // time. 197 // time.
197 ConnectionHandler::ProtoReceivedCallback read_callback_; 198 ConnectionHandler::ProtoReceivedCallback read_callback_;
198 ConnectionHandler::ProtoSentCallback write_callback_; 199 ConnectionHandler::ProtoSentCallback write_callback_;
199 200
(...skipping 10 matching lines...) Expand all
210 ConnectionListener* listener_; 211 ConnectionListener* listener_;
211 212
212 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; 213 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_;
213 214
214 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); 215 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl);
215 }; 216 };
216 217
217 } // namespace gcm 218 } // namespace gcm
218 219
219 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ 220 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698