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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_tamper_detection_unittest.cc

Issue 501413003: Remove implicit conversions from scoped_refptr to T* in components/data_reduction_proxy/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/browser/data_reduction_proxy_tamper_detection_unittest.cc
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 0ab9ac83647db09ded680c1d7a43d53329a2e62a..6c28806d86afeb4aa2ce6d5b9bd0705d2d94cacc 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;
}
}

Powered by Google App Engine
This is Rietveld 408576698