OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_REDIRECT_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_REDIRECT_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_REDIRECT_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_REDIRECT_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 URLRequestRedirectJob(URLRequest* request, | 38 URLRequestRedirectJob(URLRequest* request, |
39 NetworkDelegate* network_delegate, | 39 NetworkDelegate* network_delegate, |
40 const GURL& redirect_destination, | 40 const GURL& redirect_destination, |
41 ResponseCode response_code, | 41 ResponseCode response_code, |
42 const std::string& redirect_reason); | 42 const std::string& redirect_reason); |
43 | 43 |
44 // URLRequestJob implementation: | 44 // URLRequestJob implementation: |
45 void GetResponseInfo(HttpResponseInfo* info) override; | 45 void GetResponseInfo(HttpResponseInfo* info) override; |
46 void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 46 void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
47 void Start() override; | 47 void Start() override; |
| 48 void Kill() override; |
48 bool CopyFragmentOnRedirect(const GURL& location) const override; | 49 bool CopyFragmentOnRedirect(const GURL& location) const override; |
49 int GetResponseCode() const override; | 50 int GetResponseCode() const override; |
50 | 51 |
51 private: | 52 private: |
52 ~URLRequestRedirectJob() override; | 53 ~URLRequestRedirectJob() override; |
53 | 54 |
54 void StartAsync(); | 55 void StartAsync(); |
55 | 56 |
56 const GURL redirect_destination_; | 57 const GURL redirect_destination_; |
57 const ResponseCode response_code_; | 58 const ResponseCode response_code_; |
58 base::TimeTicks receive_headers_end_; | 59 base::TimeTicks receive_headers_end_; |
59 base::Time response_time_; | 60 base::Time response_time_; |
60 std::string redirect_reason_; | 61 std::string redirect_reason_; |
61 | 62 |
62 scoped_refptr<HttpResponseHeaders> fake_headers_; | 63 scoped_refptr<HttpResponseHeaders> fake_headers_; |
63 | 64 |
64 base::WeakPtrFactory<URLRequestRedirectJob> weak_factory_; | 65 base::WeakPtrFactory<URLRequestRedirectJob> weak_factory_; |
65 }; | 66 }; |
66 | 67 |
67 } // namespace net | 68 } // namespace net |
68 | 69 |
69 #endif // NET_URL_REQUEST_URL_REQUEST_REDIRECT_JOB_H_ | 70 #endif // NET_URL_REQUEST_URL_REQUEST_REDIRECT_JOB_H_ |
OLD | NEW |