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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java

Issue 2872453005: Add Yandex referral ID to search URL. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/BUILD.gn » ('j') | components/search_engines/search_terms_data.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java b/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
index 70eac9913eb0750784f883b18b07f8cea222932e..717c14bd44142c4048251d2665773bf1ec1687ca 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
@@ -14,6 +14,7 @@ import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
+import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.AppHooks;
import org.chromium.chrome.browser.ChromeFeatureList;
@@ -85,6 +86,7 @@ public class LocaleManager {
/**
* @return An instance of the {@link LocaleManager}. This should only be called on UI thread.
*/
+ @CalledByNative
public static LocaleManager getInstance() {
assert ThreadUtils.runningOnUiThread();
if (sInstance == null) {
@@ -272,6 +274,14 @@ public class LocaleManager {
}
/**
+ * @return The referral ID to be passed when searching with Yandex as the DSE.
+ */
+ @CalledByNative
+ protected String getYandexReferralId() {
Yusuf 2017/05/09 23:18:52 should this be a static, so that we avoid calling
Ted C 2017/05/10 15:20:29 I thought about that as well, but then it would pr
+ return "";
+ }
+
+ /**
* To be called after the user has made a selection from a search engine promo dialog.
* @param type The type of search engine promo dialog that was shown.
* @param keyword The keyword for the search engine chosen.
« no previous file with comments | « no previous file | chrome/browser/BUILD.gn » ('j') | components/search_engines/search_terms_data.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698