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

Unified Diff: components/variations/android/variations_seed_bridge.cc

Issue 1438123002: Removed callbacks to JNI functions + added gzip compressed seed support & pulling response time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging this CL with master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/variations/android/variations_seed_bridge.h ('k') | components/variations/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/android/variations_seed_bridge.cc
diff --git a/components/variations/android/variations_seed_bridge.cc b/components/variations/android/variations_seed_bridge.cc
index 731c744319b35fe3d9403a34b4c5e6f764a59ecd..16dfecaf0a55f0273567b6f779085e699fa3c912 100644
--- a/components/variations/android/variations_seed_bridge.cc
+++ b/components/variations/android/variations_seed_bridge.cc
@@ -39,7 +39,9 @@ bool RegisterVariationsSeedBridge(JNIEnv* env) {
void GetVariationsFirstRunSeed(std::string* seed_data,
std::string* seed_signature,
- std::string* seed_country) {
+ std::string* seed_country,
+ std::string* response_date,
+ bool* is_gzip_compressed) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jbyteArray> j_seed_data =
Java_VariationsSeedBridge_getVariationsFirstRunSeedData(
@@ -50,9 +52,17 @@ void GetVariationsFirstRunSeed(std::string* seed_data,
ScopedJavaLocalRef<jstring> j_seed_country =
Java_VariationsSeedBridge_getVariationsFirstRunSeedCountry(
env, GetApplicationContext());
+ ScopedJavaLocalRef<jstring> j_response_date =
+ Java_VariationsSeedBridge_getVariationsFirstRunSeedDate(
+ env, GetApplicationContext());
+ jboolean j_is_gzip_compressed =
+ Java_VariationsSeedBridge_getVariationsFirstRunSeedIsGzipCompressed(
+ env, GetApplicationContext());
*seed_data = JavaByteArrayToString(env, j_seed_data.obj());
*seed_signature = ConvertJavaStringToUTF8(j_seed_signature);
*seed_country = ConvertJavaStringToUTF8(j_seed_country);
+ *response_date = ConvertJavaStringToUTF8(j_response_date);
+ *is_gzip_compressed = static_cast<bool>(j_is_gzip_compressed);
}
void ClearJavaFirstRunPrefs() {
« no previous file with comments | « components/variations/android/variations_seed_bridge.h ('k') | components/variations/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698