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

Unified Diff: sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java

Issue 565743002: Remove most usages of guava. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 3 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: sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java b/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
index 11cc4c442b3761d496e1f0362ad4109d108e16b9..3d96e03c96af7a2fc436d3593eb58a3a3b6e1e56 100644
--- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
+++ b/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
@@ -7,7 +7,6 @@ package org.chromium.sync.notifier;
import android.accounts.Account;
import android.content.Intent;
-import com.google.common.base.Preconditions;
import com.google.ipc.invalidation.external.client.types.ObjectId;
import com.google.protos.ipc.invalidation.Types;
@@ -87,8 +86,10 @@ public class InvalidationIntentProtocol {
*/
public static Intent createRegisterIntent(Account account, int[] objectSources,
String[] objectNames) {
- Preconditions.checkArgument(objectSources.length == objectNames.length,
- "objectSources and objectNames must have the same length");
+ if (objectSources.length != objectNames.length) {
+ throw new IllegalArgumentException(
+ "objectSources and objectNames must have the same length");
+ }
// Add all non-Sync objects to new lists.
ArrayList<Integer> sources = new ArrayList<Integer>();

Powered by Google App Engine
This is Rietveld 408576698