Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: chrome/common/safe_browsing/download_protection_util.cc

Issue 2331323002: Remove .osx file extension as a type of Mac executable (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h"
(...skipping 18 matching lines...) Expand all
29 // This function will return ZIPPED_EXECUTABLE for ZIP files as a 29 // This function will return ZIPPED_EXECUTABLE for ZIP files as a
30 // placeholder. The correct DownloadType will be determined based on the 30 // placeholder. The correct DownloadType will be determined based on the
31 // result of analyzing the ZIP file. 31 // result of analyzing the ZIP file.
32 return ClientDownloadRequest::ZIPPED_EXECUTABLE; 32 return ClientDownloadRequest::ZIPPED_EXECUTABLE;
33 else if (file.MatchesExtension(FILE_PATH_LITERAL(".dmg")) || 33 else if (file.MatchesExtension(FILE_PATH_LITERAL(".dmg")) ||
34 file.MatchesExtension(FILE_PATH_LITERAL(".img")) || 34 file.MatchesExtension(FILE_PATH_LITERAL(".img")) ||
35 file.MatchesExtension(FILE_PATH_LITERAL(".iso")) || 35 file.MatchesExtension(FILE_PATH_LITERAL(".iso")) ||
36 file.MatchesExtension(FILE_PATH_LITERAL(".pkg")) || 36 file.MatchesExtension(FILE_PATH_LITERAL(".pkg")) ||
37 file.MatchesExtension(FILE_PATH_LITERAL(".mpkg")) || 37 file.MatchesExtension(FILE_PATH_LITERAL(".mpkg")) ||
38 file.MatchesExtension(FILE_PATH_LITERAL(".smi")) || 38 file.MatchesExtension(FILE_PATH_LITERAL(".smi")) ||
39 file.MatchesExtension(FILE_PATH_LITERAL(".osx")) ||
40 file.MatchesExtension(FILE_PATH_LITERAL(".app")) || 39 file.MatchesExtension(FILE_PATH_LITERAL(".app")) ||
41 file.MatchesExtension(FILE_PATH_LITERAL(".cdr")) || 40 file.MatchesExtension(FILE_PATH_LITERAL(".cdr")) ||
42 file.MatchesExtension(FILE_PATH_LITERAL(".dmgpart")) || 41 file.MatchesExtension(FILE_PATH_LITERAL(".dmgpart")) ||
43 file.MatchesExtension(FILE_PATH_LITERAL(".dvdr")) || 42 file.MatchesExtension(FILE_PATH_LITERAL(".dvdr")) ||
44 file.MatchesExtension(FILE_PATH_LITERAL(".dart")) || 43 file.MatchesExtension(FILE_PATH_LITERAL(".dart")) ||
45 file.MatchesExtension(FILE_PATH_LITERAL(".dc42")) || 44 file.MatchesExtension(FILE_PATH_LITERAL(".dc42")) ||
46 file.MatchesExtension(FILE_PATH_LITERAL(".diskcopy42")) || 45 file.MatchesExtension(FILE_PATH_LITERAL(".diskcopy42")) ||
47 file.MatchesExtension(FILE_PATH_LITERAL(".imgpart")) || 46 file.MatchesExtension(FILE_PATH_LITERAL(".imgpart")) ||
48 file.MatchesExtension(FILE_PATH_LITERAL(".ndif")) || 47 file.MatchesExtension(FILE_PATH_LITERAL(".ndif")) ||
49 file.MatchesExtension(FILE_PATH_LITERAL(".udif")) || 48 file.MatchesExtension(FILE_PATH_LITERAL(".udif")) ||
50 file.MatchesExtension(FILE_PATH_LITERAL(".toast")) || 49 file.MatchesExtension(FILE_PATH_LITERAL(".toast")) ||
51 file.MatchesExtension(FILE_PATH_LITERAL(".sparsebundle")) || 50 file.MatchesExtension(FILE_PATH_LITERAL(".sparsebundle")) ||
52 file.MatchesExtension(FILE_PATH_LITERAL(".sparseimage"))) 51 file.MatchesExtension(FILE_PATH_LITERAL(".sparseimage")))
53 return ClientDownloadRequest::MAC_EXECUTABLE; 52 return ClientDownloadRequest::MAC_EXECUTABLE;
54 else if (FileTypePolicies::GetInstance()->IsArchiveFile(file)) 53 else if (FileTypePolicies::GetInstance()->IsArchiveFile(file))
55 return ClientDownloadRequest::ARCHIVE; 54 return ClientDownloadRequest::ARCHIVE;
56 return ClientDownloadRequest::WIN_EXECUTABLE; 55 return ClientDownloadRequest::WIN_EXECUTABLE;
57 } 56 }
58 57
59 } // namespace download_protection_util 58 } // namespace download_protection_util
60 } // namespace safe_browsing 59 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698