Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1535)

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 1945753002: Make Service Worker DB UserData methods accept multiple keys at once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid6encrypt
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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,
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,
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698