| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/variations/android/variations_seed_bridge.h" | 5 #include "components/variations/android/variations_seed_bridge.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 Java_VariationsSeedBridge_getVariationsFirstRunSeedSignature( | 48 Java_VariationsSeedBridge_getVariationsFirstRunSeedSignature( |
| 49 env, GetApplicationContext()); | 49 env, GetApplicationContext()); |
| 50 ScopedJavaLocalRef<jstring> j_seed_country = | 50 ScopedJavaLocalRef<jstring> j_seed_country = |
| 51 Java_VariationsSeedBridge_getVariationsFirstRunSeedCountry( | 51 Java_VariationsSeedBridge_getVariationsFirstRunSeedCountry( |
| 52 env, GetApplicationContext()); | 52 env, GetApplicationContext()); |
| 53 *seed_data = JavaByteArrayToString(env, j_seed_data.obj()); | 53 *seed_data = JavaByteArrayToString(env, j_seed_data.obj()); |
| 54 *seed_signature = ConvertJavaStringToUTF8(j_seed_signature); | 54 *seed_signature = ConvertJavaStringToUTF8(j_seed_signature); |
| 55 *seed_country = ConvertJavaStringToUTF8(j_seed_country); | 55 *seed_country = ConvertJavaStringToUTF8(j_seed_country); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void ClearJavaFirstRunPrefs() { | |
| 59 JNIEnv* env = AttachCurrentThread(); | |
| 60 Java_VariationsSeedBridge_clearFirstRunPrefs(env, GetApplicationContext()); | |
| 61 } | |
| 62 | |
| 63 void MarkVariationsSeedAsStored() { | |
| 64 JNIEnv* env = AttachCurrentThread(); | |
| 65 Java_VariationsSeedBridge_markVariationsSeedAsStored(env, | |
| 66 GetApplicationContext()); | |
| 67 } | |
| 68 | |
| 69 } // namespace android | 58 } // namespace android |
| 70 } // namespace variations | 59 } // namespace variations |
| OLD | NEW |