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

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

Issue 2892033002: Enable support for draft-ietf-webpush-encryption-08 (Closed)
Patch Set: Enable support for draft-ietf-webpush-encryption-08 Created 3 years, 7 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_driver.cc ('k') | components/gcm_driver/gcm_stats_recorder_impl.cc » ('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 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> 5 #include <stddef.h>
6 6
7 #include "components/gcm_driver/gcm_stats_recorder_android.h" 7 #include "components/gcm_driver/gcm_stats_recorder_android.h"
8 8
9 namespace gcm { 9 namespace gcm {
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 receiving_activities_.pop_back(); 120 receiving_activities_.pop_back();
121 121
122 if (delegate_) 122 if (delegate_)
123 delegate_->OnActivityRecorded(); 123 delegate_->OnActivityRecorded();
124 } 124 }
125 125
126 void GCMStatsRecorderAndroid::RecordDecryptionFailure( 126 void GCMStatsRecorderAndroid::RecordDecryptionFailure(
127 const std::string& app_id, 127 const std::string& app_id,
128 GCMEncryptionProvider::DecryptionResult result) { 128 GCMEncryptionProvider::DecryptionResult result) {
129 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_UNENCRYPTED); 129 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_UNENCRYPTED);
130 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED); 130 DCHECK_NE(result,
131 GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED_DRAFT_03);
132 DCHECK_NE(result,
133 GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED_DRAFT_08);
131 if (!is_recording_) 134 if (!is_recording_)
132 return; 135 return;
133 136
134 DecryptionFailureActivity activity; 137 DecryptionFailureActivity activity;
135 activity.app_id = app_id; 138 activity.app_id = app_id;
136 activity.details = 139 activity.details =
137 GCMEncryptionProvider::ToDecryptionResultDetailsString(result); 140 GCMEncryptionProvider::ToDecryptionResultDetailsString(result);
138 141
139 decryption_failure_activities_.push_front(activity); 142 decryption_failure_activities_.push_front(activity);
140 if (decryption_failure_activities_.size() > MAX_LOGGED_ACTIVITY_COUNT) 143 if (decryption_failure_activities_.size() > MAX_LOGGED_ACTIVITY_COUNT)
141 decryption_failure_activities_.pop_back(); 144 decryption_failure_activities_.pop_back();
142 145
143 if (delegate_) 146 if (delegate_)
144 delegate_->OnActivityRecorded(); 147 delegate_->OnActivityRecorded();
145 } 148 }
146 149
147 } // namespace gcm 150 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver.cc ('k') | components/gcm_driver/gcm_stats_recorder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698