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

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

Issue 2854041: Fix a bug effectively disabling the default plugin. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Add braces. Created 10 years, 5 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
« no previous file with comments | « chrome/browser/default_plugin_uitest.cc ('k') | no next file » | 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/glue/plugins/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"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 } 375 }
376 376
377 bool PluginList::GetPluginInfo(const GURL& url, 377 bool PluginList::GetPluginInfo(const GURL& url,
378 const std::string& mime_type, 378 const std::string& mime_type,
379 bool allow_wildcard, 379 bool allow_wildcard,
380 WebPluginInfo* info, 380 WebPluginInfo* info,
381 std::string* actual_mime_type) { 381 std::string* actual_mime_type) {
382 bool found = FindPlugin(mime_type, allow_wildcard, info); 382 bool found = FindPlugin(mime_type, allow_wildcard, info);
383 if (!found || (info->path.value() == kDefaultPluginLibraryName)) { 383 if (!found || (info->path.value() == kDefaultPluginLibraryName)) {
384 found = FindPlugin(url, actual_mime_type, info) || 384 if (FindPlugin(url, actual_mime_type, info) ||
385 FindDisabledPlugin(mime_type, allow_wildcard, info); 385 FindDisabledPlugin(mime_type, allow_wildcard, info)) {
386 found = true;
387 }
386 } 388 }
387 389
388 return found; 390 return found;
389 } 391 }
390 392
391 bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, 393 bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path,
392 WebPluginInfo* info) { 394 WebPluginInfo* info) {
393 LoadPlugins(false); 395 LoadPlugins(false);
394 AutoLock lock(lock_); 396 AutoLock lock(lock_);
395 for (size_t i = 0; i < plugins_.size(); ++i) { 397 for (size_t i = 0; i < plugins_.size(); ++i) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 451 }
450 452
451 return did_disable; 453 return did_disable;
452 } 454 }
453 455
454 void PluginList::Shutdown() { 456 void PluginList::Shutdown() {
455 // TODO 457 // TODO
456 } 458 }
457 459
458 } // namespace NPAPI 460 } // namespace NPAPI
OLDNEW
« no previous file with comments | « chrome/browser/default_plugin_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698