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

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

Issue 795323003: Move Fetch API releted code to modules/fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/FetchResponseData.h
diff --git a/Source/modules/serviceworkers/FetchResponseData.h b/Source/modules/serviceworkers/FetchResponseData.h
deleted file mode 100644
index a6002d9f2ad821d171c8f5e3b2895d9d4c12cb50..0000000000000000000000000000000000000000
--- a/Source/modules/serviceworkers/FetchResponseData.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef FetchResponseData_h
-#define FetchResponseData_h
-
-#include "platform/heap/Handle.h"
-#include "platform/weborigin/KURL.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/AtomicString.h"
-
-namespace blink {
-
-class BlobDataHandle;
-class BodyStreamBuffer;
-class FetchHeaderList;
-class WebServiceWorkerResponse;
-
-class FetchResponseData final : public GarbageCollectedFinalized<FetchResponseData> {
- WTF_MAKE_NONCOPYABLE(FetchResponseData);
-public:
- // "A response has an associated type which is one of basic, CORS, default,
- // error, and opaque. Unless stated otherwise, it is default."
- enum Type { BasicType, CORSType, DefaultType, ErrorType, OpaqueType };
- // "A response can have an associated termination reason which is one of
- // end-user abort, fatal, and timeout."
- enum TerminationReason { EndUserAbortTermination, FatalTermination, TimeoutTermination };
-
- static FetchResponseData* create();
- static FetchResponseData* createNetworkErrorResponse();
- static FetchResponseData* createWithBuffer(BodyStreamBuffer*);
-
- FetchResponseData* createBasicFilteredResponse();
- FetchResponseData* createCORSFilteredResponse();
- FetchResponseData* createOpaqueFilteredResponse();
-
- FetchResponseData* clone();
-
- Type type() const { return m_type; }
- const KURL& url() const { return m_url; }
- unsigned short status() const { return m_status; }
- AtomicString statusMessage() const { return m_statusMessage; }
- FetchHeaderList* headerList() const { return m_headerList.get(); }
- PassRefPtr<BlobDataHandle> blobDataHandle() const { return m_blobDataHandle; }
- BodyStreamBuffer* buffer() const { return m_buffer; }
- String contentTypeForBuffer() const;
- PassRefPtr<BlobDataHandle> internalBlobDataHandle() const;
- BodyStreamBuffer* internalBuffer() const;
- String internalContentTypeForBuffer() const;
-
- void setURL(const KURL& url) { m_url = url; }
- void setStatus(unsigned short status) { m_status = status; }
- void setStatusMessage(AtomicString statusMessage) { m_statusMessage = statusMessage; }
- void setBlobDataHandle(PassRefPtr<BlobDataHandle>);
- void setContentTypeForBuffer(const String& contentType) { m_contentTypeForBuffer = contentType; }
-
- void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&);
-
- void trace(Visitor*);
-
-private:
- FetchResponseData(Type, unsigned short, AtomicString);
-
- Type m_type;
- OwnPtr<TerminationReason> m_terminationReason;
- KURL m_url;
- unsigned short m_status;
- AtomicString m_statusMessage;
- Member<FetchHeaderList> m_headerList;
- RefPtr<BlobDataHandle> m_blobDataHandle;
- Member<FetchResponseData> m_internalResponse;
- Member<BodyStreamBuffer> m_buffer;
- String m_contentTypeForBuffer;
-};
-
-} // namespace blink
-
-#endif // FetchResponseData_h
« no previous file with comments | « Source/modules/serviceworkers/FetchRequestData.cpp ('k') | Source/modules/serviceworkers/FetchResponseData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698