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

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

Issue 1980033002: [NTP Snippets] Clear the snippets when the user signs out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix double we Created 4 years, 7 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 192 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
193 }; 193 };
194 194
195 class NTPSnippetsServiceObserver { 195 class NTPSnippetsServiceObserver {
196 public: 196 public:
197 // Sent every time the service loads a new set of data. 197 // Sent every time the service loads a new set of data.
198 virtual void NTPSnippetsServiceLoaded() = 0; 198 virtual void NTPSnippetsServiceLoaded() = 0;
199 // Sent when the service is shutting down. 199 // Sent when the service is shutting down.
200 virtual void NTPSnippetsServiceShutdown() = 0; 200 virtual void NTPSnippetsServiceShutdown() = 0;
201 // Sent every time the service has its data sources cleared.
202 // Note: we use it as signal that the user signed out or disabled sync, but it
203 // can be triggered in other cases, when the suggestions service returns no
204 // hosts. (e.g. the user manually removed all MostLikely tiles.)
205 virtual void NTPSnippetsServiceCleared() = 0;
201 206
202 protected: 207 protected:
203 virtual ~NTPSnippetsServiceObserver() {} 208 virtual ~NTPSnippetsServiceObserver() {}
204 }; 209 };
205 210
206 } // namespace ntp_snippets 211 } // namespace ntp_snippets
207 212
208 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 213 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698