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

Unified Diff: Source/core/inspector/InspectorWorkerAgent.cpp

Issue 800113002: Use C++11 range-based for loop in Source/core/inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase again and again! Created 6 years 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 | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/inspector/NetworkResourcesData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorWorkerAgent.cpp
diff --git a/Source/core/inspector/InspectorWorkerAgent.cpp b/Source/core/inspector/InspectorWorkerAgent.cpp
index b2382bdbcf2ea572e459b9988e729713be790134..f6828ebad28327e8eb364107f4c9383893b440d8 100644
--- a/Source/core/inspector/InspectorWorkerAgent.cpp
+++ b/Source/core/inspector/InspectorWorkerAgent.cpp
@@ -213,8 +213,8 @@ void InspectorWorkerAgent::setTracingSessionId(const String& sessionId)
m_tracingSessionId = sessionId;
if (sessionId.isEmpty())
return;
- for (WorkerInfos::iterator it = m_workerInfos.begin(); it != m_workerInfos.end(); ++it)
- it->key->writeTimelineStartedEvent(sessionId, it->value.id);
+ for (auto& info : m_workerInfos)
+ info.key->writeTimelineStartedEvent(sessionId, info.value.id);
}
bool InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart()
@@ -247,15 +247,15 @@ void InspectorWorkerAgent::workerTerminated(WorkerInspectorProxy* proxy)
void InspectorWorkerAgent::createWorkerAgentClientsForExistingWorkers()
{
- for (WorkerInfos::iterator it = m_workerInfos.begin(); it != m_workerInfos.end(); ++it)
- createWorkerAgentClient(it->key, it->value.url, it->value.id);
+ for (auto& info : m_workerInfos)
+ createWorkerAgentClient(info.key, info.value.url, info.value.id);
}
void InspectorWorkerAgent::destroyWorkerAgentClients()
{
- for (WorkerClients::iterator it = m_idToClient.begin(); it != m_idToClient.end(); ++it) {
- it->value->disconnectFromWorker();
- delete it->value;
+ for (auto& client : m_idToClient) {
+ client.value->disconnectFromWorker();
+ delete client.value;
}
m_idToClient.clear();
}
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/inspector/NetworkResourcesData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698