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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class Time; | 13 class Time; |
14 } | 14 } |
15 | 15 |
16 namespace content { | |
17 class BrowsingDataFilterBuilder; | |
18 } | |
19 | |
20 namespace storage { | 16 namespace storage { |
21 class SpecialStoragePolicy; | 17 class SpecialStoragePolicy; |
22 } | 18 } |
23 | 19 |
| 20 namespace content { |
| 21 |
| 22 class BrowsingDataFilterBuilder; |
| 23 |
24 class BrowsingDataRemoverDelegate { | 24 class BrowsingDataRemoverDelegate { |
25 public: | 25 public: |
26 // Determines whether |origin| matches |origin_type_mask| given | 26 // Determines whether |origin| matches |origin_type_mask| given |
27 // the |special_storage_policy|. | 27 // the |special_storage_policy|. |
28 typedef base::Callback<bool(int origin_type_mask, | 28 typedef base::Callback<bool(int origin_type_mask, |
29 const GURL& origin, | 29 const GURL& origin, |
30 storage::SpecialStoragePolicy* policy)> | 30 storage::SpecialStoragePolicy* policy)> |
31 EmbedderOriginTypeMatcher; | 31 EmbedderOriginTypeMatcher; |
32 | 32 |
33 virtual ~BrowsingDataRemoverDelegate() {} | 33 virtual ~BrowsingDataRemoverDelegate() {} |
34 | 34 |
35 // Returns a MaskMatcherFunction to match embedder's origin types. | 35 // Returns a MaskMatcherFunction to match embedder's origin types. |
36 // This MaskMatcherFunction will be called with an |origin_type_mask| | 36 // This MaskMatcherFunction will be called with an |origin_type_mask| |
37 // parameter containing ONLY embedder-defined origin types, and must be able | 37 // parameter containing ONLY embedder-defined origin types, and must be able |
38 // to handle ALL embedder-defined typed. It must be static and support | 38 // to handle ALL embedder-defined typed. It must be static and support |
39 // being called on the UI and IO thread. | 39 // being called on the UI and IO thread. |
40 virtual EmbedderOriginTypeMatcher GetOriginTypeMatcher() const = 0; | 40 virtual EmbedderOriginTypeMatcher GetOriginTypeMatcher() const = 0; |
41 | 41 |
42 // Removes embedder-specific data. | 42 // Removes embedder-specific data. |
43 virtual void RemoveEmbedderData( | 43 virtual void RemoveEmbedderData( |
44 const base::Time& delete_begin, | 44 const base::Time& delete_begin, |
45 const base::Time& delete_end, | 45 const base::Time& delete_end, |
46 int remove_mask, | 46 int remove_mask, |
47 const content::BrowsingDataFilterBuilder& filter_builder, | 47 const BrowsingDataFilterBuilder& filter_builder, |
48 int origin_type_mask, | 48 int origin_type_mask, |
49 const base::Closure& callback) = 0; | 49 const base::Closure& callback) = 0; |
50 }; | 50 }; |
51 | 51 |
52 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_DELEGATE_H_ | 52 } // namespace content |
| 53 |
| 54 #endif // CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ |
OLD | NEW |