| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ | 5 #ifndef HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ |
| 6 #define HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ | 6 #define HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <functional> | 9 #include <functional> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // net::URLRequestJob implementation: | 88 // net::URLRequestJob implementation: |
| 89 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; | 89 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
| 90 void Start() override; | 90 void Start() override; |
| 91 int ReadRawData(net::IOBuffer* buf, int buf_size) override; | 91 int ReadRawData(net::IOBuffer* buf, int buf_size) override; |
| 92 int GetResponseCode() const override; | 92 int GetResponseCode() const override; |
| 93 void GetResponseInfo(net::HttpResponseInfo* info) override; | 93 void GetResponseInfo(net::HttpResponseInfo* info) override; |
| 94 bool GetMimeType(std::string* mime_type) const override; | 94 bool GetMimeType(std::string* mime_type) const override; |
| 95 bool GetCharset(std::string* charset) override; | 95 bool GetCharset(std::string* charset) override; |
| 96 | 96 |
| 97 // URLFetcher::FetchResultListener implementation: | 97 // URLFetcher::FetchResultListener implementation: |
| 98 void OnStartError(net::Error error) override; | 98 void OnFetchStartError(net::Error error) override; |
| 99 void OnFetchComplete(const GURL& final_url, | 99 void OnFetchComplete(const GURL& final_url, |
| 100 int http_response_code, | 100 int http_response_code, |
| 101 scoped_refptr<net::HttpResponseHeaders> response_headers, | 101 scoped_refptr<net::HttpResponseHeaders> response_headers, |
| 102 const char* body, | 102 const char* body, |
| 103 size_t body_size) override; | 103 size_t body_size) override; |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 void PrepareCookies(const GURL& rewritten_url, | 106 void PrepareCookies(const GURL& rewritten_url, |
| 107 const url::Origin& site_for_cookies); | 107 const url::Origin& site_for_cookies); |
| 108 | 108 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 119 size_t read_offset_ = 0; | 119 size_t read_offset_ = 0; |
| 120 | 120 |
| 121 base::WeakPtrFactory<GenericURLRequestJob> weak_factory_; | 121 base::WeakPtrFactory<GenericURLRequestJob> weak_factory_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(GenericURLRequestJob); | 123 DISALLOW_COPY_AND_ASSIGN(GenericURLRequestJob); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace headless | 126 } // namespace headless |
| 127 | 127 |
| 128 #endif // HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ | 128 #endif // HEADLESS_PUBLIC_UTIL_GENERIC_URL_REQUEST_JOB_H_ |
| OLD | NEW |