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

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

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Fix issue with rebase Created 3 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
« no previous file with comments | « components/gcm_driver/gcm_driver_android.h ('k') | components/gcm_driver/gcm_driver_desktop.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.sender_id, 109 recorder_.RecordDataMessageReceived(app_id, message.sender_id,
110 message_byte_size); 110 message_byte_size);
111 111
112 DispatchMessage(app_id, message); 112 DispatchMessage(app_id, message,
113 base::Bind(&GCMDriverAndroid::SendMessageReceipt,
114 weak_ptr_factory_.GetWeakPtr()));
115 }
116
117 void GCMDriverAndroid::SendMessageReceipt(GCMMessageStatus status) {
118 // TODO(harkness) Implement message receipts in android. crbug.com/674131.
113 } 119 }
114 120
115 // static 121 // static
116 bool GCMDriverAndroid::RegisterJni(JNIEnv* env) { 122 bool GCMDriverAndroid::RegisterJni(JNIEnv* env) {
117 return RegisterNativesImpl(env); 123 return RegisterNativesImpl(env);
118 } 124 }
119 125
120 void GCMDriverAndroid::OnSignedIn() { 126 void GCMDriverAndroid::OnSignedIn() {
121 } 127 }
122 128
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 NOTIMPLEMENTED(); 266 NOTIMPLEMENTED();
261 } 267 }
262 268
263 void GCMDriverAndroid::RecordDecryptionFailure( 269 void GCMDriverAndroid::RecordDecryptionFailure(
264 const std::string& app_id, 270 const std::string& app_id,
265 GCMEncryptionProvider::DecryptionResult result) { 271 GCMEncryptionProvider::DecryptionResult result) {
266 recorder_.RecordDecryptionFailure(app_id, result); 272 recorder_.RecordDecryptionFailure(app_id, result);
267 } 273 }
268 274
269 } // namespace gcm 275 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_android.h ('k') | components/gcm_driver/gcm_driver_desktop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698