blob: 7baa087c963170bf3983b5dffb9b1de7a1667efb [file] [log] [blame]
[email protected]f7867172012-07-11 07:04:071// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]8b8a554d2010-11-18 13:26:402// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]d8e682012011-11-17 18:31:545#ifndef CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_
6#define CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_
[email protected]8b8a554d2010-11-18 13:26:407
[email protected]bb95acab2011-11-16 22:22:278#include <string>
9
[email protected]15bbfc52011-11-17 19:22:5910#include "base/compiler_specific.h"
avib7348942015-12-25 20:57:1011#include "base/macros.h"
[email protected]76b70f92011-11-21 19:31:1412#include "base/memory/ref_counted.h"
[email protected]a43858f2013-06-28 15:18:3713#include "base/time/time.h"
[email protected]d8e682012011-11-17 18:31:5414#include "content/public/browser/plugin_data_remover.h"
[email protected]8b8a554d2010-11-18 13:26:4015
[email protected]1bf0fb22012-04-12 21:44:1616namespace content {
17
18class CONTENT_EXPORT PluginDataRemoverImpl : public PluginDataRemover {
[email protected]8b8a554d2010-11-18 13:26:4019 public:
[email protected]1bf0fb22012-04-12 21:44:1620 explicit PluginDataRemoverImpl(BrowserContext* browser_context);
dchengc2282aa2014-10-21 12:07:5821 ~PluginDataRemoverImpl() override;
[email protected]d8e682012011-11-17 18:31:5422
[email protected]1bf0fb22012-04-12 21:44:1623 // PluginDataRemover implementation:
dchengc2282aa2014-10-21 12:07:5824 base::WaitableEvent* StartRemoving(base::Time begin_time) override;
[email protected]8b8a554d2010-11-18 13:26:4025
tommyclie86b2982015-03-16 20:16:4526 // The plugin whose data should be removed (usually Flash) is specified via
[email protected]b4a27e02011-04-04 19:12:2227 // its MIME type. This method sets a different MIME type in order to call a
tommyclie86b2982015-03-16 20:16:4528 // different plugin (for example in tests).
[email protected]c7d58d62011-01-21 10:27:1829 void set_mime_type(const std::string& mime_type) { mime_type_ = mime_type; }
30
[email protected]8b8a554d2010-11-18 13:26:4031 private:
[email protected]76b70f92011-11-21 19:31:1432 class Context;
[email protected]8b8a554d2010-11-18 13:26:4033
[email protected]c7d58d62011-01-21 10:27:1834 std::string mime_type_;
[email protected]1bf0fb22012-04-12 21:44:1635
36 // The browser context for the profile.
37 BrowserContext* browser_context_;
[email protected]b4a27e02011-04-04 19:12:2238
[email protected]76b70f92011-11-21 19:31:1439 // This allows this object to be deleted on the UI thread while it's still
40 // being used on the IO thread.
41 scoped_refptr<Context> context_;
[email protected]d8e682012011-11-17 18:31:5442
43 DISALLOW_COPY_AND_ASSIGN(PluginDataRemoverImpl);
[email protected]8b8a554d2010-11-18 13:26:4044};
45
[email protected]1bf0fb22012-04-12 21:44:1646} // namespace content
47
[email protected]d8e682012011-11-17 18:31:5448#endif // CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_