| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_util.h" | 8 #include "chrome/browser/download/download_util.h" |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 * under the terms of either the GPL or the LGPL, and not to allow others to | 48 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 49 * use your version of this file under the terms of the MPL, indicate your | 49 * use your version of this file under the terms of the MPL, indicate your |
| 50 * decision by deleting the provisions above and replace them with the notice | 50 * decision by deleting the provisions above and replace them with the notice |
| 51 * and other provisions required by the GPL or the LGPL. If you do not delete | 51 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 52 * the provisions above, a recipient may use your version of this file under | 52 * the provisions above, a recipient may use your version of this file under |
| 53 * the terms of any one of the MPL, the GPL or the LGPL. | 53 * the terms of any one of the MPL, the GPL or the LGPL. |
| 54 * | 54 * |
| 55 * ***** END LICENSE BLOCK ***** */ | 55 * ***** END LICENSE BLOCK ***** */ |
| 56 | 56 |
| 57 static const char* const g_executables[] = { | 57 static const char* const g_executables[] = { |
| 58 #if defined(OS_WIN) |
| 58 "ad", | 59 "ad", |
| 59 "ade", | 60 "ade", |
| 60 "adp", | 61 "adp", |
| 61 "app", | 62 "app", |
| 62 "application", | 63 "application", |
| 63 "asp", | 64 "asp", |
| 64 "asx", | 65 "asx", |
| 65 "bas", | 66 "bas", |
| 66 "bat", | 67 "bat", |
| 67 "chm", | 68 "chm", |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 "vsmacros", | 130 "vsmacros", |
| 130 "vss", | 131 "vss", |
| 131 "vst", | 132 "vst", |
| 132 "vsw", | 133 "vsw", |
| 133 "ws", | 134 "ws", |
| 134 "wsc", | 135 "wsc", |
| 135 "wsf", | 136 "wsf", |
| 136 "wsh", | 137 "wsh", |
| 137 "xht", | 138 "xht", |
| 138 "xhtm", | 139 "xhtm", |
| 139 "xhtml" | 140 "xhtml", |
| 141 #elif defined(OS_LINUX) |
| 142 // TODO(estade): lengthen this list. |
| 143 "exe", |
| 144 "pl", |
| 145 "py", |
| 146 "rb", |
| 147 "sh", |
| 148 #endif // defined(OS_LINUX) |
| 140 }; | 149 }; |
| 141 | 150 |
| 142 void InitializeExeTypes(std::set<std::string>* exe_extensions) { | 151 void InitializeExeTypes(std::set<std::string>* exe_extensions) { |
| 143 DCHECK(exe_extensions); | 152 DCHECK(exe_extensions); |
| 144 for (size_t i = 0; i < arraysize(g_executables); ++i) | 153 for (size_t i = 0; i < arraysize(g_executables); ++i) |
| 145 exe_extensions->insert(g_executables[i]); | 154 exe_extensions->insert(g_executables[i]); |
| 146 } | 155 } |
| 147 | 156 |
| 148 } // namespace download_util | 157 } // namespace download_util |
| OLD | NEW |