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

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

Issue 1891623003: [Downloads] Set the Referrer header for resumed requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch up with ToT Created 4 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/public/test/test_download_request_handler.h
diff --git a/content/public/test/test_download_request_handler.h b/content/public/test/test_download_request_handler.h
index 6a0610ab2f2c12e7725f1923f0461324cf9ad745..4daff5c4548e9c7f9206e53b842e15ddb22ed6d0 100644
--- a/content/public/test/test_download_request_handler.h
+++ b/content/public/test/test_download_request_handler.h
@@ -197,15 +197,32 @@ class TestDownloadRequestHandler : public base::NonThreadSafe {
// Details about completed requests returned by GetCompletedRequestInfo().
struct CompletedRequest {
+ CompletedRequest();
+ CompletedRequest(CompletedRequest&&);
+ ~CompletedRequest();
+
// Count of bytes read by the client of the URLRequestJob. This counts the
// number of bytes of the entity that was transferred *after* content
// decoding is complete.
int64_t transferred_byte_count = -1;
net::HttpRequestHeaders request_headers;
+
+ std::string referrer;
+ net::URLRequest::ReferrerPolicy referrer_policy =
+ net::URLRequest::NEVER_CLEAR_REFERRER;
+
+ GURL first_party_for_cookies;
+ net::URLRequest::FirstPartyURLPolicy first_party_url_policy =
+ net::URLRequest::NEVER_CHANGE_FIRST_PARTY_URL;
+
+ url::Origin initiator;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CompletedRequest);
};
- using CompletedRequests = std::vector<CompletedRequest>;
+ using CompletedRequests = std::vector<std::unique_ptr<CompletedRequest>>;
// Registers a request handler at the default URL. Call url() to determine the
// URL.
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/test/test_download_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698