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

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

Issue 2872743003: Change AccountManagerHelper initialization
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.components.signin; 5 package org.chromium.components.signin;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.content.BroadcastReceiver; 8 import android.content.BroadcastReceiver;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 private void setIsChildAccount(boolean isChildAccount) { 86 private void setIsChildAccount(boolean isChildAccount) {
87 Log.d(TAG, "Setting child account status for %s to %s", mAccount.name, 87 Log.d(TAG, "Setting child account status for %s to %s", mAccount.name,
88 Boolean.toString(isChildAccount)); 88 Boolean.toString(isChildAccount));
89 nativeSetIsChildAccount(mNativeAccountFetcherService, mAccountId, isChil dAccount); 89 nativeSetIsChildAccount(mNativeAccountFetcherService, mAccountId, isChil dAccount);
90 } 90 }
91 91
92 @CalledByNative 92 @CalledByNative
93 private static void initializeForTests() { 93 private static void initializeForTests() {
94 Context context = ContextUtils.getApplicationContext();
95 AccountManagerDelegate delegate = new SystemAccountManagerDelegate(); 94 AccountManagerDelegate delegate = new SystemAccountManagerDelegate();
96 AccountManagerHelper.overrideAccountManagerHelperForTests(context, deleg ate); 95 AccountManagerHelper.overrideAccountManagerHelperForTests(delegate);
97 } 96 }
98 97
99 private static native void nativeSetIsChildAccount( 98 private static native void nativeSetIsChildAccount(
100 long accountFetcherServicePtr, String accountId, boolean isChildAcco unt); 99 long accountFetcherServicePtr, String accountId, boolean isChildAcco unt);
101 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698