mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Use CompletionOnceCallback in URLRequestSimpleJob.
https://chromium-review.googlesource.com/c/chromium/src/+/1155089
This commit is contained in:
@@ -143,7 +143,7 @@ int URLRequestBufferJob::GetRefCountedData(
|
||||
std::string* mime_type,
|
||||
std::string* charset,
|
||||
scoped_refptr<base::RefCountedMemory>* data,
|
||||
const net::CompletionCallback& callback) const {
|
||||
net::CompletionOnceCallback callback) const {
|
||||
*mime_type = mime_type_;
|
||||
*charset = charset_;
|
||||
*data = data_;
|
||||
|
||||
@@ -31,7 +31,7 @@ class URLRequestBufferJob : public JsAsker, public net::URLRequestSimpleJob {
|
||||
int GetRefCountedData(std::string* mime_type,
|
||||
std::string* charset,
|
||||
scoped_refptr<base::RefCountedMemory>* data,
|
||||
const net::CompletionCallback& callback) const override;
|
||||
net::CompletionOnceCallback callback) const override;
|
||||
|
||||
private:
|
||||
std::string mime_type_;
|
||||
|
||||
@@ -102,11 +102,10 @@ void URLRequestStringJob::GetResponseInfo(net::HttpResponseInfo* info) {
|
||||
info->headers = headers;
|
||||
}
|
||||
|
||||
int URLRequestStringJob::GetData(
|
||||
std::string* mime_type,
|
||||
std::string* charset,
|
||||
std::string* data,
|
||||
const net::CompletionCallback& callback) const {
|
||||
int URLRequestStringJob::GetData(std::string* mime_type,
|
||||
std::string* charset,
|
||||
std::string* data,
|
||||
net::CompletionOnceCallback callback) const {
|
||||
*mime_type = mime_type_;
|
||||
*charset = charset_;
|
||||
*data = data_;
|
||||
|
||||
@@ -29,7 +29,7 @@ class URLRequestStringJob : public JsAsker, public net::URLRequestSimpleJob {
|
||||
int GetData(std::string* mime_type,
|
||||
std::string* charset,
|
||||
std::string* data,
|
||||
const net::CompletionCallback& callback) const override;
|
||||
net::CompletionOnceCallback callback) const override;
|
||||
|
||||
private:
|
||||
std::string mime_type_;
|
||||
|
||||
Reference in New Issue
Block a user