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 // Download utility implementation | 5 // Download utility implementation |
6 | 6 |
7 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 7 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
8 | 8 |
9 #include "chrome/browser/download/download_util.h" | 9 #include "chrome/browser/download/download_util.h" |
10 | 10 |
11 #include <cmath> | 11 #include <cmath> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "base/i18n/time_formatting.h" | 16 #include "base/i18n/time_formatting.h" |
17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/sys_string_conversions.h" | 22 #include "base/strings/sys_string_conversions.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "base/threading/thread_restrictions.h" | 24 #include "base/threading/thread_restrictions.h" |
25 #include "base/value_conversions.h" | 25 #include "base/value_conversions.h" |
26 #include "base/values.h" | 26 #include "base/values.h" |
| 27 #include "chrome/browser/chrome_notification_types.h" |
27 #include "chrome/browser/download/download_extensions.h" | 28 #include "chrome/browser/download/download_extensions.h" |
28 #include "chrome/browser/download/download_item_model.h" | 29 #include "chrome/browser/download/download_item_model.h" |
29 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
30 #include "chrome/common/chrome_notification_types.h" | |
31 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
32 #include "chrome/common/time_format.h" | 32 #include "chrome/common/time_format.h" |
33 #include "content/public/browser/download_item.h" | 33 #include "content/public/browser/download_item.h" |
34 #include "content/public/browser/download_manager.h" | 34 #include "content/public/browser/download_manager.h" |
35 #include "content/public/browser/render_view_host.h" | 35 #include "content/public/browser/render_view_host.h" |
36 #include "content/public/common/url_constants.h" | 36 #include "content/public/common/url_constants.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 "net/base/mime_util.h" | 40 #include "net/base/mime_util.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 UMA_HISTOGRAM_ENUMERATION( | 482 UMA_HISTOGRAM_ENUMERATION( |
483 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY); | 483 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY); |
484 } | 484 } |
485 | 485 |
486 void RecordDownloadSource(ChromeDownloadSource source) { | 486 void RecordDownloadSource(ChromeDownloadSource source) { |
487 UMA_HISTOGRAM_ENUMERATION( | 487 UMA_HISTOGRAM_ENUMERATION( |
488 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY); | 488 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY); |
489 } | 489 } |
490 | 490 |
491 } // namespace download_util | 491 } // namespace download_util |
OLD | NEW |