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

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

Issue 9536013: Move |requires_authorization| flag for plug-ins out of webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 9 months 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/plugins/npapi/plugin_list.h ('k') | webkit/plugins/npapi/plugin_list_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 << actual_mime_type << " (expected " << orig_mime_type 46 << actual_mime_type << " (expected " << orig_mime_type
47 << ")"; 47 << ")";
48 return allow; 48 return allow;
49 } 49 }
50 50
51 } 51 }
52 52
53 namespace webkit { 53 namespace webkit {
54 namespace npapi { 54 namespace npapi {
55 55
56 // Note: If you change the plug-in definitions here, also update
57 // chrome/browser/resources/plugins_*.json correspondingly!
58 // In particular, the identifier and the update URLs need to be kept in sync.
59
56 // Some version ranges can be shared across operating systems. This should be 60 // Some version ranges can be shared across operating systems. This should be
57 // done where possible to avoid duplication. 61 // done where possible to avoid duplication.
58 // TODO(bauerb): The |requires_authorization| flag should be part of
59 // PluginGroupDefinition, not VersionRangeDefinition.
60 static const VersionRangeDefinition kAllVersionsInfobarVersionRange[] = {
61 { "", "", "", true }
62 };
63
64 static const VersionRangeDefinition kAllVersionsNoInfobarVersionRange[] = {
65 { "", "", "", false }
66 };
67 62
68 // This is up to date with 63 // This is up to date with
69 // http://www.adobe.com/support/security/bulletins/apsb12-03.html 64 // http://www.adobe.com/support/security/bulletins/apsb12-03.html
70 // NOTE: We would like to go to the 4th component value but we cannot because 65 // NOTE: We would like to go to the 4th component value but we cannot because
71 // on some platforms, such as Linux, it is not available. 66 // on some platforms, such as Linux, it is not available.
72 static const VersionRangeDefinition kFlashVersionRange[] = { 67 static const VersionRangeDefinition kFlashVersionRange[] = {
73 { "", "", "11.1.102", false } 68 { "", "", "11.1.102" }
74 }; 69 };
75 // This is up to date with 70 // This is up to date with
76 // http://www.adobe.com/support/security/bulletins/apsb12-02.html 71 // http://www.adobe.com/support/security/bulletins/apsb12-02.html
77 static const VersionRangeDefinition kShockwaveVersionRange[] = { 72 static const VersionRangeDefinition kShockwaveVersionRange[] = {
78 { "", "", "11.6.4.634", true } 73 { "", "", "11.6.4.634" }
79 }; 74 };
80 // This is up to date with 75 // This is up to date with
81 // http://support.microsoft.com/kb/2668562 76 // http://support.microsoft.com/kb/2668562
82 // http://technet.microsoft.com/en-us/security/Bulletin/MS12-016 77 // http://technet.microsoft.com/en-us/security/Bulletin/MS12-016
83 static const VersionRangeDefinition kSilverlightVersionRange[] = { 78 static const VersionRangeDefinition kSilverlightVersionRange[] = {
84 { "0", "5", "4.1.10111.0", false }, 79 { "0", "5", "4.1.10111.0" },
85 { "5", "6", "", false }, 80 { "5", "6", "" },
86 }; 81 };
87 82
88 // Similarly, try and share the group definition for plug-ins that are 83 // Similarly, try and share the group definition for plug-ins that are
89 // very consistent across OS'es. 84 // very consistent across OS'es.
90 #define kFlashDefinition { \ 85 #define kFlashDefinition { \
91 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange,\ 86 "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange,\
92 arraysize(kFlashVersionRange), "http://get.adobe.com/flashplayer/" } 87 arraysize(kFlashVersionRange) }
93 88
94 #define kShockwaveDefinition { \ 89 #define kShockwaveDefinition { \
95 "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", \ 90 "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", \
96 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), \ 91 kShockwaveVersionRange, arraysize(kShockwaveVersionRange) }
97 "http://www.adobe.com/shockwave/download/" }
98 92
99 #define kSilverlightDefinition { \ 93 #define kSilverlightDefinition { \
100 "silverlight", PluginGroup::kSilverlightGroupName, "Silverlight", \ 94 "silverlight", PluginGroup::kSilverlightGroupName, "Silverlight", \
101 kSilverlightVersionRange, arraysize(kSilverlightVersionRange), \ 95 kSilverlightVersionRange, arraysize(kSilverlightVersionRange) }
102 "http://www.microsoft.com/getsilverlight/" }
103 96
104 #define kChromePdfDefinition { \ 97 #define kChromePdfDefinition { \
105 "google-chrome-pdf", "Chrome PDF Viewer", "Chrome PDF Viewer", \ 98 "google-chrome-pdf", "Chrome PDF Viewer", "Chrome PDF Viewer", NULL, 0 }
106 kAllVersionsNoInfobarVersionRange, \
107 arraysize(kAllVersionsNoInfobarVersionRange), "" }
108 99
109 #define kGoogleTalkDefinition { \ 100 #define kGoogleTalkDefinition { \
110 "google-talk", "Google Talk", "Google Talk", \ 101 "google-talk", "Google Talk", "Google Talk", NULL, 0 }
111 kAllVersionsNoInfobarVersionRange, \
112 arraysize(kAllVersionsNoInfobarVersionRange), ""}
113 102
114 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
115 // Plugin Groups for Mac. 104 // Plugin Groups for Mac.
116 // Plugins are listed here as soon as vulnerabilities and solutions 105 // Plugins are listed here as soon as vulnerabilities and solutions
117 // (new versions) are published. 106 // (new versions) are published.
118 static const VersionRangeDefinition kQuicktimeVersionRange[] = { 107 static const VersionRangeDefinition kQuicktimeVersionRange[] = {
119 { "", "", "7.6.6", true } 108 { "", "", "7.6.6" }
120 }; 109 };
121 static const VersionRangeDefinition kJavaVersionRange[] = { 110 static const VersionRangeDefinition kJavaVersionRange[] = {
122 { "0", "13.0", "12.8.0", true }, // Leopard 111 { "0", "13.0", "12.8.0" }, // Leopard
123 { "13.0", "14.0", "13.5.0", true }, // Snow Leopard 112 { "13.0", "14.0", "13.5.0" }, // Snow Leopard
124 { "14.0", "", "14.0.3", true } // Lion 113 { "14.0", "", "14.0.3" } // Lion
125 }; 114 };
126 static const VersionRangeDefinition kFlip4MacVersionRange[] = { 115 static const VersionRangeDefinition kFlip4MacVersionRange[] = {
127 { "", "", "2.2.1", true } 116 { "", "", "2.2.1" }
128 };
129 static const VersionRangeDefinition kDivXVersionRange[] = {
130 { "", "", "", true }
131 }; 117 };
132 // Note: The Adobe Reader browser plug-in is not supported in Chrome. 118 // Note: The Adobe Reader browser plug-in is not supported in Chrome.
133 // Note: The Real Player plugin for mac doesn't expose a version at all. 119 // Note: The Real Player plugin for mac doesn't expose a version at all.
134 static const PluginGroupDefinition kGroupDefinitions[] = { 120 static const PluginGroupDefinition kGroupDefinitions[] = {
135 kFlashDefinition, 121 kFlashDefinition,
136 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", 122 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in",
137 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), 123 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange) },
138 "http://www.apple.com/quicktime/download/" },
139 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", 124 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java",
140 kJavaVersionRange, arraysize(kJavaVersionRange), 125 kJavaVersionRange, arraysize(kJavaVersionRange) },
141 "http://support.apple.com/kb/HT1338" },
142 kSilverlightDefinition, 126 kSilverlightDefinition,
143 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, 127 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange,
144 arraysize(kFlip4MacVersionRange), 128 arraysize(kFlip4MacVersionRange) },
145 "http://www.telestream.net/flip4mac-wmv/overview.htm" },
146 { "divx-player", "DivX Plus Web Player", "DivX Plus Web Player", 129 { "divx-player", "DivX Plus Web Player", "DivX Plus Web Player",
147 kDivXVersionRange, arraysize(kDivXVersionRange), 130 NULL, 0 },
148 "http://www.divx.com/en/software/divx-plus/web-player" },
149 kShockwaveDefinition, 131 kShockwaveDefinition,
150 kChromePdfDefinition, 132 kChromePdfDefinition,
151 kGoogleTalkDefinition, 133 kGoogleTalkDefinition,
152 }; 134 };
153 135
154 #elif defined(OS_WIN) 136 #elif defined(OS_WIN)
155 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of 137 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of
156 // the RealPlayer files. 138 // the RealPlayer files.
157 static const VersionRangeDefinition kQuicktimeVersionRange[] = { 139 static const VersionRangeDefinition kQuicktimeVersionRange[] = {
158 { "", "", "7.6.9", true } 140 { "", "", "7.6.9" }
159 }; 141 };
160 static const VersionRangeDefinition kJavaVersionRange[] = { 142 static const VersionRangeDefinition kJavaVersionRange[] = {
161 { "0", "7", "6.0.310", true }, // "310" is not a typo. 143 { "0", "7", "6.0.310" }, // "310" is not a typo.
162 { "7", "", "10.3", true } // JDK7u3 identifies itself as 10.3 144 { "7", "", "10.3" } // JDK7u3 identifies itself as 10.3
163 }; 145 };
164 // This is up to date with 146 // This is up to date with
165 // http://www.adobe.com/support/security/bulletins/apsb12-01.html 147 // http://www.adobe.com/support/security/bulletins/apsb12-01.html
166 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { 148 static const VersionRangeDefinition kAdobeReaderVersionRange[] = {
167 { "10", "11", "10.1.2", false }, 149 { "10", "11", "10.1.2" },
168 { "0", "10", "9.5", false } 150 { "0", "10", "9.5" }
169 }; 151 };
170 static const VersionRangeDefinition kDivXVersionRange[] = { 152 static const VersionRangeDefinition kDivXVersionRange[] = {
171 { "", "", "1.4.3.4", true } 153 { "", "", "1.4.3.4" }
172 }; 154 };
173 // This is up to date with 155 // This is up to date with
174 // http://service.real.com/realplayer/security/02062012_player/en/ 156 // http://service.real.com/realplayer/security/02062012_player/en/
175 static const VersionRangeDefinition kRealPlayerVersionRange[] = { 157 static const VersionRangeDefinition kRealPlayerVersionRange[] = {
176 { "", "", "15.0.2.71", true } 158 { "", "", "15.0.2.71" }
177 }; 159 };
178 static const PluginGroupDefinition kGroupDefinitions[] = { 160 static const PluginGroupDefinition kGroupDefinitions[] = {
179 kFlashDefinition, 161 kFlashDefinition,
180 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", 162 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in",
181 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), 163 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange) },
182 "http://www.apple.com/quicktime/download/" },
183 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", 164 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java",
184 kJavaVersionRange, arraysize(kJavaVersionRange), 165 kJavaVersionRange, arraysize(kJavaVersionRange) },
185 "http://www.java.com/download" },
186 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", 166 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat",
187 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), 167 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange) },
188 "http://get.adobe.com/reader/" },
189 kSilverlightDefinition, 168 kSilverlightDefinition,
190 kShockwaveDefinition, 169 kShockwaveDefinition,
191 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, 170 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange,
192 arraysize(kDivXVersionRange), 171 arraysize(kDivXVersionRange) },
193 "http://download.divx.com/divx/autoupdate/player/"
194 "DivXWebPlayerInstaller.exe" },
195 { "realplayer", PluginGroup::kRealPlayerGroupName, "RealPlayer", 172 { "realplayer", PluginGroup::kRealPlayerGroupName, "RealPlayer",
196 kRealPlayerVersionRange, arraysize(kRealPlayerVersionRange), 173 kRealPlayerVersionRange, arraysize(kRealPlayerVersionRange) },
197 "http://www.real.com/realplayer/download" },
198 // These are here for grouping, no vulnerabilities known. 174 // These are here for grouping, no vulnerabilities known.
199 { "windows-media-player", PluginGroup::kWindowsMediaPlayerGroupName, 175 { "windows-media-player", PluginGroup::kWindowsMediaPlayerGroupName,
200 "Windows Media Player", kAllVersionsInfobarVersionRange, 176 "Windows Media Player", NULL, 0 },
201 arraysize(kAllVersionsInfobarVersionRange), "" },
202 { "microsoft-office", "Microsoft Office", "Microsoft Office", 177 { "microsoft-office", "Microsoft Office", "Microsoft Office",
203 NULL, 0, "" }, 178 NULL, 0 },
204 { "nvidia-3d", "NVIDIA 3D", "NVIDIA 3D", kAllVersionsInfobarVersionRange, 179 { "nvidia-3d", "NVIDIA 3D", "NVIDIA 3D", NULL, 0 },
205 arraysize(kAllVersionsInfobarVersionRange), "" },
206 kChromePdfDefinition, 180 kChromePdfDefinition,
207 kGoogleTalkDefinition, 181 kGoogleTalkDefinition,
208 }; 182 };
209 183
210 #elif defined(OS_CHROMEOS) 184 #elif defined(OS_CHROMEOS)
211 // ChromeOS generally has (autoupdated) system plug-ins and no user-installable 185 // ChromeOS generally has (autoupdated) system plug-ins and no user-installable
212 // plug-ins, so we just use these definitions for grouping. 186 // plug-ins, so we just use these definitions for grouping.
213 static const PluginGroupDefinition kGroupDefinitions[] = { 187 static const PluginGroupDefinition kGroupDefinitions[] = {
214 kFlashDefinition, 188 kFlashDefinition,
215 kChromePdfDefinition, 189 kChromePdfDefinition,
216 }; 190 };
217 191
218 #else // Most importantly, covers desktop Linux. 192 #else // Most importantly, covers desktop Linux.
219 static const VersionRangeDefinition kJavaVersionRange[] = { 193 static const VersionRangeDefinition kJavaVersionRange[] = {
220 { "0", "1.7", "1.6.0.31", true }, 194 { "0", "1.7", "1.6.0.31" },
221 { "1.7", "", "1.7.0.3", true } 195 { "1.7", "", "1.7.0.3" }
222 }; 196 };
223 197
224 // Up to date with: 198 // Up to date with:
225 // http://blog.fuseyism.com/index.php/2012/02/15/ 199 // http://blog.fuseyism.com/index.php/2012/02/15/
226 // security-icedtea6-1-8-13-1-9-13-1-10-6-and-icedtea-2-0-1-released/ 200 // security-icedtea6-1-8-13-1-9-13-1-10-6-and-icedtea-2-0-1-released/
227 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { 201 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = {
228 { "0", "1.9", "1.8.13", true }, 202 { "0", "1.9", "1.8.13" },
229 { "1.9", "1.10", "1.9.13", true }, 203 { "1.9", "1.10", "1.9.13" },
230 { "1.10", "2", "1.10.6", true }, 204 { "1.10", "2", "1.10.6" },
231 { "2", "", "2.0.1", true } 205 { "2", "", "2.0.1" }
232 }; 206 };
233 207
234 static const PluginGroupDefinition kGroupDefinitions[] = { 208 static const PluginGroupDefinition kGroupDefinitions[] = {
235 // Flash on Linux is significant because there isn't yet a built-in Flash 209 // Flash on Linux is significant because there isn't yet a built-in Flash
236 // plug-in on the Linux 64-bit version of Chrome. 210 // plug-in on the Linux 64-bit version of Chrome.
237 kFlashDefinition, 211 kFlashDefinition,
238 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", 212 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java",
239 kJavaVersionRange, arraysize(kJavaVersionRange), 213 kJavaVersionRange, arraysize(kJavaVersionRange) },
240 "http://www.java.com/en/download/manual.jsp" },
241 { "redhat-icetea-java", "IcedTea", "IcedTea", 214 { "redhat-icetea-java", "IcedTea", "IcedTea",
242 kRedhatIcedTeaVersionRange, arraysize(kRedhatIcedTeaVersionRange), 215 kRedhatIcedTeaVersionRange, arraysize(kRedhatIcedTeaVersionRange) },
243 "http://www.linuxsecurity.com/content/section/3/170/" },
244 kChromePdfDefinition, 216 kChromePdfDefinition,
245 kGoogleTalkDefinition, 217 kGoogleTalkDefinition,
246 }; 218 };
247 #endif 219 #endif
248 220
249 // static 221 // static
250 PluginList* PluginList::Singleton() { 222 PluginList* PluginList::Singleton() {
251 return g_singleton.Pointer(); 223 return g_singleton.Pointer();
252 } 224 }
253 225
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 405
434 if (!will_load_callback.is_null()) 406 if (!will_load_callback.is_null())
435 will_load_callback.Run(); 407 will_load_callback.Run();
436 408
437 std::vector<FilePath> plugin_paths; 409 std::vector<FilePath> plugin_paths;
438 GetPluginPathsToLoad(&plugin_paths); 410 GetPluginPathsToLoad(&plugin_paths);
439 411
440 for (std::vector<FilePath>::const_iterator it = plugin_paths.begin(); 412 for (std::vector<FilePath>::const_iterator it = plugin_paths.begin();
441 it != plugin_paths.end(); 413 it != plugin_paths.end();
442 ++it) { 414 ++it) {
443 LoadPlugin(*it, plugin_groups); 415 WebPluginInfo plugin_info;
416 LoadPlugin(*it, plugin_groups, &plugin_info);
444 } 417 }
445 } 418 }
446 419
447 void PluginList::LoadPlugins() { 420 void PluginList::LoadPlugins() {
448 { 421 {
449 base::AutoLock lock(lock_); 422 base::AutoLock lock(lock_);
450 if (!plugins_need_refresh_) 423 if (!plugins_need_refresh_)
451 return; 424 return;
452 } 425 }
453 426
454 ScopedVector<PluginGroup> new_plugin_groups; 427 ScopedVector<PluginGroup> new_plugin_groups;
455 // Do the actual loading of the plugins. 428 // Do the actual loading of the plugins.
456 LoadPluginsInternal(&new_plugin_groups); 429 LoadPluginsInternal(&new_plugin_groups);
457 430
458 base::AutoLock lock(lock_); 431 base::AutoLock lock(lock_);
459 plugin_groups_.swap(new_plugin_groups); 432 plugin_groups_.swap(new_plugin_groups);
460 } 433 }
461 434
462 void PluginList::LoadPlugin(const FilePath& path, 435 bool PluginList::LoadPlugin(const FilePath& path,
463 ScopedVector<PluginGroup>* plugin_groups) { 436 ScopedVector<PluginGroup>* plugin_groups,
437 WebPluginInfo* plugin_info) {
464 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 438 LOG_IF(ERROR, PluginList::DebugPluginLoading())
465 << "Loading plugin " << path.value(); 439 << "Loading plugin " << path.value();
466 WebPluginInfo plugin_info;
467 const PluginEntryPoints* entry_points; 440 const PluginEntryPoints* entry_points;
468 441
469 if (!ReadPluginInfo(path, &plugin_info, &entry_points)) 442 if (!ReadPluginInfo(path, plugin_info, &entry_points))
470 return; 443 return false;
471 444
472 if (!ShouldLoadPlugin(plugin_info, plugin_groups)) 445 if (!ShouldLoadPlugin(*plugin_info, plugin_groups))
473 return; 446 return false;
474 447
475 #if defined(OS_WIN) && !defined(NDEBUG) 448 #if defined(OS_WIN) && !defined(NDEBUG)
476 if (path.BaseName().value() != L"npspy.dll") // Make an exception for NPSPY 449 if (path.BaseName().value() != L"npspy.dll") // Make an exception for NPSPY
477 #endif 450 #endif
478 { 451 {
479 for (size_t i = 0; i < plugin_info.mime_types.size(); ++i) { 452 for (size_t i = 0; i < plugin_info->mime_types.size(); ++i) {
480 // TODO: don't load global handlers for now. 453 // TODO: don't load global handlers for now.
481 // WebKit hands to the Plugin before it tries 454 // WebKit hands to the Plugin before it tries
482 // to handle mimeTypes on its own. 455 // to handle mimeTypes on its own.
483 const std::string &mime_type = plugin_info.mime_types[i].mime_type; 456 const std::string &mime_type = plugin_info->mime_types[i].mime_type;
484 if (mime_type == "*") 457 if (mime_type == "*")
485 return; 458 return false;
486 } 459 }
487 } 460 }
488 461 AddToPluginGroups(*plugin_info, plugin_groups);
489 base::AutoLock lock(lock_); 462 return true;
490 AddToPluginGroups(plugin_info, plugin_groups);
491 } 463 }
492 464
493 void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) { 465 void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) {
494 // Don't want to hold the lock while loading new plugins, so we don't block 466 // Don't want to hold the lock while loading new plugins, so we don't block
495 // other methods if they're called on other threads. 467 // other methods if they're called on other threads.
496 std::vector<FilePath> extra_plugin_paths; 468 std::vector<FilePath> extra_plugin_paths;
497 std::vector<FilePath> extra_plugin_dirs; 469 std::vector<FilePath> extra_plugin_dirs;
498 { 470 {
499 base::AutoLock lock(lock_); 471 base::AutoLock lock(lock_);
500 extra_plugin_paths = extra_plugin_paths_; 472 extra_plugin_paths = extra_plugin_paths_;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 } 712 }
741 return false; 713 return false;
742 } 714 }
743 715
744 PluginList::~PluginList() { 716 PluginList::~PluginList() {
745 } 717 }
746 718
747 719
748 } // namespace npapi 720 } // namespace npapi
749 } // namespace webkit 721 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list.h ('k') | webkit/plugins/npapi/plugin_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698