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

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

Issue 1437833002: Added check for avoid repeating variations first run seed fetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented marking seed storing as successful from C++ side 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 markVariationsSeedAsStored() {
59 JNIEnv* env = AttachCurrentThread();
60 Java_VariationsSeedBridge_markVariationsSeedAsStored(env,
61 GetApplicationContext());
62 }
63
58 } // namespace android 64 } // namespace android
59 } // namespace variations 65 } // namespace variations
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698