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

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

Issue 10701119: PPAPI: Set custom user agent in headers, if applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 | « no previous file | 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 55c6d3ac1fcaac0663b5986e23e31bdb09b3daf2..9bc99bf00a9f30dd6842b9168e75bfeb27935d69 100644
--- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
@@ -120,6 +120,13 @@ bool PPB_URLRequestInfo_Impl::ToWebURLRequest(WebFrame* frame,
WebString::fromUTF8(data().custom_content_transfer_encoding));
}
+ 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));
+ }
+
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698