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

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

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.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
index 61539beb9cbda06e13a9aef866f5ebe7de79fe64..60d95e15b405f2f37899a3a6d4ef2a9c1dc6bc4b 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
@@ -109,7 +109,17 @@ class DataReductionProxySettings
DataReductionProxyConfigurator* configurator);
// Returns true if the proxy is enabled.
- bool IsDataReductionProxyEnabled();
+ bool IsDataReductionProxyEnabled() const;
+
+ // Returns true if the proxy can be used for the given url. This method does
+ // not take into account the proxy config or proxy retry list, so it can
+ // return 'true' even when proxy will not be used. Specifically, if
bengr 2015/02/20 01:19:25 "the proxy"
Not at Google. Contact bengr 2015/02/20 17:08:08 Done.
+ // another proxy configuration overrides use of data reduction proxy, or
+ // if data reduction proxy is in proxy retry list, then data reduction proxy
+ // will not be used, but this method will still return true. If this method
+ // returns false, then we are guaranteed that data reduction proxy will not be
+ // used.
+ bool CanUseDataReductionProxy(const GURL& url) const;
bengr 2015/02/20 01:19:25 Is this what we'll want to use going forward? Two
Not at Google. Contact bengr 2015/02/20 17:08:08 I think option 1 is a good one. We could always sh
Not at Google. Contact bengr 2015/02/20 18:43:38 Discussed in person. We need the "Open original im
// Returns true if the alternative proxy is enabled.
bool IsDataReductionProxyAlternativeEnabled() const;
@@ -235,6 +245,8 @@ class DataReductionProxySettings
FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
TestIsProxyEnabledOrManaged);
FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
+ TestCanUseDataReductionProxy);
+ FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
TestContentLengths);
FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
TestGetDailyContentLengths);

Powered by Google App Engine
This is Rietveld 408576698