| 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", false } | 32 { "", "", "10.2.152", false } |
| 33 }; |
| 34 static const VersionRangeDefinition kShockwaveVersionRange[] = { |
| 35 { "", "", "11.5.9.620", true } |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 // Similarly, try and share the group definition for plug-ins that are | 38 // Similarly, try and share the group definition for plug-ins that are |
| 36 // very consistent across OS'es. | 39 // very consistent across OS'es. |
| 37 static const PluginGroupDefinition kFlashDefinition = { | 40 static const PluginGroupDefinition kFlashDefinition = { |
| 38 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, | 41 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, |
| 39 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" }; | 42 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" }; |
| 40 | 43 |
| 44 static const PluginGroupDefinition kShockwaveDefinition = { |
| 45 "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", |
| 46 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), |
| 47 "http://www.adobe.com/shockwave/download/" }; |
| 48 |
| 41 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
| 42 // Plugin Groups for Mac. | 50 // Plugin Groups for Mac. |
| 43 // Plugins are listed here as soon as vulnerabilities and solutions | 51 // Plugins are listed here as soon as vulnerabilities and solutions |
| 44 // (new versions) are published. | 52 // (new versions) are published. |
| 45 // TODO(panayiotis): Get the Real Player version on Mac, somehow. | |
| 46 static const VersionRangeDefinition kQuicktimeVersionRange[] = { | 53 static const VersionRangeDefinition kQuicktimeVersionRange[] = { |
| 47 { "", "", "7.6.6", true } | 54 { "", "", "7.6.6", true } |
| 48 }; | 55 }; |
| 49 static const VersionRangeDefinition kJavaVersionRange[] = { | 56 static const VersionRangeDefinition kJavaVersionRange[] = { |
| 50 { "13.0", "14.0", "13.3.0", true } // Snow Leopard | 57 { "13.0", "14.0", "13.3.0", true } // Snow Leopard |
| 51 }; | 58 }; |
| 52 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 59 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
| 53 { "0", "4", "3.0.50106.0", false }, | 60 { "0", "4", "3.0.50106.0", false }, |
| 54 { "4", "5", "", false } | 61 { "4", "5", "", false } |
| 55 }; | 62 }; |
| 56 static const VersionRangeDefinition kFlip4MacVersionRange[] = { | 63 static const VersionRangeDefinition kFlip4MacVersionRange[] = { |
| 57 { "", "", "2.2.1", false } | 64 { "", "", "2.2.1", false } |
| 58 }; | 65 }; |
| 59 static const VersionRangeDefinition kShockwaveVersionRange[] = { | 66 // Note: The Adobe Reader browser plug-in is not supported in Chrome. |
| 60 { "", "", "11.5.9.615", true } | 67 // Note: The Real Player plugin for mac doesn't expose a version at all. |
| 61 }; | |
| 62 // TODO(cevans) - I don't see Adobe Reader in here for Mac. | |
| 63 static const PluginGroupDefinition kGroupDefinitions[] = { | 68 static const PluginGroupDefinition kGroupDefinitions[] = { |
| 64 kFlashDefinition, | 69 kFlashDefinition, |
| 65 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", | 70 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
| 66 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), | 71 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
| 67 "http://www.apple.com/quicktime/download/" }, | 72 "http://www.apple.com/quicktime/download/" }, |
| 68 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", | 73 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
| 69 kJavaVersionRange, arraysize(kJavaVersionRange), | 74 kJavaVersionRange, arraysize(kJavaVersionRange), |
| 70 "http://support.apple.com/kb/HT1338" }, | 75 "http://support.apple.com/kb/HT1338" }, |
| 71 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 76 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
| 72 arraysize(kSilverlightVersionRange), | 77 arraysize(kSilverlightVersionRange), |
| 73 "http://www.microsoft.com/getsilverlight/" }, | 78 "http://www.microsoft.com/getsilverlight/" }, |
| 74 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, | 79 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, |
| 75 arraysize(kFlip4MacVersionRange), | 80 arraysize(kFlip4MacVersionRange), |
| 76 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, | 81 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, |
| 77 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", | 82 kShockwaveDefinition |
| 78 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), | |
| 79 "http://www.adobe.com/shockwave/download/" } | |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 #elif defined(OS_WIN) | 85 #elif defined(OS_WIN) |
| 83 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of | 86 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of |
| 84 // the RealPlayer files. | 87 // the RealPlayer files. |
| 85 static const VersionRangeDefinition kQuicktimeVersionRange[] = { | 88 static const VersionRangeDefinition kQuicktimeVersionRange[] = { |
| 86 { "", "", "7.6.8", true } | 89 { "", "", "7.6.8", true } |
| 87 }; | 90 }; |
| 88 static const VersionRangeDefinition kJavaVersionRange[] = { | 91 static const VersionRangeDefinition kJavaVersionRange[] = { |
| 89 { "0", "7", "6.0.220", true } // "220" is not a typo. | 92 { "0", "7", "6.0.220", true } // "220" is not a typo. |
| 90 }; | 93 }; |
| 91 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { | 94 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { |
| 92 { "10", "11", "", false }, | 95 { "10", "11", "10.0.1", false }, |
| 93 { "9", "10", "9.4.1", false }, | 96 { "9", "10", "9.4.2", false }, |
| 94 { "0", "9", "8.2.5", false } | 97 { "0", "9", "8.2.6", false } |
| 95 }; | 98 }; |
| 96 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 99 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
| 97 { "0", "4", "3.0.50106.0", false }, | 100 { "0", "4", "3.0.50106.0", false }, |
| 98 { "4", "5", "", false } | 101 { "4", "5", "", false } |
| 99 }; | 102 }; |
| 100 static const VersionRangeDefinition kShockwaveVersionRange[] = { | |
| 101 { "", "", "11.5.9.615", true } | |
| 102 }; | |
| 103 static const VersionRangeDefinition kDivXVersionRange[] = { | 103 static const VersionRangeDefinition kDivXVersionRange[] = { |
| 104 { "", "", "1.4.3.4", false } | 104 { "", "", "1.4.3.4", false } |
| 105 }; | 105 }; |
| 106 static const VersionRangeDefinition kRealPlayerVersionRange[] = { |
| 107 { "", "", "12.0.1.633", true } |
| 108 }; |
| 106 static const PluginGroupDefinition kGroupDefinitions[] = { | 109 static const PluginGroupDefinition kGroupDefinitions[] = { |
| 107 kFlashDefinition, | 110 kFlashDefinition, |
| 108 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", | 111 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
| 109 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), | 112 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
| 110 "http://www.apple.com/quicktime/download/" }, | 113 "http://www.apple.com/quicktime/download/" }, |
| 111 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", | 114 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
| 112 kJavaVersionRange, arraysize(kJavaVersionRange), "http://www.java.com/" }, | 115 kJavaVersionRange, arraysize(kJavaVersionRange), "http://www.java.com/" }, |
| 113 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", | 116 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", |
| 114 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), | 117 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), |
| 115 "http://get.adobe.com/reader/" }, | 118 "http://get.adobe.com/reader/" }, |
| 116 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 119 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
| 117 arraysize(kSilverlightVersionRange), | 120 arraysize(kSilverlightVersionRange), |
| 118 "http://www.microsoft.com/getsilverlight/" }, | 121 "http://www.microsoft.com/getsilverlight/" }, |
| 119 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", | 122 kShockwaveDefinition, |
| 120 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), | |
| 121 "http://www.adobe.com/shockwave/download/" }, | |
| 122 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, | 123 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, |
| 123 arraysize(kDivXVersionRange), | 124 arraysize(kDivXVersionRange), |
| 124 "http://download.divx.com/divx/autoupdate/player/" | 125 "http://download.divx.com/divx/autoupdate/player/" |
| 125 "DivXWebPlayerInstaller.exe" }, | 126 "DivXWebPlayerInstaller.exe" }, |
| 127 { "realplayer", "RealPlayer", "RealPlayer", |
| 128 kRealPlayerVersionRange, arraysize(kRealPlayerVersionRange), |
| 129 "http://www.real.com/realplayer/downloads" }, |
| 126 // These are here for grouping, no vulnerabilities known. | 130 // These are here for grouping, no vulnerabilities known. |
| 127 { "windows-media-player", "Windows Media Player", "Windows Media Player", | 131 { "windows-media-player", "Windows Media Player", "Windows Media Player", |
| 128 NULL, 0, "" }, | 132 NULL, 0, "" }, |
| 129 { "microsoft-office", "Microsoft Office", "Microsoft Office", | 133 { "microsoft-office", "Microsoft Office", "Microsoft Office", |
| 130 NULL, 0, "" }, | 134 NULL, 0, "" }, |
| 131 // TODO(panayiotis): The vulnerable versions are | |
| 132 // (v >= 6.0.12.1040 && v <= 6.0.12.1663) | |
| 133 // || v == 6.0.12.1698 || v == 6.0.12.1741 | |
| 134 { "realplayer", "RealPlayer", "RealPlayer", NULL, 0, | |
| 135 "www.real.com/realplayer/downloads" }, | |
| 136 }; | 135 }; |
| 137 | 136 |
| 138 #else | 137 #else |
| 139 static const VersionRangeDefinition kJavaVersionRange[] = { | 138 static const VersionRangeDefinition kJavaVersionRange[] = { |
| 140 { "0", "1.7", "1.6.0.22", true } | 139 { "0", "1.7", "1.6.0.22", true } |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { | 142 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { |
| 144 { "0", "1.9", "1.8.5", true }, | 143 { "0", "1.9", "1.8.5", true }, |
| 145 { "1.9", "1.10", "1.9.5", true }, | 144 { "1.9", "1.10", "1.9.5", true }, |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 void PluginList::DisableOutdatedPluginGroups() { | 817 void PluginList::DisableOutdatedPluginGroups() { |
| 819 disable_outdated_plugins_ = true; | 818 disable_outdated_plugins_ = true; |
| 820 } | 819 } |
| 821 | 820 |
| 822 PluginList::~PluginList() { | 821 PluginList::~PluginList() { |
| 823 } | 822 } |
| 824 | 823 |
| 825 | 824 |
| 826 } // namespace npapi | 825 } // namespace npapi |
| 827 } // namespace webkit | 826 } // namespace webkit |
| OLD | NEW |