Home | History | Annotate | Download | only in sync_file_system
      1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_SERVICE_STATE_H_
      6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_SERVICE_STATE_H_
      7 
      8 namespace sync_file_system {
      9 
     10 // This enum is translated into syncFileSystem.ServiceStatus
     11 // (defined in chrome/common/extensions/api/sync_file_system.idl).
     12 // When you update this enum please consider updating the other enum in IDL.
     13 enum SyncServiceState {
     14   // The sync service is up and running, or has not seen any errors yet.
     15   // The consumer of this service can make new requests while the
     16   // service is in this state.
     17   SYNC_SERVICE_RUNNING,
     18 
     19   // The sync service is not synchronizing files because the remote service
     20   // needs to be authenticated by the user to proceed.
     21   // This state may be automatically resolved when the underlying
     22   // network condition or service condition changes.
     23   // The consumer of this service can still make new requests but
     24   // they may fail (with recoverable error code).
     25   SYNC_SERVICE_AUTHENTICATION_REQUIRED,
     26 
     27   // The sync service is not synchronizing files because the remote service
     28   // is (temporarily) unavailable due to some recoverable errors, e.g.
     29   // network is offline, the remote service is down or not
     30   // reachable etc. More details should be given by |description| parameter
     31   // in OnSyncStateUpdated (which could contain service-specific details).
     32   SYNC_SERVICE_TEMPORARY_UNAVAILABLE,
     33 
     34   // The sync service is disabled by configuration change or due to some
     35   // unrecoverable errors, e.g. local database corruption.
     36   // Any new requests will immediately fail when the service is in
     37   // this state.
     38   SYNC_SERVICE_DISABLED,
     39 };
     40 
     41 }  // namespace sync_file_system
     42 
     43 #endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_SERVICE_STATE_H_
     44