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

Side by Side Diff: third_party/WebKit/Source/modules/webusb/USBDevice.cpp

Issue 2703833002: Migrate WTF::HashSet::remove() to ::erase() [part 2] (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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webusb/USBDevice.h" 5 #include "modules/webusb/USBDevice.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ToV8.h" 9 #include "bindings/core/v8/ToV8.h"
10 #include "core/dom/DOMArrayBuffer.h" 10 #include "core/dom/DOMArrayBuffer.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 m_opened = false; 903 m_opened = false;
904 for (ScriptPromiseResolver* resolver : m_deviceRequests) 904 for (ScriptPromiseResolver* resolver : m_deviceRequests)
905 resolver->reject(DOMException::create(NotFoundError, kDeviceUnavailable)); 905 resolver->reject(DOMException::create(NotFoundError, kDeviceUnavailable));
906 m_deviceRequests.clear(); 906 m_deviceRequests.clear();
907 } 907 }
908 908
909 bool USBDevice::markRequestComplete(ScriptPromiseResolver* resolver) { 909 bool USBDevice::markRequestComplete(ScriptPromiseResolver* resolver) {
910 auto requestEntry = m_deviceRequests.find(resolver); 910 auto requestEntry = m_deviceRequests.find(resolver);
911 if (requestEntry == m_deviceRequests.end()) 911 if (requestEntry == m_deviceRequests.end())
912 return false; 912 return false;
913 m_deviceRequests.remove(requestEntry); 913 m_deviceRequests.erase(requestEntry);
914 return true; 914 return true;
915 } 915 }
916 916
917 } // namespace blink 917 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USB.cpp ('k') | third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698