| 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/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" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 DCHECK(!is_removing_); | 43 DCHECK(!is_removing_); |
| 44 remove_start_time_ = base::Time::Now(); | 44 remove_start_time_ = base::Time::Now(); |
| 45 begin_time_ = begin_time; | 45 begin_time_ = begin_time; |
| 46 | 46 |
| 47 message_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); | 47 message_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); |
| 48 done_task_.reset(done_task); | 48 done_task_.reset(done_task); |
| 49 is_removing_ = true; | 49 is_removing_ = true; |
| 50 | 50 |
| 51 AddRef(); | 51 AddRef(); |
| 52 PluginService::GetInstance()->OpenChannelToPlugin( | 52 PluginService::GetInstance()->OpenChannelToPlugin( |
| 53 GURL(), kFlashMimeType, this); | 53 0, 0, GURL(), kFlashMimeType, this); |
| 54 | 54 |
| 55 BrowserThread::PostDelayedTask( | 55 BrowserThread::PostDelayedTask( |
| 56 BrowserThread::IO, | 56 BrowserThread::IO, |
| 57 FROM_HERE, | 57 FROM_HERE, |
| 58 NewRunnableMethod(this, &PluginDataRemover::OnTimeout), | 58 NewRunnableMethod(this, &PluginDataRemover::OnTimeout), |
| 59 kRemovalTimeoutMs); | 59 kRemovalTimeoutMs); |
| 60 } | 60 } |
| 61 | 61 |
| 62 int PluginDataRemover::ID() { | 62 int PluginDataRemover::ID() { |
| 63 // Generate an ID for the browser process. | 63 // Generate an ID for the browser process. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); | 160 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); |
| 161 scoped_ptr<Version> min_version(Version::GetVersionFromString( | 161 scoped_ptr<Version> min_version(Version::GetVersionFromString( |
| 162 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 162 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 163 switches::kMinClearSiteDataFlashVersion))); | 163 switches::kMinClearSiteDataFlashVersion))); |
| 164 if (!min_version.get()) | 164 if (!min_version.get()) |
| 165 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); | 165 min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); |
| 166 return plugin.enabled && | 166 return plugin.enabled && |
| 167 version.get() && | 167 version.get() && |
| 168 min_version->CompareTo(*version) == -1; | 168 min_version->CompareTo(*version) == -1; |
| 169 } | 169 } |
| OLD | NEW |