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

Unified Diff: webkit/glue/webplugin_impl.h

Issue 459003: Don't set referrers on outgoing plugin requests if the load_manually flag is ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « webkit/glue/plugins/test/plugin_geturl_test.cc ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.h
===================================================================
--- webkit/glue/webplugin_impl.h (revision 33607)
+++ webkit/glue/webplugin_impl.h (working copy)
@@ -29,6 +29,7 @@
class WebPluginContainer;
class WebURLResponse;
class WebURLLoader;
+class WebURLRequest;
}
namespace webkit_glue {
@@ -109,6 +110,14 @@
GENERAL_FAILURE
};
+ // Determines the referrer value sent along with outgoing HTTP requests
+ // issued by plugins.
+ enum Referrer {
+ PLUGIN_SRC,
+ DOCUMENT_URL,
+ NO_REFERRER
+ };
+
// Given a download request, check if we need to route the output to a frame.
// Returns ROUTED if the load is done and routed to a frame, NOT_ROUTED or
// corresponding error codes otherwise.
@@ -116,7 +125,7 @@
const char* target, unsigned int len,
const char* buf, bool is_file_data,
bool notify_needed, intptr_t notify_data,
- const char* url);
+ const char* url, Referrer referrer_flag);
// Cancels a pending request.
void CancelResource(int id);
@@ -129,7 +138,7 @@
bool InitiateHTTPRequest(int resource_id, WebPluginResourceClient* client,
const char* method, const char* buf, int buf_len,
const GURL& url, const char* range_info,
- bool use_plugin_src_as_referer);
+ Referrer referrer_flag);
gfx::Rect GetWindowClipRect(const gfx::Rect& rect);
@@ -209,7 +218,7 @@
const char* buf, bool is_file_data,
bool notify, const char* url,
intptr_t notify_data, bool popups_allowed,
- bool use_plugin_src_as_referrer);
+ Referrer referrer_flag);
// Tears down the existing plugin instance and creates a new plugin instance
// to handle the response identified by the loader parameter.
@@ -230,6 +239,9 @@
WebPluginResourceClient* GetClientFromLoader(WebKit::WebURLLoader* loader);
ClientInfo* GetClientInfoFromLoader(WebKit::WebURLLoader* loader);
+ // Helper function to set the referrer on the request passed in.
+ void SetReferrer(WebKit::WebURLRequest* request, Referrer referrer_flag);
+
std::vector<ClientInfo> clients_;
bool windowless_;
« no previous file with comments | « webkit/glue/plugins/test/plugin_geturl_test.cc ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698