OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/plugins/npapi/plugin_list.h" | 5 #include "webkit/plugins/npapi/plugin_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace webkit { | 23 namespace webkit { |
24 namespace npapi { | 24 namespace npapi { |
25 | 25 |
26 FilePath::CharType kDefaultPluginLibraryName[] = | 26 FilePath::CharType kDefaultPluginLibraryName[] = |
27 FILE_PATH_LITERAL("default_plugin"); | 27 FILE_PATH_LITERAL("default_plugin"); |
28 | 28 |
29 // Some version ranges can be shared across operating systems. This should be | 29 // Some version ranges can be shared across operating systems. This should be |
30 // done where possible to avoid duplication. | 30 // done where possible to avoid duplication. |
31 static const VersionRangeDefinition kFlashVersionRange[] = { | 31 static const VersionRangeDefinition kFlashVersionRange[] = { |
32 { "", "", "10.1.102" } | 32 { "", "", "10.1.102", false } |
33 }; | 33 }; |
34 | 34 |
35 // Similarly, try and share the group definition for plug-ins that are | 35 // Similarly, try and share the group definition for plug-ins that are |
36 // very consistent across OS'es. | 36 // very consistent across OS'es. |
37 static const PluginGroupDefinition kFlashDefinition = { | 37 static const PluginGroupDefinition kFlashDefinition = { |
38 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, | 38 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, |
39 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" }; | 39 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" }; |
40 | 40 |
41 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
42 // Plugin Groups for Mac. | 42 // Plugin Groups for Mac. |
43 // Plugins are listed here as soon as vulnerabilities and solutions | 43 // Plugins are listed here as soon as vulnerabilities and solutions |
44 // (new versions) are published. | 44 // (new versions) are published. |
45 // TODO(panayiotis): Get the Real Player version on Mac, somehow. | 45 // TODO(panayiotis): Get the Real Player version on Mac, somehow. |
46 static const VersionRangeDefinition kQuicktimeVersionRange[] = { | 46 static const VersionRangeDefinition kQuicktimeVersionRange[] = { |
47 { "", "", "7.6.6" } | 47 { "", "", "7.6.6", true } |
48 }; | 48 }; |
49 static const VersionRangeDefinition kJavaVersionRange[] = { | 49 static const VersionRangeDefinition kJavaVersionRange[] = { |
50 { "13.0", "14.0", "13.3.0" } // Snow Leopard | 50 { "13.0", "14.0", "13.3.0", true } // Snow Leopard |
51 }; | 51 }; |
52 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 52 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
53 { "0", "4", "3.0.50106.0" }, | 53 { "0", "4", "3.0.50106.0", false }, |
54 { "4", "5", "" } | 54 { "4", "5", "", false } |
55 }; | 55 }; |
56 static const VersionRangeDefinition kFlip4MacVersionRange[] = { | 56 static const VersionRangeDefinition kFlip4MacVersionRange[] = { |
57 { "", "", "2.2.1" } | 57 { "", "", "2.2.1", false } |
58 }; | 58 }; |
59 static const VersionRangeDefinition kShockwaveVersionRange[] = { | 59 static const VersionRangeDefinition kShockwaveVersionRange[] = { |
60 { "", "", "11.5.9.615" } | 60 { "", "", "11.5.9.615", true } |
61 }; | 61 }; |
| 62 // TODO(cevans) - I don't see Adobe Reader in here for Mac. |
62 static const PluginGroupDefinition kGroupDefinitions[] = { | 63 static const PluginGroupDefinition kGroupDefinitions[] = { |
63 kFlashDefinition, | 64 kFlashDefinition, |
64 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange, | 65 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
65 arraysize(kQuicktimeVersionRange), | 66 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
66 "http://www.apple.com/quicktime/download/" }, | 67 "http://www.apple.com/quicktime/download/" }, |
67 { "java-runtime-environment", "Java", "Java", kJavaVersionRange, | 68 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
68 arraysize(kJavaVersionRange), "http://support.apple.com/kb/HT1338" }, | 69 kJavaVersionRange, arraysize(kJavaVersionRange), |
| 70 "http://support.apple.com/kb/HT1338" }, |
69 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 71 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
70 arraysize(kSilverlightVersionRange), | 72 arraysize(kSilverlightVersionRange), |
71 "http://www.microsoft.com/getsilverlight/" }, | 73 "http://www.microsoft.com/getsilverlight/" }, |
72 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, | 74 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, |
73 arraysize(kFlip4MacVersionRange), | 75 arraysize(kFlip4MacVersionRange), |
74 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, | 76 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, |
75 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, | 77 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", |
76 arraysize(kShockwaveVersionRange), | 78 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), |
77 "http://www.adobe.com/shockwave/download/" } | 79 "http://www.adobe.com/shockwave/download/" } |
78 }; | 80 }; |
79 | 81 |
80 #elif defined(OS_WIN) | 82 #elif defined(OS_WIN) |
81 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of | 83 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of |
82 // the RealPlayer files. | 84 // the RealPlayer files. |
83 static const VersionRangeDefinition kQuicktimeVersionRange[] = { | 85 static const VersionRangeDefinition kQuicktimeVersionRange[] = { |
84 { "", "", "7.6.8" } | 86 { "", "", "7.6.8", true } |
85 }; | 87 }; |
86 static const VersionRangeDefinition kJavaVersionRange[] = { | 88 static const VersionRangeDefinition kJavaVersionRange[] = { |
87 { "0", "7", "6.0.220" } // "220" is not a typo. | 89 { "0", "7", "6.0.220", true } // "220" is not a typo. |
88 }; | 90 }; |
89 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { | 91 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { |
90 { "10", "11", "" }, | 92 { "10", "11", "", false }, |
91 { "9", "10", "9.4.1" }, | 93 { "9", "10", "9.4.1", false }, |
92 { "0", "9", "8.2.5" } | 94 { "0", "9", "8.2.5", false } |
93 }; | 95 }; |
94 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 96 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
95 { "0", "4", "3.0.50106.0" }, | 97 { "0", "4", "3.0.50106.0", false }, |
96 { "4", "5", "" } | 98 { "4", "5", "", false } |
97 }; | 99 }; |
98 static const VersionRangeDefinition kShockwaveVersionRange[] = { | 100 static const VersionRangeDefinition kShockwaveVersionRange[] = { |
99 { "", "", "11.5.9.615" } | 101 { "", "", "11.5.9.615", true } |
100 }; | 102 }; |
101 static const VersionRangeDefinition kDivXVersionRange[] = { | 103 static const VersionRangeDefinition kDivXVersionRange[] = { |
102 { "", "", "1.4.3.4" } | 104 { "", "", "1.4.3.4", false } |
103 }; | 105 }; |
104 static const PluginGroupDefinition kGroupDefinitions[] = { | 106 static const PluginGroupDefinition kGroupDefinitions[] = { |
105 kFlashDefinition, | 107 kFlashDefinition, |
106 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange, | 108 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
107 arraysize(kQuicktimeVersionRange), | 109 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
108 "http://www.apple.com/quicktime/download/" }, | 110 "http://www.apple.com/quicktime/download/" }, |
109 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange, | 111 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
110 arraysize(kJavaVersionRange), "http://www.java.com/" }, | 112 kJavaVersionRange, arraysize(kJavaVersionRange), "http://www.java.com/" }, |
111 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", | 113 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", |
112 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), | 114 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), |
113 "http://get.adobe.com/reader/" }, | 115 "http://get.adobe.com/reader/" }, |
114 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 116 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
115 arraysize(kSilverlightVersionRange), | 117 arraysize(kSilverlightVersionRange), |
116 "http://www.microsoft.com/getsilverlight/" }, | 118 "http://www.microsoft.com/getsilverlight/" }, |
117 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, | 119 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", |
118 arraysize(kShockwaveVersionRange), | 120 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), |
119 "http://www.adobe.com/shockwave/download/" }, | 121 "http://www.adobe.com/shockwave/download/" }, |
120 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, | 122 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, |
121 arraysize(kDivXVersionRange), | 123 arraysize(kDivXVersionRange), |
122 "http://download.divx.com/divx/autoupdate/player/" | 124 "http://download.divx.com/divx/autoupdate/player/" |
123 "DivXWebPlayerInstaller.exe" }, | 125 "DivXWebPlayerInstaller.exe" }, |
124 // These are here for grouping, no vulnerabilities known. | 126 // These are here for grouping, no vulnerabilities known. |
125 { "windows-media-player", "Windows Media Player", "Windows Media Player", | 127 { "windows-media-player", "Windows Media Player", "Windows Media Player", |
126 NULL, 0, "" }, | 128 NULL, 0, "" }, |
127 { "microsoft-office", "Microsoft Office", "Microsoft Office", | 129 { "microsoft-office", "Microsoft Office", "Microsoft Office", |
128 NULL, 0, "" }, | 130 NULL, 0, "" }, |
129 // TODO(panayiotis): The vulnerable versions are | 131 // TODO(panayiotis): The vulnerable versions are |
130 // (v >= 6.0.12.1040 && v <= 6.0.12.1663) | 132 // (v >= 6.0.12.1040 && v <= 6.0.12.1663) |
131 // || v == 6.0.12.1698 || v == 6.0.12.1741 | 133 // || v == 6.0.12.1698 || v == 6.0.12.1741 |
132 { "realplayer", "RealPlayer", "RealPlayer", NULL, 0, | 134 { "realplayer", "RealPlayer", "RealPlayer", NULL, 0, |
133 "www.real.com/realplayer/downloads" }, | 135 "www.real.com/realplayer/downloads" }, |
134 }; | 136 }; |
135 | 137 |
136 #else | 138 #else |
137 static const VersionRangeDefinition kJavaVersionRange[] = { | 139 static const VersionRangeDefinition kJavaVersionRange[] = { |
138 { "0", "1.7", "1.6.0.22" } | 140 { "0", "1.7", "1.6.0.22", true } |
139 }; | 141 }; |
140 | 142 |
141 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { | 143 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { |
142 { "0", "1.9", "1.8.3" }, | 144 { "0", "1.9", "1.8.3", true }, |
143 { "1.9", "1.10", "1.9.2" }, | 145 { "1.9", "1.10", "1.9.2", true }, |
144 }; | 146 }; |
145 | 147 |
146 static const PluginGroupDefinition kGroupDefinitions[] = { | 148 static const PluginGroupDefinition kGroupDefinitions[] = { |
147 // Flash on Linux is significant because there isn't yet a built-in Flash | 149 // Flash on Linux is significant because there isn't yet a built-in Flash |
148 // plug-in on the Linux 64-bit version of Chrome. | 150 // plug-in on the Linux 64-bit version of Chrome. |
149 kFlashDefinition, | 151 kFlashDefinition, |
150 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange, | 152 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
151 arraysize(kJavaVersionRange), | 153 kJavaVersionRange, arraysize(kJavaVersionRange), |
152 "http://www.java.com/en/download/manual.jsp" }, | 154 "http://www.java.com/en/download/manual.jsp" }, |
153 { "redhat-icetea-java", "IcedTea", "IcedTea", kRedhatIcedTeaVersionRange, | 155 { "redhat-icetea-java", "IceTea", "IcedTea", |
154 arraysize(kRedhatIcedTeaVersionRange), | 156 kRedhatIcedTeaVersionRange, arraysize(kRedhatIcedTeaVersionRange), |
155 "http://www.linuxsecurity.com/content/section/3/170/" }, | 157 "http://www.linuxsecurity.com/content/section/3/170/" }, |
156 }; | 158 }; |
157 #endif | 159 #endif |
158 | 160 |
159 // static | 161 // static |
160 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() { | 162 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() { |
161 return kGroupDefinitions; | 163 return kGroupDefinitions; |
162 } | 164 } |
163 | 165 |
164 // static | 166 // static |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 void PluginList::DisableOutdatedPluginGroups() { | 823 void PluginList::DisableOutdatedPluginGroups() { |
822 disable_outdated_plugins_ = true; | 824 disable_outdated_plugins_ = true; |
823 } | 825 } |
824 | 826 |
825 PluginList::~PluginList() { | 827 PluginList::~PluginList() { |
826 } | 828 } |
827 | 829 |
828 | 830 |
829 } // namespace npapi | 831 } // namespace npapi |
830 } // namespace webkit | 832 } // namespace webkit |
OLD | NEW |