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

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

Issue 2250263007: Pass incoming sender_id to GCMStatsRecorderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | components/gcm_driver/gcm_stats_recorder_android.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_driver_android.h" 5 #include "components/gcm_driver/gcm_driver_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/android/context_utils.h" 10 #include "base/android/context_utils.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 // Convert j_raw_data from byte[] to binary std::string. 100 // Convert j_raw_data from byte[] to binary std::string.
101 if (j_raw_data) { 101 if (j_raw_data) {
102 std::vector<uint8_t> raw_data; 102 std::vector<uint8_t> raw_data;
103 JavaByteArrayToByteVector(env, j_raw_data, &raw_data); 103 JavaByteArrayToByteVector(env, j_raw_data, &raw_data);
104 message.raw_data.assign(raw_data.begin(), raw_data.end()); 104 message.raw_data.assign(raw_data.begin(), raw_data.end());
105 105
106 message_byte_size += message.raw_data.size(); 106 message_byte_size += message.raw_data.size();
107 } 107 }
108 108
109 recorder_.RecordDataMessageReceived(app_id, message_byte_size); 109 recorder_.RecordDataMessageReceived(app_id, message.sender_id,
110 message_byte_size);
110 111
111 DispatchMessage(app_id, message); 112 DispatchMessage(app_id, message);
112 } 113 }
113 114
114 // static 115 // static
115 bool GCMDriverAndroid::RegisterJni(JNIEnv* env) { 116 bool GCMDriverAndroid::RegisterJni(JNIEnv* env) {
116 return RegisterNativesImpl(env); 117 return RegisterNativesImpl(env);
117 } 118 }
118 119
119 void GCMDriverAndroid::OnSignedIn() { 120 void GCMDriverAndroid::OnSignedIn() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 NOTIMPLEMENTED(); 260 NOTIMPLEMENTED();
260 } 261 }
261 262
262 void GCMDriverAndroid::RecordDecryptionFailure( 263 void GCMDriverAndroid::RecordDecryptionFailure(
263 const std::string& app_id, 264 const std::string& app_id,
264 GCMEncryptionProvider::DecryptionResult result) { 265 GCMEncryptionProvider::DecryptionResult result) {
265 recorder_.RecordDecryptionFailure(app_id, result); 266 recorder_.RecordDecryptionFailure(app_id, result);
266 } 267 }
267 268
268 } // namespace gcm 269 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | components/gcm_driver/gcm_stats_recorder_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698