1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/tests/background/junit3/src/sync/helpers/SimpleSuccessFetchDelegate.java Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +package org.mozilla.gecko.background.sync.helpers; 1.8 + 1.9 +import java.util.concurrent.ExecutorService; 1.10 + 1.11 +import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionFetchRecordsDelegate; 1.12 +import org.mozilla.gecko.sync.repositories.domain.Record; 1.13 + 1.14 +public abstract class SimpleSuccessFetchDelegate extends DefaultDelegate implements 1.15 + RepositorySessionFetchRecordsDelegate { 1.16 + @Override 1.17 + public void onFetchFailed(Exception ex, Record record) { 1.18 + performNotify("Fetch failed", ex); 1.19 + } 1.20 + 1.21 + @Override 1.22 + public RepositorySessionFetchRecordsDelegate deferredFetchDelegate(ExecutorService executor) { 1.23 + return this; 1.24 + } 1.25 +}