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> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // This class is an implementation of BrowsingDataServiceWorkerHelper that does | 64 // This class is an implementation of BrowsingDataServiceWorkerHelper that does |
65 // not fetch its information from the Service Worker context, but is passed the | 65 // not fetch its information from the Service Worker context, but is passed the |
66 // info as a parameter. | 66 // info as a parameter. |
67 class CannedBrowsingDataServiceWorkerHelper | 67 class CannedBrowsingDataServiceWorkerHelper |
68 : public BrowsingDataServiceWorkerHelper { | 68 : public BrowsingDataServiceWorkerHelper { |
69 public: | 69 public: |
70 // Contains information about a Service Worker. | 70 // Contains information about a Service Worker. |
71 struct PendingServiceWorkerUsageInfo { | 71 struct PendingServiceWorkerUsageInfo { |
72 PendingServiceWorkerUsageInfo(const GURL& origin, | 72 PendingServiceWorkerUsageInfo(const GURL& origin, |
73 const std::vector<GURL>& scopes); | 73 const std::vector<GURL>& scopes); |
| 74 PendingServiceWorkerUsageInfo(const PendingServiceWorkerUsageInfo& other); |
74 ~PendingServiceWorkerUsageInfo(); | 75 ~PendingServiceWorkerUsageInfo(); |
75 | 76 |
76 bool operator<(const PendingServiceWorkerUsageInfo& other) const; | 77 bool operator<(const PendingServiceWorkerUsageInfo& other) const; |
77 | 78 |
78 GURL origin; | 79 GURL origin; |
79 std::vector<GURL> scopes; | 80 std::vector<GURL> scopes; |
80 }; | 81 }; |
81 | 82 |
82 explicit CannedBrowsingDataServiceWorkerHelper( | 83 explicit CannedBrowsingDataServiceWorkerHelper( |
83 content::ServiceWorkerContext* context); | 84 content::ServiceWorkerContext* context); |
(...skipping 22 matching lines...) Expand all Loading... |
106 | 107 |
107 private: | 108 private: |
108 ~CannedBrowsingDataServiceWorkerHelper() override; | 109 ~CannedBrowsingDataServiceWorkerHelper() override; |
109 | 110 |
110 std::set<PendingServiceWorkerUsageInfo> pending_service_worker_info_; | 111 std::set<PendingServiceWorkerUsageInfo> pending_service_worker_info_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataServiceWorkerHelper); | 113 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataServiceWorkerHelper); |
113 }; | 114 }; |
114 | 115 |
115 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ | 116 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_SERVICE_WORKER_HELPER_H_ |
OLD | NEW |