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

Unified Diff: content/browser/service_worker/embedded_worker_instance.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/embedded_worker_instance.h
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index edb8295756a988fece3575f652b4ad381fe493c4..2bcbaab09e0bcbbc0fa5fd927704c5ba7d27560e 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -100,18 +100,21 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
int line_number,
const GURL& source_url) {}
// Returns false if the message is not handled by this listener.
- virtual bool OnMessageReceived(const IPC::Message& message) = 0;
+ CONTENT_EXPORT virtual bool OnMessageReceived(const IPC::Message& message);
};
~EmbeddedWorkerInstance();
// Starts the worker. It is invalid to call this when the worker is not in
// STOPPED status. |callback| is invoked after the worker script has been
- // started and evaluated, or when an error occurs.
+ // started and evaluated, or when an error occurs. If |pause_after_download|
+ // is true, the worker pauses after loading until ResumeAfterDownload() is
+ // called.
void Start(int64_t service_worker_version_id,
const GURL& scope,
const GURL& script_url,
- const StatusCallback& callback);
+ const StatusCallback& callback,
+ bool pause_after_download = false);
// Stops the worker. It is invalid to call this when the worker is
// not in STARTING or RUNNING status.
@@ -129,6 +132,9 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
// status.
ServiceWorkerStatusCode SendMessage(const IPC::Message& message);
+ // Resumes the worker if it paused after download.
+ void ResumeAfterDownload();
+
// Returns the ServiceRegistry for this worker. It is invalid to call this
// when the worker is not in STARTING or RUNNING status.
ServiceRegistry* GetServiceRegistry();
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698