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

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

Issue 2190353002: 📰Fix SnippetsService's status reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void EnterStateDisabled(); 258 void EnterStateDisabled();
259 259
260 // Applies the effects of the transition to the SHUT_DOWN state. Do not call 260 // Applies the effects of the transition to the SHUT_DOWN state. Do not call
261 // directly, use |EnterState| instead. 261 // directly, use |EnterState| instead.
262 void EnterStateShutdown(); 262 void EnterStateShutdown();
263 263
264 // Converts the cached snippets to article content suggestions and notifies 264 // Converts the cached snippets to article content suggestions and notifies
265 // the observers. 265 // the observers.
266 void NotifyNewSuggestions(); 266 void NotifyNewSuggestions();
267 267
268 // Notifies the content suggestions observer about a change in the 268 // Updates the internal status |category_status_| and notifies the content
269 // |category_status_|. 269 // suggestions observer if it changed.
270 void NotifyCategoryStatusChanged(); 270 void UpdateCategoryStatus(ContentSuggestionsCategoryStatus status);
271 271
272 State state_; 272 State state_;
273 273
274 ContentSuggestionsCategoryStatus category_status_; 274 ContentSuggestionsCategoryStatus category_status_;
275 275
276 PrefService* pref_service_; 276 PrefService* pref_service_;
277 277
278 suggestions::SuggestionsService* suggestions_service_; 278 suggestions::SuggestionsService* suggestions_service_;
279 279
280 // All current suggestions (i.e. not dismissed ones). 280 // All current suggestions (i.e. not dismissed ones).
(...skipping 60 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 | « no previous file | components/ntp_snippets/ntp_snippets_service.cc » ('j') | components/ntp_snippets/ntp_snippets_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698