OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/history/core/browser/top_sites_impl.h" | 5 #include "components/history/core/browser/top_sites_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/md5.h" | 16 #include "base/md5.h" |
17 #include "base/memory/ref_counted_memory.h" | 17 #include "base/memory/ref_counted_memory.h" |
18 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/task_runner.h" | 22 #include "base/task_runner.h" |
23 #include "base/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
24 #include "base/values.h" | 24 #include "base/values.h" |
25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
26 #include "components/history/core/browser/history_backend.h" | 26 #include "components/history/core/browser/history_backend.h" |
27 #include "components/history/core/browser/history_constants.h" | 27 #include "components/history/core/browser/history_constants.h" |
28 #include "components/history/core/browser/history_db_task.h" | 28 #include "components/history/core/browser/history_db_task.h" |
29 #include "components/history/core/browser/page_usage_data.h" | 29 #include "components/history/core/browser/page_usage_data.h" |
30 #include "components/history/core/browser/top_sites_cache.h" | 30 #include "components/history/core/browser/top_sites_cache.h" |
31 #include "components/history/core/browser/top_sites_observer.h" | 31 #include "components/history/core/browser/top_sites_observer.h" |
32 #include "components/history/core/browser/url_utils.h" | 32 #include "components/history/core/browser/url_utils.h" |
33 #include "components/history/core/common/thumbnail_score.h" | 33 #include "components/history/core/common/thumbnail_score.h" |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin(); | 935 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin(); |
936 i != indices_to_delete.rend(); i++) { | 936 i != indices_to_delete.rend(); i++) { |
937 new_top_sites.erase(new_top_sites.begin() + *i); | 937 new_top_sites.erase(new_top_sites.begin() + *i); |
938 } | 938 } |
939 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES); | 939 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES); |
940 } | 940 } |
941 StartQueryForMostVisited(); | 941 StartQueryForMostVisited(); |
942 } | 942 } |
943 | 943 |
944 } // namespace history | 944 } // namespace history |
OLD | NEW |