OLD | NEW |
(Empty) | |
| 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 |
| 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_ |
| 7 |
| 8 namespace ntp_snippets { |
| 9 |
| 10 // Represents the status of a category of content suggestions. |
| 11 // On Android builds, a Java counterpart will be generated for this enum. |
| 12 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
| 13 enum class ContentSuggestionsCategoryStatus { |
| 14 // Content suggestions are available (though the list of available suggestions |
| 15 // may be empty simply because there are no reasonable suggestions to be made |
| 16 // at the moment). |
| 17 AVAILABLE, |
| 18 // Content suggestions are provided but not yet loaded. |
| 19 AVAILABLE_LOADING, |
| 20 |
| 21 // There is no provider that provides suggestions for this category. |
| 22 NOT_PROVIDED, |
| 23 // The entire content suggestions feature has explicitly been disabled as part |
| 24 // of the service configuration. |
| 25 ALL_SUGGESTIONS_EXPLICITLY_DISABLED, |
| 26 // Content suggestions from a specific category have been disabled as part of |
| 27 // the service configuration. |
| 28 CATEGORY_EXPLICITLY_DISABLED, |
| 29 |
| 30 // Content suggestions are not available because the user is not signed in. |
| 31 SIGNED_OUT, |
| 32 // Content suggestions are not available because sync is disabled. |
| 33 SYNC_DISABLED, |
| 34 // Content suggestions are not available because passphrase encryption is |
| 35 // enabled (and it should be disabled). |
| 36 PASSPHRASE_ENCRYPTION_ENABLED, |
| 37 // Content suggestions are not available because history sync is disabled. |
| 38 HISTORY_SYNC_DISABLED, |
| 39 // Content suggestions are not available because the history sync service is |
| 40 // not yet completely initialized and its status is unknown. |
| 41 HISTORY_SYNC_STATE_UNKNOWN |
| 42 }; |
| 43 |
| 44 // Determines whether the given status is one of the AVAILABLE statuses. |
| 45 bool IsContentSuggestionsCategoryStatusAvailable( |
| 46 ContentSuggestionsCategoryStatus status); |
| 47 |
| 48 } // namespace ntp_snippets |
| 49 |
| 50 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_ |
OLD | NEW |