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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 2068423002: Cleanup usage of canonical_suffixes in HttpServerPropertiesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ClearAlternativeServices
Patch Set: fix comments Created 4 years, 6 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_unittest.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_manager.cc
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index e9dcffd24e0d44f7e5bfebf43a1b3a4adafe373b..3c7fa3e2f9836e927faf4123109afcb5868ae40b 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -953,12 +953,12 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(
if (notbroken_alternative_service_info_vector.empty()) {
continue;
}
- std::string canonical_suffix =
+ const std::string* canonical_suffix =
http_server_properties_impl_->GetCanonicalSuffix(server.host());
- if (!canonical_suffix.empty()) {
- if (persisted_map.find(canonical_suffix) != persisted_map.end())
+ if (canonical_suffix != nullptr) {
+ if (persisted_map.find(*canonical_suffix) != persisted_map.end())
continue;
- persisted_map[canonical_suffix] = true;
+ persisted_map[*canonical_suffix] = true;
}
alternative_service_map->Put(server,
notbroken_alternative_service_info_vector);
« no previous file with comments | « net/http/http_server_properties_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698