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

Unified Diff: Source/core/fetch/Resource.cpp

Issue 665613002: Move /fetch to use C++11 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.cpp
diff --git a/Source/core/fetch/Resource.cpp b/Source/core/fetch/Resource.cpp
index df69fb7535ed226adf0bf95ce4c42e734d286dbf..062d594c43e8a32c02e198c79e397c36fb02dd3a 100644
--- a/Source/core/fetch/Resource.cpp
+++ b/Source/core/fetch/Resource.cpp
@@ -447,7 +447,7 @@ bool Resource::hasOneHandle() const
CachedMetadata* Resource::cachedMetadata(unsigned dataTypeID) const
{
if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID)
- return 0;
+ return nullptr;
return m_cachedMetadata.get();
}
@@ -693,7 +693,7 @@ void Resource::switchClientsToRevalidatedResource()
m_resourceToRevalidate->m_identifier = m_identifier;
m_switchingClientsToRevalidatedResource = true;
- for (const auto& handle : m_handlesToRevalidate) {
+ for (ResourcePtrBase* handle : m_handlesToRevalidate) {
handle->m_resource = m_resourceToRevalidate;
m_resourceToRevalidate->registerHandle(handle);
--m_handleCount;
@@ -702,12 +702,10 @@ void Resource::switchClientsToRevalidatedResource()
m_handlesToRevalidate.clear();
Vector<ResourceClient*> clientsToMove;
- for (const auto& clientHash : m_clients) {
- unsigned count = clientHash.value;
- while (count) {
- clientsToMove.append(clientHash.key);
- --count;
- }
+ for (const auto& clientHashEntry : m_clients) {
+ unsigned count = clientHashEntry.value;
+ while (count--)
+ clientsToMove.append(clientHashEntry.key);
}
unsigned moveCount = clientsToMove.size();
@@ -907,7 +905,7 @@ bool Resource::ResourceCallback::isScheduled(Resource* resource) const
void Resource::ResourceCallback::timerFired(Timer<ResourceCallback>*)
{
Vector<ResourcePtr<Resource>> resources;
- for (const auto& resource : m_resourcesWithPendingClients)
+ for (Resource* resource : m_resourcesWithPendingClients)
resources.append(resource);
m_resourcesWithPendingClients.clear();
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698