Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: components/ntp_snippets/ntp_snippets_status_service.h

Issue 2158883002: Change NTPSnippetsBridge to read from ContentSuggestionsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@offlinepagesprovider
Patch Set: Marc's comments; Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/prefs/pref_change_registrar.h" 11 #include "components/prefs/pref_change_registrar.h"
12 #include "components/sync_driver/sync_service_observer.h" 12 #include "components/sync_driver/sync_service_observer.h"
13 13
14 class PrefRegistrySimple; 14 class PrefRegistrySimple;
15 class PrefService; 15 class PrefService;
16 class SigninManagerBase; 16 class SigninManagerBase;
17 17
18 namespace sync_driver { 18 namespace sync_driver {
19 class SyncService; 19 class SyncService;
20 } 20 }
21 21
22 namespace ntp_snippets { 22 namespace ntp_snippets {
23 23
24 // On Android builds, a Java counterpart will be generated for this enum.
25 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets
26 enum class DisabledReason : int { 24 enum class DisabledReason : int {
27 // Snippets are enabled 25 // Snippets are enabled
28 NONE, 26 NONE,
29 // Snippets have been disabled as part of the service configuration. 27 // Snippets have been disabled as part of the service configuration.
30 EXPLICITLY_DISABLED, 28 EXPLICITLY_DISABLED,
31 // The user is not signed in, and the service requires it to be enabled. 29 // The user is not signed in, and the service requires it to be enabled.
32 SIGNED_OUT, 30 SIGNED_OUT,
33 // Sync is not enabled, and the service requires it to be enabled. 31 // Sync is not enabled, and the service requires it to be enabled.
34 SYNC_DISABLED, 32 SYNC_DISABLED,
35 // The service requires passphrase encryption to be disabled. 33 // The service requires passphrase encryption to be disabled.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // SyncService will call |OnStateChanged|. 82 // SyncService will call |OnStateChanged|.
85 ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver> 83 ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver>
86 sync_service_observer_; 84 sync_service_observer_;
87 85
88 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService); 86 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService);
89 }; 87 };
90 88
91 } // namespace ntp_snippets 89 } // namespace ntp_snippets
92 90
93 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ 91 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698