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 #ifndef CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual int ID(); | 32 virtual int ID(); |
33 virtual bool OffTheRecord(); | 33 virtual bool OffTheRecord(); |
34 virtual void SetPluginInfo(const WebPluginInfo& info); | 34 virtual void SetPluginInfo(const WebPluginInfo& info); |
35 virtual void OnChannelOpened(const IPC::ChannelHandle& handle); | 35 virtual void OnChannelOpened(const IPC::ChannelHandle& handle); |
36 virtual void OnError(); | 36 virtual void OnError(); |
37 | 37 |
38 // IPC::ChannelProxy::MessageFilter methods | 38 // IPC::ChannelProxy::MessageFilter methods |
39 virtual void OnMessageReceived(const IPC::Message& message); | 39 virtual void OnMessageReceived(const IPC::Message& message); |
40 virtual void OnChannelError(); | 40 virtual void OnChannelError(); |
41 | 41 |
| 42 // Returns whether there is a plug-in installed that supports removing |
| 43 // LSO data. Because this method possibly has to load the plug-in list, it |
| 44 // should only be called on the FILE thread. |
| 45 static bool IsSupported(); |
| 46 |
42 private: | 47 private: |
43 void SignalDone(); | 48 void SignalDone(); |
44 void SignalError(); | 49 void SignalError(); |
45 void OnClearSiteDataResult(bool success); | 50 void OnClearSiteDataResult(bool success); |
46 void OnTimeout(); | 51 void OnTimeout(); |
47 | 52 |
48 scoped_refptr<base::MessageLoopProxy> message_loop_; | 53 scoped_refptr<base::MessageLoopProxy> message_loop_; |
49 scoped_ptr<Task> done_task_; | 54 scoped_ptr<Task> done_task_; |
50 base::Time begin_time_; | 55 base::Time begin_time_; |
51 // We own the channel, but it's used on the IO thread, so it needs to be | 56 // We own the channel, but it's used on the IO thread, so it needs to be |
52 // deleted there as well. | 57 // deleted there as well. |
53 IPC::Channel* channel_; | 58 IPC::Channel* channel_; |
54 ScopedRunnableMethodFactory<PluginDataRemover> method_factory_; | 59 ScopedRunnableMethodFactory<PluginDataRemover> method_factory_; |
| 60 Lock task_lock_; |
55 }; | 61 }; |
56 | 62 |
57 #endif // CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ | 63 #endif // CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_ |
OLD | NEW |