| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <tchar.h> | 5 #include <tchar.h> |
| 6 | 6 |
| 7 #include "webkit/glue/plugins/plugin_list.h" | 7 #include "webkit/glue/plugins/plugin_list.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 int cur_a = StringToInt(a_ver[i]); | 255 int cur_a = StringToInt(a_ver[i]); |
| 256 int cur_b = StringToInt(b_ver[i]); | 256 int cur_b = StringToInt(b_ver[i]); |
| 257 if (cur_a > cur_b) | 257 if (cur_a > cur_b) |
| 258 return false; | 258 return false; |
| 259 if (cur_a < cur_b) | 259 if (cur_a < cur_b) |
| 260 return true; | 260 return true; |
| 261 } | 261 } |
| 262 return false; | 262 return false; |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, | 265 bool PluginList::PlatformShouldLoadPlugin(const WebPluginInfo& info, |
| 266 std::vector<WebPluginInfo>* plugins) { | 266 std::vector<WebPluginInfo>* plugins) { |
| 267 // Version check | 267 // Version check |
| 268 | 268 |
| 269 for (size_t i = 0; i < plugins->size(); ++i) { | 269 for (size_t i = 0; i < plugins->size(); ++i) { |
| 270 if ((*plugins)[i].path.BaseName() == info.path.BaseName() && | 270 if ((*plugins)[i].path.BaseName() == info.path.BaseName() && |
| 271 !IsNewerVersion((*plugins)[i].version, info.version)) { | 271 !IsNewerVersion((*plugins)[i].version, info.version)) { |
| 272 return false; // We already have a loaded plugin whose version is newer. | 272 return false; // We already have a loaded plugin whose version is newer. |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 | 275 |
| 276 // Troublemakers | 276 // Troublemakers |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 for (size_t i = 0; i < plugins->size(); ++i) { | 310 for (size_t i = 0; i < plugins->size(); ++i) { |
| 311 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) | 311 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) |
| 312 return false; | 312 return false; |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 return true; | 316 return true; |
| 317 } | 317 } |
| 318 | 318 |
| 319 } // namespace NPAPI | 319 } // namespace NPAPI |
| OLD | NEW |