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/macros.h" |
10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "build/build_config.h" |
12 #include "net/base/mime_util.h" | 14 #include "net/base/mime_util.h" |
13 #include "net/base/net_util.h" | 15 #include "net/base/net_util.h" |
14 | 16 |
15 namespace download_util { | 17 namespace download_util { |
16 | 18 |
17 namespace { | 19 namespace { |
18 | 20 |
19 enum DownloadAutoOpenHint { | 21 enum DownloadAutoOpenHint { |
20 ALLOW_AUTO_OPEN, | 22 ALLOW_AUTO_OPEN, |
21 | 23 |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 542 |
541 DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path) { | 543 DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path) { |
542 return GetFileType(path).danger_level; | 544 return GetFileType(path).danger_level; |
543 } | 545 } |
544 | 546 |
545 bool IsAllowedToOpenAutomatically(const base::FilePath& path) { | 547 bool IsAllowedToOpenAutomatically(const base::FilePath& path) { |
546 return GetFileType(path).auto_open_hint == ALLOW_AUTO_OPEN; | 548 return GetFileType(path).auto_open_hint == ALLOW_AUTO_OPEN; |
547 } | 549 } |
548 | 550 |
549 } // namespace download_util | 551 } // namespace download_util |
OLD | NEW |