OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ |
6 #define CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ | 6 #define CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ |
7 | 7 |
8 #if !defined(ENABLE_PLUGINS) | 8 #include "ppapi/features/features.h" |
| 9 |
| 10 #if !BUILDFLAG(ENABLE_PLUGINS) |
9 #error This file should only be included when plugins are enabled. | 11 #error This file should only be included when plugins are enabled. |
10 #endif | 12 #endif |
11 | 13 |
12 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/time/time.h" | 16 #include "base/time/time.h" |
15 #include "url/gurl.h" | 17 #include "url/gurl.h" |
16 | 18 |
17 namespace storage { | 19 namespace storage { |
18 class FileSystemContext; | 20 class FileSystemContext; |
19 } | 21 } |
20 | 22 |
21 namespace content { | 23 namespace content { |
22 | 24 |
23 // Clear the plugin private filesystem data in |filesystem_context| for | 25 // Clear the plugin private filesystem data in |filesystem_context| for |
24 // |storage_origin| if any file has a last modified time between |begin| | 26 // |storage_origin| if any file has a last modified time between |begin| |
25 // and |end|. If |storage_origin| is not specified, then all available | 27 // and |end|. If |storage_origin| is not specified, then all available |
26 // origins are checked. |callback| is called when the operation is complete. | 28 // origins are checked. |callback| is called when the operation is complete. |
27 // This must be called on the file task runner. | 29 // This must be called on the file task runner. |
28 void ClearPluginPrivateDataOnFileTaskRunner( | 30 void ClearPluginPrivateDataOnFileTaskRunner( |
29 scoped_refptr<storage::FileSystemContext> filesystem_context, | 31 scoped_refptr<storage::FileSystemContext> filesystem_context, |
30 const GURL& storage_origin, | 32 const GURL& storage_origin, |
31 const base::Time begin, | 33 const base::Time begin, |
32 const base::Time end, | 34 const base::Time end, |
33 const base::Closure& callback); | 35 const base::Closure& callback); |
34 | 36 |
35 } // namespace content | 37 } // namespace content |
36 | 38 |
37 #endif // CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ | 39 #endif // CONTENT_BROWSER_PLUGIN_PRIVATE_STORAGE_HELPER_H_ |
OLD | NEW |