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