Commit d23d886b authored by Doug Arnett's avatar Doug Arnett Committed by Commit Bot

Drops proxy unreachable error message from DataSaver home screen

Adds log message instead so situation will be available for user
feedback report based on this screen.

Tested log message locally by hacking threshold constants to simulate
blocked proxy condition.

Bug: 839478
Change-Id: I92935bb164255187127096ac86820bb32b689b2e
Reviewed-on: https://chromium-review.googlesource.com/1042794Reviewed-by: default avatarTheresa <twellington@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Reviewed-by: default avatarBen Greenstein <bengr@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556467}
parent ba34164c
...@@ -89,18 +89,6 @@ ...@@ -89,18 +89,6 @@
</FrameLayout> </FrameLayout>
<TextView
android:id="@+id/data_reduction_proxy_unreachable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp"
android:drawableStart="@drawable/exclamation_triangle"
android:drawablePadding="6dp"
android:text="@string/data_reduction_proxy_unreachable_warn"
android:textColor="?android:attr/textColorPrimary"
android:textSize="14sp" />
<include layout="@layout/data_usage_breakdown" /> <include layout="@layout/data_usage_breakdown" />
<Button <Button
......
...@@ -26,6 +26,7 @@ import android.widget.TextView; ...@@ -26,6 +26,7 @@ import android.widget.TextView;
import org.chromium.base.Callback; import org.chromium.base.Callback;
import org.chromium.base.ContextUtils; import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.browser.util.FileSizeUtil; import org.chromium.chrome.browser.util.FileSizeUtil;
...@@ -40,6 +41,8 @@ import java.util.TimeZone; ...@@ -40,6 +41,8 @@ import java.util.TimeZone;
* Preference used to display statistics on data reduction. * Preference used to display statistics on data reduction.
*/ */
public class DataReductionStatsPreference extends Preference { public class DataReductionStatsPreference extends Preference {
private static final String TAG = "DataSaverStats";
/** /**
* Key used to save the date on which the site breakdown should be shown. If the user has * Key used to save the date on which the site breakdown should be shown. If the user has
* historical data saver stats, the site breakdown cannot be shown for DAYS_IN_CHART. * historical data saver stats, the site breakdown cannot be shown for DAYS_IN_CHART.
...@@ -198,12 +201,9 @@ public class DataReductionStatsPreference extends Preference { ...@@ -198,12 +201,9 @@ public class DataReductionStatsPreference extends Preference {
mCurrentTime - DateUtils.DAY_IN_MILLIS * DAYS_IN_CHART, mCurrentTime - DateUtils.DAY_IN_MILLIS * DAYS_IN_CHART,
mCurrentTime + DateUtils.HOUR_IN_MILLIS, mLeftPosition, mRightPosition); mCurrentTime + DateUtils.HOUR_IN_MILLIS, mLeftPosition, mRightPosition);
View dataReductionProxyUnreachableWarning =
view.findViewById(R.id.data_reduction_proxy_unreachable);
if (DataReductionProxySettings.getInstance().isDataReductionProxyUnreachable()) { if (DataReductionProxySettings.getInstance().isDataReductionProxyUnreachable()) {
dataReductionProxyUnreachableWarning.setVisibility(View.VISIBLE); // Leave breadcrumb in log for user feedback report.
} else { Log.w(TAG, "Data Saver proxy unreachable when user viewed Data Saver stats");
dataReductionProxyUnreachableWarning.setVisibility(View.GONE);
} }
mResetStatisticsButton = (Button) view.findViewById(R.id.data_reduction_reset_statistics); mResetStatisticsButton = (Button) view.findViewById(R.id.data_reduction_reset_statistics);
......
...@@ -1124,9 +1124,6 @@ To obtain new licenses, connect to the internet and play your downloaded content ...@@ -1124,9 +1124,6 @@ To obtain new licenses, connect to the internet and play your downloaded content
<message name="IDS_DATA_REDUCTION_USAGE_LABEL" desc="Data Reduction statistics label that states the amount of data that was used by Chrome when Data Saver is enabled."> <message name="IDS_DATA_REDUCTION_USAGE_LABEL" desc="Data Reduction statistics label that states the amount of data that was used by Chrome when Data Saver is enabled.">
data used data used
</message> </message>
<message name="IDS_DATA_REDUCTION_PROXY_UNREACHABLE_WARN" desc="Warning message shown when Google data reduction proxy servers are not reachable.">
Chrome is unable to reach Google servers for data compression. Your data savings may be limited.
</message>
<message name="IDS_DATA_REDUCTION_BREAKDOWN_SITE_TITLE" desc="Title for the sites column on the Data Reduction statistics page. The breakdown lists the top ten sites with the greatest amount of data usage or mobile data that was saved."> <message name="IDS_DATA_REDUCTION_BREAKDOWN_SITE_TITLE" desc="Title for the sites column on the Data Reduction statistics page. The breakdown lists the top ten sites with the greatest amount of data usage or mobile data that was saved.">
Site Site
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment