mobile/android/base/fxa/sync/FxAccountGlobalSession.java

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 package org.mozilla.gecko.fxa.sync;
michael@0 6
michael@0 7 import java.io.IOException;
michael@0 8 import java.net.URISyntaxException;
michael@0 9 import java.util.Collections;
michael@0 10 import java.util.HashMap;
michael@0 11
michael@0 12 import org.json.simple.parser.ParseException;
michael@0 13 import org.mozilla.gecko.sync.GlobalSession;
michael@0 14 import org.mozilla.gecko.sync.NonObjectJSONException;
michael@0 15 import org.mozilla.gecko.sync.SyncConfiguration;
michael@0 16 import org.mozilla.gecko.sync.SyncConfigurationException;
michael@0 17 import org.mozilla.gecko.sync.delegates.BaseGlobalSessionCallback;
michael@0 18 import org.mozilla.gecko.sync.delegates.ClientsDataDelegate;
michael@0 19 import org.mozilla.gecko.sync.stage.CheckPreconditionsStage;
michael@0 20 import org.mozilla.gecko.sync.stage.GlobalSyncStage;
michael@0 21 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
michael@0 22
michael@0 23 import android.content.Context;
michael@0 24
michael@0 25 public class FxAccountGlobalSession extends GlobalSession {
michael@0 26 public FxAccountGlobalSession(SyncConfiguration config,
michael@0 27 BaseGlobalSessionCallback callback,
michael@0 28 Context context,
michael@0 29 ClientsDataDelegate clientsDelegate)
michael@0 30 throws SyncConfigurationException, IllegalArgumentException, IOException, ParseException, NonObjectJSONException, URISyntaxException {
michael@0 31 super(config, callback, context, clientsDelegate, null);
michael@0 32 }
michael@0 33
michael@0 34 @Override
michael@0 35 public void prepareStages() {
michael@0 36 super.prepareStages();
michael@0 37 HashMap<Stage, GlobalSyncStage> stages = new HashMap<Stage, GlobalSyncStage>();
michael@0 38 stages.putAll(this.stages);
michael@0 39 stages.put(Stage.ensureClusterURL, new CheckPreconditionsStage());
michael@0 40 this.stages = Collections.unmodifiableMap(stages);
michael@0 41 }
michael@0 42 }

mercurial