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

Side by Side Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.h

Issue 1386873003: OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-generation-mgr-cleanup
Patch Set: Moved MHTML boundary marker generation into the browser. Created 5 years 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) 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 PassRefPtrWillBeRawPtr<MHTMLArchive> create(); 51 static PassRefPtrWillBeRawPtr<MHTMLArchive> create();
52 static PassRefPtrWillBeRawPtr<MHTMLArchive> create(const KURL&, SharedBuffer *); 52 static PassRefPtrWillBeRawPtr<MHTMLArchive> create(const KURL&, SharedBuffer *);
53 ~MHTMLArchive(); 53 ~MHTMLArchive();
54 54
55 // Binary encoding results in smaller MHTML files but they might not work in other browsers. 55 // Binary encoding results in smaller MHTML files but they might not work in other browsers.
56 enum EncodingPolicy { 56 enum EncodingPolicy {
57 UseDefaultEncoding, 57 UseDefaultEncoding,
58 UseBinaryEncoding 58 UseBinaryEncoding
59 }; 59 };
60 60
61 // Generates a random/unique boundary that can be used as a separator of
62 // MHTML parts.
63 static String generateMHTMLBoundary();
64
65 // Generates an MHTML header and appends it to |outputBuffer|. 61 // Generates an MHTML header and appends it to |outputBuffer|.
66 // 62 //
67 // Same |boundary| needs to used for all generateMHTMLHeader and 63 // Same |boundary| needs to used for all generateMHTMLHeader and
68 // generateMHTMLPart and generateMHTMLFooter calls that belong to the same 64 // generateMHTMLPart and generateMHTMLFooter calls that belong to the same
69 // MHTML document (see also generateMHTMLBoundary method). 65 // MHTML document (see also generateMHTMLBoundary method).
70 static void generateMHTMLHeader( 66 static void generateMHTMLHeader(
71 const String& boundary, const String& title, const String& mimeType, 67 const String& boundary, const String& title, const String& mimeType,
72 SharedBuffer& outputBuffer); 68 SharedBuffer& outputBuffer);
73 69
74 // Serializes SerializedResource as an MHTML part and appends it in 70 // Serializes SerializedResource as an MHTML part and appends it in
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #endif 113 #endif
118 114
119 RefPtrWillBeMember<ArchiveResource> m_mainResource; 115 RefPtrWillBeMember<ArchiveResource> m_mainResource;
120 SubArchiveResources m_subresources; 116 SubArchiveResources m_subresources;
121 SubFrameArchives m_subframeArchives; 117 SubFrameArchives m_subframeArchives;
122 }; 118 };
123 119
124 } 120 }
125 121
126 #endif 122 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698