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

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

Issue 7901015: Revert 101269 - Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo, to ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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_mac.mm ('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')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/npapi/plugin_list_posix.cc:r3734-4217,4606-5108,5177-5263
OLDNEW
1 // Copyright (c) 2011 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 "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "base/string_split.h" 11 #include "base/string_split.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 241 LOG_IF(ERROR, PluginList::DebugPluginLoading())
242 << "Considering " << info.path.value() << " (" << info.name << ")"; 242 << "Considering " << info.path.value() << " (" << info.name << ")";
243 243
244 if (IsUndesirablePlugin(info)) { 244 if (IsUndesirablePlugin(info)) {
245 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 245 LOG_IF(ERROR, PluginList::DebugPluginLoading())
246 << info.path.value() << " is undesirable."; 246 << info.path.value() << " is undesirable.";
247 247
248 // See if we have a better version of this plugin. 248 // See if we have a better version of this plugin.
249 for (size_t i = 0; i < plugin_groups->size(); ++i) { 249 for (size_t i = 0; i < plugin_groups->size(); ++i) {
250 const std::vector<WebPluginInfo>& plugins = 250 const std::vector<WebPluginInfo>& plugins =
251 (*plugin_groups)[i]->web_plugin_infos(); 251 (*plugin_groups)[i]->web_plugins_info();
252 for (size_t j = 0; j < plugins.size(); ++j) { 252 for (size_t j = 0; j < plugins.size(); ++j) {
253 if (plugins[j].name == info.name && 253 if (plugins[j].name == info.name &&
254 !IsUndesirablePlugin(plugins[j])) { 254 !IsUndesirablePlugin(plugins[j])) {
255 // Skip the current undesirable one so we can use the better one 255 // Skip the current undesirable one so we can use the better one
256 // we just found. 256 // we just found.
257 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 257 LOG_IF(ERROR, PluginList::DebugPluginLoading())
258 << "Skipping " << info.path.value() << ", preferring " 258 << "Skipping " << info.path.value() << ", preferring "
259 << plugins[j].path.value(); 259 << plugins[j].path.value();
260 return false; 260 return false;
261 } 261 }
262 } 262 }
263 } 263 }
264 } 264 }
265 265
266 // TODO(evanm): prefer the newest version of flash, etc. here? 266 // TODO(evanm): prefer the newest version of flash, etc. here?
267 267
268 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 268 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
269 269
270 return true; 270 return true;
271 } 271 }
272 272
273 } // namespace npapi 273 } // namespace npapi
274 } // namespace webkit 274 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list_mac.mm ('k') | webkit/plugins/npapi/plugin_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698