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

Unified Diff: components/sync/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.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/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java
diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java b/components/sync/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java
similarity index 94%
rename from sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java
rename to components/sync/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java
index 2255cff917ffad0e0c1b95eb88fef83996325ddb..7f227be80ae7ef8817512a3abb3cb49e0707ceb3 100644
--- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java
+++ b/components/sync/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java
@@ -2,7 +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.notifier;
+package org.chromium.components.sync.notifier;
import android.accounts.Account;
import android.content.SharedPreferences;
@@ -77,7 +77,7 @@ public class InvalidationPreferences {
static final String SYNC_TANGO_INTERNAL_STATE = "sync_tango_internal_state";
}
- private static final String TAG = "InvalidationPreferences";
+ private static final String TAG = "InvalidationPrefs";
// Only one commit call can be in progress at a time.
private static final Object sCommitLock = new Object();
@@ -104,7 +104,8 @@ public class InvalidationPreferences {
}
/** Returns the saved sync types, or {@code null} if none exist. */
- @Nullable public Set<String> getSavedSyncedTypes() {
+ @Nullable
+ public Set<String> getSavedSyncedTypes() {
SharedPreferences preferences = ContextUtils.getAppSharedPreferences();
Set<String> syncedTypes = preferences.getStringSet(PrefKeys.SYNC_TANGO_TYPES, null);
// Wrap with unmodifiableSet to ensure it's never modified. See crbug.com/568369.
@@ -147,7 +148,8 @@ public class InvalidationPreferences {
}
/** Returns the saved account, or {@code null} if none exists. */
- @Nullable public Account getSavedSyncedAccount() {
+ @Nullable
+ public Account getSavedSyncedAccount() {
SharedPreferences preferences = ContextUtils.getAppSharedPreferences();
String accountName = preferences.getString(PrefKeys.SYNC_ACCT_NAME, null);
String accountType = preferences.getString(PrefKeys.SYNC_ACCT_TYPE, null);
@@ -164,7 +166,8 @@ public class InvalidationPreferences {
}
/** Returns the notification client internal state. */
- @Nullable public byte[] getInternalNotificationClientState() {
+ @Nullable
+ public byte[] getInternalNotificationClientState() {
SharedPreferences preferences = ContextUtils.getAppSharedPreferences();
String base64State = preferences.getString(PrefKeys.SYNC_TANGO_INTERNAL_STATE, null);
if (base64State == null) {
@@ -175,8 +178,8 @@ public class InvalidationPreferences {
/** Sets the notification client internal state to {@code state}. */
public void setInternalNotificationClientState(EditContext editContext, byte[] state) {
- editContext.mEditor.putString(PrefKeys.SYNC_TANGO_INTERNAL_STATE,
- Base64.encodeToString(state, Base64.DEFAULT));
+ editContext.mEditor.putString(
+ PrefKeys.SYNC_TANGO_INTERNAL_STATE, Base64.encodeToString(state, Base64.DEFAULT));
}
/** Converts the given object id to a string for storage in preferences. */

Powered by Google App Engine
This is Rietveld 408576698