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

Side by Side Diff: headless/public/util/generic_url_request_job.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 | « no previous file | headless/public/util/generic_url_request_job.cc » ('j') | 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_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
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
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_
OLDNEW
« no previous file with comments | « no previous file | headless/public/util/generic_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698