Chromium Code Reviews| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 return kHistogramWhitelistName; | 133 return kHistogramWhitelistName; |
| 134 case NTPTileSource::SUGGESTIONS_SERVICE: | 134 case NTPTileSource::SUGGESTIONS_SERVICE: |
| 135 return kHistogramServerName; | 135 return kHistogramServerName; |
| 136 } | 136 } |
| 137 NOTREACHED(); | 137 NOTREACHED(); |
| 138 return std::string(); | 138 return std::string(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace | 141 } // namespace |
| 142 | 142 |
| 143 void MostVisitedSites::Observer::OnPopularURLsAvailable( | |
| 144 const PopularSitesVector& sites) {} | |
|
Marc Treib
2016/09/15 09:13:33
Might as well put the empty body in the header. Th
sfiera
2016/09/21 08:35:26
Done.
| |
| 145 | |
| 143 MostVisitedSites::MostVisitedSites(PrefService* prefs, | 146 MostVisitedSites::MostVisitedSites(PrefService* prefs, |
| 144 scoped_refptr<history::TopSites> top_sites, | 147 scoped_refptr<history::TopSites> top_sites, |
| 145 SuggestionsService* suggestions, | 148 SuggestionsService* suggestions, |
| 146 std::unique_ptr<PopularSites> popular_sites, | 149 std::unique_ptr<PopularSites> popular_sites, |
| 147 MostVisitedSitesSupervisor* supervisor) | 150 MostVisitedSitesSupervisor* supervisor) |
| 148 : prefs_(prefs), | 151 : prefs_(prefs), |
| 149 top_sites_(top_sites), | 152 top_sites_(top_sites), |
| 150 suggestions_service_(suggestions), | 153 suggestions_service_(suggestions), |
| 151 popular_sites_(std::move(popular_sites)), | 154 popular_sites_(std::move(popular_sites)), |
| 152 supervisor_(supervisor), | 155 supervisor_(supervisor), |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 544 | 547 |
| 545 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, | 548 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, |
| 546 ChangeReason change_reason) { | 549 ChangeReason change_reason) { |
| 547 if (mv_source_ == NTPTileSource::TOP_SITES) { | 550 if (mv_source_ == NTPTileSource::TOP_SITES) { |
| 548 // The displayed tiles are invalidated. | 551 // The displayed tiles are invalidated. |
| 549 InitiateTopSitesQuery(); | 552 InitiateTopSitesQuery(); |
| 550 } | 553 } |
| 551 } | 554 } |
| 552 | 555 |
| 553 } // namespace ntp_tiles | 556 } // namespace ntp_tiles |
| OLD | NEW |