summaryrefslogtreecommitdiffstats
path: root/components/data_reduction_proxy/browser
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-08-26 11:00:21 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-26 18:02:36 +0000
commit900d3d42c0577b5a3d64858c6a02a1917fb78f71 (patch)
treefafb38a47677262afb09e483bf1f83246aea13a2 /components/data_reduction_proxy/browser
parent45252e8e668d5c891caf75a72eb6f791f2c17dd8 (diff)
downloadchromium_src-900d3d42c0577b5a3d64858c6a02a1917fb78f71.zip
chromium_src-900d3d42c0577b5a3d64858c6a02a1917fb78f71.tar.gz
chromium_src-900d3d42c0577b5a3d64858c6a02a1917fb78f71.tar.bz2
Remove implicit conversions from scoped_refptr to T* in components/data_reduction_proxy/
This patch was generated by running the rewrite_scoped_refptr clang tool on a Linux build. BUG=110610 Review URL: https://codereview.chromium.org/501413003 Cr-Commit-Position: refs/heads/master@{#291934}
Diffstat (limited to 'components/data_reduction_proxy/browser')
-rw-r--r--components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc5
-rw-r--r--components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc5
-rw-r--r--components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc17
3 files changed, 14 insertions, 13 deletions
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
index 795dbea..22bd57c 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
@@ -314,8 +314,9 @@ DataReductionProxyRequestType GetDataReductionProxyRequestType(
return SHORT_BYPASS;
}
#endif
- if (request->response_info().headers &&
- HasDataReductionProxyViaHeader(request->response_info().headers, NULL)) {
+ if (request->response_info().headers.get() &&
+ HasDataReductionProxyViaHeader(request->response_info().headers.get(),
+ NULL)) {
return VIA_DATA_REDUCTION_PROXY;
}
return UNKNOWN_TYPE;
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc
index 999e14f..0e3b237 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc
@@ -351,9 +351,8 @@ TEST_F(DataReductionProxyProtocolTest, OverrideResponseAsRedirect) {
net::DEFAULT_PRIORITY,
NULL,
&context);
- OverrideResponseAsRedirect(&request,
- original_response_headers,
- &override_response_headers);
+ OverrideResponseAsRedirect(
+ &request, original_response_headers.get(), &override_response_headers);
int expected_flags = net::LOAD_DISABLE_CACHE | net::LOAD_BYPASS_PROXY;
EXPECT_EQ(expected_flags, request.load_flags());
std::string override_headers;
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc
index 0ab9ac8..6c28806 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc
@@ -250,7 +250,7 @@ TEST_F(DataReductionProxyTamperDetectionTest, ChromeProxy) {
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(raw_headers));
- DataReductionProxyTamperDetection tamper_detection(headers, true, 0);
+ DataReductionProxyTamperDetection tamper_detection(headers.get(), true, 0);
bool tampered = tamper_detection.ValidateChromeProxyHeader(
test[i].received_fingerprint);
@@ -374,7 +374,7 @@ TEST_F(DataReductionProxyTamperDetectionTest, Via) {
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(raw_headers));
- DataReductionProxyTamperDetection tamper_detection(headers, true, 0);
+ DataReductionProxyTamperDetection tamper_detection(headers.get(), true, 0);
bool has_chrome_proxy_via_header;
bool tampered = tamper_detection.ValidateViaHeader(
@@ -507,7 +507,7 @@ TEST_F(DataReductionProxyTamperDetectionTest, OtherHeaders) {
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(raw_headers));
- DataReductionProxyTamperDetection tamper_detection(headers, true, 0);
+ DataReductionProxyTamperDetection tamper_detection(headers.get(), true, 0);
bool tampered = tamper_detection.ValidateOtherHeaders(
test[i].received_fingerprint);
@@ -583,7 +583,7 @@ TEST_F(DataReductionProxyTamperDetectionTest, ContentLength) {
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(raw_headers));
- DataReductionProxyTamperDetection tamper_detection(headers, true, 0);
+ DataReductionProxyTamperDetection tamper_detection(headers.get(), true, 0);
bool tampered = tamper_detection.ValidateContentLengthHeader(
test[i].received_fingerprint);
@@ -674,8 +674,8 @@ TEST_F(DataReductionProxyTamperDetectionTest, GetHeaderValues) {
StringsToVector(test[i].expected_output_values);
std::vector<std::string> output_values =
- DataReductionProxyTamperDetection::GetHeaderValues(
- headers, test[i].header_name);
+ DataReductionProxyTamperDetection::GetHeaderValues(headers.get(),
+ test[i].header_name);
EXPECT_EQ(expected_output_values, output_values) << test[i].label;
}
}
@@ -747,8 +747,9 @@ TEST_F(DataReductionProxyTamperDetectionTest, DetectAndReport) {
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(raw_headers));
- EXPECT_EQ(test[i].expected_tampered_with,
- DataReductionProxyTamperDetection::DetectAndReport(headers, true))
+ EXPECT_EQ(
+ test[i].expected_tampered_with,
+ DataReductionProxyTamperDetection::DetectAndReport(headers.get(), true))
<< test[i].label;
}
}