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

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

Issue 2570453002: Add CHECKs to investigate ServiceWorkerControlleeRequestHandler crash. (Closed)
Patch Set: fix compile Created 4 years 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_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void AddMatchingRegistration(ServiceWorkerRegistration* registration); 252 void AddMatchingRegistration(ServiceWorkerRegistration* registration);
253 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); 253 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration);
254 254
255 // An optimized implementation of [[Match Service Worker Registration]] 255 // An optimized implementation of [[Match Service Worker Registration]]
256 // for current document. 256 // for current document.
257 ServiceWorkerRegistration* MatchRegistration() const; 257 ServiceWorkerRegistration* MatchRegistration() const;
258 258
259 // Called when our controller has been terminated and doomed due to an 259 // Called when our controller has been terminated and doomed due to an
260 // exceptional condition like it could no longer be read from the script 260 // exceptional condition like it could no longer be read from the script
261 // cache. 261 // cache.
262 void NotifyControllerLost(); 262 void NotifyControllerLost(bool was_deleted);
263 bool controller_was_deleted() { return controller_was_deleted_; }
263 264
264 private: 265 private:
265 friend class ForeignFetchRequestHandlerTest; 266 friend class ForeignFetchRequestHandlerTest;
266 friend class LinkHeaderServiceWorkerTest; 267 friend class LinkHeaderServiceWorkerTest;
267 friend class ServiceWorkerProviderHostTestP; 268 friend class ServiceWorkerProviderHostTestP;
268 friend class ServiceWorkerWriteToCacheJobTest; 269 friend class ServiceWorkerWriteToCacheJobTest;
269 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); 270 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript);
270 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, 271 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
271 Update_SameSizeScript); 272 Update_SameSizeScript);
272 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, 273 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // starts with. It is empty if IsContextSecureForServiceWorker() is 367 // starts with. It is empty if IsContextSecureForServiceWorker() is
367 // false. 368 // false.
368 ServiceWorkerRegistrationMap matching_registrations_; 369 ServiceWorkerRegistrationMap matching_registrations_;
369 370
370 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_; 371 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_;
371 scoped_refptr<ServiceWorkerVersion> controlling_version_; 372 scoped_refptr<ServiceWorkerVersion> controlling_version_;
372 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; 373 scoped_refptr<ServiceWorkerVersion> running_hosted_version_;
373 base::WeakPtr<ServiceWorkerContextCore> context_; 374 base::WeakPtr<ServiceWorkerContextCore> context_;
374 ServiceWorkerDispatcherHost* dispatcher_host_; 375 ServiceWorkerDispatcherHost* dispatcher_host_;
375 bool allow_association_; 376 bool allow_association_;
377 // TODO(falken): Remove once https://crbug.com/655910 is resolved.
378 bool controller_was_deleted_;
376 379
377 std::vector<base::Closure> queued_events_; 380 std::vector<base::Closure> queued_events_;
378 381
379 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 382 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
380 }; 383 };
381 384
382 } // namespace content 385 } // namespace content
383 386
384 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 387 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698