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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/DataReductionProxyFirstRunFragment.java

Issue 2022313002: UI for the Data Saver InfoBar Promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobarPromo
Patch Set: use app_icon Created 4 years, 6 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.firstrun; 5 package org.chromium.chrome.browser.firstrun;
6 6
7 import android.os.Bundle; 7 import android.os.Bundle;
8 import android.support.v7.widget.SwitchCompat; 8 import android.support.v7.widget.SwitchCompat;
9 import android.view.LayoutInflater; 9 import android.view.LayoutInflater;
10 import android.view.View; 10 import android.view.View;
11 import android.view.View.OnClickListener; 11 import android.view.View.OnClickListener;
12 import android.view.ViewGroup; 12 import android.view.ViewGroup;
13 import android.widget.Button; 13 import android.widget.Button;
14 14
15 import org.chromium.chrome.R; 15 import org.chromium.chrome.R;
16 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; 16 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
17 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
18 import org.chromium.chrome.browser.preferences.PrefServiceBridge.AboutVersionStr ings;
17 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoU tils; 19 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoU tils;
18 20
19 /** 21 /**
20 * The First Run Experience fragment that allows the user to opt in to Data Save r. 22 * The First Run Experience fragment that allows the user to opt in to Data Save r.
21 */ 23 */
22 public class DataReductionProxyFirstRunFragment extends FirstRunPage { 24 public class DataReductionProxyFirstRunFragment extends FirstRunPage {
23 25
24 @Override 26 @Override
25 public View onCreateView( 27 public View onCreateView(
26 LayoutInflater inflater, ViewGroup container, Bundle savedInstanceSt ate) { 28 LayoutInflater inflater, ViewGroup container, Bundle savedInstanceSt ate) {
(...skipping 29 matching lines...) Expand all
56 }); 58 });
57 59
58 enableDataSaverSwitch.setChecked(true); 60 enableDataSaverSwitch.setChecked(true);
59 DataReductionProxySettings.getInstance().setDataReductionProxyEnabled( 61 DataReductionProxySettings.getInstance().setDataReductionProxyEnabled(
60 view.getContext(), enableDataSaverSwitch.isChecked()); 62 view.getContext(), enableDataSaverSwitch.isChecked());
61 } 63 }
62 64
63 @Override 65 @Override
64 public void onStart() { 66 public void onStart() {
65 super.onStart(); 67 super.onStart();
66 DataReductionPromoUtils.saveFreOrSecondRunPromoDisplayed(); 68 AboutVersionStrings versionStrings = PrefServiceBridge.getInstance()
Raj 2016/06/13 17:52:18 Could you pass no argument to saveFreOrSecondRunPr
megjablon 2016/06/23 23:17:30 Done.
69 .getAboutVersionStrings();
70 DataReductionPromoUtils.saveFreOrSecondRunPromoDisplayed(
71 versionStrings.getApplicationVersion());
67 } 72 }
68 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698