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

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..6932144b1b650c77f22d05d9c56c367bd468098d 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,17 @@ public:
static PassRefPtr<Response> create(const Dictionary& responseInit);
~Response() { };
- unsigned short statusCode() { return m_statusCode; }
- void setStatusCode(unsigned short statusCode) { m_statusCode = statusCode; }
-
- 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&);
+ unsigned short status() const { return m_status; }
+ String statusText() const { return m_statusText; }
+ PassRefPtr<HeaderMap> headers() const;
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
« no previous file with comments | « Source/modules/serviceworkers/HeaderMapForEachCallback.idl ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698