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

Side by Side Diff: webkit/plugins/npapi/plugin_list_mac.mm

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added empty group prunning. Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, 92 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
93 std::vector<WebPluginInfo>* plugins) { 93 std::vector<WebPluginInfo>* plugins) {
94 if (IsBlacklistedPlugin(info)) 94 if (IsBlacklistedPlugin(info))
95 return false; 95 return false;
96 96
97 // Hierarchy check 97 // Hierarchy check
98 // (we're loading plugins hierarchically from Library folders, so plugins we 98 // (we're loading plugins hierarchically from Library folders, so plugins we
99 // encounter earlier must override plugins we encounter later) 99 // encounter earlier must override plugins we encounter later)
100 for (size_t i = 0; i < plugins->size(); ++i) { 100 for (size_t i = 0; i < plugins->size(); ++i) {
101 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { 101 if (plugins->at(i).path.BaseName() == info.path.BaseName()) {
jam 2011/01/19 20:22:09 there's no change here, so please just leave this
pastarmovj 2011/01/19 23:39:17 Done.
102 return false; // We already have a loaded plugin higher in the hierarchy. 102 // We already have a loaded plugin higher in the hierarchy.
103 return false;
103 } 104 }
104 } 105 }
105 106
106 return true; 107 return true;
107 } 108 }
108 109
109 } // namespace npapi 110 } // namespace npapi
110 } // namespace webkit 111 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698