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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java

Issue 2806023003: Remove vestigial Context arguments in ExternalAuthUtils, part 3/3 (Closed)
Patch Set: 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: chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
index db9ea63f6b9c90809e9f1f068144d86ca1634ff1..37f89e6258cf0f602408ea129750963b7a9d3854 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
@@ -90,34 +90,12 @@ public class ExternalAuthUtils {
return true;
}
- // TODO(paulmiller): Remove; replaced by no-argument isChromeGoogleSigned().
- /**
- * Returns whether the current build of Chrome is a Google-signed package.
- *
- * @param context the current context.
- * @return whether the currently running application is signed with Google keys.
- */
- public boolean isChromeGoogleSigned(Context context) {
- return isGoogleSigned(context, context.getPackageName());
- }
-
/**
* Returns whether the current build of Chrome is a Google-signed package.
* @return whether the currently running application is signed with Google keys.
*/
public boolean isChromeGoogleSigned() {
String packageName = ContextUtils.getApplicationContext().getPackageName();
- return isGoogleSigned(null, packageName);
- }
-
- // TODO(paulmiller): Remove; replaced by isGoogleSigned(String).
- /**
- * Returns whether the call is originating from a Google-signed package.
- * @param appContext the current context.
- * @param packageName The package name to inquire about.
- */
- public boolean isGoogleSigned(Context context, String packageName) {
- // This is overridden in a subclass.
return isGoogleSigned(packageName);
}
@@ -149,7 +127,7 @@ public class ExternalAuthUtils {
for (String packageName : callingPackages) {
if (!TextUtils.isEmpty(packageToMatch) && !packageName.equals(packageToMatch)) continue;
matchFound = true;
- if ((shouldBeGoogleSigned && !isGoogleSigned(context, packageName))
+ if ((shouldBeGoogleSigned && !isGoogleSigned(packageName))
|| (shouldBeSystem && !isSystemBuild(pm, packageName))) {
return false;
}
@@ -263,7 +241,7 @@ public class ExternalAuthUtils {
public boolean canUseFirstPartyGooglePlayServices(
Context context, UserRecoverableErrorHandler userRecoverableErrorHandler) {
return canUseGooglePlayServices(context, userRecoverableErrorHandler)
- && isChromeGoogleSigned(context);
+ && isChromeGoogleSigned();
}
/**

Powered by Google App Engine
This is Rietveld 408576698