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 /ppapi/cpp | |
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 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/completion_callback.h | 8 | ||||
-rw-r--r-- | ppapi/cpp/paint_manager.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ppapi/cpp/completion_callback.h b/ppapi/cpp/completion_callback.h index 3cec39a..92403f3 100644 --- a/ppapi/cpp/completion_callback.h +++ b/ppapi/cpp/completion_callback.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -69,7 +69,7 @@ class CompletionCallback { // void ProcessFile(const FileRef& file) { // CompletionCallback cc = factory_.NewCallback(&MyHandler::DidOpen); // int32_t rv = fio_.Open(file, PP_FileOpenFlag_Read, cc); -// if (rv != PP_ERROR_WOULDBLOCK) +// if (rv != PP_OK_COMPLETIONPENDING) // cc.Run(rv); // } // @@ -103,7 +103,7 @@ class CompletionCallback { // CompletionCallback cc = factory_.NewCallback(&MyHandler::DidRead); // int32_t rv = fio_.Read(offset_, buf_, sizeof(buf_), // cc.pp_completion_callback()); -// if (rv != PP_ERROR_WOULDBLOCK) +// if (rv != PP_OK_COMPLETIONPENDING) // cc.Run(rv); // } // @@ -148,7 +148,7 @@ class CompletionCallbackFactory { // Allocates a new, single-use CompletionCallback. The CompletionCallback // must be run in order for the memory allocated by NewCallback to be freed. // If after passing the CompletionCallback to a PPAPI method, the method does - // not return PP_ERROR_WOULDBLOCK, then you should manually call the + // not return PP_OK_COMPLETIONPENDING, then you should manually call the // CompletionCallback's Run method otherwise memory will be leaked. template <typename Method> diff --git a/ppapi/cpp/paint_manager.cc b/ppapi/cpp/paint_manager.cc index a555c52..1508333 100644 --- a/ppapi/cpp/paint_manager.cc +++ b/ppapi/cpp/paint_manager.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -146,7 +146,7 @@ void PaintManager::DoPaint() { // re-use devices in this way. PP_DCHECK(result != PP_ERROR_INPROGRESS); - if (result == PP_ERROR_WOULDBLOCK) { + if (result == PP_OK_COMPLETIONPENDING) { flush_pending_ = true; } else { PP_DCHECK(result == PP_OK); // Catch all other errors in debug mode. |