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

Unified Diff: webkit/glue/weburlrequest_extradata_impl.h

Issue 10886047: Pepper: Add a X-Requested-With header to URL requests done for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 8 years 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 | « ppapi/tests/test_url_loader.cc ('k') | webkit/glue/weburlrequest_extradata_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/weburlrequest_extradata_impl.h
diff --git a/webkit/glue/weburlrequest_extradata_impl.h b/webkit/glue/weburlrequest_extradata_impl.h
index d4b2c194b6c14d3448ddbb79cb69f82ffcf43324..c7bbe6934b799aa10ad3bbd54db224b07e0a5cbf 100644
--- a/webkit/glue/weburlrequest_extradata_impl.h
+++ b/webkit/glue/weburlrequest_extradata_impl.h
@@ -21,21 +21,25 @@ class WEBKIT_GLUE_EXPORT WebURLRequestExtraDataImpl :
// |custom_user_agent| is used to communicate an overriding custom user agent
// to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no
// override and an empty string to indicate that there should be no user
- // agent. This needs to be here, instead of content's |RequestExtraData| since
- // ppb_url_request_info_impl.cc needs to be able to set it.
+ // agent. |requested_with| is used to set a X-Requested-With header for
+ // requests done on behalf of plugins. These need to be here, instead of
+ // content's |RequestExtraData| since they're set from webkit/plugins/ppapi.
explicit WebURLRequestExtraDataImpl(
WebKit::WebReferrerPolicy referrer_policy,
- const WebKit::WebString& custom_user_agent);
+ const WebKit::WebString& custom_user_agent,
+ const WebKit::WebString& requested_with);
virtual ~WebURLRequestExtraDataImpl();
WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; }
const WebKit::WebString& custom_user_agent() const {
return custom_user_agent_;
}
+ const WebKit::WebString& requested_with() const { return requested_with_; }
private:
WebKit::WebReferrerPolicy referrer_policy_;
WebKit::WebString custom_user_agent_;
+ WebKit::WebString requested_with_;
DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl);
};
« no previous file with comments | « ppapi/tests/test_url_loader.cc ('k') | webkit/glue/weburlrequest_extradata_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698