| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 if (mime_type.file_extensions[j] == extension) { | 445 if (mime_type.file_extensions[j] == extension) { |
| 446 if (actual_mime_type) | 446 if (actual_mime_type) |
| 447 *actual_mime_type = mime_type.mime_type; | 447 *actual_mime_type = mime_type.mime_type; |
| 448 return true; | 448 return true; |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 return false; | 452 return false; |
| 453 } | 453 } |
| 454 | 454 |
| 455 /*static*/ | |
| 456 bool PluginList::RemovePlugin(const FilePath& filename, | |
| 457 std::vector<webkit::WebPluginInfo>* plugins) { | |
| 458 bool did_remove = false; | |
| 459 for (size_t i = 0; i < plugins->size();) { | |
| 460 if ((*plugins)[i].path == filename) { | |
| 461 plugins->erase(plugins->begin() + i); | |
| 462 did_remove = true; | |
| 463 } else { | |
| 464 i++; | |
| 465 } | |
| 466 } | |
| 467 return did_remove; | |
| 468 } | |
| 469 | |
| 470 PluginList::~PluginList() { | 455 PluginList::~PluginList() { |
| 471 } | 456 } |
| 472 | 457 |
| 473 | 458 |
| 474 } // namespace npapi | 459 } // namespace npapi |
| 475 } // namespace webkit | 460 } // namespace webkit |
| OLD | NEW |