shutdown_reason.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SYNC_ENGINE_SHUTDOWN_REASON_H_
  5. #define COMPONENTS_SYNC_ENGINE_SHUTDOWN_REASON_H_
  6. namespace syncer {
  7. // Reason for shutting down the sync engine.
  8. enum class ShutdownReason {
  9. // The Sync engine is being stopped with the expectation that it will be
  10. // started again for the same user before too long, so any Sync metadata
  11. // should be kept. An example is content-area signout while Sync-the-feature
  12. // is enabled.
  13. STOP_SYNC_AND_KEEP_DATA,
  14. // The Sync engine is being stopped with the expectation that it will *not* be
  15. // started again for the same user soon, or with the explicit intention of
  16. // clearing Sync metadata. Examples include signout while only
  17. // Sync-the-transport is active, the "Turn off" button in settings for
  18. // Sync-the-feature users, and clearing data via the Sync dashboard.
  19. DISABLE_SYNC_AND_CLEAR_DATA,
  20. // The browser is being shut down; any Sync metadata should be kept.
  21. BROWSER_SHUTDOWN_AND_KEEP_DATA,
  22. };
  23. const char* ShutdownReasonToString(ShutdownReason reason);
  24. } // namespace syncer
  25. #endif // COMPONENTS_SYNC_ENGINE_SHUTDOWN_REASON_H_