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

Side by Side Diff: Source/core/loader/archive/MHTMLArchive.h

Issue 41423002: Devirtualize PageConsole and MHTMLArchive destructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | Source/core/page/PageConsole.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static PassRefPtr<MHTMLArchive> create(const KURL&, SharedBuffer*); 51 static PassRefPtr<MHTMLArchive> create(const KURL&, SharedBuffer*);
52 52
53 enum EncodingPolicy { 53 enum EncodingPolicy {
54 UseDefaultEncoding, 54 UseDefaultEncoding,
55 UseBinaryEncoding 55 UseBinaryEncoding
56 }; 56 };
57 57
58 // Binary encoding results in smaller MHTML files but they might not work in other browsers. 58 // Binary encoding results in smaller MHTML files but they might not work in other browsers.
59 static PassRefPtr<SharedBuffer> generateMHTMLData(const Vector<SerializedRes ource>&, EncodingPolicy, const String& title, const String& mimeType); 59 static PassRefPtr<SharedBuffer> generateMHTMLData(const Vector<SerializedRes ource>&, EncodingPolicy, const String& title, const String& mimeType);
60 60
61 virtual ~MHTMLArchive(); 61 ~MHTMLArchive();
62 ArchiveResource* mainResource() { return m_mainResource.get(); } 62 ArchiveResource* mainResource() { return m_mainResource.get(); }
63 const Vector<RefPtr<ArchiveResource> >& subresources() const { return m_subr esources; } 63 const Vector<RefPtr<ArchiveResource> >& subresources() const { return m_subr esources; }
64 const Vector<RefPtr<MHTMLArchive> >& subframeArchives() const { return m_sub frameArchives; } 64 const Vector<RefPtr<MHTMLArchive> >& subframeArchives() const { return m_sub frameArchives; }
65 65
66 private: 66 private:
67 friend class MHTMLParser; 67 friend class MHTMLParser;
68 MHTMLArchive(); 68 MHTMLArchive();
69 69
70 void setMainResource(PassRefPtr<ArchiveResource> mainResource) { m_mainResou rce = mainResource; } 70 void setMainResource(PassRefPtr<ArchiveResource> mainResource) { m_mainResou rce = mainResource; }
71 void addSubresource(PassRefPtr<ArchiveResource> subResource) { m_subresource s.append(subResource); } 71 void addSubresource(PassRefPtr<ArchiveResource> subResource) { m_subresource s.append(subResource); }
72 void addSubframeArchive(PassRefPtr<MHTMLArchive> subframeArchive) { m_subfra meArchives.append(subframeArchive); } 72 void addSubframeArchive(PassRefPtr<MHTMLArchive> subframeArchive) { m_subfra meArchives.append(subframeArchive); }
73 73
74 void clearAllSubframeArchives(); 74 void clearAllSubframeArchives();
75 void clearAllSubframeArchivesImpl(Vector<RefPtr<MHTMLArchive> >* clearedArch ives); 75 void clearAllSubframeArchivesImpl(Vector<RefPtr<MHTMLArchive> >* clearedArch ives);
76 76
77 RefPtr<ArchiveResource> m_mainResource; 77 RefPtr<ArchiveResource> m_mainResource;
78 Vector<RefPtr<ArchiveResource> > m_subresources; 78 Vector<RefPtr<ArchiveResource> > m_subresources;
79 Vector<RefPtr<MHTMLArchive> > m_subframeArchives; 79 Vector<RefPtr<MHTMLArchive> > m_subframeArchives;
80 }; 80 };
81 81
82 } 82 }
83 83
84 #endif 84 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/PageConsole.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698