| Index: remoting/host/token_validator_factory_impl.cc
|
| diff --git a/remoting/host/token_validator_factory_impl.cc b/remoting/host/token_validator_factory_impl.cc
|
| index 321722de438321644e397736516da2bf0203ff3d..972a4100b0e23199388550a76bec1d095a213986 100644
|
| --- a/remoting/host/token_validator_factory_impl.cc
|
| +++ b/remoting/host/token_validator_factory_impl.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/json/json_reader.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/values.h"
|
| @@ -92,9 +93,8 @@ void TokenValidatorImpl::StartValidateRequest(const std::string& token) {
|
| net::HttpRequestHeaders::kContentType,
|
| "application/x-www-form-urlencoded", true);
|
| request_->set_method("POST");
|
| - scoped_ptr<net::UploadElementReader> reader(
|
| - new net::UploadBytesElementReader(
|
| - post_body_.data(), post_body_.size()));
|
| + std::unique_ptr<net::UploadElementReader> reader(
|
| + new net::UploadBytesElementReader(post_body_.data(), post_body_.size()));
|
| request_->set_upload(
|
| net::ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
|
| request_->Start();
|
| @@ -123,14 +123,12 @@ TokenValidatorFactoryImpl::TokenValidatorFactoryImpl(
|
| TokenValidatorFactoryImpl::~TokenValidatorFactoryImpl() {
|
| }
|
|
|
| -scoped_ptr<protocol::TokenValidator>
|
| -TokenValidatorFactoryImpl::CreateTokenValidator(
|
| - const std::string& local_jid,
|
| - const std::string& remote_jid) {
|
| - return make_scoped_ptr(
|
| - new TokenValidatorImpl(third_party_auth_config_,
|
| - key_pair_, local_jid, remote_jid,
|
| - request_context_getter_));
|
| +std::unique_ptr<protocol::TokenValidator>
|
| +TokenValidatorFactoryImpl::CreateTokenValidator(const std::string& local_jid,
|
| + const std::string& remote_jid) {
|
| + return base::WrapUnique(
|
| + new TokenValidatorImpl(third_party_auth_config_, key_pair_, local_jid,
|
| + remote_jid, request_context_getter_));
|
| }
|
|
|
| } // namespace remoting
|
|
|