OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ |
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Called when the sequence of settled fetches for |registration_id| have been | 106 // Called when the sequence of settled fetches for |registration_id| have been |
107 // retrieved from storage, and the Service Worker event can be invoked. | 107 // retrieved from storage, and the Service Worker event can be invoked. |
108 void DidGetSettledFetches( | 108 void DidGetSettledFetches( |
109 const BackgroundFetchRegistrationId& registration_id, | 109 const BackgroundFetchRegistrationId& registration_id, |
110 blink::mojom::BackgroundFetchError error, | 110 blink::mojom::BackgroundFetchError error, |
111 std::vector<BackgroundFetchSettledFetch> settled_fetches, | 111 std::vector<BackgroundFetchSettledFetch> settled_fetches, |
112 std::vector<std::unique_ptr<BlobHandle>> blob_handles); | 112 std::vector<std::unique_ptr<BlobHandle>> blob_handles); |
113 | 113 |
114 // Called when all processing for the |registration_id| has been finished and | 114 // Called when all processing for the |registration_id| has been finished and |
115 // the job, including its associated data, is ready to be deleted. | 115 // the job, including its associated data, is ready to be deleted. |
116 void DeleteRegistration(const BackgroundFetchRegistrationId& registration_id); | 116 void DeleteRegistration( |
| 117 const BackgroundFetchRegistrationId& registration_id, |
| 118 const std::vector<std::unique_ptr<BlobHandle>>& blob_handles); |
117 | 119 |
118 // |this| is owned, indirectly, by the BrowserContext. | 120 // |this| is owned, indirectly, by the BrowserContext. |
119 BrowserContext* browser_context_; | 121 BrowserContext* browser_context_; |
120 | 122 |
121 scoped_refptr<net::URLRequestContextGetter> request_context_; | 123 scoped_refptr<net::URLRequestContextGetter> request_context_; |
122 | 124 |
123 std::unique_ptr<BackgroundFetchDataManager> data_manager_; | 125 std::unique_ptr<BackgroundFetchDataManager> data_manager_; |
124 std::unique_ptr<BackgroundFetchEventDispatcher> event_dispatcher_; | 126 std::unique_ptr<BackgroundFetchEventDispatcher> event_dispatcher_; |
125 | 127 |
126 // Map of the Background Fetch fetches that are currently in-progress. | 128 // Map of the Background Fetch fetches that are currently in-progress. |
127 std::map<BackgroundFetchRegistrationId, | 129 std::map<BackgroundFetchRegistrationId, |
128 std::unique_ptr<BackgroundFetchJobController>> | 130 std::unique_ptr<BackgroundFetchJobController>> |
129 active_fetches_; | 131 active_fetches_; |
130 | 132 |
131 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext); | 133 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext); |
132 }; | 134 }; |
133 | 135 |
134 } // namespace content | 136 } // namespace content |
135 | 137 |
136 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ | 138 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ |
OLD | NEW |