Bug 1392505 - Pre: remove unused delegate interface r=rnewman
MozReview-Commit-ID: K93rK1pILky
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/synchronizer/RecordsChannelDelegate.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/synchronizer/RecordsChannelDelegate.java
@@ -4,10 +4,9 @@
package org.mozilla.gecko.sync.synchronizer;
public interface RecordsChannelDelegate {
public void onFlowCompleted(RecordsChannel recordsChannel, long fetchEnd, long storeEnd);
public void onFlowBeginFailed(RecordsChannel recordsChannel, Exception ex);
public void onFlowFetchFailed(RecordsChannel recordsChannel, Exception ex);
public void onFlowStoreFailed(RecordsChannel recordsChannel, Exception ex, String recordGuid);
- public void onFlowFinishFailed(RecordsChannel recordsChannel, Exception ex);
}
\ No newline at end of file
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/synchronizer/SynchronizerSession.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/synchronizer/SynchronizerSession.java
@@ -219,22 +219,16 @@ implements RecordsChannelDelegate,
@Override
public void onFlowStoreFailed(RecordsChannel recordsChannel, Exception ex, String recordGuid) {
Logger.warn(LOG_TAG, "First RecordsChannel onFlowStoreFailed. Logging local store error.", ex);
// Currently we're just recording the very last exception which occurred. This is a reasonable
// approach, but ideally we'd want to categorize the exceptions and count them for the purposes
// of better telemetry. See Bug 1362208.
storeFailedCauseException = ex;
}
-
- @Override
- public void onFlowFinishFailed(RecordsChannel recordsChannel, Exception ex) {
- Logger.warn(LOG_TAG, "First RecordsChannel onFlowFinishedFailed. Logging session error.", ex);
- session.delegate.onSynchronizeFailed(session, ex, "Failed to finish first flow.");
- }
};
// This is the *first* channel to flow.
channelAToB = new RecordsChannel(this.sessionA, this.sessionB, channelAToBDelegate);
Logger.trace(LOG_TAG, "Starting A to B flow. Channel is " + channelAToB);
try {
channelAToB.beginAndFlow();
@@ -308,22 +302,16 @@ implements RecordsChannelDelegate,
Logger.warn(LOG_TAG, "Second RecordsChannel onFlowFetchFailed. Logging local fetch error.", ex);
}
@Override
public void onFlowStoreFailed(RecordsChannel recordsChannel, Exception ex, String recordGuid) {
Logger.warn(LOG_TAG, "Second RecordsChannel onFlowStoreFailed. Logging remote store error.", ex);
}
- @Override
- public void onFlowFinishFailed(RecordsChannel recordsChannel, Exception ex) {
- Logger.warn(LOG_TAG, "Second RecordsChannel onFlowFinishedFailed. Logging session error.", ex);
- this.delegate.onSynchronizeFailed(this, ex, "Failed to finish second flow.");
- }
-
/*
* RepositorySessionCreationDelegate methods.
*/
/**
* I could be called twice: once for sessionA and once for sessionB.
*
* I try to clean up sessionA if it is not null, since the creation of
--- a/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestRecordsChannel.java
+++ b/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestRecordsChannel.java
@@ -72,21 +72,16 @@ public class TestRecordsChannel {
@Override
public void onFlowStoreFailed(RecordsChannel recordsChannel, Exception ex, String recordGuid) {
numFlowStoreFailed.incrementAndGet();
storeException = ex;
}
@Override
- public void onFlowFinishFailed(RecordsChannel recordsChannel, Exception ex) {
- flowFinishFailed.set(true);
- WaitHelper.getTestWaiter().performNotify();
- }
-
@Override
public void onFlowCompleted(RecordsChannel recordsChannel, long fetchEnd, long storeEnd) {
numFlowCompleted.incrementAndGet();
try {
sinkSession.finish(new ExpectSuccessRepositorySessionFinishDelegate(WaitHelper.getTestWaiter()) {
@Override
public void onFinishSucceeded(RepositorySession session, RepositorySessionBundle bundle) {
try {