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" |
11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
12 #include "base/android/jni_array.h" | 12 #include "base/android/jni_array.h" |
13 #include "base/android/jni_string.h" | 13 #include "base/android/jni_string.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "jni/GCMDriver_jni.h" | 16 #include "jni/GCMDriver_jni.h" |
17 | 17 |
18 using base::android::AppendJavaStringArrayToStringVector; | 18 using base::android::AppendJavaStringArrayToStringVector; |
19 using base::android::AttachCurrentThread; | 19 using base::android::AttachCurrentThread; |
20 using base::android::ConvertJavaStringToUTF8; | 20 using base::android::ConvertJavaStringToUTF8; |
21 using base::android::ConvertUTF8ToJavaString; | 21 using base::android::ConvertUTF8ToJavaString; |
22 using base::android::JavaByteArrayToByteVector; | 22 using base::android::JavaByteArrayToByteVector; |
| 23 using base::android::JavaParamRef; |
23 | 24 |
24 namespace gcm { | 25 namespace gcm { |
25 | 26 |
26 GCMDriverAndroid::GCMDriverAndroid( | 27 GCMDriverAndroid::GCMDriverAndroid( |
27 const base::FilePath& store_path, | 28 const base::FilePath& store_path, |
28 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) | 29 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) |
29 : GCMDriver(store_path, blocking_task_runner), | 30 : GCMDriver(store_path, blocking_task_runner), |
30 recorder_(this) { | 31 recorder_(this) { |
31 JNIEnv* env = AttachCurrentThread(); | 32 JNIEnv* env = AttachCurrentThread(); |
32 java_ref_.Reset( | 33 java_ref_.Reset( |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |