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

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

Issue 10762017: PPAPI: Add an API for setting a custom user agent for URL requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo 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 | « ppapi/tests/test_url_request.cc ('k') | no next file » | 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
diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
index 79c09bdf08755c2981d05329e4d79ad409acc19b..55c6d3ac1fcaac0663b5986e23e31bdb09b3daf2 100644
--- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
@@ -113,12 +113,11 @@ bool PPB_URLRequestInfo_Impl::ToWebURLRequest(WebFrame* frame,
frame->setReferrerForRequest(*dest, GURL(data().custom_referrer_url));
}
- if (data().has_custom_content_transfer_encoding) {
- if (!data().custom_content_transfer_encoding.empty()) {
- dest->addHTTPHeaderField(
- WebString::fromUTF8("Content-Transfer-Encoding"),
- WebString::fromUTF8(data().custom_content_transfer_encoding));
- }
+ if (data().has_custom_content_transfer_encoding &&
+ !data().custom_content_transfer_encoding.empty()) {
+ dest->addHTTPHeaderField(
+ WebString::fromUTF8("Content-Transfer-Encoding"),
+ WebString::fromUTF8(data().custom_content_transfer_encoding));
}
return true;
@@ -128,6 +127,7 @@ bool PPB_URLRequestInfo_Impl::RequiresUniversalAccess() const {
return
data().has_custom_referrer_url ||
data().has_custom_content_transfer_encoding ||
+ data().has_custom_user_agent ||
url_util::FindAndCompareScheme(data().url, "javascript", NULL);
}
« no previous file with comments | « ppapi/tests/test_url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698