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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef ArchiveResourceCollection_h 29 #ifndef ArchiveResourceCollection_h
30 #define ArchiveResourceCollection_h 30 #define ArchiveResourceCollection_h
31 31
32 #include "platform/mhtml/ArchiveResource.h" 32 #include "platform/heap/Handle.h"
33 #include "platform/mhtml/MHTMLArchive.h"
34 #include "wtf/HashMap.h" 33 #include "wtf/HashMap.h"
35 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
36 35
37 namespace WebCore { 36 namespace WebCore {
38 37
38 class ArchiveResource;
39 class KURL; 39 class KURL;
40 class MHTMLArchive;
40 41
41 class PLATFORM_EXPORT ArchiveResourceCollection { 42 class PLATFORM_EXPORT ArchiveResourceCollection FINAL : public NoBaseWillBeGarba geCollectedFinalized<ArchiveResourceCollection> {
42 WTF_MAKE_NONCOPYABLE(ArchiveResourceCollection); WTF_MAKE_FAST_ALLOCATED; 43 WTF_MAKE_NONCOPYABLE(ArchiveResourceCollection); WTF_MAKE_FAST_ALLOCATED_WIL L_BE_REMOVED;
43 public: 44 public:
44 ArchiveResourceCollection(); 45 static PassOwnPtrWillBeRawPtr<ArchiveResourceCollection> create()
46 {
47 return adoptPtrWillBeNoop(new ArchiveResourceCollection);
48 }
45 49
46 void addResource(PassRefPtr<ArchiveResource>); 50 ~ArchiveResourceCollection();
51
52 void addResource(PassRefPtrWillBeRawPtr<ArchiveResource>);
47 void addAllResources(MHTMLArchive*); 53 void addAllResources(MHTMLArchive*);
48 54
49 ArchiveResource* archiveResourceForURL(const KURL&); 55 ArchiveResource* archiveResourceForURL(const KURL&);
50 PassRefPtr<MHTMLArchive> popSubframeArchive(const String& frameName, const K URL&); 56 PassRefPtrWillBeRawPtr<MHTMLArchive> popSubframeArchive(const String& frameN ame, const KURL&);
57
58 void trace(Visitor*);
51 59
52 private: 60 private:
53 HashMap<String, RefPtr<ArchiveResource> > m_subresources; 61 ArchiveResourceCollection();
54 HashMap<String, RefPtr<MHTMLArchive> > m_subframes; 62
63 WillBeHeapHashMap<String, RefPtrWillBeMember<ArchiveResource> > m_subresourc es;
64 WillBeHeapHashMap<String, RefPtrWillBeMember<MHTMLArchive> > m_subframes;
55 }; 65 };
56 66
57 } 67 }
58 68
59 #endif 69 #endif
OLDNEW
« 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