OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> |
| 6 |
5 #include "components/gcm_driver/gcm_stats_recorder_android.h" | 7 #include "components/gcm_driver/gcm_stats_recorder_android.h" |
6 | 8 |
7 namespace gcm { | 9 namespace gcm { |
8 | 10 |
9 namespace { | 11 namespace { |
10 | 12 |
11 const size_t MAX_LOGGED_ACTIVITY_COUNT = 100; | 13 const size_t MAX_LOGGED_ACTIVITY_COUNT = 100; |
12 | 14 |
13 const char kSuccess[] = "SUCCESS"; | 15 const char kSuccess[] = "SUCCESS"; |
14 const char kUnknownError[] = "UNKNOWN_ERROR"; | 16 const char kUnknownError[] = "UNKNOWN_ERROR"; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 110 |
109 receiving_activities_.push_front(activity); | 111 receiving_activities_.push_front(activity); |
110 if (receiving_activities_.size() > MAX_LOGGED_ACTIVITY_COUNT) | 112 if (receiving_activities_.size() > MAX_LOGGED_ACTIVITY_COUNT) |
111 receiving_activities_.pop_back(); | 113 receiving_activities_.pop_back(); |
112 | 114 |
113 if (delegate_) | 115 if (delegate_) |
114 delegate_->OnActivityRecorded(); | 116 delegate_->OnActivityRecorded(); |
115 } | 117 } |
116 | 118 |
117 } // namespace gcm | 119 } // namespace gcm |
OLD | NEW |