Index: chrome/browser/plugin_data_remover.h |
diff --git a/chrome/browser/plugin_data_remover.h b/chrome/browser/plugin_data_remover.h |
index 77f7f582dbcfccef92c8d2128c763bb01b878b04..762d6293716bc6f244752badc10d42699db8c7ff 100644 |
--- a/chrome/browser/plugin_data_remover.h |
+++ b/chrome/browser/plugin_data_remover.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ |
#pragma once |
+#include "base/process.h" |
#include "base/ref_counted.h" |
#include "base/time.h" |
#include "chrome/browser/plugin_process_host.h" |
@@ -23,9 +24,13 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>, |
public: |
PluginDataRemover(); |
- // Starts removing plug-in data stored since |begin_time|. If |done_task| is |
- // not NULL, it is run on the current thread when removing has finished. |
- void StartRemoving(base::Time begin_time, Task* done_task); |
+ // Starts removing plug-in data stored since |begin_time|. |
+ // If |terminate| is true, the plugin process should exit after removing data. |
+ // If |done_task| is not NULL, it is run on the current thread when removing |
+ // has finished. |
+ void StartRemoving(const base::Time& begin_time, |
+ bool terminate, |
+ Task* done_task); |
// Returns whether there is a plug-in installed that supports removing |
// LSO data. Because this method possibly has to load the plug-in list, it |
@@ -34,14 +39,15 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>, |
bool is_removing() const { return is_removing_; } |
- // Sets the task to run when removing has finished. Takes ownership of |
- // the passed task. |
- void set_done_task(Task* task) { done_task_.reset(task); } |
+ // Wait for the plugin process to exit. This should only be called after |
+ // StartRemoving has been called with |terminate| equals true. |
+ void WaitForPluginToExit(); |
// PluginProcessHost::Client methods |
virtual int ID(); |
virtual bool OffTheRecord(); |
virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info); |
+ virtual void OnPluginProcessFound(PluginProcessHost* process); |
virtual void OnChannelOpened(const IPC::ChannelHandle& handle); |
virtual void OnError(); |
@@ -54,17 +60,23 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>, |
~PluginDataRemover(); |
void SignalDone(); |
+ void ReleaseBrowserProcess(); |
void ConnectToChannel(const IPC::ChannelHandle& handle); |
void OnClearSiteDataResult(bool success); |
+ void OnPluginShuttingDown(); |
void OnTimeout(); |
scoped_refptr<base::MessageLoopProxy> message_loop_; |
bool is_removing_; |
+ bool terminate_process_; |
scoped_ptr<Task> done_task_; |
// The point in time when we start removing data. |
base::Time remove_start_time_; |
// The point in time from which on we remove data. |
base::Time begin_time_; |
+ bool has_browser_ref_; |
jam
2011/01/13 19:52:44
comment?
|
+ PluginProcessHost* plugin_process_; |
+ base::ProcessHandle handle_; |
// We own the channel, but it's used on the IO thread, so it needs to be |
// deleted there as well. |
IPC::Channel* channel_; |