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 | 5 |
6 #include "chrome/browser/download/download_safe_browsing_client.h" | 6 #include "chrome/browser/download/download_safe_browsing_client.h" |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/metrics/stats_counters.h" | 11 #include "base/metrics/stats_counters.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/download/download_create_info.h" | |
15 #include "chrome/browser/download/download_manager.h" | |
16 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 14 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
17 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
18 #include "content/browser/browser_thread.h" | 16 #include "content/browser/browser_thread.h" |
| 17 #include "content/browser/download/download_create_info.h" |
| 18 #include "content/browser/download/download_manager.h" |
19 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 19 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
20 | 20 |
21 // TODO(lzheng): Get rid of the AddRef and Release after | 21 // TODO(lzheng): Get rid of the AddRef and Release after |
22 // SafeBrowsingService::Client is changed to RefCountedThreadSafe<>. | 22 // SafeBrowsingService::Client is changed to RefCountedThreadSafe<>. |
23 | 23 |
24 DownloadSBClient::DownloadSBClient(int32 download_id, | 24 DownloadSBClient::DownloadSBClient(int32 download_id, |
25 const std::vector<GURL>& url_chain, | 25 const std::vector<GURL>& url_chain, |
26 const GURL& referrer_url, | 26 const GURL& referrer_url, |
27 bool safe_browsing_enabled) | 27 bool safe_browsing_enabled) |
28 : download_id_(download_id), | 28 : download_id_(download_id), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 true, // is_subresource | 175 true, // is_subresource |
176 result, | 176 result, |
177 post_data); | 177 post_data); |
178 } | 178 } |
179 | 179 |
180 void DownloadSBClient::UpdateDownloadCheckStats(SBStatsType stat_type) { | 180 void DownloadSBClient::UpdateDownloadCheckStats(SBStatsType stat_type) { |
181 UMA_HISTOGRAM_ENUMERATION("SB2.DownloadChecks", | 181 UMA_HISTOGRAM_ENUMERATION("SB2.DownloadChecks", |
182 stat_type, | 182 stat_type, |
183 DOWNLOAD_CHECKS_MAX); | 183 DOWNLOAD_CHECKS_MAX); |
184 } | 184 } |
OLD | NEW |