Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: components/variations/android/variations_seed_bridge.cc

Issue 1447823003: Revert of Implemented clearing Java prefs after pulling variations first run seed from Java to C++ side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/variations/android/variations_seed_bridge.h ('k') | components/variations/variations_seed_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698