OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/version.h" | 10 #include "base/version.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/plugin_messages.h" | |
13 #include "content/browser/browser_thread.h" | 12 #include "content/browser/browser_thread.h" |
14 #include "content/browser/plugin_service.h" | 13 #include "content/browser/plugin_service.h" |
| 14 #include "content/common/plugin_messages.h" |
15 #include "webkit/plugins/npapi/plugin_group.h" | 15 #include "webkit/plugins/npapi/plugin_group.h" |
16 #include "webkit/plugins/npapi/plugin_list.h" | 16 #include "webkit/plugins/npapi/plugin_list.h" |
17 | 17 |
18 #if defined(OS_POSIX) | 18 #if defined(OS_POSIX) |
19 #include "ipc/ipc_channel_posix.h" | 19 #include "ipc/ipc_channel_posix.h" |
20 #endif | 20 #endif |
21 | 21 |
22 namespace { | 22 namespace { |
23 const char* kFlashMimeType = "application/x-shockwave-flash"; | 23 const char* kFlashMimeType = "application/x-shockwave-flash"; |
24 // The minimum Flash Player version that implements NPP_ClearSiteData. | 24 // The minimum Flash Player version that implements NPP_ClearSiteData. |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); | 172 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); |
173 scoped_ptr<Version> min_version(Version::GetVersionFromString( | 173 scoped_ptr<Version> min_version(Version::GetVersionFromString( |
174 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 174 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
175 switches::kMinClearSiteDataFlashVersion))); | 175 switches::kMinClearSiteDataFlashVersion))); |
176 if (!min_version.get()) | 176 if (!min_version.get()) |
177 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); | 177 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); |
178 return webkit::npapi::IsPluginEnabled(plugin) && | 178 return webkit::npapi::IsPluginEnabled(plugin) && |
179 version.get() && | 179 version.get() && |
180 min_version->CompareTo(*version) == -1; | 180 min_version->CompareTo(*version) == -1; |
181 } | 181 } |
OLD | NEW |