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

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: nits 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 is in progress after the connection was established. If
187 // If a connection reset happens while attempting to log in, the current 187 // a connection reset happens while attempting to complete the handshake, the
188 // backoff entry is reused (after incrementing with a new failure). 188 // current backoff entry is reused (after incrementing with a new failure).
189 bool logging_in_; 189 bool handshake_in_progress_;
190 190
191 // The time of the last login completion. Used for calculating whether to 191 // The time of the last login completion. Used for calculating whether to
192 // restore a previous backoff entry and for measuring uptime. 192 // restore a previous backoff entry and for measuring uptime.
193 base::TimeTicks last_login_time_; 193 base::TimeTicks last_login_time_;
194 194
195 // Cached callbacks. Set at |Initialize| time, consumed at first |Connect| 195 // Cached callbacks. Set at |Initialize| time, consumed at first |Connect|
196 // time. 196 // time.
197 ConnectionHandler::ProtoReceivedCallback read_callback_; 197 ConnectionHandler::ProtoReceivedCallback read_callback_;
198 ConnectionHandler::ProtoSentCallback write_callback_; 198 ConnectionHandler::ProtoSentCallback write_callback_;
199 199
(...skipping 10 matching lines...) Expand all
210 ConnectionListener* listener_; 210 ConnectionListener* listener_;
211 211
212 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; 212 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_;
213 213
214 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); 214 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl);
215 }; 215 };
216 216
217 } // namespace gcm 217 } // namespace gcm
218 218
219 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ 219 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/connection_event_tracker.cc ('k') | google_apis/gcm/engine/connection_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698