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

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

Issue 2191343002: 📰 Remove SnippetService's dependency on Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update some doc, show NO_SNIPPETS instead of SIGNIN when during INITIALIZING state 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Observer accessors. 154 // Observer accessors.
155 void AddObserver(NTPSnippetsServiceObserver* observer); 155 void AddObserver(NTPSnippetsServiceObserver* observer);
156 void RemoveObserver(NTPSnippetsServiceObserver* observer); 156 void RemoveObserver(NTPSnippetsServiceObserver* observer);
157 157
158 // Returns the maximum number of snippets that will be shown at once. 158 // Returns the maximum number of snippets that will be shown at once.
159 static int GetMaxSnippetCountForTesting(); 159 static int GetMaxSnippetCountForTesting();
160 160
161 private: 161 private:
162 friend class NTPSnippetsServiceTest; 162 friend class NTPSnippetsServiceTest;
163 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsServiceTest, HistorySyncStateChanges); 163 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsServiceTest, StatusChanges);
164 164
165 // TODO(pke): As soon as the DisabledReason is replaced with the new status, 165 // TODO(pke): As soon as the DisabledReason is replaced with the new status,
166 // also remove the old State enum and replace it with 166 // also remove the old State enum and replace it with
167 // ContentSuggestionsCategoryStatus and a similar status diagram. 167 // ContentSuggestionsCategoryStatus and a similar status diagram.
168 // Possible state transitions: 168 // Possible state transitions:
169 // +------- NOT_INITED ------+ 169 // +------- NOT_INITED ------+
170 // | / \ | 170 // | / \ |
171 // | READY <--> DISABLED <-+ 171 // | READY <--> DISABLED <-+
172 // | \ / 172 // | \ /
173 // +-----> SHUT_DOWN 173 // +-----> SHUT_DOWN
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // If the service might be enabled, DisabledReason::NONE will be provided. 341 // If the service might be enabled, DisabledReason::NONE will be provided.
342 virtual void NTPSnippetsServiceDisabledReasonChanged(DisabledReason) = 0; 342 virtual void NTPSnippetsServiceDisabledReasonChanged(DisabledReason) = 0;
343 343
344 protected: 344 protected:
345 virtual ~NTPSnippetsServiceObserver() {} 345 virtual ~NTPSnippetsServiceObserver() {}
346 }; 346 };
347 347
348 } // namespace ntp_snippets 348 } // namespace ntp_snippets
349 349
350 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 350 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestions_category_status.h ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698