Commit 0aea215b 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/extensions/api/identity.

This CL was uploaded by git cl split.

R=courage@chromium.org

Bug: 809610
Change-Id: Id702299e37de9a9f224e11f948537c13df068fc6
Reviewed-on: https://chromium-review.googlesource.com/c/1259042
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarMichael Courage <courage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596644}
parent 128c2f6f
......@@ -8,6 +8,7 @@
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
......@@ -436,11 +437,12 @@ class IdentityTestWithSignin : public AsyncExtensionBrowserTest {
// creating the browser so that a bunch of classes don't register as
// observers and end up needing to unregister when the fake is substituted.
SigninManagerFactory::GetInstance()->SetTestingFactory(
context, &BuildFakeSigninManagerBase);
context, base::BindRepeating(&BuildFakeSigninManagerBase));
ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory(
context, &BuildFakeProfileOAuth2TokenService);
context, base::BindRepeating(&BuildFakeProfileOAuth2TokenService));
GaiaCookieManagerServiceFactory::GetInstance()->SetTestingFactory(
context, &BuildFakeGaiaCookieManagerServiceNoFakeUrlFetcher);
context, base::BindRepeating(
&BuildFakeGaiaCookieManagerServiceNoFakeUrlFetcher));
// Ensure that AccountFetcherService is (1) created at all and (2) created
// early enough for it to observe the Profile initialization process and
......
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