OLD | NEW |
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_stats_recorder_impl.h" | 5 #include "components/gcm_driver/gcm_stats_recorder_impl.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 | 15 |
16 namespace gcm { | 16 namespace gcm { |
17 | 17 |
18 const uint32 MAX_LOGGED_ACTIVITY_COUNT = 100; | 18 const uint32 MAX_LOGGED_ACTIVITY_COUNT = 100; |
19 const int64 RECEIVED_DATA_MESSAGE_BURST_LENGTH_SECONDS = 2; | 19 const int64 RECEIVED_DATA_MESSAGE_BURST_LENGTH_SECONDS = 2; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 const std::string& receiver_id, | 505 const std::string& receiver_id, |
506 const std::string& message_id) { | 506 const std::string& message_id) { |
507 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); | 507 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); |
508 if (!is_recording_) | 508 if (!is_recording_) |
509 return; | 509 return; |
510 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", | 510 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", |
511 std::string()); | 511 std::string()); |
512 } | 512 } |
513 | 513 |
514 } // namespace gcm | 514 } // namespace gcm |
OLD | NEW |