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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/md5.h" | 14 #include "base/md5.h" |
15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram_macros.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "base/prefs/scoped_user_pref_update.h" | 18 #include "base/prefs/scoped_user_pref_update.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/thread_task_runner_handle.h" |
24 #include "base/values.h" | 24 #include "base/values.h" |
25 #include "components/history/core/browser/history_backend.h" | 25 #include "components/history/core/browser/history_backend.h" |
26 #include "components/history/core/browser/history_constants.h" | 26 #include "components/history/core/browser/history_constants.h" |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin(); | 912 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin(); |
913 i != indices_to_delete.rend(); i++) { | 913 i != indices_to_delete.rend(); i++) { |
914 new_top_sites.erase(new_top_sites.begin() + *i); | 914 new_top_sites.erase(new_top_sites.begin() + *i); |
915 } | 915 } |
916 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES); | 916 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES); |
917 } | 917 } |
918 StartQueryForMostVisited(); | 918 StartQueryForMostVisited(); |
919 } | 919 } |
920 | 920 |
921 } // namespace history | 921 } // namespace history |
OLD | NEW |