| 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 <stdint.h> | 8 #include <stdint.h> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 82                                                        GetApplicationContext()); | 82                                                        GetApplicationContext()); | 
| 83 } | 83 } | 
| 84 | 84 | 
| 85 void SetJavaFirstRunPrefsForTesting(const std::string& seed_data, | 85 void SetJavaFirstRunPrefsForTesting(const std::string& seed_data, | 
| 86                                     const std::string& seed_signature, | 86                                     const std::string& seed_signature, | 
| 87                                     const std::string& seed_country, | 87                                     const std::string& seed_country, | 
| 88                                     const std::string& response_date, | 88                                     const std::string& response_date, | 
| 89                                     bool is_gzip_compressed) { | 89                                     bool is_gzip_compressed) { | 
| 90   JNIEnv* env = AttachCurrentThread(); | 90   JNIEnv* env = AttachCurrentThread(); | 
| 91   Java_VariationsSeedBridge_setVariationsFirstRunSeed( | 91   Java_VariationsSeedBridge_setVariationsFirstRunSeed( | 
| 92       env, GetApplicationContext(), StringToJavaByteArray(env, seed_data).obj(), | 92       env, GetApplicationContext(), StringToJavaByteArray(env, seed_data), | 
| 93       ConvertUTF8ToJavaString(env, seed_signature).obj(), | 93       ConvertUTF8ToJavaString(env, seed_signature), | 
| 94       ConvertUTF8ToJavaString(env, seed_country).obj(), | 94       ConvertUTF8ToJavaString(env, seed_country), | 
| 95       ConvertUTF8ToJavaString(env, response_date).obj(), | 95       ConvertUTF8ToJavaString(env, response_date), | 
| 96       static_cast<jboolean>(is_gzip_compressed)); | 96       static_cast<jboolean>(is_gzip_compressed)); | 
| 97 } | 97 } | 
| 98 | 98 | 
| 99 }  // namespace android | 99 }  // namespace android | 
| 100 }  // namespace variations | 100 }  // namespace variations | 
| OLD | NEW | 
|---|