Chromium Code Reviews| 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 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 Loading... | |
| 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 } |
| OLD | NEW |