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

Unified Diff: Source/core/inspector/InspectorResourceContentLoader.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/InspectorResourceAgent.cpp ('k') | Source/core/inspector/InspectorState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceContentLoader.cpp
diff --git a/Source/core/inspector/InspectorResourceContentLoader.cpp b/Source/core/inspector/InspectorResourceContentLoader.cpp
index d919b17c04e08cd64e49cd05e3b2c6033700ac97..10167ad8a95aaccba4e5923489af57649ee1c0c7 100644
--- a/Source/core/inspector/InspectorResourceContentLoader.cpp
+++ b/Source/core/inspector/InspectorResourceContentLoader.cpp
@@ -91,8 +91,7 @@ void InspectorResourceContentLoader::start()
documents.append(localFrame->document());
documents.appendVector(InspectorPageAgent::importsForFrame(localFrame));
}
- for (Vector<Document*>::const_iterator documentIt = documents.begin(); documentIt != documents.end(); ++documentIt) {
- Document* document = *documentIt;
+ for (Document* document : documents) {
HashSet<String> urlsToFetch;
ResourceRequest resourceRequest;
@@ -120,8 +119,7 @@ void InspectorResourceContentLoader::start()
WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > styleSheets;
InspectorCSSAgent::collectAllDocumentStyleSheets(document, styleSheets);
- for (WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> >::const_iterator stylesheetIt = styleSheets.begin(); stylesheetIt != styleSheets.end(); ++stylesheetIt) {
- CSSStyleSheet* styleSheet = *stylesheetIt;
+ for (CSSStyleSheet* styleSheet : styleSheets) {
if (styleSheet->isInline() || !styleSheet->contents()->loadCompleted())
continue;
String url = styleSheet->baseURL().string();
@@ -173,8 +171,8 @@ void InspectorResourceContentLoader::stop()
{
HashSet<ResourceClient*> pendingResourceClients;
m_pendingResourceClients.swap(pendingResourceClients);
- for (HashSet<ResourceClient*>::const_iterator it = pendingResourceClients.begin(); it != pendingResourceClients.end(); ++it)
- (*it)->m_loader = 0;
+ for (const auto& client : pendingResourceClients)
+ client->m_loader = 0;
m_resources.clear();
// Make sure all callbacks are called to prevent infinite waiting time.
checkDone();
@@ -191,8 +189,8 @@ void InspectorResourceContentLoader::checkDone()
return;
PersistentHeapVectorWillBeHeapVector<Member<VoidCallback> > callbacks;
callbacks.swap(m_callbacks);
- for (PersistentHeapVectorWillBeHeapVector<Member<VoidCallback> >::const_iterator it = callbacks.begin(); it != callbacks.end(); ++it)
- (*it)->handleEvent();
+ for (const auto& callback : callbacks)
+ callback->handleEvent();
}
void InspectorResourceContentLoader::resourceFinished(ResourceClient* client)
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/inspector/InspectorState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698