Chromium Code Reviews| Index: ppapi/utility/completion_callback_factory.h |
| diff --git a/ppapi/utility/completion_callback_factory.h b/ppapi/utility/completion_callback_factory.h |
| index b656024097c77ff338cbace98cc2703cd38ee4fe..b2e80094cfd38c0c6f9824dd0ca68105a985628e 100644 |
| --- a/ppapi/utility/completion_callback_factory.h |
| +++ b/ppapi/utility/completion_callback_factory.h |
| @@ -39,7 +39,7 @@ namespace pp { |
| /// } |
| /// |
| /// void ProcessFile(const FileRef& file) { |
| -/// CompletionCallback cc = factory_.NewRequiredCallback( |
| +/// CompletionCallback cc = factory_.NewCallback( |
| /// &MyHandler::DidOpen); |
| /// int32_t rv = fio_.Open(file, PP_FileOpenFlag_Read, cc); |
| /// CHECK(rv == PP_OK_COMPLETIONPENDING); |
| @@ -147,7 +147,7 @@ class CompletionCallbackFactory { |
| /// NewCallback allocates a new, single-use <code>CompletionCallback</code>. |
| /// The <code>CompletionCallback</code> must be run in order for the memory |
| /// allocated by the methods to be freed. |
| - /// NewCallback() is equivalent to NewRequiredCallback() below. |
| + /// NewCallback() is equivalent to NewCallback() below. |
|
viettrungluu
2012/03/09 06:16:24
This was not your finest search-and-replace moment
|
| /// |
| /// @param[in] method The method to be invoked upon completion of the |
| /// operation. |
| @@ -159,22 +159,6 @@ class CompletionCallbackFactory { |
| return NewCallbackHelper(Dispatcher0<Method>(method)); |
| } |
| - /// NewRequiredCallback() allocates a new, single-use |
| - /// <code>CompletionCallback</code> that will always run. The |
| - /// <code>CompletionCallback</code> must be run in order for the memory |
| - /// allocated by the methods to be freed. |
| - /// |
| - /// @param[in] method The method to be invoked upon completion of the |
| - /// operation. |
| - /// |
| - /// @return A <code>CompletionCallback</code>. |
| - template <typename Method> |
| - CompletionCallback NewRequiredCallback(Method method) { |
| - CompletionCallback cc = NewCallback(method); |
| - cc.set_flags(cc.flags() & ~PP_COMPLETIONCALLBACK_FLAG_OPTIONAL); |
| - return cc; |
| - } |
| - |
| /// NewOptionalCallback() allocates a new, single-use |
| /// <code>CompletionCallback</code> that might not run if the method |
| /// taking it can complete synchronously. Thus, if after passing the |
| @@ -196,7 +180,6 @@ class CompletionCallbackFactory { |
| /// NewCallback() allocates a new, single-use <code>CompletionCallback</code>. |
| /// The <code>CompletionCallback</code> must be run in order for the memory |
| /// allocated by the methods to be freed. |
| - /// NewCallback() is equivalent to NewRequiredCallback() below. |
| /// |
| /// @param[in] method The method to be invoked upon completion of the |
| /// operation. Method should be of type: |
| @@ -212,27 +195,6 @@ class CompletionCallbackFactory { |
| return NewCallbackHelper(Dispatcher1<Method, A>(method, a)); |
| } |
| - /// NewRequiredCallback() allocates a new, single-use |
| - /// <code>CompletionCallback</code> that will always run. The |
| - /// <code>CompletionCallback</code> must be run in order for the memory |
| - /// allocated by the methods to be freed. |
| - /// |
| - /// @param[in] method The method to be invoked upon completion of the |
| - /// operation. Method should be of type: |
| - /// <code>void (T::*)(int32_t result, const A& a)</code> |
| - /// |
| - /// @param[in] a Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @return A <code>CompletionCallback</code>. |
| - template <typename Method, typename A> |
| - CompletionCallback NewRequiredCallback(Method method, const A& a) { |
| - CompletionCallback cc = NewCallback(method, a); |
| - cc.set_flags(cc.flags() & ~PP_COMPLETIONCALLBACK_FLAG_OPTIONAL); |
| - return cc; |
| - } |
| - |
| - /// NewOptionalCallback() allocates a new, single-use |
| /// <code>CompletionCallback</code> that might not run if the method |
| /// taking it can complete synchronously. Thus, if after passing the |
| /// CompletionCallback to a Pepper method, the method does not return |
| @@ -258,7 +220,6 @@ class CompletionCallbackFactory { |
| /// <code>CompletionCallback</code>. |
| /// The <code>CompletionCallback</code> must be run in order for the memory |
| /// allocated by the methods to be freed. |
| - /// NewCallback() is equivalent to NewRequiredCallback() below. |
| /// |
| /// @param method The method taking the callback. Method should be of type: |
| /// <code>void (T::*)(int32_t result, const A& a, const B& b)</code> |
| @@ -276,29 +237,6 @@ class CompletionCallbackFactory { |
| return NewCallbackHelper(Dispatcher2<Method, A, B>(method, a, b)); |
| } |
| - /// NewRequiredCallback() allocates a new, single-use |
| - /// <code>CompletionCallback</code> that will always run. The |
| - /// <code>CompletionCallback</code> must be run in order for the memory |
| - /// allocated by the methods to be freed. |
| - /// |
| - /// @param method The method taking the callback. Method should be of type: |
| - /// <code>void (T::*)(int32_t result, const A& a, const B& b)</code> |
| - /// |
| - /// @param[in] a Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @param[in] b Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @return A <code>CompletionCallback</code>. |
| - template <typename Method, typename A, typename B> |
| - CompletionCallback NewRequiredCallback(Method method, const A& a, |
| - const B& b) { |
| - CompletionCallback cc = NewCallback(method, a, b); |
| - cc.set_flags(cc.flags() & ~PP_COMPLETIONCALLBACK_FLAG_OPTIONAL); |
| - return cc; |
| - } |
| - |
| /// NewOptionalCallback() allocates a new, single-use |
| /// <code>CompletionCallback</code> that might not run if the method |
| /// taking it can complete synchronously. Thus, if after passing the |
| @@ -329,7 +267,6 @@ class CompletionCallbackFactory { |
| /// <code>CompletionCallback</code>. |
| /// The <code>CompletionCallback</code> must be run in order for the memory |
| /// allocated by the methods to be freed. |
| - /// NewCallback() is equivalent to NewRequiredCallback() below. |
| /// |
| /// @param method The method taking the callback. Method should be of type: |
| /// <code> |
| @@ -353,34 +290,6 @@ class CompletionCallbackFactory { |
| return NewCallbackHelper(Dispatcher3<Method, A, B, C>(method, a, b, c)); |
| } |
| - /// NewRequiredCallback() allocates a new, single-use |
| - /// <code>CompletionCallback</code> that will always run. The |
| - /// <code>CompletionCallback</code> must be run in order for the memory |
| - /// allocated by the methods to be freed. |
| - /// |
| - /// @param method The method taking the callback. Method should be of type: |
| - /// <code> |
| - /// void (T::*)(int32_t result, const A& a, const B& b, const C& c) |
| - /// </code> |
| - /// |
| - /// @param[in] a Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @param[in] b Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @param[in] c Passed to <code>method</code> when the completion callback |
| - /// runs. |
| - /// |
| - /// @return A <code>CompletionCallback</code>. |
| - template <typename Method, typename A, typename B, typename C> |
| - CompletionCallback NewRequiredCallback(Method method, const A& a, |
| - const B& b, const C& c) { |
| - CompletionCallback cc = NewCallback(method, a, b, c); |
| - cc.set_flags(cc.flags() & ~PP_COMPLETIONCALLBACK_FLAG_OPTIONAL); |
| - return cc; |
| - } |
| - |
| /// NewOptionalCallback() allocates a new, single-use |
| /// <code>CompletionCallback</code> that might not run if the method |
| /// taking it can complete synchronously. Thus, if after passing the |