OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stl_util-inl.h" | |
13 #include "base/string_split.h" | 12 #include "base/string_split.h" |
14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
15 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
16 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
17 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
18 #include "net/base/mime_util.h" | 17 #include "net/base/mime_util.h" |
19 #include "webkit/glue/plugins/plugin_constants_win.h" | 18 #include "webkit/glue/plugins/plugin_constants_win.h" |
20 #include "webkit/glue/plugins/plugin_lib.h" | 19 #include "webkit/glue/plugins/plugin_lib.h" |
21 #include "webkit/glue/plugins/plugin_switches.h" | 20 #include "webkit/glue/plugins/plugin_switches.h" |
22 #include "webkit/glue/webkit_glue.h" | 21 #include "webkit/glue/webkit_glue.h" |
23 | 22 |
24 #if defined(OS_POSIX) | 23 #if defined(OS_POSIX) |
| 24 #include "base/stl_util-inl.h" |
25 #include "base/third_party/valgrind/valgrind.h" | 25 #include "base/third_party/valgrind/valgrind.h" |
26 #endif // defined(OS_POSIX) | 26 #endif // defined(OS_POSIX) |
27 | 27 |
28 namespace NPAPI { | 28 namespace NPAPI { |
29 | 29 |
30 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
31 // Plugin Groups for Mac. | 31 // Plugin Groups for Mac. |
32 // Plugins are listed here as soon as vulnerabilities and solutions | 32 // Plugins are listed here as soon as vulnerabilities and solutions |
33 // (new versions) are published. | 33 // (new versions) are published. |
34 // TODO(panayiotis): Get the Real Player version on Mac, somehow. | 34 // TODO(panayiotis): Get the Real Player version on Mac, somehow. |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 706 } |
707 | 707 |
708 return did_change; | 708 return did_change; |
709 } | 709 } |
710 | 710 |
711 void PluginList::DisableOutdatedPluginGroups() { | 711 void PluginList::DisableOutdatedPluginGroups() { |
712 disable_outdated_plugins_ = true; | 712 disable_outdated_plugins_ = true; |
713 } | 713 } |
714 | 714 |
715 PluginList::~PluginList() { | 715 PluginList::~PluginList() { |
| 716 Shutdown(); |
716 } | 717 } |
717 | 718 |
718 void PluginList::Shutdown() { | 719 void PluginList::Shutdown() { |
719 // TODO | 720 // TODO |
720 // Note: plugin_groups_ contains simple pointers of type PluginGroup*, but | 721 // Note: plugin_groups_ contains simple pointers of type PluginGroup*, but |
721 // since this singleton lives until the process is destroyed, no explicit | 722 // since this singleton lives until the process is destroyed, no explicit |
722 // cleanup is necessary. | 723 // cleanup is necessary. |
723 // However, when running on Valgrind, we need to do the cleanup to keep the | 724 // However, when running on Valgrind, we need to do the cleanup to keep the |
724 // memory tree green. | 725 // memory tree green. |
725 #if defined(OS_POSIX) | 726 #if defined(OS_POSIX) |
726 if (RUNNING_ON_VALGRIND) { | 727 if (RUNNING_ON_VALGRIND) { |
727 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), | 728 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), |
728 plugin_groups_.end()); | 729 plugin_groups_.end()); |
729 } | 730 } |
730 #endif | 731 #endif |
731 } | 732 } |
732 | 733 |
733 } // namespace NPAPI | 734 } // namespace NPAPI |
OLD | NEW |