| 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_CATEGORY_STATUS_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_STATUS_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_STATUS_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_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. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 AVAILABLE, | 21 AVAILABLE, |
| 22 // Content suggestions are provided but not yet loaded. | 22 // Content suggestions are provided but not yet loaded. |
| 23 AVAILABLE_LOADING, | 23 AVAILABLE_LOADING, |
| 24 | 24 |
| 25 // There is no provider that provides suggestions for this category. | 25 // There is no provider that provides suggestions for this category. |
| 26 NOT_PROVIDED, | 26 NOT_PROVIDED, |
| 27 // The entire content suggestions feature has explicitly been disabled as part | 27 // The entire content suggestions feature has explicitly been disabled as part |
| 28 // of the service configuration. | 28 // of the service configuration. |
| 29 ALL_SUGGESTIONS_EXPLICITLY_DISABLED, | 29 ALL_SUGGESTIONS_EXPLICITLY_DISABLED, |
| 30 // 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 |
| 31 // the service configuration. | 31 // the service configuration. Any suggestions from this category should be |
| 32 // removed from the UI immediately. |
| 32 CATEGORY_EXPLICITLY_DISABLED, | 33 CATEGORY_EXPLICITLY_DISABLED, |
| 33 | 34 |
| 34 // Content suggestions are not available because an error occurred when | 35 // Content suggestions are not available because an error occurred when |
| 35 // loading or updating them. | 36 // loading or updating them. Any suggestions from this category should be |
| 37 // removed from the UI immediately. |
| 36 LOADING_ERROR | 38 LOADING_ERROR |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 // Determines whether the given status is one of the AVAILABLE statuses. | 41 // Determines whether the given status is one of the AVAILABLE statuses. |
| 40 bool IsCategoryStatusAvailable(CategoryStatus status); | 42 bool IsCategoryStatusAvailable(CategoryStatus status); |
| 41 | 43 |
| 42 // Determines whether the given status is INITIALIZING or one of the AVAILABLE | 44 // Determines whether the given status is INITIALIZING or one of the AVAILABLE |
| 43 // statuses. All of these statuses have in common that there is or will soon be | 45 // statuses. All of these statuses have in common that there is or will soon be |
| 44 // content. | 46 // content. |
| 45 bool IsCategoryStatusInitOrAvailable(CategoryStatus status); | 47 bool IsCategoryStatusInitOrAvailable(CategoryStatus status); |
| 46 | 48 |
| 47 } // namespace ntp_snippets | 49 } // namespace ntp_snippets |
| 48 | 50 |
| 49 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_STATUS_H_ | 51 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_STATUS_H_ |
| OLD | NEW |