Remove unbound base::Bind overload

This CL removes a base::Bind overload without bound arguments.
The difference to generic base::Bind is the type check for the bound
Runnable: the generic one ensures any argument of the Runnable
is not non-const reference, OTHT, the overload being removed checks
nothing.

Where, comments and tests asserts any *bound* argument should not be
non-const reference, so the generic one has been checked excessively.
This CL loosen the type check to match the requirement, and then
the overloaded base::Bind is no longer needed.

BUG=

Review URL: https://codereview.chromium.org/1512833002

Cr-Commit-Position: refs/heads/master@{#365988}
diff --git a/base/bind_helpers.h b/base/bind_helpers.h
index 434520a..68867c3 100644
--- a/base/bind_helpers.h
+++ b/base/bind_helpers.h
@@ -527,6 +527,31 @@
 template <size_t n, typename List>
 using DropTypeListItem = typename DropTypeListItemImpl<n, List>::Type;
 
+// Used for TakeTypeListItem implementation.
+template <size_t n, typename List, typename... Accum>
+struct TakeTypeListItemImpl;
+
+// Do not use enable_if and SFINAE here to avoid MSVC2013 compile failure.
+template <size_t n, typename T, typename... List, typename... Accum>
+struct TakeTypeListItemImpl<n, TypeList<T, List...>, Accum...>
+    : TakeTypeListItemImpl<n - 1, TypeList<List...>, Accum..., T> {};
+
+template <typename T, typename... List, typename... Accum>
+struct TakeTypeListItemImpl<0, TypeList<T, List...>, Accum...> {
+  using Type = TypeList<Accum...>;
+};
+
+template <typename... Accum>
+struct TakeTypeListItemImpl<0, TypeList<>, Accum...> {
+  using Type = TypeList<Accum...>;
+};
+
+// A type-level function that takes first |n| list item from given TypeList.
+// E.g. TakeTypeListItem<3, TypeList<A, B, C, D>> is evaluated to
+// TypeList<A, B, C>.
+template <size_t n, typename List>
+using TakeTypeListItem = typename TakeTypeListItemImpl<n, List>::Type;
+
 // Used for ConcatTypeLists implementation.
 template <typename List1, typename List2>
 struct ConcatTypeListsImpl;
@@ -554,6 +579,20 @@
 template <typename R, typename ArgList>
 using MakeFunctionType = typename MakeFunctionTypeImpl<R, ArgList>::Type;
 
+// Used for ExtractArgs.
+template <typename Signature>
+struct ExtractArgsImpl;
+
+template <typename R, typename... Args>
+struct ExtractArgsImpl<R(Args...)> {
+  using Type = TypeList<Args...>;
+};
+
+// A type-level function that extracts function arguments into a TypeList.
+// E.g. ExtractArgs<R(A, B, C)> is evaluated to TypeList<A, B, C>.
+template <typename Signature>
+using ExtractArgs = typename ExtractArgsImpl<Signature>::Type;
+
 }  // namespace internal
 
 template <typename T>