OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/ntp_tiles/most_visited_sites.h" | 5 #include "components/ntp_tiles/most_visited_sites.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 observer_->OnMostVisitedURLsAvailable(current_tiles_); | 413 observer_->OnMostVisitedURLsAvailable(current_tiles_); |
414 } | 414 } |
415 | 415 |
416 void MostVisitedSites::OnPopularSitesDownloaded(bool success) { | 416 void MostVisitedSites::OnPopularSitesDownloaded(bool success) { |
417 if (!success) { | 417 if (!success) { |
418 LOG(WARNING) << "Download of popular sites failed"; | 418 LOG(WARNING) << "Download of popular sites failed"; |
419 return; | 419 return; |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
423 void MostVisitedSites::OnIconMadeAvailable(const GURL& site_url, | 423 void MostVisitedSites::OnIconMadeAvailable(const GURL& site_url) { |
424 bool newly_available) { | 424 observer_->OnIconMadeAvailable(site_url); |
425 if (newly_available) | |
426 observer_->OnIconMadeAvailable(site_url); | |
427 } | 425 } |
428 | 426 |
429 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} | 427 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} |
430 | 428 |
431 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, | 429 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, |
432 ChangeReason change_reason) { | 430 ChangeReason change_reason) { |
433 if (mv_source_ == NTPTileSource::TOP_SITES) { | 431 if (mv_source_ == NTPTileSource::TOP_SITES) { |
434 // The displayed tiles are invalidated. | 432 // The displayed tiles are invalidated. |
435 InitiateTopSitesQuery(); | 433 InitiateTopSitesQuery(); |
436 } | 434 } |
437 } | 435 } |
438 | 436 |
439 } // namespace ntp_tiles | 437 } // namespace ntp_tiles |
OLD | NEW |