| Index: net/url_request/url_request_ftp_job.cc
|
| diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
|
| index dcfb8fde01e607afccd2ba7021e0e21aa2244b05..dcb914a878d6963a690f27898358a93d73c2f923 100644
|
| --- a/net/url_request/url_request_ftp_job.cc
|
| +++ b/net/url_request/url_request_ftp_job.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/location.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| @@ -24,6 +25,19 @@
|
|
|
| namespace net {
|
|
|
| +class URLRequestFtpJob::AuthData {
|
| + public:
|
| + AuthState state; // Whether we need, have, or gave up on authentication.
|
| + AuthCredentials credentials; // The credentials to use for auth.
|
| +
|
| + AuthData();
|
| + ~AuthData();
|
| +};
|
| +
|
| +URLRequestFtpJob::AuthData::AuthData() : state(AUTH_STATE_NEED_AUTH) {}
|
| +
|
| +URLRequestFtpJob::AuthData::~AuthData() {}
|
| +
|
| URLRequestFtpJob::URLRequestFtpJob(
|
| URLRequest* request,
|
| NetworkDelegate* network_delegate,
|
| @@ -358,7 +372,7 @@ void URLRequestFtpJob::HandleAuthNeededResponse() {
|
| if (ftp_transaction_ && auth_data_->state == AUTH_STATE_HAVE_AUTH)
|
| ftp_auth_cache_->Remove(origin, auth_data_->credentials);
|
| } else {
|
| - auth_data_ = new AuthData;
|
| + auth_data_ = base::MakeUnique<AuthData>();
|
| }
|
| auth_data_->state = AUTH_STATE_NEED_AUTH;
|
|
|
|
|