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

Unified Diff: Source/modules/serviceworkers/Response.h

Issue 287363004: ServiceWorker: support Response.{status,statusText,headers} [blink] (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: Source/modules/serviceworkers/Response.h
diff --git a/Source/modules/serviceworkers/Response.h b/Source/modules/serviceworkers/Response.h
index 0b093b6185e7f1e5f377f5d757908fd32d6cd830..b5ef6b162870e178065300b43b8e7b274cf7ca1b 100644
--- a/Source/modules/serviceworkers/Response.h
+++ b/Source/modules/serviceworkers/Response.h
@@ -7,7 +7,9 @@
#include "bindings/v8/Dictionary.h"
#include "bindings/v8/ScriptWrappable.h"
+#include "modules/serviceworkers/HeaderMap.h"
#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
namespace blink { class WebServiceWorkerResponse; }
@@ -22,26 +24,26 @@ public:
static PassRefPtr<Response> create(const Dictionary& responseInit);
~Response() { };
- unsigned short statusCode() { return m_statusCode; }
- void setStatusCode(unsigned short statusCode) { m_statusCode = statusCode; }
+ unsigned short status() { return m_status; }
+ void setStatus(unsigned short status) { m_status = status; }
String statusText() { return m_statusText; }
void setStatusText(const String& statusText) { m_statusText = statusText; }
- String method() { return m_method; }
- void setMethod(const String& method) { m_method = method; }
-
- Dictionary* headers();
- void headers(const Dictionary&);
+ PassRefPtr<HeaderMap> headers();
+ void setHeaders(PassRefPtr<HeaderMap>);
jsbell 2014/05/23 20:59:49 Where is this used?
kinuko 2014/05/26 05:45:13 The spec's updated and now it's (officially) a rea
+ String getHeader(const String& name);
+ bool namedPropertyQuery(const String& name, ExceptionState&);
+ void namedPropertyEnumerator(Vector<String>& names, ExceptionState&);
falken 2014/05/24 14:32:36 The Blink IDL documentation seems to say you must
kinuko 2014/05/26 05:45:13 I was likely mistaken, and the spec's updated so w
+ bool setHeader(const String& name, const String& value);
void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&);
private:
explicit Response(const ResponseInit&);
- unsigned short m_statusCode;
+ unsigned short m_status;
String m_statusText;
- String m_method;
- Dictionary m_headers;
+ RefPtr<HeaderMap> m_headers;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698