| Index: components/sync/android/java/src/org/chromium/components/sync/PassphraseType.java
|
| diff --git a/sync/android/java/src/org/chromium/sync/PassphraseType.java b/components/sync/android/java/src/org/chromium/components/sync/PassphraseType.java
|
| similarity index 74%
|
| rename from sync/android/java/src/org/chromium/sync/PassphraseType.java
|
| rename to components/sync/android/java/src/org/chromium/components/sync/PassphraseType.java
|
| index 8aa5879366f0876a9cbe86ce1af15b72fad53240..8e56aeb8c9ad1db8b854eaaedc91ebd72083b115 100644
|
| --- a/sync/android/java/src/org/chromium/sync/PassphraseType.java
|
| +++ b/components/sync/android/java/src/org/chromium/components/sync/PassphraseType.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;
|
| +package org.chromium.components.sync;
|
|
|
| import android.os.Parcel;
|
| import android.os.Parcelable;
|
| @@ -18,23 +18,22 @@ import java.util.Set;
|
| * It maps the native enum syncer::PassphraseType.
|
| */
|
| public enum PassphraseType implements Parcelable {
|
| - IMPLICIT_PASSPHRASE(0), // GAIA-based passphrase (deprecated).
|
| - KEYSTORE_PASSPHRASE(1), // Keystore passphrase.
|
| + IMPLICIT_PASSPHRASE(0), // GAIA-based passphrase (deprecated).
|
| + KEYSTORE_PASSPHRASE(1), // Keystore passphrase.
|
| FROZEN_IMPLICIT_PASSPHRASE(2), // Frozen GAIA passphrase.
|
| - CUSTOM_PASSPHRASE(3); // User-provided passphrase.
|
| + CUSTOM_PASSPHRASE(3); // User-provided passphrase.
|
|
|
| - public static Parcelable.Creator CREATOR =
|
| - new Parcelable.Creator<PassphraseType>() {
|
| - @Override
|
| - public PassphraseType createFromParcel(Parcel parcel) {
|
| - return fromInternalValue(parcel.readInt());
|
| - }
|
| + public static Parcelable.Creator CREATOR = new Parcelable.Creator<PassphraseType>() {
|
| + @Override
|
| + public PassphraseType createFromParcel(Parcel parcel) {
|
| + return fromInternalValue(parcel.readInt());
|
| + }
|
|
|
| - @Override
|
| - public PassphraseType[] newArray(int size) {
|
| - return new PassphraseType[size];
|
| - }
|
| - };
|
| + @Override
|
| + public PassphraseType[] newArray(int size) {
|
| + return new PassphraseType[size];
|
| + }
|
| + };
|
|
|
| public static PassphraseType fromInternalValue(int value) {
|
| for (PassphraseType type : values()) {
|
| @@ -54,7 +53,7 @@ public enum PassphraseType implements Parcelable {
|
| public Set<PassphraseType> getVisibleTypes() {
|
| Set<PassphraseType> visibleTypes = new HashSet<>();
|
| switch (this) {
|
| - case IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| + case IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| case KEYSTORE_PASSPHRASE:
|
| visibleTypes.add(this);
|
| visibleTypes.add(CUSTOM_PASSPHRASE);
|
| @@ -79,15 +78,15 @@ public enum PassphraseType implements Parcelable {
|
| public Set<PassphraseType> getAllowedTypes(boolean isEncryptEverythingAllowed) {
|
| Set<PassphraseType> allowedTypes = new HashSet<>();
|
| switch (this) {
|
| - case IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| + case IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| case KEYSTORE_PASSPHRASE:
|
| allowedTypes.add(this);
|
| if (isEncryptEverythingAllowed) {
|
| allowedTypes.add(CUSTOM_PASSPHRASE);
|
| }
|
| break;
|
| - case FROZEN_IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| - case CUSTOM_PASSPHRASE: // Intentional fall through.
|
| + case FROZEN_IMPLICIT_PASSPHRASE: // Intentional fall through.
|
| + case CUSTOM_PASSPHRASE: // Intentional fall through.
|
| default:
|
| break;
|
| }
|
|
|