OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/ntp/most_visited_handler.h" | 5 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
36 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
37 #include "components/pref_registry/pref_registry_syncable.h" | 37 #include "components/pref_registry/pref_registry_syncable.h" |
38 #include "content/public/browser/navigation_controller.h" | 38 #include "content/public/browser/navigation_controller.h" |
39 #include "content/public/browser/navigation_entry.h" | 39 #include "content/public/browser/navigation_entry.h" |
40 #include "content/public/browser/notification_source.h" | 40 #include "content/public/browser/notification_source.h" |
41 #include "content/public/browser/url_data_source.h" | 41 #include "content/public/browser/url_data_source.h" |
42 #include "content/public/browser/user_metrics.h" | 42 #include "content/public/browser/user_metrics.h" |
43 #include "content/public/browser/web_contents.h" | 43 #include "content/public/browser/web_contents.h" |
44 #include "content/public/browser/web_ui.h" | 44 #include "content/public/browser/web_ui.h" |
45 #include "grit/chromium_strings.h" | |
46 #include "grit/generated_resources.h" | |
47 #include "grit/locale_settings.h" | |
48 #include "ui/base/l10n/l10n_util.h" | |
49 #include "url/gurl.h" | 45 #include "url/gurl.h" |
50 | 46 |
51 using base::UserMetricsAction; | 47 using base::UserMetricsAction; |
52 | 48 |
53 MostVisitedHandler::MostVisitedHandler() | 49 MostVisitedHandler::MostVisitedHandler() |
54 : got_first_most_visited_request_(false), | 50 : got_first_most_visited_request_(false), |
55 most_visited_viewed_(false), | 51 most_visited_viewed_(false), |
56 user_action_logged_(false), | 52 user_action_logged_(false), |
57 weak_ptr_factory_(this) { | 53 weak_ptr_factory_(this) { |
58 } | 54 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 return base::MD5String(url); | 258 return base::MD5String(url); |
263 } | 259 } |
264 | 260 |
265 // static | 261 // static |
266 void MostVisitedHandler::RegisterProfilePrefs( | 262 void MostVisitedHandler::RegisterProfilePrefs( |
267 user_prefs::PrefRegistrySyncable* registry) { | 263 user_prefs::PrefRegistrySyncable* registry) { |
268 registry->RegisterDictionaryPref( | 264 registry->RegisterDictionaryPref( |
269 prefs::kNtpMostVisitedURLsBlacklist, | 265 prefs::kNtpMostVisitedURLsBlacklist, |
270 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 266 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
271 } | 267 } |
OLD | NEW |