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

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

Issue 1707513002: Add various UMA histograms for measuring GCM crypto performance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-remove-info
Patch Set: Created 4 years, 10 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
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/fake_gcm_client.h" 5 #include "components/gcm_driver/fake_gcm_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const OutgoingMessage& message) { 153 const OutgoingMessage& message) {
154 DCHECK(io_thread_->RunsTasksOnCurrentThread()); 154 DCHECK(io_thread_->RunsTasksOnCurrentThread());
155 155
156 base::ThreadTaskRunnerHandle::Get()->PostTask( 156 base::ThreadTaskRunnerHandle::Get()->PostTask(
157 FROM_HERE, base::Bind(&FakeGCMClient::SendFinished, 157 FROM_HERE, base::Bind(&FakeGCMClient::SendFinished,
158 weak_ptr_factory_.GetWeakPtr(), app_id, message)); 158 weak_ptr_factory_.GetWeakPtr(), app_id, message));
159 } 159 }
160 160
161 void FakeGCMClient::RecordDecryptionFailure( 161 void FakeGCMClient::RecordDecryptionFailure(
162 const std::string& app_id, 162 const std::string& app_id,
163 GCMEncryptionProvider::DecryptionFailure reason) { 163 GCMEncryptionProvider::DecryptionResult result) {
164 recorder_.RecordDecryptionFailure(app_id, reason); 164 recorder_.RecordDecryptionFailure(app_id, result);
165 } 165 }
166 166
167 void FakeGCMClient::SetRecording(bool recording) { 167 void FakeGCMClient::SetRecording(bool recording) {
168 recorder_.set_is_recording(recording); 168 recorder_.set_is_recording(recording);
169 } 169 }
170 170
171 void FakeGCMClient::ClearActivityLogs() { 171 void FakeGCMClient::ClearActivityLogs() {
172 recorder_.Clear(); 172 recorder_.Clear();
173 } 173 }
174 174
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 delegate_->OnMessageSendError(app_id, send_error_details); 319 delegate_->OnMessageSendError(app_id, send_error_details);
320 } 320 }
321 321
322 void FakeGCMClient::SendAcknowledgement(const std::string& app_id, 322 void FakeGCMClient::SendAcknowledgement(const std::string& app_id,
323 const std::string& message_id) { 323 const std::string& message_id) {
324 if (delegate_) 324 if (delegate_)
325 delegate_->OnSendAcknowledged(app_id, message_id); 325 delegate_->OnSendAcknowledged(app_id, message_id);
326 } 326 }
327 327
328 } // namespace gcm 328 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698