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

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

Issue 1283273002: Service Worker: Change last update check location and HTTP cache bypass rule (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments. Created 5 years, 3 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_CONTEXT_CORE_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 // A child process of |source_process_id| may be used to run the created 172 // A child process of |source_process_id| may be used to run the created
173 // worker for initial installation. 173 // worker for initial installation.
174 // Non-null |provider_host| must be given if this is called from a document. 174 // Non-null |provider_host| must be given if this is called from a document.
175 void RegisterServiceWorker(const GURL& pattern, 175 void RegisterServiceWorker(const GURL& pattern,
176 const GURL& script_url, 176 const GURL& script_url,
177 ServiceWorkerProviderHost* provider_host, 177 ServiceWorkerProviderHost* provider_host,
178 const RegistrationCallback& callback); 178 const RegistrationCallback& callback);
179 void UnregisterServiceWorker(const GURL& pattern, 179 void UnregisterServiceWorker(const GURL& pattern,
180 const UnregistrationCallback& callback); 180 const UnregistrationCallback& callback);
181
181 // Callback is called issued after all unregistrations occur. The Status 182 // Callback is called issued after all unregistrations occur. The Status
182 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED 183 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED
183 // if any did not succeed. 184 // if any did not succeed.
184 void UnregisterServiceWorkers(const GURL& origin, 185 void UnregisterServiceWorkers(const GURL& origin,
185 const UnregistrationCallback& callback); 186 const UnregistrationCallback& callback);
187
188 // Updates the service worker. If |force_bypass_cache| is true or 86400
189 // seconds (24 hours) have passed since the last update, bypasses the browser
190 // cache.
186 void UpdateServiceWorker(ServiceWorkerRegistration* registration, 191 void UpdateServiceWorker(ServiceWorkerRegistration* registration,
187 bool force_bypass_cache); 192 bool force_bypass_cache);
188 void UpdateServiceWorker(ServiceWorkerRegistration* registration, 193 void UpdateServiceWorker(ServiceWorkerRegistration* registration,
189 bool force_bypass_cache, 194 bool force_bypass_cache,
190 ServiceWorkerProviderHost* provider_host, 195 ServiceWorkerProviderHost* provider_host,
191 const UpdateCallback& callback); 196 const UpdateCallback& callback);
192 197
193 // This class maintains collections of live instances, this class 198 // This class maintains collections of live instances, this class
194 // does not own these object or influence their lifetime. 199 // does not own these object or influence their lifetime.
195 ServiceWorkerRegistration* GetLiveRegistration(int64 registration_id); 200 ServiceWorkerRegistration* GetLiveRegistration(int64 registration_id);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> 289 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>>
285 observer_list_; 290 observer_list_;
286 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; 291 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_;
287 292
288 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); 293 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore);
289 }; 294 };
290 295
291 } // namespace content 296 } // namespace content
292 297
293 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ 298 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698