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

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

Issue 6652014: Pepper: Add a property to URLRequestInfo to skip header validation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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/plugins/ppapi/ppb_url_request_info_impl.h ('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 f7b472eea244251b655ee2c4654686110f10b709..d8aaf6ebf81c4870159a26eca981ec4f1007966f 100644
--- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
@@ -192,7 +192,8 @@ PPB_URLRequestInfo_Impl::PPB_URLRequestInfo_Impl(PluginInstance* instance)
stream_to_file_(false),
follow_redirects_(true),
record_download_progress_(false),
- record_upload_progress_(false) {
+ record_upload_progress_(false),
+ universal_access_(false) {
}
PPB_URLRequestInfo_Impl::~PPB_URLRequestInfo_Impl() {
@@ -222,6 +223,12 @@ bool PPB_URLRequestInfo_Impl::SetBooleanProperty(PP_URLRequestProperty property,
case PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS:
record_upload_progress_ = value;
return true;
+ case PP_URLREQUESTPROPERTY_UNIVERSALACCESS:
+ // Only allow it to be set, not unset.
+ if (universal_access_ && universal_access_ != value)
+ return false;
+ universal_access_ = value;
+ return true;
default:
return false;
}
@@ -238,7 +245,7 @@ bool PPB_URLRequestInfo_Impl::SetStringProperty(PP_URLRequestProperty property,
method_ = value;
return true;
case PP_URLREQUESTPROPERTY_HEADERS:
- if (!AreValidHeaders(value))
+ if (!universal_access_ && !AreValidHeaders(value))
piman 2011/03/09 02:10:10 I'm not sure we'd want to allow any arbitrary head
return false;
headers_ = value;
return true;
« no previous file with comments | « webkit/plugins/ppapi/ppb_url_request_info_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698