| Index: chrome/browser/plugin_data_remover.cc
|
| diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc
|
| index 2baf0d0452ba6c60c92703bde6e5d6fc89b56bd1..4e6ac7f3c71bf5ca4a9ba8d6be6bad0c2e75bd59 100644
|
| --- a/chrome/browser/plugin_data_remover.cc
|
| +++ b/chrome/browser/plugin_data_remover.cc
|
| @@ -18,11 +18,12 @@
|
| #endif
|
|
|
| namespace {
|
| -const char* g_flash_mime_type = "application/x-shockwave-flash";
|
| +const char* kFlashMimeType = "application/x-shockwave-flash";
|
| // TODO(bauerb): Update minimum required Flash version as soon as there is one
|
| // implementing the API.
|
| -const char* g_min_flash_version = "100";
|
| -const int64 g_timeout_ms = 10000;
|
| +const char* kMinFlashVersion = "100";
|
| +const int64 kRemovalTimeoutMs = 10000;
|
| +const uint64 kClearAllData = 0;
|
| } // namespace
|
|
|
| PluginDataRemover::PluginDataRemover()
|
| @@ -47,13 +48,13 @@ void PluginDataRemover::StartRemoving(base::Time begin_time, Task* done_task) {
|
|
|
| AddRef();
|
| PluginService::GetInstance()->OpenChannelToPlugin(
|
| - GURL(), g_flash_mime_type, this);
|
| + GURL(), kFlashMimeType, this);
|
|
|
| BrowserThread::PostDelayedTask(
|
| BrowserThread::IO,
|
| FROM_HERE,
|
| NewRunnableMethod(this, &PluginDataRemover::OnTimeout),
|
| - g_timeout_ms);
|
| + kRemovalTimeoutMs);
|
| }
|
|
|
| int PluginDataRemover::ID() {
|
| @@ -90,7 +91,9 @@ void PluginDataRemover::ConnectToChannel(const IPC::ChannelHandle& handle) {
|
| }
|
|
|
| if (!channel_->Send(
|
| - new PluginMsg_ClearSiteData(0, std::string(), begin_time_))) {
|
| + new PluginMsg_ClearSiteData(std::string(),
|
| + kClearAllData,
|
| + begin_time_))) {
|
| LOG(DFATAL) << "Couldn't send ClearSiteData message";
|
| SignalDone();
|
| }
|
| @@ -147,16 +150,14 @@ bool PluginDataRemover::IsSupported() {
|
| bool allow_wildcard = false;
|
| webkit::npapi::WebPluginInfo plugin;
|
| std::string mime_type;
|
| - if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(GURL(),
|
| - g_flash_mime_type,
|
| - allow_wildcard,
|
| - &plugin,
|
| - &mime_type))
|
| + if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
|
| + GURL(), kFlashMimeType, allow_wildcard, &plugin, &mime_type)) {
|
| return false;
|
| + }
|
| scoped_ptr<Version> version(
|
| webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
|
| scoped_ptr<Version> min_version(
|
| - Version::GetVersionFromString(g_min_flash_version));
|
| + Version::GetVersionFromString(kMinFlashVersion));
|
| return plugin.enabled &&
|
| version.get() &&
|
| min_version->CompareTo(*version) == -1;
|
|
|