Commit b728a754 authored by paulmiller's avatar paulmiller Committed by Commit bot

Remove vestigial Context arguments in ExternalAuthUtils, part 1/3

BUG=709208

Review-Url: https://codereview.chromium.org/2800013002
Cr-Commit-Position: refs/heads/master@{#462737}
parent 9bfd22cb
......@@ -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.
*
......@@ -99,12 +101,31 @@ public class ExternalAuthUtils {
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);
}
/**
* 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;
}
......
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