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_client_impl.h" | 5 #include "components/gcm_driver/gcm_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 case GCMClientImpl::INITIAL_DEVICE_CHECKIN: | 1145 case GCMClientImpl::INITIAL_DEVICE_CHECKIN: |
1146 return "INITIAL_DEVICE_CHECKIN"; | 1146 return "INITIAL_DEVICE_CHECKIN"; |
1147 case GCMClientImpl::READY: | 1147 case GCMClientImpl::READY: |
1148 return "READY"; | 1148 return "READY"; |
1149 default: | 1149 default: |
1150 NOTREACHED(); | 1150 NOTREACHED(); |
1151 return std::string(); | 1151 return std::string(); |
1152 } | 1152 } |
1153 } | 1153 } |
1154 | 1154 |
1155 void GCMClientImpl::RecordDecryptionFailure( | |
1156 const std::string& app_id, | |
1157 GCMEncryptionProvider::DecryptionFailure reason) { | |
1158 recorder_.RecordDecryptionFailure(app_id, reason); | |
1159 } | |
1160 | |
1161 void GCMClientImpl::SetRecording(bool recording) { | 1155 void GCMClientImpl::SetRecording(bool recording) { |
1162 recorder_.set_is_recording(recording); | 1156 recorder_.set_is_recording(recording); |
1163 } | 1157 } |
1164 | 1158 |
1165 void GCMClientImpl::ClearActivityLogs() { | 1159 void GCMClientImpl::ClearActivityLogs() { |
1166 recorder_.Clear(); | 1160 recorder_.Clear(); |
1167 } | 1161 } |
1168 | 1162 |
1169 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const { | 1163 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const { |
1170 GCMClient::GCMStatistics stats; | 1164 GCMClient::GCMStatistics stats; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 bool GCMClientImpl::HasStandaloneRegisteredApp() const { | 1372 bool GCMClientImpl::HasStandaloneRegisteredApp() const { |
1379 if (registrations_.empty()) | 1373 if (registrations_.empty()) |
1380 return false; | 1374 return false; |
1381 // Note that account mapper is not counted as a standalone app since it is | 1375 // Note that account mapper is not counted as a standalone app since it is |
1382 // automatically started when other app uses GCM. | 1376 // automatically started when other app uses GCM. |
1383 return registrations_.size() > 1 || | 1377 return registrations_.size() > 1 || |
1384 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); | 1378 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); |
1385 } | 1379 } |
1386 | 1380 |
1387 } // namespace gcm | 1381 } // namespace gcm |
OLD | NEW |