Skip to content

Commit

Permalink
Move out OnceCallback and RepeatingCallback from internal namespace
Browse files Browse the repository at this point in the history
BUG=554299

Review-Url: https://codereview.chromium.org/2394023003
Cr-Commit-Position: refs/heads/master@{#424694}
  • Loading branch information
tzik authored and Commit bot committed Oct 12, 2016
1 parent b7a85b5 commit 07dbcfd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
7 changes: 2 additions & 5 deletions base/bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
// terms and concepts.

namespace base {
namespace internal {

// Bind as OnceCallback.
template <typename Functor, typename... Args>
Expand Down Expand Up @@ -69,16 +68,14 @@ BindRepeating(Functor&& functor, Args&&... args) {
std::forward<Args>(args)...));
}

} // namespace internal

// Unannotated Bind.
// TODO(tzik): Deprecate this and migrate to OnceCallback and
// RepeatingCallback, once they get ready.
template <typename Functor, typename... Args>
inline Callback<MakeUnboundRunType<Functor, Args...>>
Bind(Functor&& functor, Args&&... args) {
return internal::BindRepeating(std::forward<Functor>(functor),
std::forward<Args>(args)...);
return BindRepeating(std::forward<Functor>(functor),
std::forward<Args>(args)...);
}

} // namespace base
Expand Down
8 changes: 0 additions & 8 deletions base/bind_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ using ::testing::Return;
using ::testing::StrictMock;

namespace base {

using internal::OnceCallback;
using internal::RepeatingCallback;
using internal::OnceClosure;
using internal::RepeatingClosure;
using internal::BindOnce;
using internal::BindRepeating;

namespace {

class IncompleteType;
Expand Down
3 changes: 0 additions & 3 deletions base/callback_forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class Callback;
// will be used in a lot of APIs with delayed execution.
using Closure = Callback<void()>;

namespace internal {

template <typename Signature>
using OnceCallback = Callback<Signature,
internal::CopyMode::MoveOnly,
Expand All @@ -45,7 +43,6 @@ using RepeatingCallback = Callback<Signature,
using OnceClosure = OnceCallback<void()>;
using RepeatingClosure = RepeatingCallback<void()>;

} // namespace internal
} // namespace base

#endif // BASE_CALLBACK_FORWARD_H_

0 comments on commit 07dbcfd

Please sign in to comment.