| 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_URL_FETCHER_H_ | 5 #ifndef HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ |
| 6 #define HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ | 6 #define HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const char* response_data, | 53 const char* response_data, |
| 54 size_t response_data_size); | 54 size_t response_data_size); |
| 55 | 55 |
| 56 protected: | 56 protected: |
| 57 virtual ~ResultListener() {} | 57 virtual ~ResultListener() {} |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(ResultListener); | 60 DISALLOW_COPY_AND_ASSIGN(ResultListener); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // Instructs the sub-class to fetch the resource. | 63 virtual void StartFetch(const GURL& url, |
| 64 virtual void StartFetch(const GURL& rewritten_url, | |
| 65 const std::string& method, | 64 const std::string& method, |
| 65 const std::string& post_data, |
| 66 const net::HttpRequestHeaders& request_headers, | 66 const net::HttpRequestHeaders& request_headers, |
| 67 const std::string& devtools_request_id, | 67 ResultListener* result_listener) = 0; |
| 68 ResultListener* result_listener); | |
| 69 // TODO(alexclarke): Make the above pure virtual and remove this. | |
| 70 virtual void StartFetch(const GURL& rewritten_url, | |
| 71 const std::string& method, | |
| 72 const net::HttpRequestHeaders& request_headers, | |
| 73 ResultListener* result_listener); | |
| 74 | 68 |
| 75 private: | 69 private: |
| 76 DISALLOW_COPY_AND_ASSIGN(URLFetcher); | 70 DISALLOW_COPY_AND_ASSIGN(URLFetcher); |
| 77 }; | 71 }; |
| 78 | 72 |
| 79 } // namespace headless | 73 } // namespace headless |
| 80 | 74 |
| 81 #endif // HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ | 75 #endif // HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ |
| OLD | NEW |