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

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

Issue 2083533002: [NTP Snippets] Shut down the service on database failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@image_db_tests
Patch Set: comments Created 4 years, 6 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 SHUT_DOWN 199 SHUT_DOWN
200 }; 200 };
201 201
202 // sync_driver::SyncServiceObserver implementation. 202 // sync_driver::SyncServiceObserver implementation.
203 void OnStateChanged() override; 203 void OnStateChanged() override;
204 204
205 // image_fetcher::ImageFetcherDelegate implementation. 205 // image_fetcher::ImageFetcherDelegate implementation.
206 void OnImageDataFetched(const std::string& snippet_id, 206 void OnImageDataFetched(const std::string& snippet_id,
207 const std::string& image_data) override; 207 const std::string& image_data) override;
208 208
209 // Callback for the NTPSnippetsDatabase. 209 // Callbacks for the NTPSnippetsDatabase.
210 void OnDatabaseLoaded(NTPSnippet::PtrVector snippets); 210 void OnDatabaseLoaded(NTPSnippet::PtrVector snippets);
211 void OnDatabaseError();
211 212
212 // Callback for the SuggestionsService. 213 // Callback for the SuggestionsService.
213 void OnSuggestionsChanged(const suggestions::SuggestionsProfile& suggestions); 214 void OnSuggestionsChanged(const suggestions::SuggestionsProfile& suggestions);
214 215
215 // Callback for the NTPSnippetsFetcher. 216 // Callback for the NTPSnippetsFetcher.
216 void OnFetchFinished(NTPSnippetsFetcher::OptionalSnippets snippets); 217 void OnFetchFinished(NTPSnippetsFetcher::OptionalSnippets snippets);
217 218
218 // Merges newly available snippets with the previously available list. 219 // Merges newly available snippets with the previously available list.
219 void MergeSnippets(NTPSnippet::PtrVector new_snippets); 220 void MergeSnippets(NTPSnippet::PtrVector new_snippets);
220 221
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // or because a requirement (e.g. History Sync) is not fulfilled anymore. 335 // or because a requirement (e.g. History Sync) is not fulfilled anymore.
335 virtual void NTPSnippetsServiceDisabled() = 0; 336 virtual void NTPSnippetsServiceDisabled() = 0;
336 337
337 protected: 338 protected:
338 virtual ~NTPSnippetsServiceObserver() {} 339 virtual ~NTPSnippetsServiceObserver() {}
339 }; 340 };
340 341
341 } // namespace ntp_snippets 342 } // namespace ntp_snippets
342 343
343 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 344 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698