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> |
11 | 11 |
12 #if defined(OS_ANDROID) | 12 #if defined(OS_ANDROID) |
13 #include <jni.h> | 13 #include <jni.h> |
14 #endif | 14 #endif |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/feature_list.h" | 18 #include "base/feature_list.h" |
19 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/metrics/histogram_macros.h" |
21 #include "base/metrics/sparse_histogram.h" | 22 #include "base/metrics/sparse_histogram.h" |
22 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
23 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
24 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
25 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
26 #include "components/history/core/browser/top_sites.h" | 27 #include "components/history/core/browser/top_sites.h" |
27 #include "components/ntp_tiles/constants.h" | 28 #include "components/ntp_tiles/constants.h" |
28 #include "components/ntp_tiles/pref_names.h" | 29 #include "components/ntp_tiles/pref_names.h" |
29 #include "components/ntp_tiles/switches.h" | 30 #include "components/ntp_tiles/switches.h" |
30 #include "components/pref_registry/pref_registry_syncable.h" | 31 #include "components/pref_registry/pref_registry_syncable.h" |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 544 |
544 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, | 545 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, |
545 ChangeReason change_reason) { | 546 ChangeReason change_reason) { |
546 if (mv_source_ == NTPTileSource::TOP_SITES) { | 547 if (mv_source_ == NTPTileSource::TOP_SITES) { |
547 // The displayed tiles are invalidated. | 548 // The displayed tiles are invalidated. |
548 InitiateTopSitesQuery(); | 549 InitiateTopSitesQuery(); |
549 } | 550 } |
550 } | 551 } |
551 | 552 |
552 } // namespace ntp_tiles | 553 } // namespace ntp_tiles |
OLD | NEW |