summaryrefslogtreecommitdiffstats
path: root/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/KeyUploadDelegate.java
blob: 0cd5ec732c6a156ac39c37adc20a3e4933eb5756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.gecko.sync.delegates;

public interface KeyUploadDelegate {
  /**
   * Called when keys have been successfully uploaded to the server.
   * <p>
   * The uploaded keys are intentionally not exposed. It is possible for two
   * clients to simultaneously upload keys and for each client to conclude that
   * its keys are current (since the server returned 200 on upload). To shorten
   * the window wherein two such clients can race, all clients should upload and
   * then immediately re-download the fetched keys.
   * <p>
   * See Bug 692700, Bug 693893.
   */
  void onKeysUploaded();
  void onKeyUploadFailed(Exception e);
}