| 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 "content/browser/plugin_data_remover_impl.h" | 5 #include "content/browser/plugin_data_remover_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| 11 #include "content/browser/plugin_process_host.h" | 11 #include "content/browser/plugin_process_host.h" |
| 12 #include "content/browser/plugin_service.h" | 12 #include "content/browser/plugin_service.h" |
| 13 #include "content/common/child_process_host.h" | 13 #include "content/common/child_process_host_impl.h" |
| 14 #include "content/common/plugin_messages.h" | 14 #include "content/common/plugin_messages.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 #include "webkit/plugins/npapi/plugin_group.h" | 16 #include "webkit/plugins/npapi/plugin_group.h" |
| 17 | 17 |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 using content::ChildProcessHostImpl; |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 const char kFlashMimeType[] = "application/x-shockwave-flash"; | 23 const char kFlashMimeType[] = "application/x-shockwave-flash"; |
| 23 // The minimum Flash Player version that implements NPP_ClearSiteData. | 24 // The minimum Flash Player version that implements NPP_ClearSiteData. |
| 24 const char kMinFlashVersion[] = "10.3"; | 25 const char kMinFlashVersion[] = "10.3"; |
| 25 const int64 kRemovalTimeoutMs = 10000; | 26 const int64 kRemovalTimeoutMs = 10000; |
| 26 const uint64 kClearAllData = 0; | 27 const uint64 kClearAllData = 0; |
| 27 | 28 |
| 28 } // namespace | 29 } // namespace |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 87 } |
| 87 | 88 |
| 88 virtual ~Context() { | 89 virtual ~Context() { |
| 89 if (channel_) | 90 if (channel_) |
| 90 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, channel_); | 91 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, channel_); |
| 91 } | 92 } |
| 92 | 93 |
| 93 // PluginProcessHost::Client methods. | 94 // PluginProcessHost::Client methods. |
| 94 virtual int ID() OVERRIDE { | 95 virtual int ID() OVERRIDE { |
| 95 // Generate a unique identifier for this PluginProcessHostClient. | 96 // Generate a unique identifier for this PluginProcessHostClient. |
| 96 return ChildProcessHost::GenerateChildProcessUniqueId(); | 97 return ChildProcessHostImpl::GenerateChildProcessUniqueId(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 virtual bool OffTheRecord() OVERRIDE { | 100 virtual bool OffTheRecord() OVERRIDE { |
| 100 return false; | 101 return false; |
| 101 } | 102 } |
| 102 | 103 |
| 103 virtual const content::ResourceContext& GetResourceContext() OVERRIDE { | 104 virtual const content::ResourceContext& GetResourceContext() OVERRIDE { |
| 104 return resource_context_; | 105 return resource_context_; |
| 105 } | 106 } |
| 106 | 107 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 232 |
| 232 PluginDataRemoverImpl::~PluginDataRemoverImpl() { | 233 PluginDataRemoverImpl::~PluginDataRemoverImpl() { |
| 233 } | 234 } |
| 234 | 235 |
| 235 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( | 236 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( |
| 236 base::Time begin_time) { | 237 base::Time begin_time) { |
| 237 DCHECK(!context_.get()); | 238 DCHECK(!context_.get()); |
| 238 context_ = new Context(mime_type_, begin_time, resource_context_); | 239 context_ = new Context(mime_type_, begin_time, resource_context_); |
| 239 return context_->event(); | 240 return context_->event(); |
| 240 } | 241 } |
| OLD | NEW |