| Index: remoting/host/token_validator_factory_impl_unittest.cc
|
| diff --git a/remoting/host/token_validator_factory_impl_unittest.cc b/remoting/host/token_validator_factory_impl_unittest.cc
|
| index b86f9fbadb06859ef1a39773bd8d41a939f4e02f..c9aabd3f53ec0b1e8dbaef2798e7c82920ceb96a 100644
|
| --- a/remoting/host/token_validator_factory_impl_unittest.cc
|
| +++ b/remoting/host/token_validator_factory_impl_unittest.cc
|
| @@ -4,10 +4,13 @@
|
| //
|
| // A set of unit tests for TokenValidatorFactoryImpl
|
|
|
| +#include "remoting/host/token_validator_factory_impl.h"
|
| +
|
| +#include <memory>
|
| #include <string>
|
|
|
| #include "base/json/json_writer.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/values.h"
|
| #include "net/http/http_status_code.h"
|
| #include "net/url_request/url_request_job_factory.h"
|
| @@ -17,7 +20,6 @@
|
| #include "net/url_request/url_request_test_util.h"
|
| #include "remoting/base/rsa_key_pair.h"
|
| #include "remoting/base/test_rsa_key_pair.h"
|
| -#include "remoting/host/token_validator_factory_impl.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -56,10 +58,10 @@ class FakeProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
|
| class SetResponseURLRequestContext: public net::TestURLRequestContext {
|
| public:
|
| void SetResponse(const std::string& headers, const std::string& response) {
|
| - scoped_ptr<net::URLRequestJobFactoryImpl> factory =
|
| - make_scoped_ptr(new net::URLRequestJobFactoryImpl());
|
| + std::unique_ptr<net::URLRequestJobFactoryImpl> factory =
|
| + base::WrapUnique(new net::URLRequestJobFactoryImpl());
|
| factory->SetProtocolHandler(
|
| - "https", make_scoped_ptr(new FakeProtocolHandler(headers, response)));
|
| + "https", base::WrapUnique(new FakeProtocolHandler(headers, response)));
|
| context_storage_.set_job_factory(std::move(factory));
|
| }
|
| };
|
| @@ -93,7 +95,7 @@ class TokenValidatorFactoryImplTest : public testing::Test {
|
| key_pair_ = RsaKeyPair::FromString(kTestRsaKeyPair);
|
| request_context_getter_ = new net::TestURLRequestContextGetter(
|
| message_loop_.task_runner(),
|
| - make_scoped_ptr(new SetResponseURLRequestContext()));
|
| + base::WrapUnique(new SetResponseURLRequestContext()));
|
| ThirdPartyAuthConfig config;
|
| config.token_url = GURL(kTokenUrl);
|
| config.token_validation_url = GURL(kTokenValidationUrl);
|
| @@ -132,7 +134,7 @@ class TokenValidatorFactoryImplTest : public testing::Test {
|
| scoped_refptr<RsaKeyPair> key_pair_;
|
| scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
|
| scoped_refptr<TokenValidatorFactoryImpl> token_validator_factory_;
|
| - scoped_ptr<protocol::TokenValidator> token_validator_;
|
| + std::unique_ptr<protocol::TokenValidator> token_validator_;
|
| };
|
|
|
| TEST_F(TokenValidatorFactoryImplTest, Success) {
|
|
|