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

Unified Diff: content/public/test/test_download_request_handler.cc

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Addressed comments + rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/test_download_request_handler.cc
diff --git a/content/public/test/test_download_request_handler.cc b/content/public/test/test_download_request_handler.cc
index 48b74508d176bca8ca1f556466db1e818fab487e..c0f9525704855764b509283be42160281791ce74 100644
--- a/content/public/test/test_download_request_handler.cc
+++ b/content/public/test/test_download_request_handler.cc
@@ -327,7 +327,9 @@ void TestDownloadRequestHandler::PartialResponseJob::ReportCompletedRequest() {
completed_request->request_headers = request()->extra_request_headers();
completed_request->referrer = request()->referrer();
completed_request->referrer_policy = request()->referrer_policy();
- completed_request->initiator = request()->initiator();
+ completed_request->initiator = request()->initiator().has_value()
+ ? request()->initiator().value()
+ : url::Origin();
completed_request->first_party_for_cookies =
request()->first_party_for_cookies();
completed_request->first_party_url_policy =
« no previous file with comments | « content/public/common/url_fetcher.h ('k') | extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698