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