OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/new_tab_ui.h" | 5 #include "chrome/browser/dom_ui/new_tab_ui.h" |
6 | 6 |
7 #include "base/histogram.h" | 7 #include "base/histogram.h" |
8 #include "base/string_piece.h" | 8 #include "base/string_piece.h" |
9 #include "chrome/app/locales/locale_settings.h" | 9 #include "chrome/app/locales/locale_settings.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/browser_resources.h" | 12 #include "chrome/browser/browser_resources.h" |
13 #include "chrome/browser/history_tab_ui.h" | 13 #include "chrome/browser/history_tab_ui.h" |
14 #include "chrome/browser/history/page_usage_data.h" | 14 #include "chrome/browser/history/page_usage_data.h" |
15 #include "chrome/browser/navigation_entry.h" | 15 #include "chrome/browser/navigation_entry.h" |
16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
17 #include "chrome/browser/render_view_host.h" | 17 #include "chrome/browser/render_view_host.h" |
18 #include "chrome/browser/template_url.h" | 18 #include "chrome/browser/template_url.h" |
19 #include "chrome/browser/user_metrics.h" | 19 #include "chrome/browser/user_metrics.h" |
20 #include "chrome/browser/views/keyword_editor_view.h" | 20 #include "chrome/browser/views/keyword_editor_view.h" |
21 #include "chrome/common/jstemplate_builder.h" | 21 #include "chrome/common/jstemplate_builder.h" |
22 #include "chrome/common/l10n_util.h" | 22 #include "chrome/common/l10n_util.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "chrome/common/pref_service.h" | 24 #include "chrome/common/pref_service.h" |
25 #include "chrome/common/resource_bundle.h" | 25 #include "chrome/common/resource_bundle.h" |
26 | 26 |
27 #include "chromium_strings.h" | 27 #include "chromium_strings.h" |
28 #include "generated_resources.h" | 28 #include "generated_resources.h" |
29 | 29 |
| 30 using base::Time; |
| 31 using base::TimeDelta; |
| 32 using base::TimeTicks; |
| 33 |
30 // The URL scheme used for the new tab. | 34 // The URL scheme used for the new tab. |
31 static const char kNewTabUIScheme[] = "chrome-internal"; | 35 static const char kNewTabUIScheme[] = "chrome-internal"; |
32 | 36 |
33 // The path used in internal URLs to thumbnail data. | 37 // The path used in internal URLs to thumbnail data. |
34 static const char kThumbnailPath[] = "thumb"; | 38 static const char kThumbnailPath[] = "thumb"; |
35 | 39 |
36 // The path used in internal URLs to favicon data. | 40 // The path used in internal URLs to favicon data. |
37 static const char kFavIconPath[] = "favicon"; | 41 static const char kFavIconPath[] = "favicon"; |
38 | 42 |
39 // The number of most visited pages we show. | 43 // The number of most visited pages we show. |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 const std::vector<GURL>& urls = most_visited_handler_->most_visited_urls(); | 820 const std::vector<GURL>& urls = most_visited_handler_->most_visited_urls(); |
817 for (size_t i = 0; i < urls.size(); ++i) { | 821 for (size_t i = 0; i < urls.size(); ++i) { |
818 if (url == urls[i]) { | 822 if (url == urls[i]) { |
819 UserMetrics::RecordComputedAction(StringPrintf(L"MostVisited%d", i), | 823 UserMetrics::RecordComputedAction(StringPrintf(L"MostVisited%d", i), |
820 profile()); | 824 profile()); |
821 break; | 825 break; |
822 } | 826 } |
823 } | 827 } |
824 } | 828 } |
825 } | 829 } |
826 | |
OLD | NEW |