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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "chrome/browser/download/download_extensions.h" | 8 #include "chrome/browser/download/download_extensions.h" |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "net/base/mime_util.h" | 11 #include "net/base/mime_util.h" |
12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
13 | 13 |
14 namespace download_util { | 14 namespace download_util { |
15 | 15 |
16 // For file extensions taken from mozilla: | 16 // For file extensions taken from mozilla: |
17 | 17 |
18 /* ***** BEGIN LICENSE BLOCK ***** | 18 /* ***** BEGIN LICENSE BLOCK ***** |
19 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 19 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
20 * | 20 * |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 for (size_t i = 0; i < arraysize(kExecutableBlackList); ++i) { | 271 for (size_t i = 0; i < arraysize(kExecutableBlackList); ++i) { |
272 if (net::MatchesMimeType(kExecutableBlackList[i], mime_type)) | 272 if (net::MatchesMimeType(kExecutableBlackList[i], mime_type)) |
273 return false; | 273 return false; |
274 } | 274 } |
275 // We consider only other application types to be executable. | 275 // We consider only other application types to be executable. |
276 return net::MatchesMimeType("application/*", mime_type); | 276 return net::MatchesMimeType("application/*", mime_type); |
277 } | 277 } |
278 | 278 |
279 | 279 |
280 } // namespace download_util | 280 } // namespace download_util |
OLD | NEW |