| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
|
| index 1d0349a0e2493849316fa649fc696a3ae8d89d9b..7b3220e0f8a96096e13d23e255054dafbd68c74a 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
|
| @@ -13,6 +13,7 @@
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
|
| +#include "components/data_reduction_proxy/core/common/data_reduction_proxy_util.h"
|
| #include "net/base/load_flags.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "net/proxy/proxy_config.h"
|
| @@ -167,21 +168,7 @@ bool DataReductionProxyBypassProtocol::MaybeBypassProxyAndPrepareToRetry(
|
|
|
| // Retry if block-once was specified or if method is idempotent.
|
| return bypass_type == BYPASS_EVENT_TYPE_CURRENT ||
|
| - IsRequestIdempotent(request);
|
| -}
|
| -
|
| -// static
|
| -bool DataReductionProxyBypassProtocol::IsRequestIdempotent(
|
| - const net::URLRequest* request) {
|
| - DCHECK(request);
|
| - if (request->method() == "GET" ||
|
| - request->method() == "OPTIONS" ||
|
| - request->method() == "HEAD" ||
|
| - request->method() == "PUT" ||
|
| - request->method() == "DELETE" ||
|
| - request->method() == "TRACE")
|
| - return true;
|
| - return false;
|
| + IsMethodIdempotent(request->method());
|
| }
|
|
|
| } // namespace data_reduction_proxy
|
|
|