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

Side by Side Diff: chrome/browser/android/locale/locale_manager.cc

Issue 2872453005: Add Yandex referral ID to search URL. (Closed)
Patch Set: Clear app data in test setup to remove initial locale set for search engines from previous runs. Created 3 years, 7 months 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
(Empty)
1 // Copyright 2017 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.
4
5 #include "chrome/browser/android/locale/locale_manager.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "jni/LocaleManager_jni.h"
11
12 // static
13 std::string LocaleManager::GetYandexReferralID() {
14 JNIEnv* env = base::android::AttachCurrentThread();
15 base::android::ScopedJavaLocalRef<jobject> jlocale_manager =
16 Java_LocaleManager_getInstance(env);
17 return base::android::ConvertJavaStringToUTF8(
18 env, Java_LocaleManager_getYandexReferralId(env, jlocale_manager));
19 }
OLDNEW
« no previous file with comments | « chrome/browser/android/locale/locale_manager.h ('k') | chrome/browser/search_engines/ui_thread_search_terms_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698