OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 Java_GCMDriver_register(env, java_ref_.obj(), | 233 Java_GCMDriver_register(env, java_ref_.obj(), |
234 ConvertUTF8ToJavaString(env, app_id).obj(), | 234 ConvertUTF8ToJavaString(env, app_id).obj(), |
235 ConvertUTF8ToJavaString(env, sender_ids[0]).obj()); | 235 ConvertUTF8ToJavaString(env, sender_ids[0]).obj()); |
236 } | 236 } |
237 | 237 |
238 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { | 238 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { |
239 NOTREACHED(); | 239 NOTREACHED(); |
240 } | 240 } |
241 | 241 |
242 void GCMDriverAndroid::UnregisterWithSenderIdImpl( | 242 void GCMDriverAndroid::UnregisterWithSenderIdImpl( |
243 const std::string& app_id, const std::string& sender_id) { | 243 const std::string& app_id, |
| 244 const std::string& sender_id) { |
244 JNIEnv* env = AttachCurrentThread(); | 245 JNIEnv* env = AttachCurrentThread(); |
245 | 246 |
246 recorder_.RecordUnregistrationSent(app_id); | 247 recorder_.RecordUnregistrationSent(app_id); |
247 | 248 |
248 Java_GCMDriver_unregister(env, java_ref_.obj(), | 249 Java_GCMDriver_unregister(env, java_ref_.obj(), |
249 ConvertUTF8ToJavaString(env, app_id).obj(), | 250 ConvertUTF8ToJavaString(env, app_id).obj(), |
250 ConvertUTF8ToJavaString(env, sender_id).obj()); | 251 ConvertUTF8ToJavaString(env, sender_id).obj()); |
251 } | 252 } |
252 | 253 |
253 void GCMDriverAndroid::SendImpl(const std::string& app_id, | 254 void GCMDriverAndroid::SendImpl(const std::string& app_id, |
254 const std::string& receiver_id, | 255 const std::string& receiver_id, |
255 const OutgoingMessage& message) { | 256 const OutgoingMessage& message) { |
256 NOTIMPLEMENTED(); | 257 NOTIMPLEMENTED(); |
257 } | 258 } |
258 | 259 |
| 260 void GCMDriverAndroid::RecordDecryptionFailure( |
| 261 const std::string& app_id, |
| 262 GCMEncryptionProvider::DecryptionFailure reason) { |
| 263 recorder_.RecordDecryptionFailure(app_id, reason); |
| 264 } |
| 265 |
259 } // namespace gcm | 266 } // namespace gcm |
OLD | NEW |