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

Unified Diff: components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java

Issue 2836373003: Reland of Reimplement AccountManagerHelper singleton instance creation (Closed)
Patch Set: Fixed ClearBrowsingDataPreferencesTest Created 3 years, 8 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
Index: components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java
diff --git a/components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java b/components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java
index b2e8ae19d8cb63222b649b251ee2cf3f4382099e..42969b7d6abb7dd90b16484d23ee06ca05dbf58e 100644
--- a/components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java
@@ -89,6 +89,13 @@ public final class ChildAccountInfoFetcher {
nativeSetIsChildAccount(mNativeAccountFetcherService, mAccountId, isChildAccount);
}
+ @CalledByNative
+ private static void initializeForTests() {
+ Context context = ContextUtils.getApplicationContext();
+ AccountManagerDelegate delegate = new SystemAccountManagerDelegate();
+ AccountManagerHelper.overrideAccountManagerHelperForTests(context, delegate);
+ }
+
private static native void nativeSetIsChildAccount(
long accountFetcherServicePtr, String accountId, boolean isChildAccount);
}

Powered by Google App Engine
This is Rietveld 408576698