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

Unified Diff: content/common/service_worker/service_worker_types.cc

Issue 178343011: Support dispatching ServiceWorker FetchEvent and receiving response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more review comments Created 6 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
Index: content/common/service_worker/service_worker_types.cc
diff --git a/content/common/service_worker/service_worker_types.cc b/content/common/service_worker/service_worker_types.cc
index d4d863e68ed303e93ac27a9efa5a57f746acbdbf..7ca53801c9474b0c14c137249178b5094b6b2102 100644
--- a/content/common/service_worker/service_worker_types.cc
+++ b/content/common/service_worker/service_worker_types.cc
@@ -4,6 +4,8 @@
#include "content/common/service_worker/service_worker_types.h"
+#include "third_party/WebKit/public/platform/WebServiceWorkerResponse.h"
+
namespace content {
ServiceWorkerFetchRequest::ServiceWorkerFetchRequest() {}
@@ -19,19 +21,15 @@ ServiceWorkerFetchRequest::ServiceWorkerFetchRequest(
ServiceWorkerFetchRequest::~ServiceWorkerFetchRequest() {}
-ServiceWorkerFetchResponse::ServiceWorkerFetchResponse() {}
+ServiceWorkerResponse::ServiceWorkerResponse() {}
-ServiceWorkerFetchResponse::ServiceWorkerFetchResponse(
- int status_code,
- const std::string& status_text,
- const std::string& method,
- const std::map<std::string, std::string>& headers)
- : status_code(status_code),
- status_text(status_text),
- method(method),
- headers(headers) {
+ServiceWorkerResponse::ServiceWorkerResponse(
+ const blink::WebServiceWorkerResponse& response) {
+ status_code = response.statusCode();
+ status_text = response.statusText().utf8();
+ method = response.method().utf8();
}
-ServiceWorkerFetchResponse::~ServiceWorkerFetchResponse() {}
+ServiceWorkerResponse::~ServiceWorkerResponse() {}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698