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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 1155 void GCMClientImpl::RecordDecryptionFailure( |
1156 const std::string& app_id, | 1156 const std::string& app_id, |
1157 GCMEncryptionProvider::DecryptionFailure reason) { | 1157 GCMEncryptionProvider::DecryptionResult result) { |
1158 recorder_.RecordDecryptionFailure(app_id, reason); | 1158 recorder_.RecordDecryptionFailure(app_id, result); |
1159 } | 1159 } |
1160 | 1160 |
1161 void GCMClientImpl::SetRecording(bool recording) { | 1161 void GCMClientImpl::SetRecording(bool recording) { |
1162 recorder_.set_is_recording(recording); | 1162 recorder_.set_is_recording(recording); |
1163 } | 1163 } |
1164 | 1164 |
1165 void GCMClientImpl::ClearActivityLogs() { | 1165 void GCMClientImpl::ClearActivityLogs() { |
1166 recorder_.Clear(); | 1166 recorder_.Clear(); |
1167 } | 1167 } |
1168 | 1168 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 bool GCMClientImpl::HasStandaloneRegisteredApp() const { | 1378 bool GCMClientImpl::HasStandaloneRegisteredApp() const { |
1379 if (registrations_.empty()) | 1379 if (registrations_.empty()) |
1380 return false; | 1380 return false; |
1381 // Note that account mapper is not counted as a standalone app since it is | 1381 // Note that account mapper is not counted as a standalone app since it is |
1382 // automatically started when other app uses GCM. | 1382 // automatically started when other app uses GCM. |
1383 return registrations_.size() > 1 || | 1383 return registrations_.size() > 1 || |
1384 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); | 1384 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); |
1385 } | 1385 } |
1386 | 1386 |
1387 } // namespace gcm | 1387 } // namespace gcm |
OLD | NEW |