OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 // activated. | 147 // activated. |
148 // | 148 // |
149 // Must be called from the IO thread. | 149 // Must be called from the IO thread. |
150 void FindReadyRegistrationForId(int64_t registration_id, | 150 void FindReadyRegistrationForId(int64_t registration_id, |
151 const GURL& origin, | 151 const GURL& origin, |
152 const FindRegistrationCallback& callback); | 152 const FindRegistrationCallback& callback); |
153 | 153 |
154 // All these methods must be called from the IO thread. | 154 // All these methods must be called from the IO thread. |
155 void GetAllRegistrations(const GetRegistrationsInfosCallback& callback); | 155 void GetAllRegistrations(const GetRegistrationsInfosCallback& callback); |
156 void GetRegistrationUserData(int64_t registration_id, | 156 void GetRegistrationUserData(int64_t registration_id, |
157 const std::string& key, | 157 const std::vector<std::string>& keys, |
Michael van Ouwerkerk
2016/05/04 09:08:52
nit: why not std::set<std::string>?
johnme
2016/05/05 10:54:04
Because the order of the results is based on the o
| |
158 const GetUserDataCallback& callback); | 158 const GetUserDataCallback& callback); |
159 void StoreRegistrationUserData(int64_t registration_id, | 159 void StoreRegistrationUserData( |
160 const GURL& origin, | 160 int64_t registration_id, |
161 const std::string& key, | 161 const GURL& origin, |
162 const std::string& data, | 162 const std::vector<std::pair<std::string, std::string>>& key_value_pairs, |
Michael van Ouwerkerk
2016/05/04 09:08:52
nit: why not std::map<std::string, std::string>?
johnme
2016/05/05 10:54:04
I considered this, as both std::map and std::unord
| |
163 const StatusCallback& callback); | 163 const StatusCallback& callback); |
164 void ClearRegistrationUserData(int64_t registration_id, | 164 void ClearRegistrationUserData(int64_t registration_id, |
165 const std::string& key, | 165 const std::vector<std::string>& keys, |
166 const StatusCallback& callback); | 166 const StatusCallback& callback); |
167 void GetUserDataForAllRegistrations( | 167 void GetUserDataForAllRegistrations( |
168 const std::string& key, | 168 const std::string& key, |
169 const GetUserDataForAllRegistrationsCallback& callback); | 169 const GetUserDataForAllRegistrationsCallback& callback); |
170 | 170 |
171 // This function can be called from any thread, but the callback will always | 171 // This function can be called from any thread, but the callback will always |
172 // be called on the UI thread. | 172 // be called on the UI thread. |
173 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); | 173 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); |
174 | 174 |
175 // These methods can be called from any thread. | 175 // These methods can be called from any thread. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 ResourceContext* resource_context_; | 249 ResourceContext* resource_context_; |
250 | 250 |
251 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 251 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
252 | 252 |
253 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 253 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
254 }; | 254 }; |
255 | 255 |
256 } // namespace content | 256 } // namespace content |
257 | 257 |
258 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 258 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |