| 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/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 UMA_HISTOGRAM_TIMES("ClearPluginData.time_at_shutdown", | 75 UMA_HISTOGRAM_TIMES("ClearPluginData.time_at_shutdown", |
| 76 base::Time::Now() - remove_start_time_); | 76 base::Time::Now() - remove_start_time_); |
| 77 DCHECK(result) << "Error waiting for plugin process"; | 77 DCHECK(result) << "Error waiting for plugin process"; |
| 78 } | 78 } |
| 79 | 79 |
| 80 int PluginDataRemover::ID() { | 80 int PluginDataRemover::ID() { |
| 81 // Generate a unique identifier for this PluginProcessHostClient. | 81 // Generate a unique identifier for this PluginProcessHostClient. |
| 82 return ChildProcessInfo::GenerateChildProcessUniqueId(); | 82 return ChildProcessInfo::GenerateChildProcessUniqueId(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool PluginDataRemover::SaveLocalState() { |
| 86 return false; |
| 87 } |
| 88 |
| 85 bool PluginDataRemover::OffTheRecord() { | 89 bool PluginDataRemover::OffTheRecord() { |
| 86 return false; | 90 return false; |
| 87 } | 91 } |
| 88 | 92 |
| 89 void PluginDataRemover::SetPluginInfo( | 93 void PluginDataRemover::SetPluginInfo( |
| 90 const webkit::npapi::WebPluginInfo& info) { | 94 const webkit::npapi::WebPluginInfo& info) { |
| 91 } | 95 } |
| 92 | 96 |
| 93 void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) { | 97 void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) { |
| 94 ConnectToChannel(handle); | 98 ConnectToChannel(handle); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); | 182 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); |
| 179 scoped_ptr<Version> min_version(Version::GetVersionFromString( | 183 scoped_ptr<Version> min_version(Version::GetVersionFromString( |
| 180 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 184 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 181 switches::kMinClearSiteDataFlashVersion))); | 185 switches::kMinClearSiteDataFlashVersion))); |
| 182 if (!min_version.get()) | 186 if (!min_version.get()) |
| 183 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); | 187 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); |
| 184 return webkit::npapi::IsPluginEnabled(plugin) && | 188 return webkit::npapi::IsPluginEnabled(plugin) && |
| 185 version.get() && | 189 version.get() && |
| 186 min_version->CompareTo(*version) == -1; | 190 min_version->CompareTo(*version) == -1; |
| 187 } | 191 } |
| OLD | NEW |