From de29f2dde5ed6bfe75a13ee304beaf3cc1b8d763 Mon Sep 17 00:00:00 2001 From: "ali.ibrahim" Date: Thu, 13 Oct 2016 17:51:19 +0200 Subject: [PATCH] Fixing build: removing constness on net::HttpResponseHeaders as otherwise we would need a change in libchromiumcontent. --- atom/browser/api/atom_api_url_request.cc | 4 ++-- atom/browser/api/atom_api_url_request.h | 6 +++--- atom/browser/net/atom_url_request.cc | 4 ++-- atom/browser/net/atom_url_request.h | 2 +- atom/common/native_mate_converters/net_converter.cc | 4 ++-- atom/common/native_mate_converters/net_converter.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/atom/browser/api/atom_api_url_request.cc b/atom/browser/api/atom_api_url_request.cc index 5c472934114f..c4df35dda383 100644 --- a/atom/browser/api/atom_api_url_request.cc +++ b/atom/browser/api/atom_api_url_request.cc @@ -322,7 +322,7 @@ void URLRequest::OnAuthenticationRequired( } void URLRequest::OnResponseStarted( - scoped_refptr response_headers) { + scoped_refptr response_headers) { if (request_state_.Canceled() || request_state_.Failed() || request_state_.Closed()) { @@ -394,7 +394,7 @@ std::string URLRequest::StatusMessage() const { return result; } -scoped_refptr +scoped_refptr URLRequest::RawResponseHeaders() const { return response_headers_; } diff --git a/atom/browser/api/atom_api_url_request.h b/atom/browser/api/atom_api_url_request.h index 71e6a81ca284..1dcb90139199 100644 --- a/atom/browser/api/atom_api_url_request.h +++ b/atom/browser/api/atom_api_url_request.h @@ -102,7 +102,7 @@ class URLRequest : public mate::EventEmitter { void OnAuthenticationRequired( scoped_refptr auth_info); void OnResponseStarted( - scoped_refptr response_headers); + scoped_refptr response_headers); void OnResponseData(scoped_refptr data); void OnResponseCompleted(); void OnRequestError(const std::string& error); @@ -178,7 +178,7 @@ class URLRequest : public mate::EventEmitter { bool CanReadHeaders() const; int StatusCode() const; std::string StatusMessage() const; - scoped_refptr RawResponseHeaders() const; + scoped_refptr RawResponseHeaders() const; uint32_t ResponseHttpVersionMajor() const; uint32_t ResponseHttpVersionMinor() const; @@ -202,7 +202,7 @@ class URLRequest : public mate::EventEmitter { // Used to implement pin/unpin. v8::Global wrapper_; - scoped_refptr response_headers_; + scoped_refptr response_headers_; base::WeakPtrFactory weak_ptr_factory_; diff --git a/atom/browser/net/atom_url_request.cc b/atom/browser/net/atom_url_request.cc index 7a3a0b1423cd..bbe835e92642 100644 --- a/atom/browser/net/atom_url_request.cc +++ b/atom/browser/net/atom_url_request.cc @@ -249,7 +249,7 @@ void AtomURLRequest::OnResponseStarted(net::URLRequest* request) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_EQ(request, request_.get()); - scoped_refptr response_headers = + scoped_refptr response_headers = request->response_headers(); const auto& status = request_->status(); if (status.is_success()) { @@ -358,7 +358,7 @@ void AtomURLRequest::InformDelegateAuthenticationRequired( } void AtomURLRequest::InformDelegateResponseStarted( - scoped_refptr response_headers) const { + scoped_refptr response_headers) const { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (delegate_) delegate_->OnResponseStarted(response_headers); diff --git a/atom/browser/net/atom_url_request.h b/atom/browser/net/atom_url_request.h index c00616d1983d..b16258e5e81e 100644 --- a/atom/browser/net/atom_url_request.h +++ b/atom/browser/net/atom_url_request.h @@ -72,7 +72,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe, void InformDelegateAuthenticationRequired( scoped_refptr auth_info) const; void InformDelegateResponseStarted( - scoped_refptr) const; + scoped_refptr) const; void InformDelegateResponseData( scoped_refptr data) const; void InformDelegateResponseCompleted() const; diff --git a/atom/common/native_mate_converters/net_converter.cc b/atom/common/native_mate_converters/net_converter.cc index de6a7bae9896..89120c94ab56 100644 --- a/atom/common/native_mate_converters/net_converter.cc +++ b/atom/common/native_mate_converters/net_converter.cc @@ -61,9 +61,9 @@ v8::Local Converter>::ToV8( // static v8::Local -Converter>::ToV8( +Converter>::ToV8( v8::Isolate* isolate, - scoped_refptr headers) { + scoped_refptr headers) { base::DictionaryValue response_headers; if (headers) { size_t iter = 0; diff --git a/atom/common/native_mate_converters/net_converter.h b/atom/common/native_mate_converters/net_converter.h index de31f870b621..4ef9a7f33932 100644 --- a/atom/common/native_mate_converters/net_converter.h +++ b/atom/common/native_mate_converters/net_converter.h @@ -35,9 +35,9 @@ struct Converter> { }; template<> -struct Converter> { +struct Converter> { static v8::Local ToV8(v8::Isolate* isolate, - scoped_refptr headers); + scoped_refptr headers); }; } // namespace mate