OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.components.sync; | 5 package org.chromium.components.sync; |
6 | 6 |
7 import android.os.Parcel; | 7 import android.os.Parcel; |
8 import android.os.Parcelable; | 8 import android.os.Parcelable; |
9 | 9 |
10 import java.util.HashSet; | 10 import java.util.HashSet; |
11 import java.util.Set; | 11 import java.util.Set; |
12 | 12 |
13 /** | 13 /** |
14 * This enum describes the type of passphrase required, if any, to decrypt synce
d data. | 14 * This enum describes the type of passphrase required, if any, to decrypt synce
d data. |
15 * | 15 * |
16 * It implements the Android {@link Parcelable} interface so it is easy to pass
around in intents. | 16 * It implements the Android {@link Parcelable} interface so it is easy to pass
around in intents. |
17 * | 17 * |
18 * It maps the native enum syncer::PassphraseType. | 18 * It maps the native enum PassphraseType. |
19 */ | 19 */ |
20 public enum PassphraseType implements Parcelable { | 20 public enum PassphraseType implements Parcelable { |
21 IMPLICIT_PASSPHRASE(0), // GAIA-based passphrase (deprecated). | 21 IMPLICIT_PASSPHRASE(0), // GAIA-based passphrase (deprecated). |
22 KEYSTORE_PASSPHRASE(1), // Keystore passphrase. | 22 KEYSTORE_PASSPHRASE(1), // Keystore passphrase. |
23 FROZEN_IMPLICIT_PASSPHRASE(2), // Frozen GAIA passphrase. | 23 FROZEN_IMPLICIT_PASSPHRASE(2), // Frozen GAIA passphrase. |
24 CUSTOM_PASSPHRASE(3); // User-provided passphrase. | 24 CUSTOM_PASSPHRASE(3); // User-provided passphrase. |
25 | 25 |
26 public static Parcelable.Creator CREATOR = new Parcelable.Creator<Passphrase
Type>() { | 26 public static Parcelable.Creator CREATOR = new Parcelable.Creator<Passphrase
Type>() { |
27 @Override | 27 @Override |
28 public PassphraseType createFromParcel(Parcel parcel) { | 28 public PassphraseType createFromParcel(Parcel parcel) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 @Override | 101 @Override |
102 public int describeContents() { | 102 public int describeContents() { |
103 return 0; | 103 return 0; |
104 } | 104 } |
105 | 105 |
106 @Override | 106 @Override |
107 public void writeToParcel(Parcel dest, int flags) { | 107 public void writeToParcel(Parcel dest, int flags) { |
108 dest.writeInt(mNativeValue); | 108 dest.writeInt(mNativeValue); |
109 } | 109 } |
110 } | 110 } |
OLD | NEW |