Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: components/history/core/browser/top_sites_impl.cc

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/prefs/pref_registry_simple.h"
20 #include "base/prefs/pref_service.h"
21 #include "base/prefs/scoped_user_pref_update.h"
22 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
23 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
24 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
25 #include "base/task_runner.h" 22 #include "base/task_runner.h"
26 #include "base/thread_task_runner_handle.h" 23 #include "base/thread_task_runner_handle.h"
27 #include "base/values.h" 24 #include "base/values.h"
28 #include "build/build_config.h" 25 #include "build/build_config.h"
29 #include "components/history/core/browser/history_backend.h" 26 #include "components/history/core/browser/history_backend.h"
30 #include "components/history/core/browser/history_constants.h" 27 #include "components/history/core/browser/history_constants.h"
31 #include "components/history/core/browser/history_db_task.h" 28 #include "components/history/core/browser/history_db_task.h"
32 #include "components/history/core/browser/page_usage_data.h" 29 #include "components/history/core/browser/page_usage_data.h"
33 #include "components/history/core/browser/top_sites_cache.h" 30 #include "components/history/core/browser/top_sites_cache.h"
34 #include "components/history/core/browser/top_sites_observer.h" 31 #include "components/history/core/browser/top_sites_observer.h"
35 #include "components/history/core/browser/url_utils.h" 32 #include "components/history/core/browser/url_utils.h"
36 #include "components/history/core/common/thumbnail_score.h" 33 #include "components/history/core/common/thumbnail_score.h"
34 #include "components/prefs/pref_registry_simple.h"
35 #include "components/prefs/pref_service.h"
36 #include "components/prefs/scoped_user_pref_update.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 #include "ui/base/layout.h" 38 #include "ui/base/layout.h"
39 #include "ui/base/resource/resource_bundle.h" 39 #include "ui/base/resource/resource_bundle.h"
40 #include "ui/gfx/image/image_util.h" 40 #include "ui/gfx/image/image_util.h"
41 41
42 using base::DictionaryValue; 42 using base::DictionaryValue;
43 43
44 namespace history { 44 namespace history {
45 namespace { 45 namespace {
46 46
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin(); 934 for (std::set<size_t>::reverse_iterator i = indices_to_delete.rbegin();
935 i != indices_to_delete.rend(); i++) { 935 i != indices_to_delete.rend(); i++) {
936 new_top_sites.erase(new_top_sites.begin() + *i); 936 new_top_sites.erase(new_top_sites.begin() + *i);
937 } 937 }
938 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES); 938 SetTopSites(new_top_sites, CALL_LOCATION_FROM_OTHER_PLACES);
939 } 939 }
940 StartQueryForMostVisited(); 940 StartQueryForMostVisited();
941 } 941 }
942 942
943 } // namespace history 943 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698