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 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 info.mime_types.begin(); i != info.mime_types.end(); ++i) { | 45 info.mime_types.begin(); i != info.mime_types.end(); ++i) { |
46 // The Gears plugin is Safari-specific, so don't load it. | 46 // The Gears plugin is Safari-specific, so don't load it. |
47 if (i->mime_type == "application/x-googlegears") | 47 if (i->mime_type == "application/x-googlegears") |
48 return true; | 48 return true; |
49 } | 49 } |
50 | 50 |
51 // Versions of Flip4Mac 2.3 before 2.3.6 often hang the renderer, so don't | 51 // Versions of Flip4Mac 2.3 before 2.3.6 often hang the renderer, so don't |
52 // load them. | 52 // load them. |
53 if (StartsWith(info.name, ASCIIToUTF16("Flip4Mac Windows Media"), false) && | 53 if (StartsWith(info.name, ASCIIToUTF16("Flip4Mac Windows Media"), false) && |
54 StartsWith(info.version, ASCIIToUTF16("2.3"), false)) { | 54 StartsWith(info.version, ASCIIToUTF16("2.3"), false)) { |
55 std::vector<string16> components; | 55 std::vector<base::string16> components; |
56 base::SplitString(info.version, '.', &components); | 56 base::SplitString(info.version, '.', &components); |
57 int bugfix_version = 0; | 57 int bugfix_version = 0; |
58 return (components.size() >= 3 && | 58 return (components.size() >= 3 && |
59 base::StringToInt(components[2], &bugfix_version) && | 59 base::StringToInt(components[2], &bugfix_version) && |
60 bugfix_version < 6); | 60 bugfix_version < 6); |
61 } | 61 } |
62 | 62 |
63 return false; | 63 return false; |
64 } | 64 } |
65 | 65 |
(...skipping 22 matching lines...) Expand all Loading... |
88 } | 88 } |
89 | 89 |
90 bool PluginList::ShouldLoadPluginUsingPluginList( | 90 bool PluginList::ShouldLoadPluginUsingPluginList( |
91 const WebPluginInfo& info, | 91 const WebPluginInfo& info, |
92 std::vector<webkit::WebPluginInfo>* plugins) { | 92 std::vector<webkit::WebPluginInfo>* plugins) { |
93 return !IsBlacklistedPlugin(info); | 93 return !IsBlacklistedPlugin(info); |
94 } | 94 } |
95 | 95 |
96 } // namespace npapi | 96 } // namespace npapi |
97 } // namespace webkit | 97 } // namespace webkit |
OLD | NEW |