This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back supervised user patch to extensions
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
patches/Extensions/base/fix-disabled-supervised-user.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From: Wengling Chen <[email protected]> | ||
Date: Sat, 30 May 2020 18:25:38 -0400 | ||
Subject: fix for enable_supervised_users=false | ||
|
||
--- | ||
chrome/android/BUILD.gn | 1 | ||
chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | 14 ---------- | ||
2 files changed, 15 deletions(-) | ||
|
||
--- a/chrome/android/BUILD.gn | ||
+++ b/chrome/android/BUILD.gn | ||
@@ -2718,7 +2718,6 @@ generate_jni("chrome_jni_headers") { | ||
"java/src/org/chromium/chrome/browser/browsing_data/BrowsingDataCounterBridge.java", | ||
"java/src/org/chromium/chrome/browser/browsing_data/UrlFilterBridge.java", | ||
"java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java", | ||
- "java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java", | ||
"java/src/org/chromium/chrome/browser/complex_tasks/TaskTabHelper.java", | ||
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java", | ||
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java", | ||
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | ||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | ||
@@ -60,32 +60,18 @@ public class ChildAccountService { | ||
* @param callback the callback to be called when the status changes. | ||
*/ | ||
public static void listenForStatusChange(Callback<Boolean> callback) { | ||
- ChildAccountServiceJni.get().listenForChildStatusReceived(callback); | ||
} | ||
|
||
- @CalledByNative | ||
private static void reauthenticateChildAccount( | ||
WindowAndroid windowAndroid, String accountName, final long nativeCallback) { | ||
ThreadUtils.assertOnUiThread(); | ||
|
||
Activity activity = windowAndroid.getActivity().get(); | ||
if (activity == null) { | ||
- PostTask.postTask(UiThreadTaskTraits.DEFAULT, | ||
- () | ||
- -> ChildAccountServiceJni.get().onReauthenticationResult( | ||
- nativeCallback, false)); | ||
return; | ||
} | ||
|
||
Account account = AccountUtils.createAccountFromName(accountName); | ||
- AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity, | ||
- result | ||
- -> ChildAccountServiceJni.get().onReauthenticationResult(nativeCallback, result)); | ||
} | ||
|
||
- @NativeMethods | ||
- interface Natives { | ||
- void listenForChildStatusReceived(Callback<Boolean> callback); | ||
- void onReauthenticationResult(long callbackPtr, boolean reauthSuccessful); | ||
- } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters