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 #include "content/common/content_export.h" | |
9 | 10 |
10 class GURL; | 11 class GURL; |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 class Time; | 14 class Time; |
14 } | 15 } |
15 | 16 |
16 namespace content { | |
17 class BrowsingDataFilterBuilder; | |
18 } | |
19 | |
20 namespace storage { | 17 namespace storage { |
21 class SpecialStoragePolicy; | 18 class SpecialStoragePolicy; |
22 } | 19 } |
23 | 20 |
24 class BrowsingDataRemoverDelegate { | 21 namespace content { |
22 | |
23 class BrowsingDataFilterBuilder; | |
24 | |
25 class CONTENT_EXPORT BrowsingDataRemoverDelegate { | |
jam
2017/04/20 00:39:48
ditto re export
msramek
2017/04/21 15:22:12
Done.
| |
25 public: | 26 public: |
26 // Determines whether |origin| matches |origin_type_mask| given | 27 // Determines whether |origin| matches |origin_type_mask| given |
27 // the |special_storage_policy|. | 28 // the |special_storage_policy|. |
28 typedef base::Callback<bool(int origin_type_mask, | 29 typedef base::Callback<bool(int origin_type_mask, |
29 const GURL& origin, | 30 const GURL& origin, |
30 storage::SpecialStoragePolicy* policy)> | 31 storage::SpecialStoragePolicy* policy)> |
31 EmbedderOriginTypeMatcher; | 32 EmbedderOriginTypeMatcher; |
32 | 33 |
33 virtual ~BrowsingDataRemoverDelegate() {} | 34 virtual ~BrowsingDataRemoverDelegate() {} |
34 | 35 |
35 // Returns a MaskMatcherFunction to match embedder's origin types. | 36 // Returns a MaskMatcherFunction to match embedder's origin types. |
36 // This MaskMatcherFunction will be called with an |origin_type_mask| | 37 // This MaskMatcherFunction will be called with an |origin_type_mask| |
37 // parameter containing ONLY embedder-defined origin types, and must be able | 38 // parameter containing ONLY embedder-defined origin types, and must be able |
38 // to handle ALL embedder-defined typed. It must be static and support | 39 // to handle ALL embedder-defined typed. It must be static and support |
39 // being called on the UI and IO thread. | 40 // being called on the UI and IO thread. |
40 virtual EmbedderOriginTypeMatcher GetOriginTypeMatcher() const = 0; | 41 virtual EmbedderOriginTypeMatcher GetOriginTypeMatcher() const = 0; |
jam
2017/04/20 00:39:48
why is this passed through a delegate, can't it ju
msramek
2017/04/21 15:22:12
There should be one such method/callback per deleg
jam
2017/04/21 22:58:30
ah, I was not thinking of the case when content cr
msramek
2017/04/25 01:29:09
Acknowledged. I'm keeping the current structure th
| |
41 | 42 |
42 // Removes embedder-specific data. | 43 // Removes embedder-specific data. |
43 virtual void RemoveEmbedderData( | 44 virtual void RemoveEmbedderData( |
44 const base::Time& delete_begin, | 45 const base::Time& delete_begin, |
45 const base::Time& delete_end, | 46 const base::Time& delete_end, |
46 int remove_mask, | 47 int remove_mask, |
47 const content::BrowsingDataFilterBuilder& filter_builder, | 48 const BrowsingDataFilterBuilder& filter_builder, |
48 int origin_type_mask, | 49 int origin_type_mask, |
49 const base::Closure& callback) = 0; | 50 const base::Closure& callback) = 0; |
jam
2017/04/20 00:39:48
if the first method is removed, can this one also
msramek
2017/04/21 15:22:12
Yes. Please see the above answer.
| |
50 }; | 51 }; |
51 | 52 |
52 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_DELEGATE_H_ | 53 } // namespace content |
54 | |
55 #endif // CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ | |
OLD | NEW |