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

Unified Diff: chrome/browser/history/top_sites_impl.cc

Issue 441623002: Eliminate sending NOTIFICATION_TOP_SITES_* from TopSites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/top_sites_impl.cc
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc
index e3298d8f396d39dce803c4b6205ba1af286d6993..413bd45b13cbf79a9704bd54981252e5dfde506b 100644
--- a/chrome/browser/history/top_sites_impl.cc
+++ b/chrome/browser/history/top_sites_impl.cc
@@ -637,6 +637,10 @@ bool TopSitesImpl::AddForcedURL(const GURL& url, const base::Time& time) {
return true;
}
+Profile* TopSitesImpl::GetProfile() {
sdefresne 2014/08/04 08:47:18 Remove.
nshaik 2014/08/05 06:38:03 Done.
+ return profile_;
+}
+
bool TopSitesImpl::AddPrepopulatedPages(MostVisitedURLList* urls,
size_t num_forced_urls) {
bool added = false;
@@ -874,10 +878,7 @@ void TopSitesImpl::MoveStateToLoaded() {
for (size_t i = 0; i < pending_callbacks.size(); i++)
pending_callbacks[i].Run(filtered_urls_all, filtered_urls_nonforced);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_TOP_SITES_LOADED,
- content::Source<Profile>(profile_),
- content::Details<TopSites>(this));
+ NotifyTopSitesLoaded();
}
void TopSitesImpl::ResetThreadSafeCache() {
@@ -892,13 +893,6 @@ void TopSitesImpl::ResetThreadSafeImageCache() {
thread_safe_cache_->SetThumbnails(cache_->images());
}
-void TopSitesImpl::NotifyTopSitesChanged() {
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_TOP_SITES_CHANGED,
- content::Source<TopSites>(this),
- content::NotificationService::NoDetails());
-}
-
void TopSitesImpl::RestartQueryForTopSitesTimer(base::TimeDelta delta) {
if (timer_.IsRunning() && ((timer_start_time_ + timer_.GetCurrentDelay()) <
(base::TimeTicks::Now() + delta))) {

Powered by Google App Engine
This is Rietveld 408576698