| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 JNIEnv* env, | 60 JNIEnv* env, |
| 61 const JavaParamRef<jobject>& obj, | 61 const JavaParamRef<jobject>& obj, |
| 62 const JavaParamRef<jstring>& j_app_id, | 62 const JavaParamRef<jstring>& j_app_id, |
| 63 jboolean success) { | 63 jboolean success) { |
| 64 std::string app_id = ConvertJavaStringToUTF8(env, j_app_id); | 64 std::string app_id = ConvertJavaStringToUTF8(env, j_app_id); |
| 65 GCMClient::Result result = success ? GCMClient::SUCCESS | 65 GCMClient::Result result = success ? GCMClient::SUCCESS |
| 66 : GCMClient::UNKNOWN_ERROR; | 66 : GCMClient::UNKNOWN_ERROR; |
| 67 | 67 |
| 68 recorder_.RecordUnregistrationResponse(app_id, success); | 68 recorder_.RecordUnregistrationResponse(app_id, success); |
| 69 | 69 |
| 70 UnregisterFinished(app_id, result); | 70 UnregisterRemoveEncryptionInfo(app_id, result); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void GCMDriverAndroid::OnMessageReceived( | 73 void GCMDriverAndroid::OnMessageReceived( |
| 74 JNIEnv* env, | 74 JNIEnv* env, |
| 75 const JavaParamRef<jobject>& obj, | 75 const JavaParamRef<jobject>& obj, |
| 76 const JavaParamRef<jstring>& j_app_id, | 76 const JavaParamRef<jstring>& j_app_id, |
| 77 const JavaParamRef<jstring>& j_sender_id, | 77 const JavaParamRef<jstring>& j_sender_id, |
| 78 const JavaParamRef<jstring>& j_collapse_key, | 78 const JavaParamRef<jstring>& j_collapse_key, |
| 79 const JavaParamRef<jbyteArray>& j_raw_data, | 79 const JavaParamRef<jbyteArray>& j_raw_data, |
| 80 const JavaParamRef<jobjectArray>& j_data_keys_and_values) { | 80 const JavaParamRef<jobjectArray>& j_data_keys_and_values) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 NOTIMPLEMENTED(); | 257 NOTIMPLEMENTED(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void GCMDriverAndroid::RecordDecryptionFailure( | 260 void GCMDriverAndroid::RecordDecryptionFailure( |
| 261 const std::string& app_id, | 261 const std::string& app_id, |
| 262 GCMEncryptionProvider::DecryptionFailure reason) { | 262 GCMEncryptionProvider::DecryptionFailure reason) { |
| 263 recorder_.RecordDecryptionFailure(app_id, reason); | 263 recorder_.RecordDecryptionFailure(app_id, reason); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace gcm | 266 } // namespace gcm |
| OLD | NEW |