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

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

Issue 603023002: Fixed a mismatch of UMA GCM metric name between files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses Filip's comment. Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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 #include "components/gcm_driver/gcm_client_impl.h" 5 #include "components/gcm_driver/gcm_client_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 const gcm::GCMClient::OutgoingMessage& message) { 161 const gcm::GCMClient::OutgoingMessage& message) {
162 OutgoingMessageTTLCategory ttl_category; 162 OutgoingMessageTTLCategory ttl_category;
163 if (message.time_to_live == 0) 163 if (message.time_to_live == 0)
164 ttl_category = TTL_ZERO; 164 ttl_category = TTL_ZERO;
165 else if (message.time_to_live <= 60 ) 165 else if (message.time_to_live <= 60 )
166 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_MINUTE; 166 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_MINUTE;
167 else if (message.time_to_live <= 60 * 60) 167 else if (message.time_to_live <= 60 * 60)
168 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_HOUR; 168 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_HOUR;
169 else if (message.time_to_live <= 24 * 60 * 60) 169 else if (message.time_to_live <= 24 * 60 * 60)
170 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_DAY; 170 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_DAY;
171 else if (message.time_to_live <= 7 * 24 * 60 * 60)
172 ttl_category = TTL_LESS_THAN_OR_EQUAL_TO_ONE_WEEK;
173 else if (message.time_to_live < gcm::GCMClient::OutgoingMessage::kMaximumTTL)
174 ttl_category = TTL_MORE_THAN_ONE_WEEK;
175 else 171 else
176 ttl_category = TTL_MAXIMUM; 172 ttl_category = TTL_MAXIMUM;
177 173
178 UMA_HISTOGRAM_ENUMERATION("GCM.GCMOutgoingMessageTTLCategory", 174 UMA_HISTOGRAM_ENUMERATION("GCM.OutgoingMessageTTL",
179 ttl_category, 175 ttl_category,
180 TTL_CATEGORY_COUNT); 176 TTL_CATEGORY_COUNT);
181 } 177 }
182 178
183 } // namespace 179 } // namespace
184 180
185 GCMInternalsBuilder::GCMInternalsBuilder() {} 181 GCMInternalsBuilder::GCMInternalsBuilder() {}
186 GCMInternalsBuilder::~GCMInternalsBuilder() {} 182 GCMInternalsBuilder::~GCMInternalsBuilder() {}
187 183
188 scoped_ptr<base::Clock> GCMInternalsBuilder::BuildClock() { 184 scoped_ptr<base::Clock> GCMInternalsBuilder::BuildClock() {
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 949
954 recorder_.RecordIncomingSendError( 950 recorder_.RecordIncomingSendError(
955 data_message_stanza.category(), 951 data_message_stanza.category(),
956 data_message_stanza.to(), 952 data_message_stanza.to(),
957 data_message_stanza.id()); 953 data_message_stanza.id());
958 delegate_->OnMessageSendError(data_message_stanza.category(), 954 delegate_->OnMessageSendError(data_message_stanza.category(),
959 send_error_details); 955 send_error_details);
960 } 956 }
961 957
962 } // namespace gcm 958 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698