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

Side by Side Diff: headless/public/util/url_fetcher.h

Issue 2248283008: Fix recursion bug in blocking a fetch and add a test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unintentional change Created 4 years, 4 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
« no previous file with comments | « headless/public/util/testing/generic_url_request_mocks.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 public: 28 public:
29 URLFetcher() {} 29 URLFetcher() {}
30 virtual ~URLFetcher() {} 30 virtual ~URLFetcher() {}
31 31
32 // Interface for reporting the fetch result. 32 // Interface for reporting the fetch result.
33 class ResultListener { 33 class ResultListener {
34 public: 34 public:
35 ResultListener() {} 35 ResultListener() {}
36 36
37 // Informs the listener that the fetch failed. 37 // Informs the listener that the fetch failed.
38 virtual void OnStartError(net::Error error) = 0; 38 virtual void OnFetchStartError(net::Error error) = 0;
39 39
40 // Informs the listener that the fetch succeeded and returns the HTTP 40 // Informs the listener that the fetch succeeded and returns the HTTP
41 // headers and the body. NOTE |body| must be owned by the caller and remain 41 // headers and the body. NOTE |body| must be owned by the caller and remain
42 // valid until the fetcher is destroyed, 42 // valid until the fetcher is destroyed,
43 virtual void OnFetchComplete( 43 virtual void OnFetchComplete(
44 const GURL& final_url, 44 const GURL& final_url,
45 int http_response_code, 45 int http_response_code,
46 scoped_refptr<net::HttpResponseHeaders> response_headers, 46 scoped_refptr<net::HttpResponseHeaders> response_headers,
47 const char* body, 47 const char* body,
48 size_t body_size) = 0; 48 size_t body_size) = 0;
(...skipping 17 matching lines...) Expand all
66 const net::HttpRequestHeaders& request_headers, 66 const net::HttpRequestHeaders& request_headers,
67 ResultListener* result_listener) = 0; 67 ResultListener* result_listener) = 0;
68 68
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(URLFetcher); 70 DISALLOW_COPY_AND_ASSIGN(URLFetcher);
71 }; 71 };
72 72
73 } // namespace headless 73 } // namespace headless
74 74
75 #endif // HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_ 75 #endif // HEADLESS_PUBLIC_UTIL_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « headless/public/util/testing/generic_url_request_mocks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698