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

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

Issue 1616113003: List message decryption failures on chrome://gcm-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after CL 1619053003 Created 4 years, 11 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 | « components/gcm_driver/gcm_client_impl.h ('k') | components/gcm_driver/gcm_driver.h » ('j') | 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 <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
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
1155 void GCMClientImpl::SetRecording(bool recording) { 1161 void GCMClientImpl::SetRecording(bool recording) {
1156 recorder_.set_is_recording(recording); 1162 recorder_.set_is_recording(recording);
1157 } 1163 }
1158 1164
1159 void GCMClientImpl::ClearActivityLogs() { 1165 void GCMClientImpl::ClearActivityLogs() {
1160 recorder_.Clear(); 1166 recorder_.Clear();
1161 } 1167 }
1162 1168
1163 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const { 1169 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const {
1164 GCMClient::GCMStatistics stats; 1170 GCMClient::GCMStatistics stats;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 bool GCMClientImpl::HasStandaloneRegisteredApp() const { 1378 bool GCMClientImpl::HasStandaloneRegisteredApp() const {
1373 if (registrations_.empty()) 1379 if (registrations_.empty())
1374 return false; 1380 return false;
1375 // 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
1376 // automatically started when other app uses GCM. 1382 // automatically started when other app uses GCM.
1377 return registrations_.size() > 1 || 1383 return registrations_.size() > 1 ||
1378 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); 1384 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId);
1379 } 1385 }
1380 1386
1381 } // namespace gcm 1387 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_client_impl.h ('k') | components/gcm_driver/gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698