RESOLVED FIXED 55903
SubresourceLoader should expose a way to set the outgoing referer/origin.
https://bugs.webkit.org/show_bug.cgi?id=55903
Summary SubresourceLoader should expose a way to set the outgoing referer/origin.
David Levin
Reported 2011-03-07 13:44:44 PST
See summary.
Attachments
Patch (3.51 KB, patch)
2011-03-07 13:55 PST, David Levin
no flags
Patch (3.61 KB, patch)
2011-03-07 15:31 PST, David Levin
abarth: review+
abarth: commit-queue-
David Levin
Comment 1 2011-03-07 13:55:21 PST
Adam Barth
Comment 2 2011-03-07 14:00:21 PST
Comment on attachment 84978 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84978&action=review > Source/WebCore/loader/SubresourceLoader.cpp:63 > +PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff, const String* outgoingReferrer) Maybe pass a null string instead of a pointer to indicate no override?
Build Bot
Comment 3 2011-03-07 14:18:33 PST
David Levin
Comment 4 2011-03-07 14:50:01 PST
Comment on attachment 84978 [details] Patch r- due to Adam's comment and last minute change that doesn't compile :(.
David Levin
Comment 5 2011-03-07 15:31:38 PST
Adam Barth
Comment 6 2011-03-07 15:34:10 PST
Comment on attachment 84988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84988&action=review > Source/WebCore/loader/SubresourceLoader.cpp:63 > -PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff) > +PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff, String outgoingReferrer) We usually pass String by const reference.
Adam Barth
Comment 7 2011-03-07 15:34:24 PST
(The const reference reduces refchurn)
David Levin
Comment 8 2011-03-07 15:37:19 PST
(In reply to comment #7) > (The const reference reduces refchurn) I started that way but In this case, it saves me from creating another string as I can just modify string parameter that was passed in (and in general makes the variable names clearer by getting rid of this other variable -- no more outgoingReferrer vs referrer).
Adam Barth
Comment 9 2011-03-07 15:43:30 PST
As you like it.
David Levin
Comment 10 2011-03-21 13:06:42 PDT
(In reply to comment #6) > We usually pass String by const reference. Fixed and committed as http://trac.webkit.org/changeset/81605
Note You need to log in before you can comment on or make changes to this bug.