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

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

Issue 2183783002: Revert of Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_STORAGE_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // This class provides an interface to store and retrieve ServiceWorker 50 // This class provides an interface to store and retrieve ServiceWorker
51 // registration data. The lifetime is equal to ServiceWorkerContextCore that is 51 // registration data. The lifetime is equal to ServiceWorkerContextCore that is
52 // an owner of this class. When a storage operation fails, this is marked as 52 // an owner of this class. When a storage operation fails, this is marked as
53 // disabled and all subsequent requests are aborted until the context core is 53 // disabled and all subsequent requests are aborted until the context core is
54 // restarted. 54 // restarted.
55 class CONTENT_EXPORT ServiceWorkerStorage 55 class CONTENT_EXPORT ServiceWorkerStorage
56 : NON_EXPORTED_BASE(public ServiceWorkerVersion::Listener) { 56 : NON_EXPORTED_BASE(public ServiceWorkerVersion::Listener) {
57 public: 57 public:
58 typedef std::vector<ServiceWorkerDatabase::ResourceRecord> ResourceList; 58 typedef std::vector<ServiceWorkerDatabase::ResourceRecord> ResourceList;
59 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback; 59 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback;
60 typedef base::Callback<void( 60 typedef base::Callback<void(ServiceWorkerStatusCode status,
61 ServiceWorkerStatusCode status, 61 const scoped_refptr<ServiceWorkerRegistration>&
62 scoped_refptr<ServiceWorkerRegistration> registration)> 62 registration)> FindRegistrationCallback;
63 FindRegistrationCallback;
64 typedef base::Callback<void( 63 typedef base::Callback<void(
65 ServiceWorkerStatusCode status, 64 ServiceWorkerStatusCode status,
66 const std::vector<scoped_refptr<ServiceWorkerRegistration>>& 65 const std::vector<scoped_refptr<ServiceWorkerRegistration>>&
67 registrations)> 66 registrations)>
68 GetRegistrationsCallback; 67 GetRegistrationsCallback;
69 typedef base::Callback<void( 68 typedef base::Callback<void(
70 ServiceWorkerStatusCode status, 69 ServiceWorkerStatusCode status,
71 const std::vector<ServiceWorkerRegistrationInfo>& registrations)> 70 const std::vector<ServiceWorkerRegistrationInfo>& registrations)>
72 GetRegistrationsInfosCallback; 71 GetRegistrationsInfosCallback;
73 using GetUserDataCallback = 72 using GetUserDataCallback =
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 std::set<int64_t> pending_deletions_; 547 std::set<int64_t> pending_deletions_;
549 548
550 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; 549 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_;
551 550
552 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); 551 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage);
553 }; 552 };
554 553
555 } // namespace content 554 } // namespace content
556 555
557 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 556 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698