Chromium Code Reviews| Index: content/common/service_worker/service_worker_types.h |
| diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h |
| index 10444de002ec58e0ee9ff1136c6aeb1343c6c309..6c7bb6e063a7038732edd5fa4caab4791894c2de 100644 |
| --- a/content/common/service_worker/service_worker_types.h |
| +++ b/content/common/service_worker/service_worker_types.h |
| @@ -10,6 +10,7 @@ |
| #include "base/basictypes.h" |
| #include "content/common/content_export.h" |
| +#include "third_party/WebKit/public/web/WebServiceWorkerResponse.h" |
| #include "url/gurl.h" |
| // This file is to have common definitions that are to be shared by |
| @@ -38,15 +39,19 @@ struct CONTENT_EXPORT ServiceWorkerFetchRequest { |
| std::map<std::string, std::string> headers; |
| }; |
| -// The response sent from the child process to the browser. |
| -struct CONTENT_EXPORT ServiceWorkerFetchResponse { |
| - ServiceWorkerFetchResponse(); |
| - ServiceWorkerFetchResponse( |
| - int status_code, |
| - const std::string& status_text, |
| - const std::string& method, |
| - const std::map<std::string, std::string>& headers); |
| - ~ServiceWorkerFetchResponse(); |
| +// Indicates how the service worker handled a fetch event. |
| +enum ServiceWorkerFetchEventResult { |
| + // Browser should fallback to native fetch. |
| + FALLBACK, |
| + // Service worker provided a ServiceWorkerResponse. |
| + RESPONSE |
|
kinuko
2014/03/04 06:39:17
We're in a relatively big namespace, content, it'd
falken
2014/03/05 03:35:41
Done.
|
| +}; |
| + |
| +// Represents a response to a fetch. |
| +struct CONTENT_EXPORT ServiceWorkerResponse { |
| + ServiceWorkerResponse(); |
| + ServiceWorkerResponse(const blink::WebServiceWorkerResponse& response); |
| + ~ServiceWorkerResponse(); |
| int status_code; |
| std::string status_text; |