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

Unified Diff: content/browser/background_fetch/background_fetch_request_info.cc

Issue 2805813006: Set the Content-Type and Content-Length headers for BG Fetch (Closed)
Patch Set: Set the Content-Type and Content-Length headers for BG Fetch 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
Index: content/browser/background_fetch/background_fetch_request_info.cc
diff --git a/content/browser/background_fetch/background_fetch_request_info.cc b/content/browser/background_fetch/background_fetch_request_info.cc
index 0047606157d8318f4f9ca80ec5645a235d9576a3..0beb3c9fac044b63215ffb973912782b9bbe335a 100644
--- a/content/browser/background_fetch/background_fetch_request_info.cc
+++ b/content/browser/background_fetch/background_fetch_request_info.cc
@@ -36,6 +36,7 @@ void BackgroundFetchRequestInfo::PopulateResponseFromDownloadItem(
file_path_ = download_item->GetTargetFilePath();
file_size_ = download_item->GetReceivedBytes();
response_time_ = download_item->GetEndTime();
+ response_type_ = download_item->GetMimeType();
response_data_populated_ = true;
}
@@ -60,4 +61,9 @@ const base::Time& BackgroundFetchRequestInfo::GetResponseTime() const {
return response_time_;
}
+const std::string& BackgroundFetchRequestInfo::GetResponseType() const {
+ DCHECK(response_data_populated_);
+ return response_type_;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698