Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / android / rlz / revenue_stats.cc
blobe68253a6c42d71e710c5d5637ba6176910451713
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
3 // found in the LICENSE file.
5 #include "chrome/browser/android/rlz/revenue_stats.h"
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "chrome/browser/search_engines/ui_thread_search_terms_data_android.h"
10 #include "jni/RevenueStats_jni.h"
11 #include "url/gurl.h"
13 namespace chrome {
14 namespace android {
16 // Register native methods
17 bool RegisterRevenueStats(JNIEnv* env) {
18 return RegisterNativesImpl(env);
21 static void SetSearchClient(JNIEnv* env,
22 const JavaParamRef<jclass>& clazz,
23 const JavaParamRef<jstring>& jclient) {
24 SearchTermsDataAndroid::search_client_.Get() =
25 base::android::ConvertJavaStringToUTF8(env, jclient);
28 static void SetRlzParameterValue(JNIEnv* env,
29 const JavaParamRef<jclass>& clazz,
30 const JavaParamRef<jstring>& jrlz) {
31 SearchTermsDataAndroid::rlz_parameter_value_.Get() =
32 base::android::ConvertJavaStringToUTF16(env, jrlz);
35 } // namespace android
36 } // namespace chrome