Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |