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 "chrome/browser/plugin_data_remover.h" | 5 #include "chrome/browser/plugin_data_remover.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/version.h" | 9 #include "base/version.h" |
10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 webkit::npapi::WebPluginInfo plugin; | 151 webkit::npapi::WebPluginInfo plugin; |
152 std::string mime_type; | 152 std::string mime_type; |
153 if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( | 153 if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( |
154 GURL(), kFlashMimeType, allow_wildcard, &plugin, &mime_type)) { | 154 GURL(), kFlashMimeType, allow_wildcard, &plugin, &mime_type)) { |
155 return false; | 155 return false; |
156 } | 156 } |
157 scoped_ptr<Version> version( | 157 scoped_ptr<Version> version( |
158 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); | 158 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); |
159 scoped_ptr<Version> min_version( | 159 scoped_ptr<Version> min_version( |
160 Version::GetVersionFromString(kMinFlashVersion)); | 160 Version::GetVersionFromString(kMinFlashVersion)); |
161 return plugin.enabled && | 161 return webkit::npapi::IsPluginEnabled(plugin) && |
162 version.get() && | 162 version.get() && |
163 min_version->CompareTo(*version) == -1; | 163 min_version->CompareTo(*version) == -1; |
164 } | 164 } |
OLD | NEW |