fixing space formatting issues.
This commit is contained in:
parent
de29f2dde5
commit
9cc8bfae1c
5 changed files with 43 additions and 43 deletions
|
@ -14,7 +14,6 @@
|
||||||
#include "net/base/upload_bytes_element_reader.h"
|
#include "net/base/upload_bytes_element_reader.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const int kBufferSize = 4096;
|
const int kBufferSize = 4096;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -23,19 +22,17 @@ namespace atom {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
|
||||||
class UploadOwnedIOBufferElementReader : public net::UploadBytesElementReader {
|
class UploadOwnedIOBufferElementReader : public net::UploadBytesElementReader {
|
||||||
public:
|
public:
|
||||||
explicit UploadOwnedIOBufferElementReader(
|
explicit UploadOwnedIOBufferElementReader(
|
||||||
scoped_refptr<const net::IOBufferWithSize> buffer)
|
scoped_refptr<const net::IOBufferWithSize> buffer)
|
||||||
: net::UploadBytesElementReader(buffer->data(), buffer->size())
|
: net::UploadBytesElementReader(buffer->data(), buffer->size()),
|
||||||
, buffer_(buffer) {
|
buffer_(buffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
~UploadOwnedIOBufferElementReader() override {
|
~UploadOwnedIOBufferElementReader() override {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static UploadOwnedIOBufferElementReader* CreateWithBuffer(
|
static UploadOwnedIOBufferElementReader* CreateWithBuffer(
|
||||||
scoped_refptr<const net::IOBufferWithSize> buffer) {
|
scoped_refptr<const net::IOBufferWithSize> buffer) {
|
||||||
return new UploadOwnedIOBufferElementReader(std::move(buffer));
|
return new UploadOwnedIOBufferElementReader(std::move(buffer));
|
||||||
|
@ -143,7 +140,8 @@ void AtomURLRequest::RemoveExtraHeader(const std::string& name) const {
|
||||||
base::Bind(&AtomURLRequest::DoRemoveExtraHeader, this, name));
|
base::Bind(&AtomURLRequest::DoRemoveExtraHeader, this, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomURLRequest::PassLoginInformation(const base::string16& username,
|
void AtomURLRequest::PassLoginInformation(
|
||||||
|
const base::string16& username,
|
||||||
const base::string16& password) const {
|
const base::string16& password) const {
|
||||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||||
if (username.empty() || password.empty()) {
|
if (username.empty() || password.empty()) {
|
||||||
|
@ -223,7 +221,8 @@ void AtomURLRequest::DoRemoveExtraHeader(const std::string& name) const {
|
||||||
request_->RemoveRequestHeaderByName(name);
|
request_->RemoveRequestHeaderByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomURLRequest::DoSetAuth(const base::string16& username,
|
void AtomURLRequest::DoSetAuth(
|
||||||
|
const base::string16& username,
|
||||||
const base::string16& password) const {
|
const base::string16& password) const {
|
||||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||||
request_->SetAuth(net::AuthCredentials(username, password));
|
request_->SetAuth(net::AuthCredentials(username, password));
|
||||||
|
@ -234,7 +233,8 @@ void AtomURLRequest::DoCancelAuth() const {
|
||||||
request_->CancelAuth();
|
request_->CancelAuth();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomURLRequest::OnAuthRequired(net::URLRequest* request,
|
void AtomURLRequest::OnAuthRequired(
|
||||||
|
net::URLRequest* request,
|
||||||
net::AuthChallengeInfo* auth_info) {
|
net::AuthChallengeInfo* auth_info) {
|
||||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe<AtomURLRequest>,
|
||||||
void OnAuthRequired(net::URLRequest* request,
|
void OnAuthRequired(net::URLRequest* request,
|
||||||
net::AuthChallengeInfo* auth_info) override;
|
net::AuthChallengeInfo* auth_info) override;
|
||||||
void OnResponseStarted(net::URLRequest* request) override;
|
void OnResponseStarted(net::URLRequest* request) override;
|
||||||
void OnReadCompleted(net::URLRequest* request,
|
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
|
||||||
int bytes_read) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class base::RefCountedThreadSafe<AtomURLRequest>;
|
friend class base::RefCountedThreadSafe<AtomURLRequest>;
|
||||||
|
|
|
@ -36,7 +36,8 @@ struct Converter<scoped_refptr<net::X509Certificate>> {
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct Converter<scoped_refptr<net::HttpResponseHeaders>> {
|
struct Converter<scoped_refptr<net::HttpResponseHeaders>> {
|
||||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
static v8::Local<v8::Value> ToV8(
|
||||||
|
v8::Isolate* isolate,
|
||||||
scoped_refptr<net::HttpResponseHeaders> headers);
|
scoped_refptr<net::HttpResponseHeaders> headers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue