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

Unified Diff: Source/platform/mhtml/ArchiveResourceCollection.h

Issue 374053002: Oilpan: move MHTML objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MHTMLArchive.h self-contained/closed. Created 6 years, 5 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/platform/mhtml/ArchiveResource.cpp ('k') | Source/platform/mhtml/ArchiveResourceCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mhtml/ArchiveResourceCollection.h
diff --git a/Source/platform/mhtml/ArchiveResourceCollection.h b/Source/platform/mhtml/ArchiveResourceCollection.h
index 0e26116c539a71c7e23b16a423ba68ac2cd4dbb4..4252a42cc66f56f4560a12e0357f8852b6600e8e 100644
--- a/Source/platform/mhtml/ArchiveResourceCollection.h
+++ b/Source/platform/mhtml/ArchiveResourceCollection.h
@@ -29,29 +29,39 @@
#ifndef ArchiveResourceCollection_h
#define ArchiveResourceCollection_h
-#include "platform/mhtml/ArchiveResource.h"
-#include "platform/mhtml/MHTMLArchive.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
+class ArchiveResource;
class KURL;
+class MHTMLArchive;
-class PLATFORM_EXPORT ArchiveResourceCollection {
- WTF_MAKE_NONCOPYABLE(ArchiveResourceCollection); WTF_MAKE_FAST_ALLOCATED;
+class PLATFORM_EXPORT ArchiveResourceCollection FINAL : public NoBaseWillBeGarbageCollectedFinalized<ArchiveResourceCollection> {
+ WTF_MAKE_NONCOPYABLE(ArchiveResourceCollection); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- ArchiveResourceCollection();
+ static PassOwnPtrWillBeRawPtr<ArchiveResourceCollection> create()
+ {
+ return adoptPtrWillBeNoop(new ArchiveResourceCollection);
+ }
+
+ ~ArchiveResourceCollection();
- void addResource(PassRefPtr<ArchiveResource>);
+ void addResource(PassRefPtrWillBeRawPtr<ArchiveResource>);
void addAllResources(MHTMLArchive*);
ArchiveResource* archiveResourceForURL(const KURL&);
- PassRefPtr<MHTMLArchive> popSubframeArchive(const String& frameName, const KURL&);
+ PassRefPtrWillBeRawPtr<MHTMLArchive> popSubframeArchive(const String& frameName, const KURL&);
+
+ void trace(Visitor*);
private:
- HashMap<String, RefPtr<ArchiveResource> > m_subresources;
- HashMap<String, RefPtr<MHTMLArchive> > m_subframes;
+ ArchiveResourceCollection();
+
+ WillBeHeapHashMap<String, RefPtrWillBeMember<ArchiveResource> > m_subresources;
+ WillBeHeapHashMap<String, RefPtrWillBeMember<MHTMLArchive> > m_subframes;
};
}
« no previous file with comments | « Source/platform/mhtml/ArchiveResource.cpp ('k') | Source/platform/mhtml/ArchiveResourceCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698