Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc

Issue 2786023002: [Remote suggestions] Remove the unique_ptr wrapper around callbacks (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
index b3774f5d6b43495eafaf2a32c1c82cf092c893a1..a23d2506c31a990f44d75a528c7d43ec4be1efae 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
@@ -72,22 +72,10 @@ class MockRemoteSuggestionsProvider : public RemoteSuggestionsProvider {
public:
MockRemoteSuggestionsProvider(Observer* observer)
: RemoteSuggestionsProvider(observer) {}
- // Move-only params are not supported by GMock. We want to mock out
- // RefetchInTheBackground() which takes a unique_ptr<>. Instead, we add a new
- // mock function which takes a copy of the callback and override the
- // RemoteSuggestionsProvider's method to forward the call into the new mock
- // function.
- void RefetchInTheBackground(
- std::unique_ptr<RemoteSuggestionsProvider::FetchStatusCallback> callback)
- override {
- RefetchInTheBackground(*callback);
- }
MOCK_METHOD1(RefetchInTheBackground,
- void(RemoteSuggestionsProvider::FetchStatusCallback));
-
+ void(const RemoteSuggestionsProvider::FetchStatusCallback&));
MOCK_CONST_METHOD0(suggestions_fetcher_for_debugging,
const RemoteSuggestionsFetcher*());
-
MOCK_METHOD1(GetCategoryStatus, CategoryStatus(Category));
MOCK_METHOD1(GetCategoryInfo, CategoryInfo(Category));
MOCK_METHOD3(ClearHistory,
« no previous file with comments | « components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698