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

Unified Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 10795071: Merge 147060 to 1180 (M21) - PPAPI (Flash): Properly honor Pepper url requests with custom user age… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « webkit/glue/weburlrequest_extradata_impl.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_url_request_info_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_url_request_info_impl.cc (revision 147918)
+++ webkit/plugins/ppapi/ppb_url_request_info_impl.cc (working copy)
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/glue/weburlrequest_extradata_impl.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
@@ -121,10 +122,9 @@
}
if (data().has_custom_user_agent) {
- // TODO(viettrungluu): If |custom_user_agent| is empty, we're supposed to
- // arrange for User-Agent to be omitted; this probably won't do that.
- dest->addHTTPHeaderField(WebString::fromUTF8("User-Agent"),
- WebString::fromUTF8(data().custom_user_agent));
+ dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl(
+ WebKit::WebReferrerPolicyDefault, // Ignored.
+ WebString::fromUTF8(data().custom_user_agent)));
}
return true;
« no previous file with comments | « webkit/glue/weburlrequest_extradata_impl.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698