Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 package org.mozilla.gecko.fxa.login;
8 public class FxAccountLoginTransition {
9 public interface Transition {
10 }
12 public static class LogMessage implements Transition {
13 public final String detailMessage;
15 public LogMessage(String detailMessage) {
16 this.detailMessage = detailMessage;
17 }
19 @Override
20 public String toString() {
21 return getClass().getSimpleName() + (this.detailMessage == null ? "" : "('" + this.detailMessage + "')");
22 }
23 }
25 public static class AccountNeedsVerification extends LogMessage {
26 public AccountNeedsVerification() {
27 super(null);
28 }
29 }
31 public static class AccountVerified extends LogMessage {
32 public AccountVerified() {
33 super(null);
34 }
35 }
37 public static class PasswordRequired extends LogMessage {
38 public PasswordRequired() {
39 super(null);
40 }
41 }
43 public static class LocalError implements Transition {
44 public final Exception e;
46 public LocalError(Exception e) {
47 this.e = e;
48 }
50 @Override
51 public String toString() {
52 return "Log(" + this.e + ")";
53 }
54 }
56 public static class RemoteError implements Transition {
57 public final Exception e;
59 public RemoteError(Exception e) {
60 this.e = e;
61 }
63 @Override
64 public String toString() {
65 return "Log(" + (this.e == null ? "null" : this.e) + ")";
66 }
67 }
68 }