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

Unified Diff: components/sync/test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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: components/sync/test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java
diff --git a/sync/test/android/javatests/src/org/chromium/sync/test/util/MockSyncContentResolverDelegate.java b/components/sync/test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java
similarity index 93%
rename from sync/test/android/javatests/src/org/chromium/sync/test/util/MockSyncContentResolverDelegate.java
rename to components/sync/test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java
index 80a97a276ff831b09025f633bbf5794aa18da262..25be4801ea0edadc5fa7b6df5d2e2ef743cecce7 100644
--- a/sync/test/android/javatests/src/org/chromium/sync/test/util/MockSyncContentResolverDelegate.java
+++ b/components/sync/test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.sync.test.util;
-
+package org.chromium.components.sync.test.util;
import android.accounts.Account;
import android.content.ContentResolver;
@@ -15,7 +14,7 @@ import junit.framework.Assert;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
-import org.chromium.sync.SyncContentResolverDelegate;
+import org.chromium.components.sync.SyncContentResolverDelegate;
import java.util.HashMap;
import java.util.HashSet;
@@ -24,7 +23,6 @@ import java.util.Set;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
-
/**
* Mock implementation of the {@link SyncContentResolverDelegate}.
*
@@ -32,7 +30,6 @@ import java.util.concurrent.TimeUnit;
* SYNC_OBSERVER_TYPE_SETTINGS.
*/
public class MockSyncContentResolverDelegate implements SyncContentResolverDelegate {
-
private final Set<String> mSyncAutomaticallySet;
private final Map<String, Boolean> mIsSyncableMap;
private final Object mSyncableMapLock = new Object();
@@ -128,8 +125,8 @@ public class MockSyncContentResolverDelegate implements SyncContentResolverDeleg
}
break;
default:
- throw new IllegalArgumentException("Unable to understand syncable argument: "
- + syncable);
+ throw new IllegalArgumentException(
+ "Unable to understand syncable argument: " + syncable);
}
}
notifyObservers();
@@ -148,8 +145,7 @@ public class MockSyncContentResolverDelegate implements SyncContentResolverDeleg
}
@Override
- public void removePeriodicSync(Account account, String authority, Bundle extras) {
- }
+ public void removePeriodicSync(Account account, String authority, Bundle extras) {}
private static String createKey(Account account, String authority) {
return account.name + "@@@" + account.type + "@@@" + authority;
@@ -182,9 +178,9 @@ public class MockSyncContentResolverDelegate implements SyncContentResolverDeleg
mDisableObserverNotifications = true;
}
- /**
- * Simulate an account rename, which copies settings to the new account.
- */
+ /**
+ * Simulate an account rename, which copies settings to the new account.
+ */
public void renameAccounts(Account oldAccount, Account newAccount, String authority) {
int oldIsSyncable = getIsSyncable(oldAccount, authority);
setIsSyncable(newAccount, authority, oldIsSyncable);
@@ -195,7 +191,6 @@ public class MockSyncContentResolverDelegate implements SyncContentResolverDeleg
}
private static class AsyncSyncStatusObserver {
-
private final SyncStatusObserver mSyncStatusObserver;
private AsyncSyncStatusObserver(SyncStatusObserver syncStatusObserver) {
@@ -218,8 +213,7 @@ public class MockSyncContentResolverDelegate implements SyncContentResolverDeleg
}
}.execute();
} else {
- mSyncStatusObserver.onStatusChanged(
- ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS);
+ mSyncStatusObserver.onStatusChanged(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS);
pendingObserverCount.release();
}
}

Powered by Google App Engine
This is Rietveld 408576698