| 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 9eccc7b6c5e1eb3095df6e664c9093092af6071f..b5e8247d6f505f92c62dd7586591acc4bb7e253a 100644
|
| --- a/content/common/service_worker/service_worker_types.h
|
| +++ b/content/common/service_worker/service_worker_types.h
|
| @@ -40,15 +40,23 @@ 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.
|
| + SERVICE_WORKER_FETCH_EVENT_RESULT_FALLBACK,
|
| + // Service worker provided a ServiceWorkerResponse.
|
| + SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE,
|
| + SERVICE_WORKER_FETCH_EVENT_LAST = SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE
|
| +};
|
| +
|
| +// Represents a response to a fetch.
|
| +struct CONTENT_EXPORT ServiceWorkerResponse {
|
| + ServiceWorkerResponse();
|
| + ServiceWorkerResponse(int status_code,
|
| + const std::string& status_text,
|
| + const std::string& method,
|
| + const std::map<std::string, std::string>& headers);
|
| + ~ServiceWorkerResponse();
|
|
|
| int status_code;
|
| std::string status_text;
|
|
|