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

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

Issue 222003010: Make ServiceWorkerRegisterJob accumulate registration state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring to ToT plus issue 217163008. Created 6 years, 8 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_register_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_REGISTER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // ServiceWorkerRegisterJobBase implementation: 51 // ServiceWorkerRegisterJobBase implementation:
52 virtual void Start() OVERRIDE; 52 virtual void Start() OVERRIDE;
53 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE; 53 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE;
54 virtual RegistrationJobType GetType() OVERRIDE; 54 virtual RegistrationJobType GetType() OVERRIDE;
55 55
56 private: 56 private:
57 void HandleExistingRegistrationAndContinue( 57 void HandleExistingRegistrationAndContinue(
58 ServiceWorkerStatusCode status, 58 ServiceWorkerStatusCode status,
59 const scoped_refptr<ServiceWorkerRegistration>& registration); 59 const scoped_refptr<ServiceWorkerRegistration>& registration);
60 void RegisterAndContinue(ServiceWorkerStatusCode status); 60 void RegisterAndContinue(ServiceWorkerStatusCode status);
61 void StartWorkerAndContinue(ServiceWorkerStatusCode status); 61 void StartWorkerAndContinue(ServiceWorkerRegistration* registration,
62 void Complete(ServiceWorkerStatusCode status); 62 ServiceWorkerStatusCode status);
63 void Complete(ServiceWorkerRegistration* registration,
64 ServiceWorkerStatusCode status);
63 65
64 // The ServiceWorkerStorage object should always outlive this. 66 // The ServiceWorkerStorage object should always outlive this.
65 base::WeakPtr<ServiceWorkerContextCore> context_; 67 base::WeakPtr<ServiceWorkerContextCore> context_;
66 scoped_refptr<ServiceWorkerRegistration> registration_;
67 scoped_refptr<ServiceWorkerVersion> pending_version_; 68 scoped_refptr<ServiceWorkerVersion> pending_version_;
68 const GURL pattern_; 69 const GURL pattern_;
69 const GURL script_url_; 70 const GURL script_url_;
70 std::vector<RegistrationCallback> callbacks_; 71 std::vector<RegistrationCallback> callbacks_;
71 std::vector<int> pending_process_ids_; 72 std::vector<int> pending_process_ids_;
72 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; 73 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); 75 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
75 }; 76 };
76 77
77 } // namespace content 78 } // namespace content
78 79
79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 80 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_register_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698