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

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

Issue 1750333002: Reland of Pipe response_time from FetchManager to CacheStorage and ServiceWorkerURLRequestJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 Type type() const { return m_type; } 44 Type type() const { return m_type; }
45 const KURL& url() const { return m_url; } 45 const KURL& url() const { return m_url; }
46 unsigned short status() const { return m_status; } 46 unsigned short status() const { return m_status; }
47 AtomicString statusMessage() const { return m_statusMessage; } 47 AtomicString statusMessage() const { return m_statusMessage; }
48 FetchHeaderList* headerList() const { return m_headerList.get(); } 48 FetchHeaderList* headerList() const { return m_headerList.get(); }
49 BodyStreamBuffer* buffer() const { return m_buffer; } 49 BodyStreamBuffer* buffer() const { return m_buffer; }
50 String mimeType() const; 50 String mimeType() const;
51 BodyStreamBuffer* internalBuffer() const; 51 BodyStreamBuffer* internalBuffer() const;
52 String internalMIMEType() const; 52 String internalMIMEType() const;
53 int64_t responseTime() const { return m_responseTime; }
53 54
54 void setURL(const KURL& url) { m_url = url; } 55 void setURL(const KURL& url) { m_url = url; }
55 void setStatus(unsigned short status) { m_status = status; } 56 void setStatus(unsigned short status) { m_status = status; }
56 void setStatusMessage(AtomicString statusMessage) { m_statusMessage = status Message; } 57 void setStatusMessage(AtomicString statusMessage) { m_statusMessage = status Message; }
57 void setMIMEType(const String& type) { m_mimeType = type; } 58 void setMIMEType(const String& type) { m_mimeType = type; }
59 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
58 60
59 // If the type is Default, replaces |m_buffer|. 61 // If the type is Default, replaces |m_buffer|.
60 // If the type is Basic or CORS, replaces |m_buffer| and 62 // If the type is Basic or CORS, replaces |m_buffer| and
61 // |m_internalResponse->m_buffer|. 63 // |m_internalResponse->m_buffer|.
62 // If the type is Error or Opaque, does nothing. 64 // If the type is Error or Opaque, does nothing.
63 void replaceBodyStreamBuffer(BodyStreamBuffer*); 65 void replaceBodyStreamBuffer(BodyStreamBuffer*);
64 66
65 // Does not call response.setBlobDataHandle(). 67 // Does not call response.setBlobDataHandle().
66 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */); 68 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */);
67 69
68 DECLARE_TRACE(); 70 DECLARE_TRACE();
69 71
70 private: 72 private:
71 FetchResponseData(Type, unsigned short, AtomicString); 73 FetchResponseData(Type, unsigned short, AtomicString);
72 74
73 Type m_type; 75 Type m_type;
74 OwnPtr<TerminationReason> m_terminationReason; 76 OwnPtr<TerminationReason> m_terminationReason;
75 KURL m_url; 77 KURL m_url;
76 unsigned short m_status; 78 unsigned short m_status;
77 AtomicString m_statusMessage; 79 AtomicString m_statusMessage;
78 Member<FetchHeaderList> m_headerList; 80 Member<FetchHeaderList> m_headerList;
79 Member<FetchResponseData> m_internalResponse; 81 Member<FetchResponseData> m_internalResponse;
80 Member<BodyStreamBuffer> m_buffer; 82 Member<BodyStreamBuffer> m_buffer;
81 String m_mimeType; 83 String m_mimeType;
84 int64_t m_responseTime;
82 }; 85 };
83 86
84 } // namespace blink 87 } // namespace blink
85 88
86 #endif // FetchResponseData_h 89 #endif // FetchResponseData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698