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; |