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

Unified Diff: net/url_request/url_request_filter.cc

Issue 1884453002: Revert of Convert //net and //chromecast to std::unordered_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/url_request/url_request_filter.h ('k') | net/websockets/websocket_basic_handshake_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_filter.cc
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index be11b177822ca9c3b0be22a0e2e08388e4d3b1db..83248e2fba78a921d7c3e7d1b1adb96415eae405 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -57,8 +57,9 @@
#ifndef NDEBUG
// Check to see if we're masking URLs in the url_interceptor_map_.
- for (const auto& pair : url_interceptor_map_) {
- const GURL& url = GURL(pair.first);
+ for (URLInterceptorMap::const_iterator it = url_interceptor_map_.begin();
+ it != url_interceptor_map_.end(); ++it) {
+ const GURL& url = GURL(it->first);
HostnameInterceptorMap::const_iterator host_it =
hostname_interceptor_map_.find(make_pair(url.scheme(), url.host()));
if (host_it != hostname_interceptor_map_.end())
@@ -85,7 +86,7 @@
if (!url.is_valid())
return false;
DCHECK_EQ(0u, url_interceptor_map_.count(url.spec()));
- url_interceptor_map_[url.spec()] = std::move(interceptor);
+ url_interceptor_map_.set(url.spec(), std::move(interceptor));
// Check to see if this URL is masked by a hostname handler.
DCHECK_EQ(0u, hostname_interceptor_map_.count(make_pair(url.scheme(),
@@ -96,7 +97,7 @@
void URLRequestFilter::RemoveUrlHandler(const GURL& url) {
DCHECK(OnMessageLoopForInterceptorRemoval());
- size_t removed = url_interceptor_map_.erase(url.spec());
+ int removed = url_interceptor_map_.erase(url.spec());
DCHECK(removed);
// Note that we don't unregister from the URLRequest ProtocolFactory as
// this would leave no protocol factory for the remaining hostname and URL
« no previous file with comments | « net/url_request/url_request_filter.h ('k') | net/websockets/websocket_basic_handshake_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698