| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "components/variations/variations_associated_data.h" | 26 #include "components/variations/variations_associated_data.h" |
| 27 #include "third_party/skia/include/core/SkBitmap.h" | 27 #include "third_party/skia/include/core/SkBitmap.h" |
| 28 #include "ui/gfx/codec/jpeg_codec.h" | 28 #include "ui/gfx/codec/jpeg_codec.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 using history::TopSites; | 31 using history::TopSites; |
| 32 using suggestions::ChromeSuggestion; | 32 using suggestions::ChromeSuggestion; |
| 33 using suggestions::SuggestionsProfile; | 33 using suggestions::SuggestionsProfile; |
| 34 using suggestions::SuggestionsService; | 34 using suggestions::SuggestionsService; |
| 35 | 35 |
| 36 namespace ntp_tiles { |
| 37 |
| 36 namespace { | 38 namespace { |
| 37 | 39 |
| 38 // Identifiers for the various tile sources. | 40 // Identifiers for the various tile sources. |
| 39 const char kHistogramClientName[] = "client"; | 41 const char kHistogramClientName[] = "client"; |
| 40 const char kHistogramServerName[] = "server"; | 42 const char kHistogramServerName[] = "server"; |
| 41 const char kHistogramServerFormat[] = "server%d"; | 43 const char kHistogramServerFormat[] = "server%d"; |
| 42 const char kHistogramPopularName[] = "popular"; | 44 const char kHistogramPopularName[] = "popular"; |
| 43 const char kHistogramWhitelistName[] = "whitelist"; | 45 const char kHistogramWhitelistName[] = "whitelist"; |
| 44 | 46 |
| 45 const char kPopularSitesFieldTrialName[] = "NTPPopularSites"; | 47 const char kPopularSitesFieldTrialName[] = "NTPPopularSites"; |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 | 658 |
| 657 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} | 659 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} |
| 658 | 660 |
| 659 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, | 661 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, |
| 660 ChangeReason change_reason) { | 662 ChangeReason change_reason) { |
| 661 if (mv_source_ == TOP_SITES) { | 663 if (mv_source_ == TOP_SITES) { |
| 662 // The displayed suggestions are invalidated. | 664 // The displayed suggestions are invalidated. |
| 663 InitiateTopSitesQuery(); | 665 InitiateTopSitesQuery(); |
| 664 } | 666 } |
| 665 } | 667 } |
| 668 |
| 669 } // namespace ntp_tiles |
| OLD | NEW |