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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_util.h

Issue 2072233004: Moving utility methods in data_reduction_proxy to util namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/common/data_reduction_proxy_util.h
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
index 8bed6f4d9317dd3756725340a692108f5dfe3c27..dcefb8cf48077576df879e63dd24af52334ea650 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
@@ -18,21 +18,21 @@ class Time;
class TimeDelta;
}
namespace net {
class ProxyConfig;
class ProxyInfo;
}
namespace data_reduction_proxy {
-// TODO(ryansturm): Move these methods to util namespace. crbug.com/620161
+namespace util {
// Returns true if the request method is idempotent.
bool IsMethodIdempotent(const std::string& method);
GURL AddApiKeyToUrl(const GURL& url);
// Returns whether this is valid for data reduction proxy use. |proxy_info|
// should contain a single DIRECT ProxyServer, |url| should not be WS or WSO,
// and the |method| should be idempotent for this to be eligible.
bool EligibleForDataReductionProxy(const net::ProxyInfo& proxy_info,
@@ -42,20 +42,22 @@ bool EligibleForDataReductionProxy(const net::ProxyInfo& proxy_info,
// Determines if |proxy_config| would override a direct. |proxy_config| should
// be a data reduction proxy config with proxy servers mapped in the rules.
// |proxy_retry_info| contains the list of bad proxies. |url| is used to
// determine whether it is HTTP or HTTPS. |data_reduction_proxy_info| is an out
// param that will contain the proxies that should be used.
bool ApplyProxyConfigToProxyInfo(const net::ProxyConfig& proxy_config,
const net::ProxyRetryInfoMap& proxy_retry_info,
const GURL& url,
net::ProxyInfo* data_reduction_proxy_info);
+} // namespace util
+
namespace protobuf_parser {
// Returns the |net::ProxyServer::Scheme| for a ProxyServer_ProxyScheme.
net::ProxyServer::Scheme SchemeFromProxyScheme(
ProxyServer_ProxyScheme proxy_scheme);
// Returns the ProxyServer_ProxyScheme for a |net::ProxyServer::Scheme|.
ProxyServer_ProxyScheme ProxySchemeFromScheme(net::ProxyServer::Scheme scheme);
// Returns the |Duration| representation of |time_delta|.

Powered by Google App Engine
This is Rietveld 408576698