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

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

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make windows compiler even happier. 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
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/glue/plugins/plugin_list.h" 5 #include "webkit/glue/plugins/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_util.h" 10 #include "base/mac_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
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 (std::vector<WebPluginInfo>::iterator it = plugins->begin();
jam 2010/12/17 19:14:45 please leave as before
pastarmovj 2010/12/20 19:57:37 Done.
101 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { 101 it != plugins->end();
102 return false; // We already have a loaded plugin higher in the hierarchy. 102 ++it) {
103 if (it->path.BaseName() == info.path.BaseName()) {
104 // We already have a loaded plugin higher in the hierarchy.
105 return false;
103 } 106 }
104 } 107 }
105 108
106 return true; 109 return true;
107 } 110 }
108 111
109 } // namespace NPAPI 112 } // namespace NPAPI
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698