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

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

Issue 2800013002: Remove vestigial Context arguments in ExternalAuthUtils, part 1/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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f998065dc3edb7ff2270dd05434804556705f987..db9ea63f6b9c90809e9f1f068144d86ca1634ff1 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
@@ -17,6 +17,7 @@ import android.text.TextUtils;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
@@ -89,6 +90,7 @@ 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.
*
@@ -100,12 +102,31 @@ public class ExternalAuthUtils {
}
/**
+ * 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);
Maria 2017/04/06 23:23:15 shouldn't you be calling isGoogleSigned(packageNam
paulmiller 2017/04/06 23:25:56 Not yet. Downstream still overrides the old isGoog
Maria 2017/04/06 23:37:10 There's no reason not to switch it right now. This
+ }
+
+ // 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);
+ }
+
+ /**
+ * Returns whether the call is originating from a Google-signed package.
+ * @param packageName The package name to inquire about.
+ */
+ public boolean isGoogleSigned(String packageName) {
+ // This is overridden in a subclass.
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698