client_namespace_constants.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2016 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_OFFLINE_PAGES_CORE_CLIENT_NAMESPACE_CONSTANTS_H_
  5. #define COMPONENTS_OFFLINE_PAGES_CORE_CLIENT_NAMESPACE_CONSTANTS_H_
  6. #include "build/build_config.h"
  7. namespace offline_pages {
  8. // Currently used for fallbacks like tests.
  9. extern const char kDefaultNamespace[];
  10. // Any changes to these well-known namespaces should also be reflected in
  11. // OfflinePagesNamespaceEnumeration (histograms.xml) for consistency.
  12. // New namespaces should be put at the end of this list and a corresponding
  13. // enum value should be added in OfflinePagesNamespaceEnumeration.
  14. extern const char kBookmarkNamespace[];
  15. extern const char kLastNNamespace[];
  16. extern const char kAsyncNamespace[];
  17. extern const char kCCTNamespace[];
  18. extern const char kDownloadNamespace[];
  19. extern const char kNTPSuggestionsNamespace[];
  20. extern const char kSuggestedArticlesNamespace[];
  21. extern const char kBrowserActionsNamespace[];
  22. extern const char kLivePageSharingNamespace[];
  23. extern const char kAutoAsyncNamespace[];
  24. // Enum of namespaces used by metric collection.
  25. // See OfflinePagesNamespaceEnumeration in enums.xml for histogram usages.
  26. // Changes to this enum should be in sync with the changes to the namespace
  27. // constants above and with the metrics enum.
  28. enum class OfflinePagesNamespaceEnumeration {
  29. DEFAULT = 0,
  30. BOOKMARK = 1,
  31. LAST_N = 2,
  32. ASYNC_LOADING = 3,
  33. CUSTOM_TABS = 4,
  34. DOWNLOAD = 5,
  35. NTP_SUGGESTION = 6,
  36. SUGGESTED_ARTICLES = 7,
  37. BROWSER_ACTIONS = 8,
  38. LIVE_PAGE_SHARING = 9,
  39. ASYNC_AUTO_LOADING = 10,
  40. kMaxValue = ASYNC_AUTO_LOADING,
  41. };
  42. } // namespace offline_pages
  43. #endif // COMPONENTS_OFFLINE_PAGES_CORE_CLIENT_NAMESPACE_CONSTANTS_H_