Commit 16a93108 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Convert indirect uses of TestingFactoryFunction

TestingFactoryFunction is a simple function pointer. It is
deprecated in favor of TestingFactory which is a Callback<>.
Convert indirect uses by using base::BindRepeating() in all
invocation of SetTestingFactory/AddTestingFactory.

This converts uses in src//chrome/browser/android/signin.

This CL was uploaded by git cl split.

R=bsazonov@chromium.org

Bug: 809610
Change-Id: I6f1d6fcc1e311286e193d7be174fc5cf6687c309
Reviewed-on: https://chromium-review.googlesource.com/c/1258360
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596564}
parent 8e7d31d0
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include "base/bind.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -71,7 +72,7 @@ class SigninManagerAndroidTest : public ::testing::Test { ...@@ -71,7 +72,7 @@ class SigninManagerAndroidTest : public ::testing::Test {
// Creating a BookmarkModel also a creates a StubOfflinePageModel. // Creating a BookmarkModel also a creates a StubOfflinePageModel.
// We need to replace this with a mock that responds to deletions. // We need to replace this with a mock that responds to deletions.
offline_pages::OfflinePageModelFactory::GetInstance()->SetTestingFactory( offline_pages::OfflinePageModelFactory::GetInstance()->SetTestingFactory(
profile_, BuildOfflinePageModel); profile_, base::BindRepeating(&BuildOfflinePageModel));
bookmarks::BookmarkModel* bookmark_model = bookmarks::BookmarkModel* bookmark_model =
BookmarkModelFactory::GetForBrowserContext(profile_); BookmarkModelFactory::GetForBrowserContext(profile_);
bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment