| 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_NTP_SNIPPETS_STATUS_SERVICE_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| 11 #include "components/sync_driver/sync_service_observer.h" | 11 #include "components/sync_driver/sync_service_observer.h" |
| 12 | 12 |
| 13 class SigninManagerBase; | 13 class SigninManagerBase; |
| 14 | 14 |
| 15 namespace sync_driver { | 15 namespace sync_driver { |
| 16 class SyncService; | 16 class SyncService; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ntp_snippets { | 19 namespace ntp_snippets { |
| 20 | 20 |
| 21 // On Android builds, a Java counterpart will be generated for this enum. | |
| 22 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets | |
| 23 enum class DisabledReason : int { | 21 enum class DisabledReason : int { |
| 24 // Snippets are enabled | 22 // Snippets are enabled |
| 25 NONE, | 23 NONE, |
| 26 // Snippets have been disabled as part of the service configuration. | 24 // Snippets have been disabled as part of the service configuration. |
| 27 EXPLICITLY_DISABLED, | 25 EXPLICITLY_DISABLED, |
| 28 // The user is not signed in, and the service requires it to be enabled. | 26 // The user is not signed in, and the service requires it to be enabled. |
| 29 SIGNED_OUT, | 27 SIGNED_OUT, |
| 30 // Sync is not enabled, and the service requires it to be enabled. | 28 // Sync is not enabled, and the service requires it to be enabled. |
| 31 SYNC_DISABLED, | 29 SYNC_DISABLED, |
| 32 // The service requires passphrase encryption to be disabled. | 30 // The service requires passphrase encryption to be disabled. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // SyncService will call |OnStateChanged|. | 71 // SyncService will call |OnStateChanged|. |
| 74 ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver> | 72 ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver> |
| 75 sync_service_observer_; | 73 sync_service_observer_; |
| 76 | 74 |
| 77 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService); | 75 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService); |
| 78 }; | 76 }; |
| 79 | 77 |
| 80 } // namespace ntp_snippets | 78 } // namespace ntp_snippets |
| 81 | 79 |
| 82 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ | 80 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ |
| OLD | NEW |