| 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/safe_browsing/download_protection_service.h" | 5 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 uma_file_type); | 734 uma_file_type); |
| 735 } else { | 735 } else { |
| 736 UMA_HISTOGRAM_SPARSE_SLOWLY( | 736 UMA_HISTOGRAM_SPARSE_SLOWLY( |
| 737 "SBClientDownload.DmgFileHasNoExecutableByType", uma_file_type); | 737 "SBClientDownload.DmgFileHasNoExecutableByType", uma_file_type); |
| 738 } | 738 } |
| 739 | 739 |
| 740 UMA_HISTOGRAM_TIMES("SBClientDownload.ExtractDmgFeaturesTime", | 740 UMA_HISTOGRAM_TIMES("SBClientDownload.ExtractDmgFeaturesTime", |
| 741 base::TimeTicks::Now() - dmg_analysis_start_time_); | 741 base::TimeTicks::Now() - dmg_analysis_start_time_); |
| 742 | 742 |
| 743 if (!archived_executable_) { | 743 if (!archived_executable_) { |
| 744 if (!results.success && CanReportInvalidArchives()) { | 744 if (!results.success) { |
| 745 type_ = ClientDownloadRequest::INVALID_MAC_ARCHIVE; | 745 type_ = ClientDownloadRequest::INVALID_MAC_ARCHIVE; |
| 746 } else { | 746 } else { |
| 747 PostFinishTask(UNKNOWN, REASON_ARCHIVE_WITHOUT_BINARIES); | 747 PostFinishTask(SAFE, REASON_ARCHIVE_WITHOUT_BINARIES); |
| 748 return; | 748 return; |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 OnFileFeatureExtractionDone(); | 752 OnFileFeatureExtractionDone(); |
| 753 } | 753 } |
| 754 #endif // defined(OS_MACOSX) | 754 #endif // defined(OS_MACOSX) |
| 755 | 755 |
| 756 enum WhitelistType { | 756 enum WhitelistType { |
| 757 NO_WHITELIST_MATCH, | 757 NO_WHITELIST_MATCH, |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1718 GURL DownloadProtectionService::GetDownloadRequestUrl() { | 1718 GURL DownloadProtectionService::GetDownloadRequestUrl() { |
| 1719 GURL url(kDownloadRequestUrl); | 1719 GURL url(kDownloadRequestUrl); |
| 1720 std::string api_key = google_apis::GetAPIKey(); | 1720 std::string api_key = google_apis::GetAPIKey(); |
| 1721 if (!api_key.empty()) | 1721 if (!api_key.empty()) |
| 1722 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); | 1722 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); |
| 1723 | 1723 |
| 1724 return url; | 1724 return url; |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 } // namespace safe_browsing | 1727 } // namespace safe_browsing |
| OLD | NEW |