| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/history/top_sites.h" | 5 #include "chrome/browser/history/top_sites.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/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/md5.h" | 13 #include "base/md5.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/history/history_backend.h" | 17 #include "chrome/browser/history/history_backend.h" |
| 18 #include "chrome/browser/history/history_notifications.h" | 18 #include "chrome/browser/history/history_notifications.h" |
| 19 #include "chrome/browser/history/page_usage_data.h" | 19 #include "chrome/browser/history/page_usage_data.h" |
| 20 #include "chrome/browser/history/top_sites_backend.h" | 20 #include "chrome/browser/history/top_sites_backend.h" |
| 21 #include "chrome/browser/history/top_sites_cache.h" | 21 #include "chrome/browser/history/top_sites_cache.h" |
| 22 #include "chrome/browser/prefs/pref_service.h" | 22 #include "chrome/browser/prefs/pref_service.h" |
| 23 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 23 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h" | 25 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h" |
| 26 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 26 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 27 #include "chrome/common/chrome_notification_types.h" | 27 #include "chrome/common/chrome_notification_types.h" |
| 28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
| 29 #include "chrome/common/thumbnail_score.h" | 29 #include "chrome/common/thumbnail_score.h" |
| 30 #include "content/browser/tab_contents/navigation_controller.h" | |
| 31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 31 #include "content/public/browser/navigation_controller.h" |
| 32 #include "content/public/browser/navigation_details.h" | 32 #include "content/public/browser/navigation_details.h" |
| 33 #include "content/public/browser/navigation_entry.h" | 33 #include "content/public/browser/navigation_entry.h" |
| 34 #include "content/public/browser/notification_service.h" | 34 #include "content/public/browser/notification_service.h" |
| 35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
| 36 #include "grit/chromium_strings.h" | 36 #include "grit/chromium_strings.h" |
| 37 #include "grit/generated_resources.h" | 37 #include "grit/generated_resources.h" |
| 38 #include "grit/locale_settings.h" | 38 #include "grit/locale_settings.h" |
| 39 #include "grit/theme_resources.h" | 39 #include "grit/theme_resources.h" |
| 40 #include "ui/base/l10n/l10n_util.h" | 40 #include "ui/base/l10n/l10n_util.h" |
| 41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 SetTopSites(pages); | 1036 SetTopSites(pages); |
| 1037 | 1037 |
| 1038 // Used only in testing. | 1038 // Used only in testing. |
| 1039 content::NotificationService::current()->Notify( | 1039 content::NotificationService::current()->Notify( |
| 1040 chrome::NOTIFICATION_TOP_SITES_UPDATED, | 1040 chrome::NOTIFICATION_TOP_SITES_UPDATED, |
| 1041 content::Source<TopSites>(this), | 1041 content::Source<TopSites>(this), |
| 1042 content::Details<CancelableRequestProvider::Handle>(&handle)); | 1042 content::Details<CancelableRequestProvider::Handle>(&handle)); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 } // namespace history | 1045 } // namespace history |
| OLD | NEW |