Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: chrome/browser/plugin_data_remover.h

Issue 4832002: Add PluginDataRemover. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/plugin_data_remover.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_
6 #define CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_
7 #pragma once
8
9 #include "base/ref_counted.h"
10 #include "base/time.h"
11 #include "chrome/browser/plugin_process_host.h"
12 #include "ipc/ipc_channel_proxy.h"
13 #include "ipc/ipc_message.h"
14
15 class Task;
16
17 namespace base {
18 class MessageLoopProxy;
19 }
20
21 class PluginDataRemover : public PluginProcessHost::Client,
22 public IPC::Channel::Listener {
23 public:
24 PluginDataRemover();
25 ~PluginDataRemover();
26
27 // Starts removing plug-in data stored since |begin_time| and calls
28 // |done_task| on the current thread when finished.
29 void StartRemoving(base::Time begin_time, Task* done_task);
30
31 // PluginProcessHost::Client methods
32 virtual int ID();
33 virtual bool OffTheRecord();
34 virtual void SetPluginInfo(const WebPluginInfo& info);
35 virtual void OnChannelOpened(const IPC::ChannelHandle& handle);
36 virtual void OnError();
37
38 // IPC::ChannelProxy::MessageFilter methods
39 virtual void OnMessageReceived(const IPC::Message& message);
40 virtual void OnChannelError();
41
42 private:
43 void SignalDone();
44 void SignalError();
45 void OnClearSiteDataResult(bool success);
46 void OnTimeout();
47
48 scoped_refptr<base::MessageLoopProxy> message_loop_;
49 scoped_ptr<Task> done_task_;
50 base::Time begin_time_;
51 // We own the channel, but it's used on the IO thread, so it needs to be
52 // deleted there as well.
53 IPC::Channel* channel_;
54 ScopedRunnableMethodFactory<PluginDataRemover> method_factory_;
55 Lock task_lock_;
56 };
57
58 #endif // CHROME_BROWSER_PLUGIN_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugin_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698