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

Unified Diff: chrome/browser/android/offline_pages/prerendering_offliner.cc

Issue 2827503002: Add extra headers argument so we don't pass headers in the body. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | content/browser/download/mhtml_extra_parts_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/prerendering_offliner.cc
diff --git a/chrome/browser/android/offline_pages/prerendering_offliner.cc b/chrome/browser/android/offline_pages/prerendering_offliner.cc
index db341ef4c87b63951480215df3ff2f69ab5334b3..6cd3803e3bb77873554c0771158f63958dd15d37 100644
--- a/chrome/browser/android/offline_pages/prerendering_offliner.cc
+++ b/chrome/browser/android/offline_pages/prerendering_offliner.cc
@@ -94,10 +94,10 @@ void PrerenderingOffliner::OnLoadPageDone(
if (IsOfflinePagesLoadSignalCollectingEnabled()) {
// Stash loading signals for writing when we write out the MHTML.
- std::string headers =
- base::StringPrintf("%s\r\n%s\r\n\r\n", kContentTransferEncodingBinary,
- kXHeaderForSignals);
- std::string body = headers + SerializeLoadingSignalData();
+ // TODO(petewil): Add this data to the BackgroundLoaderOffliner too.
+ std::string extra_headers = base::StringPrintf(
+ "%s\r\n%s", kContentTransferEncodingBinary, kXHeaderForSignals);
+ std::string body = SerializeLoadingSignalData();
std::string content_type = kContentType;
std::string content_location = base::StringPrintf(
"cid:signal-data-%" PRId64 "@mhtml.blink", request.request_id());
@@ -106,7 +106,8 @@ void PrerenderingOffliner::OnLoadPageDone(
content::MHTMLExtraParts::FromWebContents(web_contents);
DCHECK(extra_parts);
if (extra_parts != nullptr) {
- extra_parts->AddExtraMHTMLPart(content_type, content_location, body);
+ extra_parts->AddExtraMHTMLPart(content_type, content_location,
+ extra_headers, body);
}
}
« no previous file with comments | « no previous file | content/browser/download/mhtml_extra_parts_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698