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

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

Issue 1675613002: service worker: use 200 OK for update requests even in the no update case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: asan and fix win compile? Created 4 years, 10 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_REGISTRATION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 ServiceWorkerVersion* waiting_version() const { 81 ServiceWorkerVersion* waiting_version() const {
82 return waiting_version_.get(); 82 return waiting_version_.get();
83 } 83 }
84 84
85 ServiceWorkerVersion* installing_version() const { 85 ServiceWorkerVersion* installing_version() const {
86 return installing_version_.get(); 86 return installing_version_.get();
87 } 87 }
88 88
89 bool has_installed_version() const {
90 return active_version() || waiting_version();
91 }
92
89 ServiceWorkerVersion* GetNewestVersion() const; 93 ServiceWorkerVersion* GetNewestVersion() const;
90 94
91 void AddListener(Listener* listener); 95 void AddListener(Listener* listener);
92 void RemoveListener(Listener* listener); 96 void RemoveListener(Listener* listener);
93 void NotifyRegistrationFailed(); 97 void NotifyRegistrationFailed();
94 void NotifyUpdateFound(); 98 void NotifyUpdateFound();
95 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); 99 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask);
96 100
97 ServiceWorkerRegistrationInfo GetInfo(); 101 ServiceWorkerRegistrationInfo GetInfo();
98 102
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 base::ObserverList<Listener> listeners_; 193 base::ObserverList<Listener> listeners_;
190 std::vector<base::Closure> registration_finished_callbacks_; 194 std::vector<base::Closure> registration_finished_callbacks_;
191 base::WeakPtr<ServiceWorkerContextCore> context_; 195 base::WeakPtr<ServiceWorkerContextCore> context_;
192 196
193 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); 197 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration);
194 }; 198 };
195 199
196 } // namespace content 200 } // namespace content
197 201
198 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ 202 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_register_job.cc ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698