| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICE_WORKER_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "content/public/browser/service_worker_context.h" | 17 #include "content/public/browser/service_worker_context.h" |
| 18 #include "content/public/browser/service_worker_usage_info.h" | 18 #include "content/public/browser/service_worker_usage_info.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 class Profile; | |
| 22 | |
| 23 // BrowsingDataServiceWorkerHelper is an interface for classes dealing with | 21 // BrowsingDataServiceWorkerHelper is an interface for classes dealing with |
| 24 // aggregating and deleting browsing data stored for Service Workers - | 22 // aggregating and deleting browsing data stored for Service Workers - |
| 25 // registrations, scripts, and caches. | 23 // registrations, scripts, and caches. |
| 26 // A client of this class need to call StartFetching from the UI thread to | 24 // A client of this class need to call StartFetching from the UI thread to |
| 27 // initiate the flow, and it'll be notified by the callback in its UI thread at | 25 // initiate the flow, and it'll be notified by the callback in its UI thread at |
| 28 // some later point. | 26 // some later point. |
| 29 class BrowsingDataServiceWorkerHelper | 27 class BrowsingDataServiceWorkerHelper |
| 30 : public base::RefCountedThreadSafe<BrowsingDataServiceWorkerHelper> { | 28 : public base::RefCountedThreadSafe<BrowsingDataServiceWorkerHelper> { |
| 31 public: | 29 public: |
| 32 using FetchCallback = | 30 using FetchCallback = |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 105 |
| 108 private: | 106 private: |
| 109 ~CannedBrowsingDataServiceWorkerHelper() override; | 107 ~CannedBrowsingDataServiceWorkerHelper() override; |
| 110 | 108 |
| 111 std::set<PendingServiceWorkerUsageInfo> pending_service_worker_info_; | 109 std::set<PendingServiceWorkerUsageInfo> pending_service_worker_info_; |
| 112 | 110 |
| 113 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataServiceWorkerHelper); | 111 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataServiceWorkerHelper); |
| 114 }; | 112 }; |
| 115 | 113 |
| 116 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ | 114 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ |
| OLD | NEW |