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

Side by Side Diff: chrome/browser/download/download_extensions.cc

Issue 1881763002: Add more mac executable extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 8 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 | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | 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 <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/macros.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // Automator Action. 494 // Automator Action.
495 {"action", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 495 {"action", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
496 496
497 {"command", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 497 {"command", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
498 498
499 // Automator Workflow. 499 // Automator Workflow.
500 {"workflow", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 500 {"workflow", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
501 #endif 501 #endif
502 502
503 // Package management formats. OS_WIN package formats are handled above. 503 // Package management formats. OS_WIN package formats are handled above.
504 #if defined(OS_MACOSX) || defined(OS_LINUX) 504 #if defined(OS_MACOSX) || defined(OS_LINUX)
Robert Sesek 2016/04/15 21:21:38 Not sure these apply to OS_LINUX.
Jialiu Lin 2016/04/15 22:01:06 You're totally right.... Thanks for catching this.
505 {"cdr", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
506 {"dart", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
507 {"dc42", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
508 {"diskcopy42", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
509 {"dmg", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
510 {"dmgpart", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
511 {"dvdr", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
512 {"img", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
513 {"imgpart", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
514 {"ndif", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
505 {"pkg", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 515 {"pkg", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
516 {"smi", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
517 {"sparsebundle", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
518 {"sparseimage", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
519 {"toast", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
520 {"udif", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
506 #endif 521 #endif
507 #if defined(OS_LINUX) 522 #if defined(OS_LINUX)
508 {"deb", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 523 {"deb", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
509 {"pet", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 524 {"pet", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
510 {"pup", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 525 {"pup", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
511 {"rpm", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 526 {"rpm", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
512 {"slp", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN}, 527 {"slp", ALLOW_ON_USER_GESTURE, DISALLOW_AUTO_OPEN},
513 528
514 // "common" executable file extensions for linux. There's not really much 529 // "common" executable file extensions for linux. There's not really much
515 // reason to block since they require execute bit to actually run. Included 530 // reason to block since they require execute bit to actually run. Included
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 571
557 DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path) { 572 DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path) {
558 return GetFileType(path).danger_level; 573 return GetFileType(path).danger_level;
559 } 574 }
560 575
561 bool IsAllowedToOpenAutomatically(const base::FilePath& path) { 576 bool IsAllowedToOpenAutomatically(const base::FilePath& path) {
562 return GetFileType(path).auto_open_hint == ALLOW_AUTO_OPEN; 577 return GetFileType(path).auto_open_hint == ALLOW_AUTO_OPEN;
563 } 578 }
564 579
565 } // namespace download_util 580 } // namespace download_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698