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

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

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() 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(ServiceWorkerStatusCode status, 60 typedef base::Callback<void(
61 const scoped_refptr<ServiceWorkerRegistration>& 61 ServiceWorkerStatusCode status,
62 registration)> FindRegistrationCallback; 62 scoped_refptr<ServiceWorkerRegistration> registration)>
63 FindRegistrationCallback;
63 typedef base::Callback<void( 64 typedef base::Callback<void(
64 ServiceWorkerStatusCode status, 65 ServiceWorkerStatusCode status,
65 const std::vector<scoped_refptr<ServiceWorkerRegistration>>& 66 const std::vector<scoped_refptr<ServiceWorkerRegistration>>&
66 registrations)> 67 registrations)>
67 GetRegistrationsCallback; 68 GetRegistrationsCallback;
68 typedef base::Callback<void( 69 typedef base::Callback<void(
69 ServiceWorkerStatusCode status, 70 ServiceWorkerStatusCode status,
70 const std::vector<ServiceWorkerRegistrationInfo>& registrations)> 71 const std::vector<ServiceWorkerRegistrationInfo>& registrations)>
71 GetRegistrationsInfosCallback; 72 GetRegistrationsInfosCallback;
72 using GetUserDataCallback = 73 using GetUserDataCallback =
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 std::set<int64_t> pending_deletions_; 548 std::set<int64_t> pending_deletions_;
548 549
549 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; 550 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_;
550 551
551 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); 552 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage);
552 }; 553 };
553 554
554 } // namespace content 555 } // namespace content
555 556
556 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 557 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698