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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc

Issue 944533002: Context menu item to view original image when Data Saver is being used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add "&" to new strings. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 7fdb3212c0808cfec96cee0502781088d15c8296..e2ec1da8aca8b2fa140b3635378ef07ebbf830bf 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -186,10 +186,16 @@ void DataReductionProxySettings::SetProxyConfigurator(
configurator_ = configurator;
}
-bool DataReductionProxySettings::IsDataReductionProxyEnabled() {
+bool DataReductionProxySettings::IsDataReductionProxyEnabled() const {
return spdy_proxy_auth_enabled_.GetValue() || IsEnabledOnCommandLine();
}
+bool DataReductionProxySettings::CanUseDataReductionProxy(const GURL& url)
+ const {
+ return url.is_valid() && (url.scheme() != "https") &&
bengr 2015/02/20 01:19:25 why not specifically check that the scheme is http
Not at Google. Contact bengr 2015/02/20 17:08:08 Copied from Android implementation: https://cs.cor
Not at Google. Contact bengr 2015/02/20 18:43:38 Used url::kHttpScheme and changed to '=='.
+ IsDataReductionProxyEnabled();
+}
+
bool
DataReductionProxySettings::IsDataReductionProxyAlternativeEnabled() const {
return data_reduction_proxy_alternative_enabled_.GetValue();

Powered by Google App Engine
This is Rietveld 408576698