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

Unified Diff: net/http/http_server_properties_impl_unittest.cc

Issue 2889273003: Fix some non-const ref function argument types. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/nqe/observation_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl_unittest.cc
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index 11600fbab6eefeea70d53578ceef13729d9cf8d3..18edad7b91476d00a0a108cf99903fb297cda57f 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -24,23 +24,23 @@ namespace net {
class HttpServerPropertiesImplPeer {
public:
static void AddBrokenAlternativeServiceWithExpirationTime(
- HttpServerPropertiesImpl& impl,
+ HttpServerPropertiesImpl* impl,
AlternativeService alternative_service,
base::TimeTicks when) {
- impl.broken_alternative_services_.insert(
+ impl->broken_alternative_services_.insert(
std::make_pair(alternative_service, when));
auto it =
- impl.recently_broken_alternative_services_.Get(alternative_service);
- if (it == impl.recently_broken_alternative_services_.end()) {
- impl.recently_broken_alternative_services_.Put(alternative_service, 1);
+ impl->recently_broken_alternative_services_.Get(alternative_service);
+ if (it == impl->recently_broken_alternative_services_.end()) {
+ impl->recently_broken_alternative_services_.Put(alternative_service, 1);
} else {
it->second++;
}
}
static void ExpireBrokenAlternateProtocolMappings(
- HttpServerPropertiesImpl& impl) {
- impl.ExpireBrokenAlternateProtocolMappings();
+ HttpServerPropertiesImpl* impl) {
+ impl->ExpireBrokenAlternateProtocolMappings();
}
};
@@ -950,11 +950,11 @@ TEST_F(AlternateProtocolServerPropertiesTest,
base::TimeTicks past =
base::TimeTicks::Now() - base::TimeDelta::FromSeconds(42);
HttpServerPropertiesImplPeer::AddBrokenAlternativeServiceWithExpirationTime(
- impl_, alternative_service, past);
+ &impl_, alternative_service, past);
EXPECT_TRUE(impl_.IsAlternativeServiceBroken(alternative_service));
EXPECT_TRUE(impl_.WasAlternativeServiceRecentlyBroken(alternative_service));
- HttpServerPropertiesImplPeer::ExpireBrokenAlternateProtocolMappings(impl_);
+ HttpServerPropertiesImplPeer::ExpireBrokenAlternateProtocolMappings(&impl_);
EXPECT_FALSE(impl_.IsAlternativeServiceBroken(alternative_service));
EXPECT_TRUE(impl_.WasAlternativeServiceRecentlyBroken(alternative_service));
}
@@ -980,10 +980,10 @@ TEST_F(AlternateProtocolServerPropertiesTest, RemoveExpiredBrokenAltSvc) {
base::TimeTicks past =
base::TimeTicks::Now() - base::TimeDelta::FromSeconds(42);
HttpServerPropertiesImplPeer::AddBrokenAlternativeServiceWithExpirationTime(
- impl_, bar_alternative_service, past);
+ &impl_, bar_alternative_service, past);
// Expire brokenness of "bar:443".
- HttpServerPropertiesImplPeer::ExpireBrokenAlternateProtocolMappings(impl_);
+ HttpServerPropertiesImplPeer::ExpireBrokenAlternateProtocolMappings(&impl_);
// "foo:443" should have no alternative service now.
EXPECT_FALSE(HasAlternativeService(foo_server));
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/nqe/observation_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698