| Index: ppapi/cpp/url_request_info.h
|
| diff --git a/ppapi/cpp/url_request_info.h b/ppapi/cpp/url_request_info.h
|
| index 49e47ae930155ef4dcaf6189429d997e5d3ecd1c..e9ff9ea1c4d7b4febd710b89489d07173abf6a98 100644
|
| --- a/ppapi/cpp/url_request_info.h
|
| +++ b/ppapi/cpp/url_request_info.h
|
| @@ -245,7 +245,6 @@ class URLRequestInfo : public Resource {
|
| return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, enable);
|
| }
|
|
|
| -
|
| /// SetCustomContentTransferEncoding() sets the
|
| /// <code>PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING</code>
|
| /// (corresponding to a string of type <code>PP_VARTYPE_STRING</code> or
|
| @@ -309,6 +308,25 @@ class URLRequestInfo : public Resource {
|
| return SetProperty(PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD,
|
| size);
|
| }
|
| +
|
| + /// SetCustomUserAgent() sets the
|
| + /// <code>PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT</code> (corresponding to a
|
| + /// string of type <code>PP_VARTYPE_STRING</code> or might be set to undefined
|
| + /// as <code>PP_VARTYPE_UNDEFINED</code>). Set it to a string to set a custom
|
| + /// user-agent header (if empty, that header will be omitted), or to undefined
|
| + /// to use the default. Only loaders with universal access (only available on
|
| + /// trusted implementations) will accept <code>URLRequestInfo</code> objects
|
| + /// that try to set a custom user agent; if given to a loader without
|
| + /// universal access, <code>PP_ERROR_BADARGUMENT</code> will result.
|
| + ///
|
| + /// @param[in] user_agent A <code>Var</code> containing the property value. To
|
| + /// use the default user agent, set <code>user_agent</code> to an undefined
|
| + /// <code>Var</code>.
|
| + ///
|
| + /// @return true if successful, false if the parameter is invalid.
|
| + bool SetCustomUserAgent(const Var& user_agent) {
|
| + return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT, user_agent);
|
| + }
|
| };
|
|
|
| } // namespace pp
|
|
|