Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java |
| index 40d3d2d0da3e6925db4006562ef40fb29dc153ef..fc5d4ebb1ba855b276794252f37a38c427f8c198 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java |
| @@ -14,6 +14,7 @@ import android.text.TextUtils; |
| import android.util.Log; |
| import org.chromium.base.ApplicationStatus; |
| +import org.chromium.base.FieldTrialList; |
| import org.chromium.base.VisibleForTesting; |
| import org.chromium.base.library_loader.ProcessInitException; |
| import org.chromium.base.metrics.RecordHistogram; |
| @@ -21,6 +22,7 @@ import org.chromium.base.metrics.RecordUserAction; |
| import org.chromium.chrome.R; |
| import org.chromium.chrome.browser.ChromeApplication; |
| import org.chromium.chrome.browser.EmbedContentViewActivity; |
| +import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; |
| import org.chromium.chrome.browser.profiles.Profile; |
| import java.lang.ref.WeakReference; |
| @@ -100,6 +102,11 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD |
| // An optional welcome page. |
| if (mShowWelcomePage) mPages.add(pageOf(ToSAndUMAFirstRunFragment.class)); |
| + // An optional Data Saver page. |
| + if (FieldTrialList.findFullName("DataReductionProxyFREPromo").equals("Enabled")) { |
|
aurimas (slooooooooow)
2015/09/24 18:28:08
I don't think finch is available this early into l
megjablon
2015/09/24 19:17:28
We're aware of this. M48 is expected to have this
aurimas (slooooooooow)
2015/09/24 20:59:10
According to the doc finch will fetch after EULA i
megjablon
2015/09/24 23:40:34
This is the EULA agreement in the Android set up.
|
| + mPages.add(pageOf(DataReductionProxyFirstRunFragment.class)); |
| + } |
| + |
| // An optional sign-in page. |
| if (mFreProperties.getBoolean(SHOW_SIGNIN_PAGE)) { |
| mPages.add(pageOf(AccountFirstRunFragment.class)); |
| @@ -244,6 +251,8 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD |
| @Override |
| public void completeFirstRunExperience() { |
| + RecordUserAction.record("MobileFre.FreShown"); |
|
aurimas (slooooooooow)
2015/09/24 18:28:08
Why do we need this additional histogram?
megjablon
2015/09/24 19:17:29
So we can get the % of FREs that have the Data Red
|
| + |
| if (!TextUtils.isEmpty(mResultSignInAccountName)) { |
| boolean defaultAccountName = |
| sGlue.isDefaultAccountName(getApplicationContext(), mResultSignInAccountName); |
| @@ -288,6 +297,15 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD |
| startActivity(originalIntent); |
| } |
| + if (DataReductionProxyFirstRunFragment |
| + .getDisplayedDataReductionFreCard(getApplicationContext())) { |
| + Log.w("TEST USER ACTIONS", "MobileFre.DataReductionProxyCardShown"); |
|
aurimas (slooooooooow)
2015/09/24 18:28:08
Why is this a warning?
megjablon
2015/09/24 19:17:29
Ah deleted the wrong line! Was using to verify. Re
|
| + |
| + if (!DataReductionProxySettings.getInstance().isDataReductionProxyEnabled()) { |
| + RecordUserAction.record("MobileFre.DataReductionProxyDisabled"); |
|
aurimas (slooooooooow)
2015/09/24 18:28:08
Why mark it as action? Let's make it a histogram w
megjablon
2015/09/24 19:17:29
Done.
|
| + } |
| + } |
| + |
| Intent resultData = new Intent(); |
| resultData.putExtras(mFreProperties); |
| finishAllFREActivities(Activity.RESULT_OK, resultData); |