diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 01:57:10 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 01:57:10 +0000 |
commit | 0913741d59bfcf69585a7bf4574d2bcfc093c260 (patch) | |
tree | 97b9f2da799a15f8459629932516fb4780d265b4 /ppapi | |
parent | ca27645dbac0a03383f052dac8ecc3271668e1d0 (diff) | |
download | chromium_src-0913741d59bfcf69585a7bf4574d2bcfc093c260.zip chromium_src-0913741d59bfcf69585a7bf4574d2bcfc093c260.tar.gz chromium_src-0913741d59bfcf69585a7bf4574d2bcfc093c260.tar.bz2 |
Revert 84096 - Merge 84071 - Defer asynchronous loading when the buffer in PPB_URLLoader_Impl exceeds an optionally-specified threshold and re-enable it when the buffer drops below a lower threshold.
BUG=80684
TEST=Set the thresholds to 4 MB and 2 MB, respectively from a plugin then download a large file (> 200 MB). Observe that the renderer/plugin process memory usage in Task Manager does not exceed ~100MB and that network traffic drops to 0 then picks up again briefly after 10 MB are used.
Review URL: http://codereview.chromium.org/6923002
TBR=ddorwin@chromium.org
Review URL: http://codereview.chromium.org/6928014
TBR=ddorwin@chromium.org
Review URL: http://codereview.chromium.org/6931025
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@84191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/c/ppb_url_request_info.h | 29 | ||||
-rw-r--r-- | ppapi/cpp/url_request_info.h | 8 |
2 files changed, 1 insertions, 36 deletions
diff --git a/ppapi/c/ppb_url_request_info.h b/ppapi/c/ppb_url_request_info.h index a5eca93..260612b 100644 --- a/ppapi/c/ppb_url_request_info.h +++ b/ppapi/c/ppb_url_request_info.h @@ -117,34 +117,7 @@ typedef enum { * custom content transfer encoding; if given to a loader without universal * access, PP_ERROR_BADARGUMENT will result. */ - PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING, - - /** - * This corresponds to an integer (PP_VARTYPE_INT32); default is not defined - * and is set by the browser, possibly depending on system capabilities. - * Set it to an integer to set an upper threshold for the prefetched buffer - * of an asynchronous load. When exceeded, the browser will defer loading - * until PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD is hit, at which - * time it will begin prefetching again. - * When setting this property, - * PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD must also be set. - * Behavior is undefined if the former is <= the latter. - */ - PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD, - - /** - * This corresponds to an integer (PP_VARTYPE_INT32); default is not defined - * and is set by the browser to a value appropriate for the default - * PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD. - * Set it to an integer to set a lower threshold for the prefetched buffer - * of an asynchronous load. When reached, the browser will resume loading if - * If PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD had previously been - * reached. - * When setting this property, - * PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD must also be set. - * Behavior is undefined if the former is >= the latter. - */ - PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD + PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING } PP_URLRequestProperty; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4); /** diff --git a/ppapi/cpp/url_request_info.h b/ppapi/cpp/url_request_info.h index f0922a5..cce4e91 100644 --- a/ppapi/cpp/url_request_info.h +++ b/ppapi/cpp/url_request_info.h @@ -70,14 +70,6 @@ class URLRequestInfo : public Resource { return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING, content_transfer_encoding); } - bool SetPrefetchBufferUpperThreshold(int32_t size) { - return SetProperty(PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD, - size); - } - bool SetPrefetchBufferLowerThreshold(int32_t size) { - return SetProperty(PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD, - size); - } }; } // namespace pp |