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

Side by Side Diff: content/browser/service_worker/service_worker_register_job.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_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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 struct Internal { 89 struct Internal {
90 Internal(); 90 Internal();
91 ~Internal(); 91 ~Internal();
92 scoped_refptr<ServiceWorkerRegistration> registration; 92 scoped_refptr<ServiceWorkerRegistration> registration;
93 93
94 // Holds the version created by this job. It can be the 'installing', 94 // Holds the version created by this job. It can be the 'installing',
95 // 'waiting', or 'active' version depending on the phase. 95 // 'waiting', or 'active' version depending on the phase.
96 scoped_refptr<ServiceWorkerVersion> new_version; 96 scoped_refptr<ServiceWorkerVersion> new_version;
97 }; 97 };
98 98
99 void set_registration( 99 void set_registration(scoped_refptr<ServiceWorkerRegistration> registration);
100 const scoped_refptr<ServiceWorkerRegistration>& registration);
101 ServiceWorkerRegistration* registration(); 100 ServiceWorkerRegistration* registration();
102 void set_new_version(ServiceWorkerVersion* version); 101 void set_new_version(ServiceWorkerVersion* version);
103 ServiceWorkerVersion* new_version(); 102 ServiceWorkerVersion* new_version();
104 103
105 void SetPhase(Phase phase); 104 void SetPhase(Phase phase);
106 105
107 void StartImpl(); 106 void StartImpl();
108 void ContinueWithRegistration( 107 void ContinueWithRegistration(
109 ServiceWorkerStatusCode status, 108 ServiceWorkerStatusCode status,
110 const scoped_refptr<ServiceWorkerRegistration>& registration); 109 scoped_refptr<ServiceWorkerRegistration> registration);
111 void ContinueWithUpdate( 110 void ContinueWithUpdate(
112 ServiceWorkerStatusCode status, 111 ServiceWorkerStatusCode status,
113 const scoped_refptr<ServiceWorkerRegistration>& registration); 112 scoped_refptr<ServiceWorkerRegistration> registration);
114 void RegisterAndContinue(); 113 void RegisterAndContinue();
115 void ContinueWithUninstallingRegistration( 114 void ContinueWithUninstallingRegistration(
116 const scoped_refptr<ServiceWorkerRegistration>& existing_registration, 115 scoped_refptr<ServiceWorkerRegistration> existing_registration,
117 ServiceWorkerStatusCode status); 116 ServiceWorkerStatusCode status);
118 void ContinueWithRegistrationForSameScriptUrl( 117 void ContinueWithRegistrationForSameScriptUrl(
119 const scoped_refptr<ServiceWorkerRegistration>& existing_registration, 118 scoped_refptr<ServiceWorkerRegistration> existing_registration,
120 ServiceWorkerStatusCode status); 119 ServiceWorkerStatusCode status);
121 void UpdateAndContinue(); 120 void UpdateAndContinue();
122 void OnStartWorkerFinished(ServiceWorkerStatusCode status); 121 void OnStartWorkerFinished(ServiceWorkerStatusCode status);
123 void OnStoreRegistrationComplete(ServiceWorkerStatusCode status); 122 void OnStoreRegistrationComplete(ServiceWorkerStatusCode status);
124 void InstallAndContinue(); 123 void InstallAndContinue();
125 void DispatchInstallEvent(); 124 void DispatchInstallEvent();
126 void OnInstallFinished(int request_id, 125 void OnInstallFinished(int request_id,
127 blink::WebServiceWorkerEventResult result, 126 blink::WebServiceWorkerEventResult result,
128 bool has_fetch_handler); 127 bool has_fetch_handler);
129 void OnInstallFailed(ServiceWorkerStatusCode status); 128 void OnInstallFailed(ServiceWorkerStatusCode status);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 std::string promise_resolved_status_message_; 161 std::string promise_resolved_status_message_;
163 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; 162 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_;
164 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; 163 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
165 164
166 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); 165 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
167 }; 166 };
168 167
169 } // namespace content 168 } // namespace content
170 169
171 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 170 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698