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