| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/most_visited_handler.h" | 5 #include "chrome/browser/dom_ui/most_visited_handler.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/md5.h" | 12 #include "base/md5.h" |
| 13 #include "base/singleton.h" | 13 #include "base/singleton.h" |
| 14 #include "base/scoped_vector.h" | 14 #include "base/scoped_vector.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "base/thread.h" | 18 #include "base/thread.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "chrome/browser/chrome_thread.h" | 20 #include "chrome/browser/chrome_thread.h" |
| 21 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 21 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 22 #include "chrome/browser/dom_ui/dom_ui_favicon_source.h" | 22 #include "chrome/browser/dom_ui/dom_ui_favicon_source.h" |
| 23 #include "chrome/browser/dom_ui/dom_ui_thumbnail_source.h" | 23 #include "chrome/browser/dom_ui/dom_ui_thumbnail_source.h" |
| 24 #include "chrome/browser/dom_ui/new_tab_ui.h" | 24 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 25 #include "chrome/browser/history/page_usage_data.h" | 25 #include "chrome/browser/history/page_usage_data.h" |
| 26 #include "chrome/browser/history/history.h" | 26 #include "chrome/browser/history/history.h" |
| 27 #include "chrome/browser/history/top_sites.h" | 27 #include "chrome/browser/history/top_sites.h" |
| 28 #include "chrome/browser/metrics/user_metrics.h" | 28 #include "chrome/browser/metrics/user_metrics.h" |
| 29 #include "chrome/browser/pref_service.h" | 29 #include "chrome/browser/prefs/pref_service.h" |
| 30 #include "chrome/browser/profile.h" | 30 #include "chrome/browser/profile.h" |
| 31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/notification_type.h" | 32 #include "chrome/common/notification_type.h" |
| 33 #include "chrome/common/notification_source.h" | 33 #include "chrome/common/notification_source.h" |
| 34 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 35 #include "googleurl/src/gurl.h" | 35 #include "googleurl/src/gurl.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 | 39 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) { | 522 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) { |
| 523 return MD5String(url); | 523 return MD5String(url); |
| 524 } | 524 } |
| 525 | 525 |
| 526 // static | 526 // static |
| 527 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) { | 527 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) { |
| 528 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist); | 528 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist); |
| 529 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs); | 529 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs); |
| 530 } | 530 } |
| OLD | NEW |