diff options
author | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 22:46:44 +0000 |
---|---|---|
committer | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 22:46:44 +0000 |
commit | 996bdbda28035f7f68955525625c998290706281 (patch) | |
tree | dfc61c5633359f02e40421e0240aeac25753b642 /webkit/plugins/ppapi/ppb_url_loader_impl.cc | |
parent | a965ca65e8170b3d685b7ca9185929fe3915b7f9 (diff) | |
download | chromium_src-996bdbda28035f7f68955525625c998290706281.zip chromium_src-996bdbda28035f7f68955525625c998290706281.tar.gz chromium_src-996bdbda28035f7f68955525625c998290706281.tar.bz2 |
1;2cReplace PP_ERROR_WOULDBLOCK with PP_OK_COMPLETIONPENDING. Improve error code comments. Update all code that uses this error code. Keep the old code for now flagging it as deprecated. Update copyrights.
BUG=none
TEST=bots
Review URL: http://codereview.chromium.org/6814033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_url_loader_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_loader_impl.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.cc b/webkit/plugins/ppapi/ppb_url_loader_impl.cc index 31518d1..bb2621e 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.cc +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.cc @@ -205,7 +205,7 @@ PPB_URLLoader_Impl::PPB_URLLoader_Impl(PluginInstance* instance, total_bytes_to_be_received_(-1), user_buffer_(NULL), user_buffer_size_(0), - done_status_(PP_ERROR_WOULDBLOCK), + done_status_(PP_OK_COMPLETIONPENDING), has_universal_access_(false), status_callback_(NULL) { } @@ -267,7 +267,7 @@ int32_t PPB_URLLoader_Impl::Open(PPB_URLRequestInfo_Impl* request, // Notify completion when we receive a redirect or response headers. RegisterCallback(callback); - return PP_ERROR_WOULDBLOCK; + return PP_OK_COMPLETIONPENDING; } int32_t PPB_URLLoader_Impl::FollowRedirect(PP_CompletionCallback callback) { @@ -283,7 +283,7 @@ int32_t PPB_URLLoader_Impl::FollowRedirect(PP_CompletionCallback callback) { loader_->setDefersLoading(false); // Allow the redirect to continue. RegisterCallback(callback); - return PP_ERROR_WOULDBLOCK; + return PP_OK_COMPLETIONPENDING; } bool PPB_URLLoader_Impl::GetUploadProgress(int64_t* bytes_sent, @@ -329,14 +329,14 @@ int32_t PPB_URLLoader_Impl::ReadResponseBody(void* buffer, return FillUserBuffer(); // We may have already reached EOF. - if (done_status_ != PP_ERROR_WOULDBLOCK) { + if (done_status_ != PP_OK_COMPLETIONPENDING) { user_buffer_ = NULL; user_buffer_size_ = 0; return done_status_; } RegisterCallback(callback); - return PP_ERROR_WOULDBLOCK; + return PP_OK_COMPLETIONPENDING; } int32_t PPB_URLLoader_Impl::FinishStreamingToFile( @@ -348,12 +348,12 @@ int32_t PPB_URLLoader_Impl::FinishStreamingToFile( return PP_ERROR_FAILED; // We may have already reached EOF. - if (done_status_ != PP_ERROR_WOULDBLOCK) + if (done_status_ != PP_OK_COMPLETIONPENDING) return done_status_; // Wait for didFinishLoading / didFail. RegisterCallback(callback); - return PP_ERROR_WOULDBLOCK; + return PP_OK_COMPLETIONPENDING; } void PPB_URLLoader_Impl::Close() { |