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

Unified Diff: Source/core/inspector/InspectorCanvasAgent.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/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCanvasAgent.cpp
diff --git a/Source/core/inspector/InspectorCanvasAgent.cpp b/Source/core/inspector/InspectorCanvasAgent.cpp
index 0057bbccad1612f26151333bc89a7df9a6e85fed..7b34b4ae1352227cf32ec84e4e159ed7e57eb6a2 100644
--- a/Source/core/inspector/InspectorCanvasAgent.cpp
+++ b/Source/core/inspector/InspectorCanvasAgent.cpp
@@ -130,8 +130,8 @@ void InspectorCanvasAgent::hasUninstrumentedCanvases(ErrorString* errorString, b
{
if (!checkIsEnabled(errorString))
return;
- for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
- if (it->value) {
+ for (const auto& frame : m_framesWithUninstrumentedCanvases) {
+ if (frame.value) {
*result = true;
return;
}
@@ -297,8 +297,8 @@ void InspectorCanvasAgent::findFramesWithUninstrumentedCanvases()
ScriptProfiler::visitNodeWrappers(&nodeVisitor);
if (m_frontend) {
- for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
- String frameId = m_pageAgent->frameId(it->key);
+ for (const auto& frame : m_framesWithUninstrumentedCanvases) {
+ String frameId = m_pageAgent->frameId(frame.key);
if (!frameId.isEmpty())
m_frontend->contextCreated(frameId);
}
@@ -319,8 +319,8 @@ void InspectorCanvasAgent::didCommitLoad(LocalFrame*, DocumentLoader* loader)
return;
Frame* frame = loader->frame();
if (frame == m_pageAgent->mainFrame()) {
- for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
- it->value = false;
+ for (auto& frame : m_framesWithUninstrumentedCanvases)
+ frame.value = false;
m_frontend->traceLogsRemoved(0, 0);
} else {
while (frame) {
@@ -349,8 +349,8 @@ void InspectorCanvasAgent::didBeginFrame()
if (!m_enabled)
return;
ErrorString error;
- for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
- InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, ScriptState::forMainWorld(it->key));
+ for (const auto& frame : m_framesWithUninstrumentedCanvases) {
+ InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, ScriptState::forMainWorld(frame.key));
if (!module.isEmpty())
module.markFrameEnd();
}
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698