Index: Source/core/inspector/NetworkResourcesData.cpp |
diff --git a/Source/core/inspector/NetworkResourcesData.cpp b/Source/core/inspector/NetworkResourcesData.cpp |
index 6efa2976305010f32371470086f73f024bed23a6..17ad7df62ec8b9cdb2932cce39aa6055586132ee 100644 |
--- a/Source/core/inspector/NetworkResourcesData.cpp |
+++ b/Source/core/inspector/NetworkResourcesData.cpp |
@@ -280,11 +280,9 @@ void NetworkResourcesData::setXHRReplayData(const String& requestId, XHRReplayDa |
ResourceData* resourceData = resourceDataForRequestId(requestId); |
if (!resourceData) { |
Vector<String> result; |
- ReusedRequestIds::iterator it; |
- ReusedRequestIds::iterator end = m_reusedXHRReplayDataRequestIds.end(); |
- for (it = m_reusedXHRReplayDataRequestIds.begin(); it != end; ++it) { |
- if (it->value == requestId) |
- setXHRReplayData(it->key, xhrReplayData); |
+ for (auto& request : m_reusedXHRReplayDataRequestIds) { |
+ if (request.value == requestId) |
+ setXHRReplayData(request.key, xhrReplayData); |
} |
return; |
} |
@@ -295,21 +293,19 @@ void NetworkResourcesData::setXHRReplayData(const String& requestId, XHRReplayDa |
Vector<NetworkResourcesData::ResourceData*> NetworkResourcesData::resources() |
{ |
Vector<ResourceData*> result; |
- for (ResourceDataMap::iterator it = m_requestIdToResourceDataMap.begin(); it != m_requestIdToResourceDataMap.end(); ++it) |
- result.append(it->value); |
+ for (auto& request : m_requestIdToResourceDataMap) |
+ result.append(request.value); |
return result; |
} |
Vector<String> NetworkResourcesData::removeResource(Resource* cachedResource) |
{ |
Vector<String> result; |
- ResourceDataMap::iterator it; |
- ResourceDataMap::iterator end = m_requestIdToResourceDataMap.end(); |
- for (it = m_requestIdToResourceDataMap.begin(); it != end; ++it) { |
- ResourceData* resourceData = it->value; |
+ for (auto& request : m_requestIdToResourceDataMap) { |
+ ResourceData* resourceData = request.value; |
if (resourceData->cachedResource() == cachedResource) { |
resourceData->setResource(0); |
- result.append(it->key); |
+ result.append(request.key); |
} |
} |
@@ -323,12 +319,10 @@ void NetworkResourcesData::clear(const String& preservedLoaderId) |
ResourceDataMap preservedMap; |
- ResourceDataMap::iterator it; |
- ResourceDataMap::iterator end = m_requestIdToResourceDataMap.end(); |
- for (it = m_requestIdToResourceDataMap.begin(); it != end; ++it) { |
- ResourceData* resourceData = it->value; |
+ for (auto& resource : m_requestIdToResourceDataMap) { |
+ ResourceData* resourceData = resource.value; |
if (!preservedLoaderId.isNull() && resourceData->loaderId() == preservedLoaderId) |
- preservedMap.set(it->key, it->value); |
+ preservedMap.set(resource.key, resource.value); |
else |
delete resourceData; |
} |