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

Unified Diff: chromecast/base/device_capabilities_impl.cc

Issue 1897033002: Reland 'Convert //net and //chromecast to std::unordered_*' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix TestDownloadRequestHandler 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 | « chromecast/base/device_capabilities_impl.h ('k') | chromecast/common/cast_resource_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/base/device_capabilities_impl.cc
diff --git a/chromecast/base/device_capabilities_impl.cc b/chromecast/base/device_capabilities_impl.cc
index c3dfea0d07e590eb5e30957f536874a0e3fd1d0a..60c2153ccf632ea56960a206b4b8316b837a6f5c 100644
--- a/chromecast/base/device_capabilities_impl.cc
+++ b/chromecast/base/device_capabilities_impl.cc
@@ -149,11 +149,9 @@ void DeviceCapabilitiesImpl::Register(const std::string& key,
DCHECK(validator);
base::AutoLock auto_lock(validation_lock_);
- bool added =
- validator_map_.add(key, base::WrapUnique(new ValidatorInfo(validator)))
- .second;
// Check that a validator has not already been registered for this key
- DCHECK(added);
+ DCHECK_EQ(0u, validator_map_.count(key));
+ validator_map_[key] = base::WrapUnique(new ValidatorInfo(validator));
}
void DeviceCapabilitiesImpl::Unregister(const std::string& key,
« no previous file with comments | « chromecast/base/device_capabilities_impl.h ('k') | chromecast/common/cast_resource_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698