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

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

Issue 996123002: ServiceWorker: Ensure live registration during starting worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 5 years, 9 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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void NotifyDoneUninstallingRegistration( 200 void NotifyDoneUninstallingRegistration(
201 ServiceWorkerRegistration* registration); 201 ServiceWorkerRegistration* registration);
202 202
203 void Disable(); 203 void Disable();
204 bool IsDisabled() const; 204 bool IsDisabled() const;
205 205
206 // |resources| must already be on the purgeable list. 206 // |resources| must already be on the purgeable list.
207 void PurgeResources(const ResourceList& resources); 207 void PurgeResources(const ResourceList& resources);
208 208
209 private: 209 private:
210 friend class ServiceWorkerHandleTest;
210 friend class ServiceWorkerStorageTest; 211 friend class ServiceWorkerStorageTest;
211 friend class ServiceWorkerResourceStorageTest; 212 friend class ServiceWorkerResourceStorageTest;
212 friend class ServiceWorkerControlleeRequestHandlerTest; 213 friend class ServiceWorkerControlleeRequestHandlerTest;
213 friend class ServiceWorkerContextRequestHandlerTest; 214 friend class ServiceWorkerContextRequestHandlerTest;
214 friend class ServiceWorkerRequestHandlerTest; 215 friend class ServiceWorkerRequestHandlerTest;
216 friend class ServiceWorkerURLRequestJobTest;
217 friend class ServiceWorkerVersionBrowserTest;
218 friend class ServiceWorkerVersionTest;
215 friend class ServiceWorkerWriteToCacheJobTest; 219 friend class ServiceWorkerWriteToCacheJobTest;
220 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDispatcherHostTest,
221 CleanupOnRendererCrash);
216 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest, 222 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest,
217 DeleteRegistration_NoLiveVersion); 223 DeleteRegistration_NoLiveVersion);
218 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest, 224 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest,
219 DeleteRegistration_WaitingVersion); 225 DeleteRegistration_WaitingVersion);
220 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest, 226 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest,
221 DeleteRegistration_ActiveVersion); 227 DeleteRegistration_ActiveVersion);
222 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest, 228 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageTest,
223 UpdateRegistration); 229 UpdateRegistration);
224 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageDiskTest, 230 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerResourceStorageDiskTest,
225 CleanupOnRestart); 231 CleanupOnRestart);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 std::set<int64> pending_deletions_; 490 std::set<int64> pending_deletions_;
485 491
486 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; 492 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_;
487 493
488 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); 494 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage);
489 }; 495 };
490 496
491 } // namespace content 497 } // namespace content
492 498
493 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 499 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698