Index: chrome/browser/google_apis/task_util.h |
diff --git a/chrome/browser/google_apis/task_util.h b/chrome/browser/google_apis/task_util.h |
index d186f3d8c0e9517b4990750da9b721f09bca2814..883a0e84655b1c53f250fb767d063792f992ee39 100644 |
--- a/chrome/browser/google_apis/task_util.h |
+++ b/chrome/browser/google_apis/task_util.h |
@@ -10,8 +10,8 @@ |
namespace google_apis { |
-// Runs task on the thread to which |relay_proxy| belongs. |
-void RunTaskOnThread(scoped_refptr<base::MessageLoopProxy> relay_proxy, |
+// Runs task on the thread to which |task_runner| belongs. |
+void RunTaskOnThread(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
const base::Closure& task); |
namespace internal { |
@@ -106,33 +106,6 @@ struct ComposedCallback<void(T1, scoped_ptr<T2, D2>, T3, T4)> { |
} |
}; |
-// GetDefaultValue returns a value constructed by the default constructor. |
-template<typename T> struct DefaultValueCreator { |
- static T GetDefaultValue() { return T(); } |
-}; |
-template<typename T> struct DefaultValueCreator<const T&> { |
- static T GetDefaultValue() { return T(); } |
-}; |
- |
-// Helper of CreateErrorRunCallback implementation. |
-// Provides: |
-// - ResultType; the type of the Callback which should be returned by |
-// CreateErrorRunCallback. |
-// - Run(): a static function which takes the original |callback| and |error|, |
-// and runs the |callback|.Run() with the error code and default values |
-// for remaining arguments. |
-template<typename CallbackType> struct CreateErrorRunCallbackHelper; |
- |
-// CreateErrorRunCallback with two arguments. |
-template<typename ErrorType, typename P1> |
-struct CreateErrorRunCallbackHelper<void(ErrorType, P1)> { |
- typedef base::Callback<void(ErrorType)> ResultType; |
- static void Run( |
- const base::Callback<void(ErrorType, P1)>& callback, ErrorType error) { |
- callback.Run(error, DefaultValueCreator<P1>::GetDefaultValue()); |
- } |
-}; |
- |
} // namespace internal |
// Returns callback that takes arguments (arg1, arg2, ...), create a closure |
@@ -158,15 +131,6 @@ CallbackType CreateRelayCallback(const CallbackType& callback) { |
callback); |
} |
-// Returns a callback with the tail parameter bound to its default value. |
-// In other words, returned_callback.Run(error) runs callback.Run(error, T()). |
-template<typename CallbackType> |
-typename internal::CreateErrorRunCallbackHelper<CallbackType>::ResultType |
-CreateErrorRunCallback(const base::Callback<CallbackType>& callback) { |
- return base::Bind( |
- &internal::CreateErrorRunCallbackHelper<CallbackType>::Run, callback); |
-} |
- |
} // namespace google_apis |
#endif // CHROME_BROWSER_GOOGLE_APIS_TASK_UTIL_H_ |