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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchResponseData.h

Issue 1969403004: Expose and check origin of request in response for foreign fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set-request-and-credentials-mode
Patch Set: update layouttests Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef FetchResponseData_h 5 #ifndef FetchResponseData_h
6 #define FetchResponseData_h 6 #define FetchResponseData_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "platform/weborigin/KURL.h" 10 #include "platform/weborigin/KURL.h"
(...skipping 16 matching lines...) Expand all
27 // default." 27 // default."
28 enum Type { BasicType, CORSType, DefaultType, ErrorType, OpaqueType, OpaqueR edirectType }; 28 enum Type { BasicType, CORSType, DefaultType, ErrorType, OpaqueType, OpaqueR edirectType };
29 // "A response can have an associated termination reason which is one of 29 // "A response can have an associated termination reason which is one of
30 // end-user abort, fatal, and timeout." 30 // end-user abort, fatal, and timeout."
31 enum TerminationReason { EndUserAbortTermination, FatalTermination, TimeoutT ermination }; 31 enum TerminationReason { EndUserAbortTermination, FatalTermination, TimeoutT ermination };
32 32
33 static FetchResponseData* create(); 33 static FetchResponseData* create();
34 static FetchResponseData* createNetworkErrorResponse(); 34 static FetchResponseData* createNetworkErrorResponse();
35 static FetchResponseData* createWithBuffer(BodyStreamBuffer*); 35 static FetchResponseData* createWithBuffer(BodyStreamBuffer*);
36 36
37 FetchResponseData* createBasicFilteredResponse(); 37 FetchResponseData* createBasicFilteredResponse() const;
38 FetchResponseData* createCORSFilteredResponse(); 38 FetchResponseData* createCORSFilteredResponse() const;
39 FetchResponseData* createOpaqueFilteredResponse(); 39 FetchResponseData* createOpaqueFilteredResponse() const;
40 FetchResponseData* createOpaqueRedirectFilteredResponse(); 40 FetchResponseData* createOpaqueRedirectFilteredResponse() const;
41
42 FetchResponseData* internalResponse() { return m_internalResponse; }
43 const FetchResponseData* internalResponse() const { return m_internalRespons e; }
41 44
42 FetchResponseData* clone(ScriptState*); 45 FetchResponseData* clone(ScriptState*);
43 46
44 Type getType() const { return m_type; } 47 Type getType() const { return m_type; }
45 const KURL& url() const { return m_url; } 48 const KURL& url() const { return m_url; }
46 unsigned short status() const { return m_status; } 49 unsigned short status() const { return m_status; }
47 AtomicString statusMessage() const { return m_statusMessage; } 50 AtomicString statusMessage() const { return m_statusMessage; }
48 FetchHeaderList* headerList() const { return m_headerList.get(); } 51 FetchHeaderList* headerList() const { return m_headerList.get(); }
49 BodyStreamBuffer* buffer() const { return m_buffer; } 52 BodyStreamBuffer* buffer() const { return m_buffer; }
50 String mimeType() const; 53 String mimeType() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Member<FetchResponseData> m_internalResponse; 86 Member<FetchResponseData> m_internalResponse;
84 Member<BodyStreamBuffer> m_buffer; 87 Member<BodyStreamBuffer> m_buffer;
85 String m_mimeType; 88 String m_mimeType;
86 int64_t m_responseTime; 89 int64_t m_responseTime;
87 String m_cacheStorageCacheName; 90 String m_cacheStorageCacheName;
88 }; 91 };
89 92
90 } // namespace blink 93 } // namespace blink
91 94
92 #endif // FetchResponseData_h 95 #endif // FetchResponseData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698