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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/CreditCardScanner.java

Issue 2784353002: Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: Fix tests 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/autofill/CreditCardScanner.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/CreditCardScanner.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/CreditCardScanner.java
index d78e4591c27c045aa7dfe05f3d22df5803e8179b..68715f19b84ad7ee11be3d2b4a4886026de61252 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/CreditCardScanner.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/CreditCardScanner.java
@@ -4,8 +4,6 @@
package org.chromium.chrome.browser.autofill;
-import android.content.Context;
-
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.content_public.browser.WebContents;
@@ -24,10 +22,6 @@ public class CreditCardScanner {
/** The delegate to notify of scanning result. */
protected final Delegate mDelegate;
- /** Application context. Used in subclass. */
- @SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
- protected final Context mContext;
-
/** The web contents that's requesting a scan. Used in subclass. */
@SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
protected final WebContents mWebContents;
@@ -37,12 +31,11 @@ public class CreditCardScanner {
/**
* Builds an instance of credit card scanner.
*
- * @param context Application context.
* @param webContents The web contents that are requesting a scan.
* @param delegate The delegate to notify of scanning result.
* @return An object that can scan a credit card.
*/
- CreditCardScanner create(Context context, WebContents webContents, Delegate delegate);
+ CreditCardScanner create(WebContents webContents, Delegate delegate);
}
/** The delegate for credit card scanning. */
@@ -76,26 +69,21 @@ public class CreditCardScanner {
/**
* Creates an instance of a credit card scanner.
*
- * @param context Application context.
* @param webContents The web contents that are requesting a scan.
* @param delegate The delegate to notify of scanning result.
* @return An object that can scan a credit card.
*/
- public static CreditCardScanner create(
- Context context, WebContents webContents, Delegate delegate) {
- return sFactory != null ? sFactory.create(context, webContents, delegate)
- : new CreditCardScanner(context, webContents, delegate);
+ public static CreditCardScanner create(WebContents webContents, Delegate delegate) {
+ return sFactory != null ? sFactory.create(webContents, delegate)
+ : new CreditCardScanner(webContents, delegate);
}
/**
* Constructor for the credit card scanner.
- *
- * @param context Application context.
- * @param webContents The web contents that are requesting a scan.
+ * @param webContents The web contents that are requesting a scan.
* @param delegate The delegate to notify of scanning result.
*/
- protected CreditCardScanner(Context context, WebContents webContents, Delegate delegate) {
- mContext = context;
+ protected CreditCardScanner(WebContents webContents, Delegate delegate) {
mWebContents = webContents;
mDelegate = delegate;
}

Powered by Google App Engine
This is Rietveld 408576698