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

Side by Side Diff: components/gcm_driver/gcm_client_impl.h

Issue 2471433003: [GCM] Update ResetStore histograms (Closed)
Patch Set: Rebase and pretty print Created 4 years, 1 month 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('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 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 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // True if accounts were already provided through SetAccountsForCheckin(), 168 // True if accounts were already provided through SetAccountsForCheckin(),
169 // or when |last_checkin_accounts| was loaded as empty. 169 // or when |last_checkin_accounts| was loaded as empty.
170 bool accounts_set; 170 bool accounts_set;
171 // Map of account email addresses and OAuth2 tokens that will be sent to the 171 // Map of account email addresses and OAuth2 tokens that will be sent to the
172 // checkin server on a next checkin. 172 // checkin server on a next checkin.
173 std::map<std::string, std::string> account_tokens; 173 std::map<std::string, std::string> account_tokens;
174 // As set of accounts last checkin was completed with. 174 // As set of accounts last checkin was completed with.
175 std::set<std::string> last_checkin_accounts; 175 std::set<std::string> last_checkin_accounts;
176 }; 176 };
177 177
178 // Reasons for resetting the GCM Store.
179 // Note: this enum is recorded into a histogram. Do not change enum value
180 // or order.
181 enum ResetReason {
182 LOAD_FAILURE, // GCM store failed to load, but the store exists.
183 CHECKIN_REJECTED, // Checkin was rejected by server.
184
185 RESET_REASON_COUNT,
186 };
187
178 // Collection of pending registration requests. Keys are RegistrationInfo 188 // Collection of pending registration requests. Keys are RegistrationInfo
179 // instance, while values are pending registration requests to obtain a 189 // instance, while values are pending registration requests to obtain a
180 // registration ID for requesting application. 190 // registration ID for requesting application.
181 using PendingRegistrationRequests = 191 using PendingRegistrationRequests =
182 std::map<linked_ptr<RegistrationInfo>, 192 std::map<linked_ptr<RegistrationInfo>,
183 std::unique_ptr<RegistrationRequest>, 193 std::unique_ptr<RegistrationRequest>,
184 RegistrationInfoComparer>; 194 RegistrationInfoComparer>;
185 195
186 // Collection of pending unregistration requests. Keys are RegistrationInfo 196 // Collection of pending unregistration requests. Keys are RegistrationInfo
187 // instance, while values are pending unregistration requests to disable the 197 // instance, while values are pending unregistration requests to disable the
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 394
385 // Factory for creating references in callbacks. 395 // Factory for creating references in callbacks.
386 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; 396 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_;
387 397
388 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); 398 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl);
389 }; 399 };
390 400
391 } // namespace gcm 401 } // namespace gcm
392 402
393 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 403 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698