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 ClearJavaPrefs() { | |
Alexei Svitkine (slow)
2015/11/12 16:30:11
Nit: ClearJavaFirstRunPrefs().
Alexander Agulenko
2015/11/12 17:40:25
Done.
| |
59 JNIEnv* env = AttachCurrentThread(); | |
60 Java_VariationsSeedBridge_clearVariationsFirstRunSeedPrefs( | |
Alexei Svitkine (slow)
2015/11/12 16:30:11
In this case, since it's on VariationsSeedBridge,
Alexander Agulenko
2015/11/12 17:40:25
Done.
| |
61 env, GetApplicationContext()); | |
62 } | |
63 | |
58 } // namespace android | 64 } // namespace android |
59 } // namespace variations | 65 } // namespace variations |
OLD | NEW |