| Index: net/url_request/ftp_protocol_handler.h
|
| diff --git a/net/url_request/ftp_protocol_handler.h b/net/url_request/ftp_protocol_handler.h
|
| index bb7796bb7c6403a391fe41cfcebfd2b4458772ee..e06aa1ad7dc67170041e751671381442f1ac5b87 100644
|
| --- a/net/url_request/ftp_protocol_handler.h
|
| +++ b/net/url_request/ftp_protocol_handler.h
|
| @@ -16,6 +16,7 @@ namespace net {
|
|
|
| class FtpAuthCache;
|
| class FtpTransactionFactory;
|
| +class HostResolver;
|
| class NetworkDelegate;
|
| class URLRequestJob;
|
|
|
| @@ -23,8 +24,18 @@ class URLRequestJob;
|
| class NET_EXPORT FtpProtocolHandler :
|
| public URLRequestJobFactory::ProtocolHandler {
|
| public:
|
| - explicit FtpProtocolHandler(FtpTransactionFactory* ftp_transaction_factory);
|
| ~FtpProtocolHandler() override;
|
| +
|
| + // Creates an FtpProtocolHandler using an FtpTransactionFactoryImpl and the
|
| + // specified HostResolver.
|
| + static std::unique_ptr<FtpProtocolHandler> Create(
|
| + HostResolver* host_resolver);
|
| +
|
| + // Creates an FtpProtocolHandler using the specified FtpTransactionFactory, to
|
| + // allow a mock to be used for testing.
|
| + static std::unique_ptr<FtpProtocolHandler> CreateForTesting(
|
| + std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory);
|
| +
|
| URLRequestJob* MaybeCreateJob(
|
| URLRequest* request,
|
| NetworkDelegate* network_delegate) const override;
|
| @@ -32,7 +43,10 @@ class NET_EXPORT FtpProtocolHandler :
|
| private:
|
| friend class FtpTestURLRequestContext;
|
|
|
| - FtpTransactionFactory* ftp_transaction_factory_;
|
| + explicit FtpProtocolHandler(
|
| + std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory);
|
| +
|
| + std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory_;
|
| std::unique_ptr<FtpAuthCache> ftp_auth_cache_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FtpProtocolHandler);
|
|
|