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

Unified Diff: net/http/http_server_properties_impl_unittest.cc

Issue 2801533002: Persist QUIC Broken State 0: change RecentlyBrokenAlternativeServies (Closed)
Patch Set: Address #4 Created 3 years, 8 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_server_properties_impl.cc ('k') | no next file » | 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 be611bfb76abda9426278faa3b942b181ffff941..d6283c4f55d12ab75e8ce51ca640cdbb200f3338 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -29,7 +29,13 @@ class HttpServerPropertiesImplPeer {
base::TimeTicks when) {
impl.broken_alternative_services_.insert(
std::make_pair(alternative_service, when));
- ++impl.recently_broken_alternative_services_[alternative_service];
+ 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);
+ } else {
+ it->second++;
+ }
}
static void ExpireBrokenAlternateProtocolMappings(
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698