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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/metrics/VariationsSession.java

Issue 2828093002: Add plumbing for accessing latest country in variations service in Java (Closed)
Patch Set: Created 3 years, 8 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
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 package org.chromium.chrome.browser.metrics; 5 package org.chromium.chrome.browser.metrics;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.Callback; 9 import org.chromium.base.Callback;
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 /** 63 /**
64 * Asynchronously returns the value of the "restrict" URL param that the var iations service 64 * Asynchronously returns the value of the "restrict" URL param that the var iations service
65 * should use for variation seed requests. This can be overriden by subclass to provide actual 65 * should use for variation seed requests. This can be overriden by subclass to provide actual
66 * restrict values, which must not be null. 66 * restrict values, which must not be null.
67 */ 67 */
68 protected void getRestrictMode(Context context, Callback<String> callback) { 68 protected void getRestrictMode(Context context, Callback<String> callback) {
69 callback.onResult(""); 69 callback.onResult("");
70 } 70 }
71 71
72 /**
73 * @return The latest country according to the current variations state.
Alexei Svitkine (slow) 2017/04/19 21:42:57 Expand comment to mention this could return null i
Yusuf 2017/04/19 22:16:46 Done.
74 */
75 public String getLatestCountry() {
76 return nativeGetLatestCountry();
77 }
78
72 protected native void nativeStartVariationsSession(String restrictMode); 79 protected native void nativeStartVariationsSession(String restrictMode);
80 protected native String nativeGetLatestCountry();
73 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698