LeOSium_old/patches/0003-LeOS/20-39/21 - Allow-building-without...

56 lines
2.6 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:23:04 +01:00
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 21 Feb 2022 01:24:11 +0100
Subject: Allow building without supervised users
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
Change-Id: I7c5b8d4b9f4fe13b692dafee02b62e32d88b1a2f
---
.../browser/supervised_user/ChildAccountService.java | 11 -----------
.../child_accounts/child_account_service_android.cc | 9 ---------
2 files changed, 20 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java b/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
@@ -31,21 +31,10 @@ public class ChildAccountService {
ThreadUtils.assertOnUiThread();
final Activity activity = windowAndroid.getActivity().get();
if (activity == null) {
- PostTask.postTask(TaskTraits.UI_DEFAULT, () -> {
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
- });
return;
}
Account account = AccountUtils.createAccountFromName(accountName);
AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity, success -> {
- if (!success) {
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
- }
});
}
-
- @NativeMethods
- interface Natives {
- void onReauthenticationFailed(long onFailureCallbackPtr);
- }
}
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
--- a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
@@ -39,12 +39,3 @@ void ReauthenticateChildAccount(
env, window_android->GetJavaObject(), ConvertUTF8ToJavaString(env, email),
reinterpret_cast<jlong>(callback_copy.release()));
}
-
-void JNI_ChildAccountService_OnReauthenticationFailed(JNIEnv* env,
- jlong jcallbackPtr) {
- // Cast the pointer value back to a Callback and take ownership of it.
- std::unique_ptr<base::RepeatingCallback<void()>> callback(
- reinterpret_cast<base::RepeatingCallback<void()>*>(jcallbackPtr));
-
- callback->Run();
-}
--
2.40.1