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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 414423003: Oilpan: Prepare to move ResourceLoader and ResourceLoaderSet to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: FINAL Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 } 1337 }
1338 1338
1339 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength, int encodedDataLength) 1339 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength, int encodedDataLength)
1340 { 1340 {
1341 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(), dataLength, encodedDataLength); 1341 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(), dataLength, encodedDataLength);
1342 } 1342 }
1343 1343
1344 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo ader) 1344 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo ader)
1345 { 1345 {
1346 if (!m_multipartLoaders) 1346 if (!m_multipartLoaders)
1347 m_multipartLoaders = adoptPtr(new ResourceLoaderSet()); 1347 m_multipartLoaders = ResourceLoaderSet::create();
1348 m_multipartLoaders->add(loader); 1348 m_multipartLoaders->add(loader);
1349 m_loaders->remove(loader); 1349 m_loaders->remove(loader);
1350 if (LocalFrame* frame = this->frame()) 1350 if (LocalFrame* frame = this->frame())
1351 return frame->loader().checkLoadComplete(); 1351 return frame->loader().checkLoadComplete();
1352 } 1352 }
1353 1353
1354 void ResourceFetcher::didInitializeResourceLoader(ResourceLoader* loader) 1354 void ResourceFetcher::didInitializeResourceLoader(ResourceLoader* loader)
1355 { 1355 {
1356 if (!m_document) 1356 if (!m_document)
1357 return; 1357 return;
1358 if (!m_loaders) 1358 if (!m_loaders)
1359 m_loaders = adoptPtr(new ResourceLoaderSet()); 1359 m_loaders = ResourceLoaderSet::create();
1360 ASSERT(!m_loaders->contains(loader)); 1360 ASSERT(!m_loaders->contains(loader));
1361 m_loaders->add(loader); 1361 m_loaders->add(loader);
1362 } 1362 }
1363 1363
1364 void ResourceFetcher::willTerminateResourceLoader(ResourceLoader* loader) 1364 void ResourceFetcher::willTerminateResourceLoader(ResourceLoader* loader)
1365 { 1365 {
1366 if (m_loaders && m_loaders->contains(loader)) 1366 if (m_loaders && m_loaders->contains(loader))
1367 m_loaders->remove(loader); 1367 m_loaders->remove(loader);
1368 if (m_multipartLoaders && m_multipartLoaders->contains(loader)) 1368 if (m_multipartLoaders && m_multipartLoaders->contains(loader))
1369 m_multipartLoaders->remove(loader); 1369 m_multipartLoaders->remove(loader);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 return; 1533 return;
1534 case Use: 1534 case Use:
1535 ++m_useCount; 1535 ++m_useCount;
1536 return; 1536 return;
1537 } 1537 }
1538 } 1538 }
1539 1539
1540 void ResourceFetcher::trace(Visitor* visitor) 1540 void ResourceFetcher::trace(Visitor* visitor)
1541 { 1541 {
1542 visitor->trace(m_document); 1542 visitor->trace(m_document);
1543 visitor->trace(m_loaders);
1544 visitor->trace(m_multipartLoaders);
1543 ResourceLoaderHost::trace(visitor); 1545 ResourceLoaderHost::trace(visitor);
1544 } 1546 }
1545 1547
1546 } 1548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698