OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 typedef base::RefCountedData<bool> SharedBoolean; | 71 typedef base::RefCountedData<bool> SharedBoolean; |
72 | 72 |
73 class HttpFilterContext; | 73 class HttpFilterContext; |
74 | 74 |
75 // Shadows URLRequestJob's version of this method. | 75 // Shadows URLRequestJob's version of this method. |
76 void NotifyBeforeNetworkStart(bool* defer); | 76 void NotifyBeforeNetworkStart(bool* defer); |
77 | 77 |
78 // Shadows URLRequestJob's version of this method so we can grab cookies. | 78 // Shadows URLRequestJob's version of this method so we can grab cookies. |
79 void NotifyHeadersComplete(); | 79 void NotifyHeadersComplete(); |
80 | 80 |
| 81 // Shadows URLRequestJob's method so we can record histograms. |
| 82 void NotifyDone(const URLRequestStatus& status); |
| 83 |
81 void DestroyTransaction(); | 84 void DestroyTransaction(); |
82 | 85 |
83 void AddExtraHeaders(); | 86 void AddExtraHeaders(); |
84 void AddCookieHeaderAndStart(); | 87 void AddCookieHeaderAndStart(); |
85 void SaveCookiesAndNotifyHeadersComplete(int result); | 88 void SaveCookiesAndNotifyHeadersComplete(int result); |
86 void SaveNextCookie(); | 89 void SaveNextCookie(); |
87 void FetchResponseCookies(std::vector<std::string>* cookies); | 90 void FetchResponseCookies(std::vector<std::string>* cookies); |
88 | 91 |
89 // Processes a Backoff header, if one exists. | 92 // Processes a Backoff header, if one exists. |
90 void ProcessBackoffHeader(); | 93 void ProcessBackoffHeader(); |
(...skipping 30 matching lines...) Expand all Loading... |
121 Filter* SetupFilter() const override; | 124 Filter* SetupFilter() const override; |
122 bool CopyFragmentOnRedirect(const GURL& location) const override; | 125 bool CopyFragmentOnRedirect(const GURL& location) const override; |
123 bool IsSafeRedirect(const GURL& location) override; | 126 bool IsSafeRedirect(const GURL& location) override; |
124 bool NeedsAuth() override; | 127 bool NeedsAuth() override; |
125 void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override; | 128 void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override; |
126 void SetAuth(const AuthCredentials& credentials) override; | 129 void SetAuth(const AuthCredentials& credentials) override; |
127 void CancelAuth() override; | 130 void CancelAuth() override; |
128 void ContinueWithCertificate(X509Certificate* client_cert) override; | 131 void ContinueWithCertificate(X509Certificate* client_cert) override; |
129 void ContinueDespiteLastError() override; | 132 void ContinueDespiteLastError() override; |
130 void ResumeNetworkStart() override; | 133 void ResumeNetworkStart() override; |
131 int ReadRawData(IOBuffer* buf, int buf_size) override; | 134 bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override; |
132 void StopCaching() override; | 135 void StopCaching() override; |
133 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; | 136 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; |
134 int64 GetTotalReceivedBytes() const override; | 137 int64 GetTotalReceivedBytes() const override; |
135 int64_t GetTotalSentBytes() const override; | 138 int64_t GetTotalSentBytes() const override; |
136 void DoneReading() override; | 139 void DoneReading() override; |
137 void DoneReadingRedirectResponse() override; | 140 void DoneReadingRedirectResponse() override; |
138 | 141 |
139 HostPortPair GetSocketAddress() const override; | 142 HostPortPair GetSocketAddress() const override; |
140 void NotifyURLRequestDestroyed() override; | 143 void NotifyURLRequestDestroyed() override; |
141 | 144 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 int64_t total_sent_bytes_from_previous_transactions_; | 286 int64_t total_sent_bytes_from_previous_transactions_; |
284 | 287 |
285 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 288 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
286 | 289 |
287 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 290 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
288 }; | 291 }; |
289 | 292 |
290 } // namespace net | 293 } // namespace net |
291 | 294 |
292 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 295 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |