Bug 1250782 - FxAccountClient: remove post method unused argument delegate. r=eoger
authorEdouard Oger <eoger@fastmail.com>
Thu, 26 May 2016 15:47:00 -0700
changeset 304077 5ee8820711c14c560dea339529f8e42d6033a671
parent 304076 5013e7bb1c9fb049cfeb8546caf5cd504a57114e
child 304078 f60d8a9c1a17fe11082082b1e6620935b8f8895c
push id30411
push userkwierso@gmail.com
push dateFri, 08 Jul 2016 00:26:45 +0000
treeherdermozilla-central@23dc78b7b57e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseoger
bugs1250782
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1250782 - FxAccountClient: remove post method unused argument delegate. r=eoger MozReview-Commit-ID: 7jqQ7KWZJf2
mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java
@@ -304,17 +304,17 @@ public class FxAccountClient20 implement
 
       // The basics.
       final Locale locale = Locale.getDefault();
       request.addHeader(HttpHeaders.ACCEPT_LANGUAGE, Locales.getLanguageTag(locale));
       request.addHeader(HttpHeaders.ACCEPT, ACCEPT_HEADER);
     }
   }
 
-  protected <T> void post(BaseResource resource, final ExtendedJSONObject requestBody, final RequestDelegate<T> delegate) {
+  protected <T> void post(BaseResource resource, final ExtendedJSONObject requestBody) {
     if (requestBody == null) {
       resource.post((HttpEntity) null);
     } else {
       resource.post(requestBody);
     }
   }
 
   @SuppressWarnings("static-method")
@@ -572,17 +572,17 @@ public class FxAccountClient20 implement
         String cert = body.getString("cert");
         if (cert == null) {
           delegate.handleError(new FxAccountClientException("cert must be a non-null string"));
           return;
         }
         delegate.handleSuccess(cert);
       }
     };
-    post(resource, body, delegate);
+    post(resource, body);
   }
 
   protected static final String[] LOGIN_RESPONSE_REQUIRED_STRING_FIELDS = new String[] { JSON_KEY_UID, JSON_KEY_SESSIONTOKEN };
   protected static final String[] LOGIN_RESPONSE_REQUIRED_STRING_FIELDS_KEYS = new String[] { JSON_KEY_UID, JSON_KEY_SESSIONTOKEN, JSON_KEY_KEYFETCHTOKEN, };
   protected static final String[] LOGIN_RESPONSE_REQUIRED_BOOLEAN_FIELDS = new String[] { JSON_KEY_VERIFIED };
 
   /**
    * Thin container for login response.
@@ -646,17 +646,17 @@ public class FxAccountClient20 implement
           keyFetchToken = Utils.hex2Byte(body.getString(JSON_KEY_KEYFETCHTOKEN));
         }
         LoginResponse loginResponse = new LoginResponse(new String(emailUTF8, "UTF-8"), uid, verified, sessionToken, keyFetchToken);
 
         delegate.handleSuccess(loginResponse);
       }
     };
 
-    post(resource, body, delegate);
+    post(resource, body);
   }
 
   public void createAccount(final byte[] emailUTF8, final byte[] quickStretchedPW,
                             final boolean getKeys,
                             final boolean preVerified,
                             final Map<String, String> queryParameters,
                             final RequestDelegate<LoginResponse> delegate) {
     final BaseResource resource;
@@ -696,17 +696,17 @@ public class FxAccountClient20 implement
           keyFetchToken = Utils.hex2Byte(body.getString(JSON_KEY_KEYFETCHTOKEN));
         }
         LoginResponse loginResponse = new LoginResponse(new String(emailUTF8, "UTF-8"), uid, verified, sessionToken, keyFetchToken);
 
         delegate.handleSuccess(loginResponse);
       }
     };
 
-    post(resource, body, delegate);
+    post(resource, body);
   }
 
   /**
    * We want users to be able to enter their email address case-insensitively.
    * We stretch the password locally using the email address as a salt, to make
    * dictionary attacks more expensive. This means that a client with a
    * case-differing email address is unable to produce the correct
    * authorization, even though it knows the password. In this case, the server
@@ -811,17 +811,17 @@ public class FxAccountClient20 implement
         try {
           delegate.handleSuccess(FxAccountDevice.fromJson(body));
         } catch (Exception e) {
           delegate.handleError(e);
         }
       }
     };
 
-    post(resource, body, delegate);
+    post(resource, body);
   }
 
   @Override
   public void deviceList(byte[] sessionToken, RequestDelegate<FxAccountDevice[]> delegate) {
     final byte[] tokenId = new byte[32];
     final byte[] reqHMACKey = new byte[32];
     final byte[] requestKey = new byte[32];
     try {