| Index: components/gcm_driver/gcm_client_impl.cc
|
| diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
|
| index 080a7d006fb208bdbcff659566dec87c476f049b..c1a02de6be833a3163cdb78274522a8846c391f5 100644
|
| --- a/components/gcm_driver/gcm_client_impl.cc
|
| +++ b/components/gcm_driver/gcm_client_impl.cc
|
| @@ -233,7 +233,8 @@ void RecordOutgoingMessageToUMA(const gcm::OutgoingMessage& message) {
|
| }
|
|
|
| void RecordResetStoreErrorToUMA(ResetStoreError error) {
|
| - UMA_HISTOGRAM_ENUMERATION("GCM.ResetStore", error, RESET_STORE_ERROR_COUNT);
|
| + UMA_HISTOGRAM_ENUMERATION("GCM.ResetStoreError", error,
|
| + RESET_STORE_ERROR_COUNT);
|
| }
|
|
|
| } // namespace
|
| @@ -394,7 +395,7 @@ void GCMClientImpl::OnLoadCompleted(
|
| }
|
| } else {
|
| // Otherwise, destroy the store to try again.
|
| - ResetStore();
|
| + ResetStore(LOAD_FAILURE);
|
| }
|
| return;
|
| }
|
| @@ -543,7 +544,7 @@ void GCMClientImpl::DestroyStoreWhenNotNeeded() {
|
| weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| -void GCMClientImpl::ResetStore() {
|
| +void GCMClientImpl::ResetStore(ResetReason reset_reason) {
|
| // If already being reset, don't do it again. We want to prevent from
|
| // resetting and loading from the store again and again.
|
| if (gcm_store_reset_) {
|
| @@ -552,6 +553,8 @@ void GCMClientImpl::ResetStore() {
|
| return;
|
| }
|
| gcm_store_reset_ = true;
|
| + UMA_HISTOGRAM_ENUMERATION("GCM.ResetStoreReason", reset_reason,
|
| + RESET_REASON_COUNT);
|
|
|
| // Destroy the GCM store to start over.
|
| gcm_store_->Destroy(base::Bind(&GCMClientImpl::ResetStoreCallback,
|
| @@ -706,7 +709,7 @@ void GCMClientImpl::OnCheckinCompleted(
|
| if (response_code == net::HTTP_UNAUTHORIZED ||
|
| response_code == net::HTTP_BAD_REQUEST) {
|
| LOG(ERROR) << "Checkin rejected. Resetting GCM Store.";
|
| - ResetStore();
|
| + ResetStore(CHECKIN_REJECTED);
|
| return;
|
| }
|
|
|
|
|