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

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

Issue 1024993003: Upstream VariationsSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2014 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 package com.google.android.apps.chrome.variations;
6
7 import android.content.Context;
8
9 /**
10 * Sets up communication with the VariationsService. This is primarily used for
11 * triggering seed fetches on application startup.
12 */
13 public class VariationsSession {
Yaron 2015/03/23 14:39:44 You don't want this one. Only the one in the other
14 private boolean mInitialized;
15 private String mRestrictMode;
16
17 /**
18 * Triggers to the native VariationsService that the application has entered the foreground.
19 */
20 public void start(Context context) {
21 if (!mInitialized) {
22 mInitialized = true;
23 // Check the restrict mode only once initially to avoid doing extra work each time the
24 // app enters foreground.
25 mRestrictMode = getRestrictMode(context);
26 }
27 nativeStartVariationsSession(mRestrictMode);
28 }
29
30 /**
31 * Returns the value of the "restrict" URL param that the variations service should use for
32 * variation seed requests.
33 */
34 protected String getRestrictMode(Context context) {
35 return "";
36 }
37
38 private native void nativeStartVariationsSession(String restrictMode);
39 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/metrics/variations_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698