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

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

Issue 1181573010: ServiceWorker: Fix matching registration info missing during shift-reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address #3 & #4 Created 5 years, 6 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_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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Sets the worker thread id and flushes queued events. 213 // Sets the worker thread id and flushes queued events.
214 void SetReadyToSendMessagesToWorker(int render_thread_id); 214 void SetReadyToSendMessagesToWorker(int render_thread_id);
215 215
216 void AddMatchingRegistration(ServiceWorkerRegistration* registration); 216 void AddMatchingRegistration(ServiceWorkerRegistration* registration);
217 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); 217 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration);
218 218
219 // An optimized implementation of [[Match Service Worker Registration]] 219 // An optimized implementation of [[Match Service Worker Registration]]
220 // for current document. 220 // for current document.
221 ServiceWorkerRegistration* MatchRegistration() const; 221 ServiceWorkerRegistration* MatchRegistration() const;
222 222
223 // Copy matched registrations from the old ServiceWorkerProviderHost force
falken 2015/06/22 06:04:02 "force force-refresh" Maybe should be "for a docu
xiang 2015/06/23 09:01:36 Done.
224 // force-refresh generated document.
225 void CopyMatchingRegistrations();
226
223 // Called when our controller has been terminated and doomed due to an 227 // Called when our controller has been terminated and doomed due to an
224 // exceptional condition like it could no longer be read from the script 228 // exceptional condition like it could no longer be read from the script
225 // cache. 229 // cache.
226 void NotifyControllerLost(); 230 void NotifyControllerLost();
227 231
228 private: 232 private:
229 friend class ServiceWorkerProviderHostTest; 233 friend class ServiceWorkerProviderHostTest;
230 friend class ServiceWorkerWriteToCacheJobTest; 234 friend class ServiceWorkerWriteToCacheJobTest;
231 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); 235 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript);
232 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, 236 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 bool allow_association_; 311 bool allow_association_;
308 312
309 std::vector<base::Closure> queued_events_; 313 std::vector<base::Closure> queued_events_;
310 314
311 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 315 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
312 }; 316 };
313 317
314 } // namespace content 318 } // namespace content
315 319
316 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 320 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698