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

Side by Side Diff: Source/platform/mhtml/MHTMLArchive.cpp

Issue 871433008: Update mhtml saved page header to "Saved by Blink" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 PassRefPtr<SharedBuffer> MHTMLArchive::generateMHTMLData(const Vector<Serialized Resource>& resources, EncodingPolicy encodingPolicy, const String& title, const String& mimeType) 125 PassRefPtr<SharedBuffer> MHTMLArchive::generateMHTMLData(const Vector<Serialized Resource>& resources, EncodingPolicy encodingPolicy, const String& title, const String& mimeType)
126 { 126 {
127 String boundary = generateRandomBoundary(); 127 String boundary = generateRandomBoundary();
128 String endOfResourceBoundary = "--" + boundary + "\r\n"; 128 String endOfResourceBoundary = "--" + boundary + "\r\n";
129 129
130 DateComponents now; 130 DateComponents now;
131 now.setMillisecondsSinceEpochForDateTime(currentTimeMS()); 131 now.setMillisecondsSinceEpochForDateTime(currentTimeMS());
132 String dateString = makeRFC2822DateString(now.weekDay(), now.monthDay(), now .month(), now.fullYear(), now.hour(), now.minute(), now.second(), 0); 132 String dateString = makeRFC2822DateString(now.weekDay(), now.monthDay(), now .month(), now.fullYear(), now.hour(), now.minute(), now.second(), 0);
133 133
134 StringBuilder stringBuilder; 134 StringBuilder stringBuilder;
135 stringBuilder.appendLiteral("From: <Saved by WebKit>\r\n"); 135 stringBuilder.appendLiteral("From: <Saved by Blink>\r\n");
136 stringBuilder.appendLiteral("Subject: "); 136 stringBuilder.appendLiteral("Subject: ");
137 // We replace non ASCII characters with '?' characters to match IE's behavio r. 137 // We replace non ASCII characters with '?' characters to match IE's behavio r.
138 stringBuilder.append(replaceNonPrintableCharacters(title)); 138 stringBuilder.append(replaceNonPrintableCharacters(title));
139 stringBuilder.appendLiteral("\r\nDate: "); 139 stringBuilder.appendLiteral("\r\nDate: ");
140 stringBuilder.append(dateString); 140 stringBuilder.append(dateString);
141 stringBuilder.appendLiteral("\r\nMIME-Version: 1.0\r\n"); 141 stringBuilder.appendLiteral("\r\nMIME-Version: 1.0\r\n");
142 stringBuilder.appendLiteral("Content-Type: multipart/related;\r\n"); 142 stringBuilder.appendLiteral("Content-Type: multipart/related;\r\n");
143 stringBuilder.appendLiteral("\ttype=\""); 143 stringBuilder.appendLiteral("\ttype=\"");
144 stringBuilder.append(mimeType); 144 stringBuilder.append(mimeType);
145 stringBuilder.appendLiteral("\";\r\n"); 145 stringBuilder.appendLiteral("\";\r\n");
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 253
254 void MHTMLArchive::trace(Visitor* visitor) 254 void MHTMLArchive::trace(Visitor* visitor)
255 { 255 {
256 visitor->trace(m_mainResource); 256 visitor->trace(m_mainResource);
257 visitor->trace(m_subresources); 257 visitor->trace(m_subresources);
258 visitor->trace(m_subframeArchives); 258 visitor->trace(m_subframeArchives);
259 } 259 }
260 260
261 } 261 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698