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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const KURL& url, 42 const KURL& url,
43 URLRegistrable* stream) { 43 URLRegistrable* stream) {
44 DCHECK(&stream->registry() == this); 44 DCHECK(&stream->registry() == this);
45 DCHECK(isMainThread()); 45 DCHECK(isMainThread());
46 m_streamDescriptors.set(url.getString(), 46 m_streamDescriptors.set(url.getString(),
47 static_cast<MediaStream*>(stream)->descriptor()); 47 static_cast<MediaStream*>(stream)->descriptor());
48 } 48 }
49 49
50 void MediaStreamRegistry::unregisterURL(const KURL& url) { 50 void MediaStreamRegistry::unregisterURL(const KURL& url) {
51 DCHECK(isMainThread()); 51 DCHECK(isMainThread());
52 m_streamDescriptors.remove(url.getString()); 52 m_streamDescriptors.erase(url.getString());
53 } 53 }
54 54
55 bool MediaStreamRegistry::contains(const String& url) { 55 bool MediaStreamRegistry::contains(const String& url) {
56 DCHECK(isMainThread()); 56 DCHECK(isMainThread());
57 return m_streamDescriptors.contains(url); 57 return m_streamDescriptors.contains(url);
58 } 58 }
59 59
60 MediaStreamDescriptor* MediaStreamRegistry::lookupMediaStreamDescriptor( 60 MediaStreamDescriptor* MediaStreamRegistry::lookupMediaStreamDescriptor(
61 const String& url) { 61 const String& url) {
62 DCHECK(isMainThread()); 62 DCHECK(isMainThread());
63 return m_streamDescriptors.get(url); 63 return m_streamDescriptors.get(url);
64 } 64 }
65 65
66 MediaStreamRegistry::MediaStreamRegistry() { 66 MediaStreamRegistry::MediaStreamRegistry() {
67 HTMLMediaElement::setMediaStreamRegistry(this); 67 HTMLMediaElement::setMediaStreamRegistry(this);
68 } 68 }
69 69
70 } // namespace blink 70 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698