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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 if (mime_type.file_extensions[j] == extension) { | 691 if (mime_type.file_extensions[j] == extension) { |
692 if (actual_mime_type) | 692 if (actual_mime_type) |
693 *actual_mime_type = mime_type.mime_type; | 693 *actual_mime_type = mime_type.mime_type; |
694 return true; | 694 return true; |
695 } | 695 } |
696 } | 696 } |
697 } | 697 } |
698 return false; | 698 return false; |
699 } | 699 } |
700 | 700 |
701 /*static*/ | |
702 bool PluginList::RemovePlugin(const FilePath& filename, | |
703 std::vector<webkit::WebPluginInfo>* plugins) { | |
704 bool did_remove = false; | |
705 for (size_t i = 0; i < plugins->size();) { | |
706 if ((*plugins)[i].path == filename) { | |
707 plugins->erase(plugins->begin() + i); | |
708 did_remove = true; | |
709 } else { | |
710 i++; | |
711 } | |
712 } | |
713 return did_remove; | |
714 } | |
715 | |
716 PluginList::~PluginList() { | 701 PluginList::~PluginList() { |
717 } | 702 } |
718 | 703 |
719 | 704 |
720 } // namespace npapi | 705 } // namespace npapi |
721 } // namespace webkit | 706 } // namespace webkit |
OLD | NEW |