Bug 844437 - pre: Remove unused Android Sync files. r=trivial
authorNick Alexander <nalexander@mozilla.com>
Wed, 27 Feb 2013 15:44:17 -0800
changeset 123245 fc7bd8b3cb09395034a2737818864c2e86ac14ab
parent 123244 37016e66676a106b6d9efdea08cef95c5274d205
child 123246 d1597e9d7d89799a2983294ad83c45b0e148c759
push id23750
push usernalexander@mozilla.com
push dateWed, 27 Feb 2013 23:44:43 +0000
treeherdermozilla-inbound@10b24d689f27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial
bugs844437
milestone22.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 844437 - pre: Remove unused Android Sync files. r=trivial
mobile/android/base/sync/jpake/JPakeRequest.java
mobile/android/base/sync/jpake/JPakeRequestDelegate.java
mobile/android/base/sync/jpake/JPakeResponse.java
mobile/android/base/sync/net/SyncResourceDelegate.java
deleted file mode 100644
--- a/mobile/android/base/sync/jpake/JPakeRequest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.jpake;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.mozilla.gecko.sync.net.BaseResource;
-import org.mozilla.gecko.sync.net.Resource;
-import org.mozilla.gecko.sync.net.ResourceDelegate;
-
-import ch.boye.httpclientandroidlib.HttpEntity;
-
-public class JPakeRequest implements Resource {
-  private BaseResource resource;
-  public JPakeRequestDelegate delegate;
-
-  public JPakeRequest(String uri, ResourceDelegate delegate) throws URISyntaxException {
-    this(new URI(uri), delegate);
-  }
-
-  public JPakeRequest(URI uri, ResourceDelegate delegate) {
-    this.resource = new BaseResource(uri);
-    this.resource.delegate = delegate;
-  }
-
-  @Override
-  public void get() {
-    this.resource.get();
-  }
-
-  @Override
-  public void delete() {
-    this.resource.delete();
-  }
-
-  @Override
-  public void post(HttpEntity body) {
-    this.resource.post(body);
-  }
-
-  @Override
-  public void put(HttpEntity body) {
-    this.resource.put(body);
-  }
-}
deleted file mode 100644
--- a/mobile/android/base/sync/jpake/JPakeRequestDelegate.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.jpake;
-
-import ch.boye.httpclientandroidlib.HttpResponse;
-
-public interface JPakeRequestDelegate {
-
-  public void onRequestFailure(HttpResponse response);
-  public void onRequestSuccess(HttpResponse response);
-  public void onRequestError(Exception e);
-}
deleted file mode 100644
--- a/mobile/android/base/sync/jpake/JPakeResponse.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.jpake;
-
-import org.mozilla.gecko.sync.net.SyncResponse;
-
-import ch.boye.httpclientandroidlib.HttpResponse;
-
-public class JPakeResponse extends SyncResponse {
-
-  public JPakeResponse(HttpResponse res) {
-    super(res);
-  }
-}
deleted file mode 100644
--- a/mobile/android/base/sync/net/SyncResourceDelegate.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.sync.net;
-
-import ch.boye.httpclientandroidlib.client.methods.HttpRequestBase;
-import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;
-
-/**
- * Shared abstract class for resource delegate that use the same timeouts
- * and no credentials.
- *
- * @author rnewman
- *
- */
-public abstract class SyncResourceDelegate implements ResourceDelegate {
-  public static int connectionTimeoutInMillis = 1000 * 30;     // Wait 30s for a connection to open.
-  public static int socketTimeoutInMillis     = 1000 * 2 * 60; // Wait 2 minutes for data.
-
-  protected Resource resource;
-  public SyncResourceDelegate(Resource resource) {
-    this.resource = resource;
-  }
-
-  @Override
-  public int connectionTimeout() {
-    return connectionTimeoutInMillis;
-  }
-
-  @Override
-  public int socketTimeout() {
-    return socketTimeoutInMillis;
-  }
-
-  @Override
-  public String getCredentials() {
-    return null;
-  }
-
-  @Override
-  public void addHeaders(HttpRequestBase request, DefaultHttpClient client) {
-  }
-}