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

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

Issue 355163003: Don't prematurely delete script resources when registration is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UNREGISTER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 30 matching lines...) Expand all
41 // ServiceWorkerRegisterJobBase implementation: 41 // ServiceWorkerRegisterJobBase implementation:
42 virtual void Start() OVERRIDE; 42 virtual void Start() OVERRIDE;
43 virtual void Abort() OVERRIDE; 43 virtual void Abort() OVERRIDE;
44 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE; 44 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE;
45 virtual RegistrationJobType GetType() OVERRIDE; 45 virtual RegistrationJobType GetType() OVERRIDE;
46 46
47 private: 47 private:
48 void OnRegistrationFound( 48 void OnRegistrationFound(
49 ServiceWorkerStatusCode status, 49 ServiceWorkerStatusCode status,
50 const scoped_refptr<ServiceWorkerRegistration>& registration); 50 const scoped_refptr<ServiceWorkerRegistration>& registration);
51 void DeleteRegistration( 51 void UninstallRegistration();
52 const scoped_refptr<ServiceWorkerRegistration>& registration); 52 void DeleteWaitingVersion(ServiceWorkerStatusCode status);
53 void DeleteActiveVersion(ServiceWorkerStatusCode status);
53 void Complete(ServiceWorkerStatusCode status); 54 void Complete(ServiceWorkerStatusCode status);
54 void CompleteInternal(ServiceWorkerStatusCode status); 55 void CompleteInternal(ServiceWorkerStatusCode status);
56 void ResolvePromise(ServiceWorkerStatusCode status);
55 57
56 base::WeakPtr<ServiceWorkerContextCore> context_; 58 base::WeakPtr<ServiceWorkerContextCore> context_;
57 const GURL pattern_; 59 const GURL pattern_;
58 std::vector<UnregistrationCallback> callbacks_; 60 std::vector<UnregistrationCallback> callbacks_;
61 bool is_promise_resolved_;
62 scoped_refptr<ServiceWorkerRegistration> registration_;
59 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_; 63 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_;
60 64
61 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob); 65 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob);
62 }; 66 };
63 } // namespace content 67 } // namespace content
64 68
65 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ 69 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698