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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2317993004: Move OnURLsDeleted from NTPSnippetsService to ContentSuggestionsService (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index 31efeef282150628dd8f15ab5fec99d63c86d202..95ad349243887332aa63288e171ed046dd3cd2a5 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -191,7 +191,6 @@ NTPSnippetsService::NTPSnippetsService(
Observer* observer,
CategoryFactory* category_factory,
PrefService* pref_service,
- history::HistoryService* history_service,
SuggestionsService* suggestions_service,
const std::string& application_language_code,
NTPSnippetsScheduler* scheduler,
@@ -207,7 +206,6 @@ NTPSnippetsService::NTPSnippetsService(
suggestions_service_(suggestions_service),
application_language_code_(application_language_code),
scheduler_(scheduler),
- history_service_observer_(this),
snippets_fetcher_(std::move(snippets_fetcher)),
image_fetcher_(std::move(image_fetcher)),
image_decoder_(std::move(image_decoder)),
@@ -226,10 +224,6 @@ NTPSnippetsService::NTPSnippetsService(
return;
}
- // Can be null in tests.
- if (history_service)
- history_service_observer_.Add(history_service);
-
database_->SetErrorCallback(base::Bind(&NTPSnippetsService::OnDatabaseError,
base::Unretained(this)));
@@ -416,28 +410,6 @@ int NTPSnippetsService::GetMaxSnippetCountForTesting() {
////////////////////////////////////////////////////////////////////////////////
// Private methods
-// history::HistoryServiceObserver implementation.
-void NTPSnippetsService::OnURLsDeleted(
- history::HistoryService* history_service,
- bool all_history,
- bool expired,
- const history::URLRows& deleted_rows,
- const std::set<GURL>& favicon_urls) {
- // We don't care about expired entries.
- if (expired)
- return;
-
- if (!ready())
- nuke_after_load_ = true;
- else
- NukeAllSnippets();
-}
-
-void NTPSnippetsService::HistoryServiceBeingDeleted(
- history::HistoryService* history_service) {
- history_service_observer_.RemoveAll();
-}
-
// image_fetcher::ImageFetcherDelegate implementation.
void NTPSnippetsService::OnImageDataFetched(const std::string& snippet_id,
const std::string& image_data) {
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | components/ntp_snippets/ntp_snippets_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698