| 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/common/safe_browsing/download_protection_util.h" | 5 #include "chrome/common/safe_browsing/download_protection_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
| 10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 11 | 12 |
| 12 namespace safe_browsing { | 13 namespace safe_browsing { |
| 13 namespace download_protection_util { | 14 namespace download_protection_util { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 // This enum matches the SBClientDownloadExtensions enum in histograms.xml. If | 18 // This enum matches the SBClientDownloadExtensions enum in histograms.xml. If |
| 18 // you are adding a value here, you should also add to the enum definition in | 19 // you are adding a value here, you should also add to the enum definition in |
| 19 // histograms.xml. Additions only at the end just in front of EXTENSION_MAX, | 20 // histograms.xml. Additions only at the end just in front of EXTENSION_MAX, |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 return ClientDownloadRequest::ARCHIVE; | 588 return ClientDownloadRequest::ARCHIVE; |
| 588 return ClientDownloadRequest::WIN_EXECUTABLE; | 589 return ClientDownloadRequest::WIN_EXECUTABLE; |
| 589 } | 590 } |
| 590 | 591 |
| 591 int GetSBClientDownloadExtensionValueForUMA(const base::FilePath& file) { | 592 int GetSBClientDownloadExtensionValueForUMA(const base::FilePath& file) { |
| 592 return GetFileType(file).uma_value; | 593 return GetFileType(file).uma_value; |
| 593 } | 594 } |
| 594 | 595 |
| 595 } // namespace download_protection_util | 596 } // namespace download_protection_util |
| 596 } // namespace safe_browsing | 597 } // namespace safe_browsing |
| OLD | NEW |