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

Side by Side Diff: webkit/glue/plugins/plugin_list.cc

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_list.h ('k') | webkit/glue/plugins/plugin_list_mac.mm » ('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) 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/glue/plugins/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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_split.h" 12 #include "base/string_split.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "net/base/mime_util.h" 17 #include "net/base/mime_util.h"
18 #include "webkit/glue/plugins/plugin_constants_win.h"
19 #include "webkit/glue/plugins/plugin_lib.h"
18 #include "webkit/glue/webkit_glue.h" 20 #include "webkit/glue/webkit_glue.h"
19 #include "webkit/plugins/npapi/plugin_constants_win.h"
20 #include "webkit/plugins/npapi/plugin_lib.h"
21 #include "webkit/plugins/plugin_switches.h" 21 #include "webkit/plugins/plugin_switches.h"
22 22
23 #if defined(OS_POSIX) 23 #if defined(OS_POSIX)
24 #include "base/stl_util-inl.h" 24 #include "base/stl_util-inl.h"
25 #include "base/third_party/valgrind/valgrind.h" 25 #include "base/third_party/valgrind/valgrind.h"
26 #endif // defined(OS_POSIX) 26 #endif // defined(OS_POSIX)
27 27
28 namespace webkit { 28 namespace NPAPI {
29 namespace npapi {
30
31 FilePath::CharType kDefaultPluginLibraryName[] =
32 FILE_PATH_LITERAL("default_plugin");
33 29
34 #if defined(OS_MACOSX) 30 #if defined(OS_MACOSX)
35 // Plugin Groups for Mac. 31 // Plugin Groups for Mac.
36 // Plugins are listed here as soon as vulnerabilities and solutions 32 // Plugins are listed here as soon as vulnerabilities and solutions
37 // (new versions) are published. 33 // (new versions) are published.
38 // TODO(panayiotis): Get the Real Player version on Mac, somehow. 34 // TODO(panayiotis): Get the Real Player version on Mac, somehow.
39 static const VersionRangeDefinition kQuicktimeVersionRange[] = { 35 static const VersionRangeDefinition kQuicktimeVersionRange[] = {
40 { "", "", "7.6.6" } 36 { "", "", "7.6.6" }
41 }; 37 };
42 static const VersionRangeDefinition kJavaVersionRange[] = { 38 static const VersionRangeDefinition kJavaVersionRange[] = {
(...skipping 28 matching lines...) Expand all
71 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, 67 "http://www.telestream.net/flip4mac-wmv/overview.htm" },
72 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, 68 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange,
73 arraysize(kShockwaveVersionRange), 69 arraysize(kShockwaveVersionRange),
74 "http://www.adobe.com/shockwave/download/" } 70 "http://www.adobe.com/shockwave/download/" }
75 }; 71 };
76 72
77 #elif defined(OS_WIN) 73 #elif defined(OS_WIN)
78 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of 74 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of
79 // the RealPlayer files. 75 // the RealPlayer files.
80 static const VersionRangeDefinition kQuicktimeVersionRange[] = { 76 static const VersionRangeDefinition kQuicktimeVersionRange[] = {
81 { "", "", "7.6.8" } 77 { "", "", "7.6.9" }
82 }; 78 };
83 static const VersionRangeDefinition kJavaVersionRange[] = { 79 static const VersionRangeDefinition kJavaVersionRange[] = {
84 { "0", "7", "6.0.220" } // "220" is not a typo. 80 { "0", "7", "6.0.220" } // "220" is not a typo.
85 }; 81 };
86 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { 82 static const VersionRangeDefinition kAdobeReaderVersionRange[] = {
87 { "10", "11", "" }, 83 { "10", "11", "" },
88 { "9", "10", "9.4.1" }, 84 { "9", "10", "9.4.1" },
89 { "0", "9", "8.2.5" } 85 { "0", "9", "8.2.5" }
90 }; 86 };
91 static const VersionRangeDefinition kFlashVersionRange[] = { 87 static const VersionRangeDefinition kFlashVersionRange[] = {
92 { "", "", "10.1.102" } 88 { "", "", "10.1.102" }
93 }; 89 };
94 static const VersionRangeDefinition kSilverlightVersionRange[] = { 90 static const VersionRangeDefinition kSilverlightVersionRange[] = {
95 { "0", "4", "3.0.50106.0" }, 91 { "0", "4", "3.0.50106.0" },
96 { "4", "5", "" } 92 { "4", "5", "" }
97 }; 93 };
98 static const VersionRangeDefinition kShockwaveVersionRange[] = { 94 static const VersionRangeDefinition kShockwaveVersionRange[] = {
99 { "", "", "11.5.9.615" } 95 { "", "", "11.5.9.615" }
100 }; 96 };
101 static const VersionRangeDefinition kDivXVersionRange[] = { 97 static const VersionRangeDefinition kDivXVersionRange[] = {
102 { "", "", "1.4.3.4" } 98 { "", "", "1.4.3.4" }
103 }; 99 };
100 static const VersionRangeDefinition kRealPlayerVersionRange[] = {
101 { "", "", "12.0.1.609" }
102 };
104 static const PluginGroupDefinition kGroupDefinitions[] = { 103 static const PluginGroupDefinition kGroupDefinitions[] = {
105 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange, 104 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange,
106 arraysize(kQuicktimeVersionRange), 105 arraysize(kQuicktimeVersionRange),
107 "http://www.apple.com/quicktime/download/" }, 106 "http://www.apple.com/quicktime/download/" },
108 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange, 107 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange,
109 arraysize(kJavaVersionRange), "http://www.java.com/" }, 108 arraysize(kJavaVersionRange), "http://www.java.com/" },
110 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", 109 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat",
111 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), 110 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange),
112 "http://get.adobe.com/reader/" }, 111 "http://get.adobe.com/reader/" },
113 { "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, 112 { "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange,
114 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" }, 113 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" },
115 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, 114 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange,
116 arraysize(kSilverlightVersionRange), 115 arraysize(kSilverlightVersionRange),
117 "http://www.microsoft.com/getsilverlight/" }, 116 "http://www.microsoft.com/getsilverlight/" },
118 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, 117 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange,
119 arraysize(kShockwaveVersionRange), 118 arraysize(kShockwaveVersionRange),
120 "http://www.adobe.com/shockwave/download/" }, 119 "http://www.adobe.com/shockwave/download/" },
121 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, 120 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange,
122 arraysize(kDivXVersionRange), 121 arraysize(kDivXVersionRange),
123 "http://download.divx.com/divx/autoupdate/player/" 122 "http://download.divx.com/divx/autoupdate/player/"
124 "DivXWebPlayerInstaller.exe" }, 123 "DivXWebPlayerInstaller.exe" },
124 { "realplayer", "RealPlayer", "RealPlayer", kRealPlayerVersionRange,
125 arraysize(kRealPlayerVersionRange),
126 "http://www.real.com/realplayer" },
125 // These are here for grouping, no vulnerabilities known. 127 // These are here for grouping, no vulnerabilities known.
126 { "windows-media-player", "Windows Media Player", "Windows Media Player", 128 { "windows-media-player", "Windows Media Player", "Windows Media Player",
127 NULL, 0, "" }, 129 NULL, 0, "" },
128 { "microsoft-office", "Microsoft Office", "Microsoft Office", 130 { "microsoft-office", "Microsoft Office", "Microsoft Office",
129 NULL, 0, "" }, 131 NULL, 0, "" },
130 // TODO(panayiotis): The vulnerable versions are
131 // (v >= 6.0.12.1040 && v <= 6.0.12.1663)
132 // || v == 6.0.12.1698 || v == 6.0.12.1741
133 { "realplayer", "RealPlayer", "RealPlayer", NULL, 0,
134 "www.real.com/realplayer/downloads" },
135 }; 132 };
136 133
137 #else 134 #else
138 static const PluginGroupDefinition kGroupDefinitions[] = {}; 135 static const PluginGroupDefinition kGroupDefinitions[] = {};
139 #endif 136 #endif
140 137
141 // static 138 // static
142 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() { 139 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() {
143 return kGroupDefinitions; 140 return kGroupDefinitions;
144 } 141 }
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 // However, when running on Valgrind, we need to do the cleanup to keep the 771 // However, when running on Valgrind, we need to do the cleanup to keep the
775 // memory tree green. 772 // memory tree green.
776 #if defined(OS_POSIX) 773 #if defined(OS_POSIX)
777 if (RUNNING_ON_VALGRIND) { 774 if (RUNNING_ON_VALGRIND) {
778 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), 775 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(),
779 plugin_groups_.end()); 776 plugin_groups_.end());
780 } 777 }
781 #endif 778 #endif
782 } 779 }
783 780
784 } // namespace npapi 781 } // namespace NPAPI
785 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_list.h ('k') | webkit/glue/plugins/plugin_list_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698