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

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

Issue 7848025: Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright 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.cc ('k') | webkit/plugins/npapi/plugin_list_posix.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, 100 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
101 ScopedVector<PluginGroup>* plugin_groups) { 101 ScopedVector<PluginGroup>* plugin_groups) {
102 if (IsBlacklistedPlugin(info)) 102 if (IsBlacklistedPlugin(info))
103 return false; 103 return false;
104 104
105 // Hierarchy check 105 // Hierarchy check
106 // (we're loading plugins hierarchically from Library folders, so plugins we 106 // (we're loading plugins hierarchically from Library folders, so plugins we
107 // encounter earlier must override plugins we encounter later) 107 // encounter earlier must override plugins we encounter later)
108 for (size_t i = 0; i < plugin_groups->size(); ++i) { 108 for (size_t i = 0; i < plugin_groups->size(); ++i) {
109 const std::vector<WebPluginInfo>& plugins = 109 const std::vector<WebPluginInfo>& plugins =
110 (*plugin_groups)[i]->web_plugins_info(); 110 (*plugin_groups)[i]->web_plugin_infos();
111 for (size_t j = 0; j < plugins.size(); ++j) { 111 for (size_t j = 0; j < plugins.size(); ++j) {
112 if (plugins[j].path.BaseName() == info.path.BaseName()) { 112 if (plugins[j].path.BaseName() == info.path.BaseName()) {
113 return false; // Already have a loaded plugin higher in the hierarchy. 113 return false; // Already have a loaded plugin higher in the hierarchy.
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 return true; 118 return true;
119 } 119 }
120 120
121 } // namespace npapi 121 } // namespace npapi
122 } // namespace webkit 122 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list.cc ('k') | webkit/plugins/npapi/plugin_list_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698