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

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: 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 | « no previous file | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void EnterStateDisabled(); 260 void EnterStateDisabled();
261 261
262 // Applies the effects of the transition to the SHUT_DOWN state. Do not call 262 // Applies the effects of the transition to the SHUT_DOWN state. Do not call
263 // directly, use |EnterState| instead. 263 // directly, use |EnterState| instead.
264 void EnterStateShutdown(); 264 void EnterStateShutdown();
265 265
266 // Converts the cached snippets to article content suggestions and notifies 266 // Converts the cached snippets to article content suggestions and notifies
267 // the observers. 267 // the observers.
268 void NotifyNewSuggestions(); 268 void NotifyNewSuggestions();
269 269
270 // Notifies the content suggestions observer about a change in the 270 // Updates the internal status |category_status_| and notifies the content
271 // |category_status_|. 271 // suggestions observer if it changed.
272 void NotifyCategoryStatusChanged(); 272 void UpdateCategoryStatus(CategoryStatus status);
273 273
274 State state_; 274 State state_;
275 275
276 CategoryStatus category_status_; 276 CategoryStatus category_status_;
277 277
278 PrefService* pref_service_; 278 PrefService* pref_service_;
279 279
280 suggestions::SuggestionsService* suggestions_service_; 280 suggestions::SuggestionsService* suggestions_service_;
281 281
282 // All current suggestions (i.e. not dismissed ones). 282 // All current suggestions (i.e. not dismissed ones).
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // If the service might be enabled, DisabledReason::NONE will be provided. 345 // If the service might be enabled, DisabledReason::NONE will be provided.
346 virtual void NTPSnippetsServiceDisabledReasonChanged(DisabledReason) = 0; 346 virtual void NTPSnippetsServiceDisabledReasonChanged(DisabledReason) = 0;
347 347
348 protected: 348 protected:
349 virtual ~NTPSnippetsServiceObserver() {} 349 virtual ~NTPSnippetsServiceObserver() {}
350 }; 350 };
351 351
352 } // namespace ntp_snippets 352 } // namespace ntp_snippets
353 353
354 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 354 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698