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 namespace download_util { | 10 namespace download_util { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 * of those above. If you wish to allow use of your version of this file only | 45 * of those above. If you wish to allow use of your version of this file only |
46 * under the terms of either the GPL or the LGPL, and not to allow others to | 46 * under the terms of either the GPL or the LGPL, and not to allow others to |
47 * use your version of this file under the terms of the MPL, indicate your | 47 * use your version of this file under the terms of the MPL, indicate your |
48 * decision by deleting the provisions above and replace them with the notice | 48 * decision by deleting the provisions above and replace them with the notice |
49 * and other provisions required by the GPL or the LGPL. If you do not delete | 49 * and other provisions required by the GPL or the LGPL. If you do not delete |
50 * the provisions above, a recipient may use your version of this file under | 50 * the provisions above, a recipient may use your version of this file under |
51 * the terms of any one of the MPL, the GPL or the LGPL. | 51 * the terms of any one of the MPL, the GPL or the LGPL. |
52 * | 52 * |
53 * ***** END LICENSE BLOCK ***** */ | 53 * ***** END LICENSE BLOCK ***** */ |
54 | 54 |
55 static const wchar_t* const g_executables[] = { | 55 static const char* const g_executables[] = { |
56 L"ad", | 56 "ad", |
57 L"ade", | 57 "ade", |
58 L"adp", | 58 "adp", |
59 L"app", | 59 "app", |
60 L"application", | 60 "application", |
61 L"asp", | 61 "asp", |
62 L"asx", | 62 "asx", |
63 L"bas", | 63 "bas", |
64 L"bat", | 64 "bat", |
65 L"chm", | 65 "chm", |
66 L"cmd", | 66 "cmd", |
67 L"com", | 67 "com", |
68 L"cpl", | 68 "cpl", |
69 L"crt", | 69 "crt", |
70 L"dll", | 70 "dll", |
71 L"exe", | 71 "exe", |
72 L"fxp", | 72 "fxp", |
73 L"hlp", | 73 "hlp", |
74 L"hta", | 74 "hta", |
75 L"htm", | 75 "htm", |
76 L"html", | 76 "html", |
77 L"inf", | 77 "inf", |
78 L"ins", | 78 "ins", |
79 L"isp", | 79 "isp", |
80 L"jar", | 80 "jar", |
81 L"js", | 81 "js", |
82 L"jse", | 82 "jse", |
83 L"lnk", | 83 "lnk", |
84 L"mad", | 84 "mad", |
85 L"maf", | 85 "maf", |
86 L"mag", | 86 "mag", |
87 L"mam", | 87 "mam", |
88 L"maq", | 88 "maq", |
89 L"mar", | 89 "mar", |
90 L"mas", | 90 "mas", |
91 L"mat", | 91 "mat", |
92 L"mau", | 92 "mau", |
93 L"mav", | 93 "mav", |
94 L"maw", | 94 "maw", |
95 L"mda", | 95 "mda", |
96 L"mdb", | 96 "mdb", |
97 L"mde", | 97 "mde", |
98 L"mdt", | 98 "mdt", |
99 L"mdw", | 99 "mdw", |
100 L"mdz", | 100 "mdz", |
101 L"msc", | 101 "msc", |
102 L"msh", | 102 "msh", |
103 L"mshxml", | 103 "mshxml", |
104 L"msi", | 104 "msi", |
105 L"msp", | 105 "msp", |
106 L"mst", | 106 "mst", |
107 L"ops", | 107 "ops", |
108 L"pcd", | 108 "pcd", |
109 L"pif", | 109 "pif", |
110 L"plg", | 110 "plg", |
111 L"prf", | 111 "prf", |
112 L"prg", | 112 "prg", |
113 L"pst", | 113 "pst", |
114 L"reg", | 114 "reg", |
115 L"scf", | 115 "scf", |
116 L"scr", | 116 "scr", |
117 L"sct", | 117 "sct", |
118 L"shb", | 118 "shb", |
119 L"shs", | 119 "shs", |
120 L"shtm", | 120 "shtm", |
121 L"shtml", | 121 "shtml", |
122 L"url", | 122 "url", |
123 L"vb", | 123 "vb", |
124 L"vbe", | 124 "vbe", |
125 L"vbs", | 125 "vbs", |
126 L"vsd", | 126 "vsd", |
127 L"vsmacros", | 127 "vsmacros", |
128 L"vss", | 128 "vss", |
129 L"vst", | 129 "vst", |
130 L"vsw", | 130 "vsw", |
131 L"ws", | 131 "ws", |
132 L"wsc", | 132 "wsc", |
133 L"wsf", | 133 "wsf", |
134 L"wsh", | 134 "wsh", |
135 L"xht", | 135 "xht", |
136 L"xhtm", | 136 "xhtm", |
137 L"xhtml" | 137 "xhtml" |
138 }; | 138 }; |
139 | 139 |
140 void InitializeExeTypes(std::set<std::wstring>* exe_extensions) { | 140 void InitializeExeTypes(std::set<std::string>* exe_extensions) { |
141 DCHECK(exe_extensions); | 141 DCHECK(exe_extensions); |
142 for (size_t i = 0; i < arraysize(g_executables); ++i) | 142 for (size_t i = 0; i < arraysize(g_executables); ++i) |
143 exe_extensions->insert(g_executables[i]); | 143 exe_extensions->insert(g_executables[i]); |
144 } | 144 } |
145 | 145 |
146 } // namespace download_util | 146 } // namespace download_util |
147 | 147 |
OLD | NEW |