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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "core/inspector/InspectorResourceContentLoader.h" 5 #include "core/inspector/InspectorResourceContentLoader.h"
6 6
7 #include "core/css/CSSStyleSheet.h" 7 #include "core/css/CSSStyleSheet.h"
8 #include "core/css/StyleSheetContents.h" 8 #include "core/css/StyleSheetContents.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 int clientId, 169 int clientId,
170 std::unique_ptr<WTF::Closure> callback) { 170 std::unique_ptr<WTF::Closure> callback) {
171 if (!m_started) 171 if (!m_started)
172 start(); 172 start();
173 m_callbacks.add(clientId, Callbacks()) 173 m_callbacks.add(clientId, Callbacks())
174 .storedValue->value.push_back(std::move(callback)); 174 .storedValue->value.push_back(std::move(callback));
175 checkDone(); 175 checkDone();
176 } 176 }
177 177
178 void InspectorResourceContentLoader::cancel(int clientId) { 178 void InspectorResourceContentLoader::cancel(int clientId) {
179 m_callbacks.remove(clientId); 179 m_callbacks.erase(clientId);
180 } 180 }
181 181
182 InspectorResourceContentLoader::~InspectorResourceContentLoader() { 182 InspectorResourceContentLoader::~InspectorResourceContentLoader() {
183 ASSERT(m_resources.isEmpty()); 183 ASSERT(m_resources.isEmpty());
184 } 184 }
185 185
186 DEFINE_TRACE(InspectorResourceContentLoader) { 186 DEFINE_TRACE(InspectorResourceContentLoader) {
187 visitor->trace(m_inspectedFrame); 187 visitor->trace(m_inspectedFrame);
188 visitor->trace(m_pendingResourceClients); 188 visitor->trace(m_pendingResourceClients);
189 visitor->trace(m_resources); 189 visitor->trace(m_resources);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 (*callback)(); 225 (*callback)();
226 } 226 }
227 } 227 }
228 228
229 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) { 229 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) {
230 m_pendingResourceClients.remove(client); 230 m_pendingResourceClients.remove(client);
231 checkDone(); 231 checkDone();
232 } 232 }
233 233
234 } // namespace blink 234 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698