Commit b8ec794f authored by Nick Burris's avatar Nick Burris Committed by Chromium LUCI CQ

Create LegacyExternalAuthUtils

* Create LegacyExternalAuthUtils and related classes, which
  are empty subclasses of the ExternalAuthUtils classes. These will be
  referenced downstream temporarily while ExternalAuthUtils is moved to
  //components.
* Create empty new target //components/externalauth/android:java so we
  can add the downstream dependency before the migration.

This is patch 2/6 for refactoring ExternalAuthUtils into //components.

Bug: 1144858
Change-Id: I928ee2998f7042c85e64d8e91e275d23b789fc79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568689
Commit-Queue: Nick Burris <nburris@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835776}
parent 50e27d04
...@@ -16,6 +16,9 @@ android_library("java") { ...@@ -16,6 +16,9 @@ android_library("java") {
] ]
sources = [ sources = [
"java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java", "java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java",
"java/src/org/chromium/chrome/browser/externalauth/LegacyExternalAuthUtils.java",
"java/src/org/chromium/chrome/browser/externalauth/LegacyUserRecoverableErrorHandler.java",
"java/src/org/chromium/chrome/browser/externalauth/LegacyVerifiedHandler.java",
"java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java", "java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java",
"java/src/org/chromium/chrome/browser/externalauth/VerifiedHandler.java", "java/src/org/chromium/chrome/browser/externalauth/VerifiedHandler.java",
] ]
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.externalauth;
/**
* Temporary class, identical to {@link ExternalAuthUtils}, for migration.
*
* This class will be referenced temporarily while ExternalAuthUtils is moved to components.
*
* TODO(crbug.com/1144858): Remove this class after downstream uses
* components.externalauth.ExternalAuthUtils.
*/
public class LegacyExternalAuthUtils extends ExternalAuthUtils {
public boolean canUseGooglePlayServices(final LegacyUserRecoverableErrorHandler errorHandler) {
return super.canUseGooglePlayServices(errorHandler);
}
public boolean canUseFirstPartyGooglePlayServices(
LegacyUserRecoverableErrorHandler userRecoverableErrorHandler) {
return super.canUseFirstPartyGooglePlayServices(userRecoverableErrorHandler);
}
}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.externalauth;
import android.content.Context;
/**
* Temporary class, identical to {@link UserRecoverableErrorHandler}, for migration.
*
* This class will be referenced temporarily while UserRecoverableErrorHandler is moved to
* components.
*
* TODO(crbug.com/1144858): Remove this class after downstream uses
* components.externalauth.UserRecoverableErrorHandler.
*/
public abstract class LegacyUserRecoverableErrorHandler extends UserRecoverableErrorHandler {
public static final class Silent extends LegacyUserRecoverableErrorHandler {
@Override
protected final void handle(final Context context, final int errorCode) {}
}
}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.externalauth;
import android.content.Context;
/**
* Temporary class, identical to {@link VerifiedHandler}, for migration.
*
* This class will be referenced temporarily while VerifiedHandler is moved to components.
*
* TODO(crbug.com/1144858): Remove this class after downstream uses
* components.externalauth.VerifiedHandler.
*/
public class LegacyVerifiedHandler extends VerifiedHandler {
public LegacyVerifiedHandler(
Context context, LegacyExternalAuthUtils externalAuthUtils, int authRequirements) {
super(context, externalAuthUtils, authRequirements);
}
}
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
java_group("java") {
# Temporary empty target for migrating downstream dependency.
}
monorail {
component: "Internals>Core"
}
os: ANDROID
peconn@chromium.org
eirage@chromium.org
The externalauth component provides utilities for external authentication, such
as whether the current Chrome build is Google-signed, or whether Google Play
Services is available. ExternalAuthUtils is the main class of the component, and
the other classes are helpers used by ExternalAuthUtils and its callers.
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