OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Sort the file list by time (and filename). | 158 // Sort the file list by time (and filename). |
159 std::sort(files.begin(), files.end(), CompareTime); | 159 std::sort(files.begin(), files.end(), CompareTime); |
160 | 160 |
161 // Load the files in order. | 161 // Load the files in order. |
162 for (FileTimeList::const_iterator i = files.begin(); i != files.end(); ++i) { | 162 for (FileTimeList::const_iterator i = files.begin(); i != files.end(); ++i) { |
163 LoadPlugin(i->first, plugins); | 163 LoadPlugin(i->first, plugins); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 | 167 |
168 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, | 168 bool PluginList::PlatformShouldLoadPlugin(const WebPluginInfo& info, |
169 std::vector<WebPluginInfo>* plugins) { | 169 std::vector<WebPluginInfo>* plugins) { |
170 if (DebugPluginLoading()) { | 170 if (DebugPluginLoading()) { |
171 LOG(ERROR) << "Considering " << info.path.value() | 171 LOG(ERROR) << "Considering " << info.path.value() |
172 << " (" << info.name << ")"; | 172 << " (" << info.name << ")"; |
173 } | 173 } |
174 if (IsUndesirablePlugin(info)) { | 174 if (IsUndesirablePlugin(info)) { |
175 if (DebugPluginLoading()) | 175 if (DebugPluginLoading()) |
176 LOG(ERROR) << info.path.value() << " is undesirable."; | 176 LOG(ERROR) << info.path.value() << " is undesirable."; |
177 | 177 |
178 // See if we have a better version of this plugin. | 178 // See if we have a better version of this plugin. |
179 for (size_t i = 0; i < plugins->size(); ++i) { | 179 for (size_t i = 0; i < plugins->size(); ++i) { |
(...skipping 12 matching lines...) Expand all Loading... |
192 | 192 |
193 // TODO(evanm): prefer the newest version of flash, etc. here? | 193 // TODO(evanm): prefer the newest version of flash, etc. here? |
194 | 194 |
195 if (DebugPluginLoading()) | 195 if (DebugPluginLoading()) |
196 LOG(ERROR) << "Using " << info.path.value(); | 196 LOG(ERROR) << "Using " << info.path.value(); |
197 | 197 |
198 return true; | 198 return true; |
199 } | 199 } |
200 | 200 |
201 } // namespace NPAPI | 201 } // namespace NPAPI |
OLD | NEW |