summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 05:00:20 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 12:00:44 +0000
commitb03027d238812b84860eaa4608df71442748c44d (patch)
tree1e1406538a891030ddaeb3daf61640e59d02a052 /net/http
parente59c1bb95b7f2f381d6a0c38c6f6f1c9a89c4ed4 (diff)
downloadchromium_src-b03027d238812b84860eaa4608df71442748c44d.zip
chromium_src-b03027d238812b84860eaa4608df71442748c44d.tar.gz
chromium_src-b03027d238812b84860eaa4608df71442748c44d.tar.bz2
Standardize usage of virtual/override/final in net/
This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=rsleevi@chromium.org Review URL: https://codereview.chromium.org/667923003 Cr-Commit-Position: refs/heads/master@{#300466}
Diffstat (limited to 'net/http')
-rw-r--r--net/http/disk_cache_based_quic_server_info.h12
-rw-r--r--net/http/failing_http_transaction_factory.cc59
-rw-r--r--net/http/failing_http_transaction_factory.h11
-rw-r--r--net/http/http_auth_cache_unittest.cc14
-rw-r--r--net/http/http_auth_controller_unittest.cc10
-rw-r--r--net/http/http_auth_filter.h4
-rw-r--r--net/http/http_auth_gssapi_posix.h111
-rw-r--r--net/http/http_auth_handler_basic.h33
-rw-r--r--net/http/http_auth_handler_digest.h36
-rw-r--r--net/http/http_auth_handler_factory.h16
-rw-r--r--net/http/http_auth_handler_factory_unittest.cc18
-rw-r--r--net/http/http_auth_handler_mock.h37
-rw-r--r--net/http/http_auth_handler_negotiate.h37
-rw-r--r--net/http/http_auth_handler_ntlm.h37
-rw-r--r--net/http/http_basic_stream.h56
-rw-r--r--net/http/http_cache.cc3
-rw-r--r--net/http/http_cache.h18
-rw-r--r--net/http/http_cache_transaction.h58
-rw-r--r--net/http/http_cache_unittest.cc9
-rw-r--r--net/http/http_network_layer.h14
-rw-r--r--net/http/http_network_transaction.h96
-rw-r--r--net/http/http_network_transaction_ssl_unittest.cc12
-rw-r--r--net/http/http_network_transaction_unittest.cc191
-rw-r--r--net/http/http_proxy_client_socket.h59
-rw-r--r--net/http/http_proxy_client_socket_pool.h72
-rw-r--r--net/http/http_proxy_client_socket_pool_unittest.cc30
-rw-r--r--net/http/http_response_body_drainer_unittest.cc61
-rw-r--r--net/http/http_server_properties_impl.h75
-rw-r--r--net/http/http_server_properties_manager.h75
-rw-r--r--net/http/http_stream.h2
-rw-r--r--net/http/http_stream_factory_impl.h31
-rw-r--r--net/http/http_stream_factory_impl_request.h15
-rw-r--r--net/http/http_stream_factory_impl_request_unittest.cc42
-rw-r--r--net/http/http_stream_factory_impl_unittest.cc108
-rw-r--r--net/http/http_stream_parser.cc2
-rw-r--r--net/http/http_transaction_test_util.h69
-rw-r--r--net/http/mock_allow_url_security_manager.h6
-rw-r--r--net/http/mock_gssapi_library_posix.h111
-rw-r--r--net/http/mock_http_cache.cc4
-rw-r--r--net/http/mock_http_cache.h125
-rw-r--r--net/http/proxy_client_socket.h2
-rw-r--r--net/http/proxy_connect_redirect_http_stream.h56
-rw-r--r--net/http/transport_security_persister.h6
-rw-r--r--net/http/url_security_manager.h6
44 files changed, 875 insertions, 974 deletions
diff --git a/net/http/disk_cache_based_quic_server_info.h b/net/http/disk_cache_based_quic_server_info.h
index 7707037..e5ced3f 100644
--- a/net/http/disk_cache_based_quic_server_info.h
+++ b/net/http/disk_cache_based_quic_server_info.h
@@ -31,11 +31,11 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
HttpCache* http_cache);
// QuicServerInfo implementation.
- virtual void Start() override;
- virtual int WaitForDataReady(const CompletionCallback& callback) override;
- virtual bool IsDataReady() override;
- virtual bool IsReadyToPersist() override;
- virtual void Persist() override;
+ void Start() override;
+ int WaitForDataReady(const CompletionCallback& callback) override;
+ bool IsDataReady() override;
+ bool IsReadyToPersist() override;
+ void Persist() override;
private:
struct CacheOperationDataShim;
@@ -55,7 +55,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
NONE,
};
- virtual ~DiskCacheBasedQuicServerInfo();
+ ~DiskCacheBasedQuicServerInfo() override;
std::string key() const;
diff --git a/net/http/failing_http_transaction_factory.cc b/net/http/failing_http_transaction_factory.cc
index 0b97aa2a..dfe78f2 100644
--- a/net/http/failing_http_transaction_factory.cc
+++ b/net/http/failing_http_transaction_factory.cc
@@ -29,43 +29,38 @@ namespace {
class FailingHttpTransaction : public HttpTransaction {
public:
explicit FailingHttpTransaction(Error error);
- virtual ~FailingHttpTransaction();
+ ~FailingHttpTransaction() override;
// HttpTransaction
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(
- const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(
- net::QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
private:
Error error_;
diff --git a/net/http/failing_http_transaction_factory.h b/net/http/failing_http_transaction_factory.h
index 8a785f5..dd4a811 100644
--- a/net/http/failing_http_transaction_factory.h
+++ b/net/http/failing_http_transaction_factory.h
@@ -23,14 +23,13 @@ class NET_EXPORT FailingHttpTransactionFactory : public HttpTransactionFactory {
public:
// The caller must guarantee that |session| outlives this object.
FailingHttpTransactionFactory(HttpNetworkSession* session, Error error);
- virtual ~FailingHttpTransactionFactory();
+ ~FailingHttpTransactionFactory() override;
// HttpTransactionFactory:
- virtual int CreateTransaction(
- RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
private:
HttpNetworkSession* session_;
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc
index 4002bab..3565b0c 100644
--- a/net/http/http_auth_cache_unittest.cc
+++ b/net/http/http_auth_cache_unittest.cc
@@ -32,27 +32,27 @@ class MockAuthHandler : public HttpAuthHandler {
properties_ = 0;
}
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override {
return HttpAuth::AUTHORIZATION_RESULT_REJECT;
}
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override {
+ bool Init(HttpAuthChallengeTokenizer* challenge) override {
return false; // Unused.
}
- virtual int GenerateAuthTokenImpl(const AuthCredentials*,
- const HttpRequestInfo*,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials*,
+ const HttpRequestInfo*,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
*auth_token = "mock-credentials";
return OK;
}
private:
- virtual ~MockAuthHandler() {}
+ ~MockAuthHandler() override {}
};
const char* kRealm1 = "Realm1";
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index 306cabd..c39256b 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -128,7 +128,7 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
}
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override {
+ bool Init(HttpAuthChallengeTokenizer* challenge) override {
HttpAuthHandlerMock::Init(challenge);
set_allows_default_credentials(true);
set_allows_explicit_credentials(false);
@@ -143,10 +143,10 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
return true;
}
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
int result =
HttpAuthHandlerMock::GenerateAuthTokenImpl(credentials,
request, callback,
diff --git a/net/http/http_auth_filter.h b/net/http/http_auth_filter.h
index 419b8af..260da47 100644
--- a/net/http/http_auth_filter.h
+++ b/net/http/http_auth_filter.h
@@ -35,7 +35,7 @@ class NET_EXPORT_PRIVATE HttpAuthFilter {
class NET_EXPORT HttpAuthFilterWhitelist : public HttpAuthFilter {
public:
explicit HttpAuthFilterWhitelist(const std::string& server_whitelist);
- virtual ~HttpAuthFilterWhitelist();
+ ~HttpAuthFilterWhitelist() override;
// Adds an individual URL |filter| to the list, of the specified |target|.
bool AddFilter(const std::string& filter, HttpAuth::Target target);
@@ -46,7 +46,7 @@ class NET_EXPORT HttpAuthFilterWhitelist : public HttpAuthFilter {
const ProxyBypassRules& rules() const { return rules_; }
// HttpAuthFilter methods:
- virtual bool IsValid(const GURL& url, HttpAuth::Target target) const override;
+ bool IsValid(const GURL& url, HttpAuth::Target target) const override;
private:
// Installs the whitelist.
diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h
index 41a1805..4091ba3 100644
--- a/net/http/http_auth_gssapi_posix.h
+++ b/net/http/http_auth_gssapi_posix.h
@@ -109,68 +109,59 @@ class NET_EXPORT_PRIVATE GSSAPISharedLibrary : public GSSAPILibrary {
// If |gssapi_library_name| is empty, hard-coded default library names are
// used.
explicit GSSAPISharedLibrary(const std::string& gssapi_library_name);
- virtual ~GSSAPISharedLibrary();
+ ~GSSAPISharedLibrary() override;
// GSSAPILibrary methods:
- virtual bool Init() override;
- virtual OM_uint32 import_name(
- OM_uint32* minor_status,
- const gss_buffer_t input_name_buffer,
- const gss_OID input_name_type,
- gss_name_t* output_name) override;
- virtual OM_uint32 release_name(
- OM_uint32* minor_status,
- gss_name_t* input_name) override;
- virtual OM_uint32 release_buffer(
- OM_uint32* minor_status,
- gss_buffer_t buffer) override;
- virtual OM_uint32 display_name(
- OM_uint32* minor_status,
- const gss_name_t input_name,
- gss_buffer_t output_name_buffer,
- gss_OID* output_name_type) override;
- virtual OM_uint32 display_status(
- OM_uint32* minor_status,
- OM_uint32 status_value,
- int status_type,
- const gss_OID mech_type,
- OM_uint32* message_contex,
- gss_buffer_t status_string) override;
- virtual OM_uint32 init_sec_context(
- OM_uint32* minor_status,
- const gss_cred_id_t initiator_cred_handle,
- gss_ctx_id_t* context_handle,
- const gss_name_t target_name,
- const gss_OID mech_type,
- OM_uint32 req_flags,
- OM_uint32 time_req,
- const gss_channel_bindings_t input_chan_bindings,
- const gss_buffer_t input_token,
- gss_OID* actual_mech_type,
- gss_buffer_t output_token,
- OM_uint32* ret_flags,
- OM_uint32* time_rec) override;
- virtual OM_uint32 wrap_size_limit(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- int conf_req_flag,
- gss_qop_t qop_req,
- OM_uint32 req_output_size,
- OM_uint32* max_input_size) override;
- virtual OM_uint32 delete_sec_context(
- OM_uint32* minor_status,
- gss_ctx_id_t* context_handle,
- gss_buffer_t output_token) override;
- virtual OM_uint32 inquire_context(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- gss_name_t* src_name,
- gss_name_t* targ_name,
- OM_uint32* lifetime_rec,
- gss_OID* mech_type,
- OM_uint32* ctx_flags,
- int* locally_initiated,
- int* open) override;
+ bool Init() override;
+ OM_uint32 import_name(OM_uint32* minor_status,
+ const gss_buffer_t input_name_buffer,
+ const gss_OID input_name_type,
+ gss_name_t* output_name) override;
+ OM_uint32 release_name(OM_uint32* minor_status,
+ gss_name_t* input_name) override;
+ OM_uint32 release_buffer(OM_uint32* minor_status,
+ gss_buffer_t buffer) override;
+ OM_uint32 display_name(OM_uint32* minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t output_name_buffer,
+ gss_OID* output_name_type) override;
+ OM_uint32 display_status(OM_uint32* minor_status,
+ OM_uint32 status_value,
+ int status_type,
+ const gss_OID mech_type,
+ OM_uint32* message_contex,
+ gss_buffer_t status_string) override;
+ OM_uint32 init_sec_context(OM_uint32* minor_status,
+ const gss_cred_id_t initiator_cred_handle,
+ gss_ctx_id_t* context_handle,
+ const gss_name_t target_name,
+ const gss_OID mech_type,
+ OM_uint32 req_flags,
+ OM_uint32 time_req,
+ const gss_channel_bindings_t input_chan_bindings,
+ const gss_buffer_t input_token,
+ gss_OID* actual_mech_type,
+ gss_buffer_t output_token,
+ OM_uint32* ret_flags,
+ OM_uint32* time_rec) override;
+ OM_uint32 wrap_size_limit(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ int conf_req_flag,
+ gss_qop_t qop_req,
+ OM_uint32 req_output_size,
+ OM_uint32* max_input_size) override;
+ OM_uint32 delete_sec_context(OM_uint32* minor_status,
+ gss_ctx_id_t* context_handle,
+ gss_buffer_t output_token) override;
+ OM_uint32 inquire_context(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ gss_name_t* src_name,
+ gss_name_t* targ_name,
+ OM_uint32* lifetime_rec,
+ gss_OID* mech_type,
+ OM_uint32* ctx_flags,
+ int* locally_initiated,
+ int* open) override;
private:
typedef typeof(&gss_import_name) gss_import_name_type;
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index f718786..186caf6 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -19,31 +19,30 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerBasic : public HttpAuthHandler {
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
-
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ ~Factory() override;
+
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
};
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
- virtual ~HttpAuthHandlerBasic() {}
+ ~HttpAuthHandlerBasic() override {}
bool ParseChallenge(HttpAuthChallengeTokenizer* challenge);
};
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index ca148fe..dbe02b4 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -38,7 +38,8 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerDigest : public HttpAuthHandler {
class DynamicNonceGenerator : public NonceGenerator {
public:
DynamicNonceGenerator();
- virtual std::string GenerateNonce() const override;
+ std::string GenerateNonce() const override;
+
private:
DISALLOW_COPY_AND_ASSIGN(DynamicNonceGenerator);
};
@@ -49,7 +50,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerDigest : public HttpAuthHandler {
public:
explicit FixedNonceGenerator(const std::string& nonce);
- virtual std::string GenerateNonce() const override;
+ std::string GenerateNonce() const override;
private:
const std::string nonce_;
@@ -59,34 +60,33 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerDigest : public HttpAuthHandler {
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
// This factory owns the passed in |nonce_generator|.
void set_nonce_generator(const NonceGenerator* nonce_generator);
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
scoped_ptr<const NonceGenerator> nonce_generator_;
};
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
FRIEND_TEST_ALL_PREFIXES(HttpAuthHandlerDigestTest, ParseChallenge);
@@ -120,7 +120,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerDigest : public HttpAuthHandler {
// the handler. The lifetime of the |nonce_generator| must exceed that of this
// handler.
HttpAuthHandlerDigest(int nonce_count, const NonceGenerator* nonce_generator);
- virtual ~HttpAuthHandlerDigest();
+ ~HttpAuthHandlerDigest() override;
// Parse the challenge, saving the results into this instance.
// Returns true on success.
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
index efb432a..06f7f34 100644
--- a/net/http/http_auth_handler_factory.h
+++ b/net/http/http_auth_handler_factory.h
@@ -130,7 +130,7 @@ class NET_EXPORT HttpAuthHandlerRegistryFactory
: public HttpAuthHandlerFactory {
public:
HttpAuthHandlerRegistryFactory();
- virtual ~HttpAuthHandlerRegistryFactory();
+ ~HttpAuthHandlerRegistryFactory() override;
// Sets an URL security manager into the factory associated with |scheme|.
void SetURLSecurityManager(const std::string& scheme,
@@ -183,13 +183,13 @@ class NET_EXPORT HttpAuthHandlerRegistryFactory
// Creates an auth handler by dispatching out to the registered factories
// based on the first token in |challenge|.
- virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap;
diff --git a/net/http/http_auth_handler_factory_unittest.cc b/net/http/http_auth_handler_factory_unittest.cc
index 9860623..2aa7958 100644
--- a/net/http/http_auth_handler_factory_unittest.cc
+++ b/net/http/http_auth_handler_factory_unittest.cc
@@ -19,15 +19,15 @@ class MockHttpAuthHandlerFactory : public HttpAuthHandlerFactory {
public:
explicit MockHttpAuthHandlerFactory(int return_code) :
return_code_(return_code) {}
- virtual ~MockHttpAuthHandlerFactory() {}
-
- virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override {
+ ~MockHttpAuthHandlerFactory() override {}
+
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override {
handler->reset();
return return_code_;
}
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index b903e8c..32b416d 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -33,7 +33,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
class Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target);
@@ -42,14 +42,13 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
}
// HttpAuthHandlerFactory:
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS];
@@ -58,7 +57,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
HttpAuthHandlerMock();
- virtual ~HttpAuthHandlerMock();
+ ~HttpAuthHandlerMock() override;
void SetResolveExpectation(Resolve resolve);
@@ -87,19 +86,19 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
}
// HttpAuthHandler:
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
- virtual bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
- virtual bool AllowsExplicitCredentials() override;
+ bool NeedsIdentity() override;
+ bool AllowsDefaultCredentials() override;
+ bool AllowsExplicitCredentials() override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
void OnResolveCanonicalName();
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index 8ff9244..fc596fa 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -43,7 +43,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
// |disable_cname_lookup()| and |set_disable_cname_lookup()| get/set whether
// the auth handlers generated by this factory should skip looking up the
@@ -69,14 +69,13 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
auth_library_.reset(auth_library);
}
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
bool disable_cname_lookup_;
@@ -99,26 +98,26 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
bool disable_cname_lookup,
bool use_port);
- virtual ~HttpAuthHandlerNegotiate();
+ ~HttpAuthHandlerNegotiate() override;
// These are public for unit tests
std::string CreateSPN(const AddressList& address_list, const GURL& orign);
const std::string& spn() const { return spn_; }
// HttpAuthHandler:
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
- virtual bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
- virtual bool AllowsExplicitCredentials() override;
+ bool NeedsIdentity() override;
+ bool AllowsDefaultCredentials() override;
+ bool AllowsExplicitCredentials() override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
enum State {
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index 5a998ac..0712bb3 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -39,16 +39,15 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
class Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
-
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ ~Factory() override;
+
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
#if defined(NTLM_SSPI)
// Set the SSPILibrary to use. Typically the only callers which need to use
// this are unit tests which pass in a mocked-out version of the SSPI
@@ -104,11 +103,11 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
URLSecurityManager* url_security_manager);
#endif
- virtual bool NeedsIdentity() override;
+ bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
+ bool AllowsDefaultCredentials() override;
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
@@ -116,15 +115,15 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
// It does nothing in the portable implementation.
int InitializeBeforeFirstChallenge();
- virtual bool Init(HttpAuthChallengeTokenizer* tok) override;
+ bool Init(HttpAuthChallengeTokenizer* tok) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
- virtual ~HttpAuthHandlerNTLM();
+ ~HttpAuthHandlerNTLM() override;
#if defined(NTLM_PORTABLE)
// For unit tests to override the GenerateRandom and GetHostName functions.
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h
index 541994d..194f7ef 100644
--- a/net/http/http_basic_stream.h
+++ b/net/http/http_basic_stream.h
@@ -30,55 +30,53 @@ class HttpBasicStream : public HttpStream {
// Constructs a new HttpBasicStream. InitializeStream must be called to
// initialize it correctly.
HttpBasicStream(ClientSocketHandle* connection, bool using_proxy);
- virtual ~HttpBasicStream();
+ ~HttpBasicStream() override;
// HttpStream methods:
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
- virtual UploadProgress GetUploadProgress() const override;
+ UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
+ void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
+ HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
+ bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
+ bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
+ bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
+ void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
+ bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
+ bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
+ void Drain(HttpNetworkSession* session) override;
- virtual void SetPriority(RequestPriority priority) override;
+ void SetPriority(RequestPriority priority) override;
private:
HttpStreamParser* parser() const { return state_.parser(); }
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 1c8e62a..61a12f6 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -286,8 +286,7 @@ class HttpCache::QuicServerInfoFactoryAdaptor : public QuicServerInfoFactory {
: http_cache_(http_cache) {
}
- virtual QuicServerInfo* GetForServer(
- const QuicServerId& server_id) override {
+ QuicServerInfo* GetForServer(const QuicServerId& server_id) override {
return new DiskCacheBasedQuicServerInfo(server_id, http_cache_);
}
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 5e6851f..1c1338b 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -108,15 +108,15 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
const base::FilePath& path,
int max_bytes,
const scoped_refptr<base::SingleThreadTaskRunner>& thread);
- virtual ~DefaultBackend();
+ ~DefaultBackend() override;
// Returns a factory for an in-memory cache.
static BackendFactory* InMemory(int max_bytes);
// BackendFactory implementation.
- virtual int CreateBackend(NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const CompletionCallback& callback) override;
+ int CreateBackend(NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const CompletionCallback& callback) override;
private:
CacheType type_;
@@ -145,7 +145,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
NetLog* net_log,
BackendFactory* backend_factory);
- virtual ~HttpCache();
+ ~HttpCache() override;
HttpTransactionFactory* network_layer() { return network_layer_.get(); }
@@ -213,10 +213,10 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
}
// HttpTransactionFactory implementation:
- virtual int CreateTransaction(RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
base::WeakPtr<HttpCache> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index cc1f467..0b4792b 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -61,7 +61,7 @@ class HttpCache::Transaction : public HttpTransaction {
Transaction(RequestPriority priority,
HttpCache* cache);
- virtual ~Transaction();
+ ~Transaction() override;
Mode mode() const { return mode_; }
@@ -110,39 +110,35 @@ class HttpCache::Transaction : public HttpTransaction {
}
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress(void) const override;
- virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress(void) const override;
+ void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
private:
static const size_t kNumValidationHeaders = 2;
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 0b05057..a0225e8 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -496,12 +496,13 @@ struct Context {
class FakeWebSocketHandshakeStreamCreateHelper
: public net::WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual ~FakeWebSocketHandshakeStreamCreateHelper() {}
- virtual net::WebSocketHandshakeStreamBase* CreateBasicStream(
- scoped_ptr<net::ClientSocketHandle> connect, bool using_proxy) override {
+ ~FakeWebSocketHandshakeStreamCreateHelper() override {}
+ net::WebSocketHandshakeStreamBase* CreateBasicStream(
+ scoped_ptr<net::ClientSocketHandle> connect,
+ bool using_proxy) override {
return NULL;
}
- virtual net::WebSocketHandshakeStreamBase* CreateSpdyStream(
+ net::WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<net::SpdySession>& session,
bool use_relative_url) override {
return NULL;
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index 58b02f2..13b0c79 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -28,7 +28,7 @@ class NET_EXPORT HttpNetworkLayer
// Construct a HttpNetworkLayer with an existing HttpNetworkSession which
// contains a valid ProxyService.
explicit HttpNetworkLayer(HttpNetworkSession* session);
- virtual ~HttpNetworkLayer();
+ ~HttpNetworkLayer() override;
// Create a transaction factory that instantiate a network layer over an
// existing network session. Network session contains some valuable
@@ -43,14 +43,14 @@ class NET_EXPORT HttpNetworkLayer
static void ForceAlternateProtocol();
// HttpTransactionFactory methods:
- virtual int CreateTransaction(RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
// base::PowerObserver methods:
- virtual void OnSuspend() override;
- virtual void OnResume() override;
+ void OnSuspend() override;
+ void OnResume() override;
private:
const scoped_refptr<HttpNetworkSession> session_;
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 57ebdf7..c7c217d 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -42,68 +42,62 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
HttpNetworkTransaction(RequestPriority priority,
HttpNetworkSession* session);
- virtual ~HttpNetworkTransaction();
+ ~HttpNetworkTransaction() override;
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
-
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
// HttpStreamRequest::Delegate methods:
- virtual void OnStreamReady(const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override;
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override;
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override;
- virtual void OnStreamFailed(int status,
- const SSLConfig& used_ssl_config) override;
- virtual void OnCertificateError(int status,
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override;
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override;
+ void OnNeedsProxyAuth(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override;
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override;
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override;
- virtual void OnNeedsProxyAuth(
- const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override;
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override;
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override;
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override;
private:
friend class HttpNetworkTransactionSSLTest;
diff --git a/net/http/http_network_transaction_ssl_unittest.cc b/net/http/http_network_transaction_ssl_unittest.cc
index 7b95f79..a84076e 100644
--- a/net/http/http_network_transaction_ssl_unittest.cc
+++ b/net/http/http_network_transaction_ssl_unittest.cc
@@ -31,12 +31,10 @@ class TLS10SSLConfigService : public SSLConfigService {
ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1;
}
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = ssl_config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = ssl_config_; }
private:
- virtual ~TLS10SSLConfigService() {}
+ ~TLS10SSLConfigService() override {}
SSLConfig ssl_config_;
};
@@ -48,12 +46,10 @@ class TLS11SSLConfigService : public SSLConfigService {
ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1_1;
}
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = ssl_config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = ssl_config_; }
private:
- virtual ~TLS11SSLConfigService() {}
+ ~TLS11SSLConfigService() override {}
SSLConfig ssl_config_;
};
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index ca26d6f..e4a75b9 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -8191,20 +8191,20 @@ TEST_P(HttpNetworkTransactionTest, CancelDuringInitRequestBody) {
class FakeUploadElementReader : public UploadElementReader {
public:
FakeUploadElementReader() {}
- virtual ~FakeUploadElementReader() {}
+ ~FakeUploadElementReader() override {}
const CompletionCallback& callback() const { return callback_; }
// UploadElementReader overrides:
- virtual int Init(const CompletionCallback& callback) override {
+ int Init(const CompletionCallback& callback) override {
callback_ = callback;
return ERR_IO_PENDING;
}
- virtual uint64 GetContentLength() const override { return 0; }
- virtual uint64 BytesRemaining() const override { return 0; }
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override {
+ uint64 GetContentLength() const override { return 0; }
+ uint64 BytesRemaining() const override { return 0; }
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
@@ -9097,13 +9097,13 @@ TEST_P(HttpNetworkTransactionTest, StallAlternateProtocolForNpnSpdy) {
class CapturingProxyResolver : public ProxyResolver {
public:
CapturingProxyResolver() : ProxyResolver(false /* expects_pac_bytes */) {}
- virtual ~CapturingProxyResolver() {}
+ ~CapturingProxyResolver() override {}
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
ProxyServer proxy_server(ProxyServer::SCHEME_HTTP,
HostPortPair("myproxy", 80));
results->UseProxyServer(proxy_server);
@@ -9111,21 +9111,17 @@ class CapturingProxyResolver : public ProxyResolver {
return OK;
}
- virtual void CancelRequest(RequestHandle request) override {
- NOTREACHED();
- }
+ void CancelRequest(RequestHandle request) override { NOTREACHED(); }
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- NOTREACHED();
- }
+ void CancelSetPacScript() override { NOTREACHED(); }
- virtual int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&,
- const CompletionCallback& /*callback*/) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&,
+ const CompletionCallback& /*callback*/) override {
return OK;
}
@@ -10060,13 +10056,13 @@ class UrlRecordingHttpAuthHandlerMock : public HttpAuthHandlerMock {
public:
explicit UrlRecordingHttpAuthHandlerMock(GURL* url) : url_(url) {}
- virtual ~UrlRecordingHttpAuthHandlerMock() {}
+ ~UrlRecordingHttpAuthHandlerMock() override {}
protected:
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
*url_ = request->url;
return HttpAuthHandlerMock::GenerateAuthTokenImpl(
credentials, request, callback, auth_token);
@@ -11153,31 +11149,31 @@ class OneTimeCachingHostResolver : public net::HostResolver {
public:
explicit OneTimeCachingHostResolver(const HostPortPair& host_port)
: host_port_(host_port) {}
- virtual ~OneTimeCachingHostResolver() {}
+ ~OneTimeCachingHostResolver() override {}
RuleBasedHostResolverProc* rules() { return host_resolver_.rules(); }
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override {
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override {
return host_resolver_.Resolve(
info, priority, addresses, callback, out_req, net_log);
}
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override {
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override {
int rv = host_resolver_.ResolveFromCache(info, addresses, net_log);
if (rv == OK && info.host_port_pair().Equals(host_port_))
host_resolver_.GetHostCache()->clear();
return rv;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
host_resolver_.CancelRequest(req);
}
@@ -12202,92 +12198,81 @@ class FakeStream : public HttpStreamBase,
public base::SupportsWeakPtr<FakeStream> {
public:
explicit FakeStream(RequestPriority priority) : priority_(priority) {}
- virtual ~FakeStream() {}
+ ~FakeStream() override {}
RequestPriority priority() const { return priority_; }
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual void Close(bool not_reusable) override {}
+ void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override {
+ bool IsResponseBodyComplete() const override {
ADD_FAILURE();
return false;
}
- virtual bool CanFindEndOfResponse() const override {
- return false;
- }
+ bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override {
+ bool IsConnectionReused() const override {
ADD_FAILURE();
return false;
}
- virtual void SetConnectionReused() override {
- ADD_FAILURE();
- }
+ void SetConnectionReused() override { ADD_FAILURE(); }
- virtual bool IsConnectionReusable() const override {
+ bool IsConnectionReusable() const override {
ADD_FAILURE();
return false;
}
- virtual int64 GetTotalReceivedBytes() const override {
+ int64 GetTotalReceivedBytes() const override {
ADD_FAILURE();
return 0;
}
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override {
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
ADD_FAILURE();
return false;
}
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {
- ADD_FAILURE();
- }
+ void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); }
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
ADD_FAILURE();
}
- virtual bool IsSpdyHttpStream() const override {
+ bool IsSpdyHttpStream() const override {
ADD_FAILURE();
return false;
}
- virtual void Drain(HttpNetworkSession* session) override {
- ADD_FAILURE();
- }
+ void Drain(HttpNetworkSession* session) override { ADD_FAILURE(); }
- virtual void SetPriority(RequestPriority priority) override {
- priority_ = priority;
- }
+ void SetPriority(RequestPriority priority) override { priority_ = priority; }
private:
RequestPriority priority_;
@@ -12313,7 +12298,7 @@ class FakeStreamRequest : public HttpStreamRequest,
delegate_(delegate),
websocket_stream_create_helper_(create_helper) {}
- virtual ~FakeStreamRequest() {}
+ ~FakeStreamRequest() override {}
RequestPriority priority() const { return priority_; }
@@ -12333,32 +12318,23 @@ class FakeStreamRequest : public HttpStreamRequest,
return weak_stream;
}
- virtual int RestartTunnelWithProxyAuth(
- const AuthCredentials& credentials) override {
+ int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual LoadState GetLoadState() const override {
+ LoadState GetLoadState() const override {
ADD_FAILURE();
return LoadState();
}
- virtual void SetPriority(RequestPriority priority) override {
- priority_ = priority;
- }
+ void SetPriority(RequestPriority priority) override { priority_ = priority; }
- virtual bool was_npn_negotiated() const override {
- return false;
- }
+ bool was_npn_negotiated() const override { return false; }
- virtual NextProto protocol_negotiated() const override {
- return kProtoUnknown;
- }
+ NextProto protocol_negotiated() const override { return kProtoUnknown; }
- virtual bool using_spdy() const override {
- return false;
- }
+ bool using_spdy() const override { return false; }
private:
RequestPriority priority_;
@@ -12372,7 +12348,7 @@ class FakeStreamRequest : public HttpStreamRequest,
class FakeStreamFactory : public HttpStreamFactory {
public:
FakeStreamFactory() {}
- virtual ~FakeStreamFactory() {}
+ ~FakeStreamFactory() override {}
// Returns a WeakPtr<> to the last HttpStreamRequest returned by
// RequestStream() (which may be NULL if it was destroyed already).
@@ -12380,19 +12356,18 @@ class FakeStreamFactory : public HttpStreamFactory {
return last_stream_request_;
}
- virtual HttpStreamRequest* RequestStream(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override {
+ HttpStreamRequest* RequestStream(const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log) override {
FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
last_stream_request_ = fake_request->AsWeakPtr();
return fake_request;
}
- virtual HttpStreamRequest* RequestWebSocketHandshakeStream(
+ HttpStreamRequest* RequestWebSocketHandshakeStream(
const HttpRequestInfo& info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -12406,15 +12381,15 @@ class FakeStreamFactory : public HttpStreamFactory {
return fake_request;
}
- virtual void PreconnectStreams(int num_streams,
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config) override {
+ void PreconnectStreams(int num_streams,
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config) override {
ADD_FAILURE();
}
- virtual const HostMappingRules* GetHostMappingRules() const override {
+ const HostMappingRules* GetHostMappingRules() const override {
ADD_FAILURE();
return NULL;
}
@@ -12430,21 +12405,21 @@ class FakeStreamFactory : public HttpStreamFactory {
class FakeWebSocketStreamCreateHelper :
public WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override {
NOTREACHED();
return NULL;
}
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& session,
bool use_relative_url) override {
NOTREACHED();
return NULL;
};
- virtual ~FakeWebSocketStreamCreateHelper() {}
+ ~FakeWebSocketStreamCreateHelper() override {}
virtual scoped_ptr<WebSocketStream> Upgrade() {
NOTREACHED();
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index 87eeda4..e4f8382 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -52,42 +52,41 @@ class HttpProxyClientSocket : public ProxyClientSocket {
bool is_https_proxy);
// On destruction Disconnect() is called.
- virtual ~HttpProxyClientSocket();
+ ~HttpProxyClientSocket() override;
// ProxyClientSocket implementation.
- virtual const HttpResponseInfo* GetConnectResponseInfo() const override;
- virtual HttpStream* CreateConnectResponseStream() override;
- virtual int RestartWithAuth(const CompletionCallback& callback) override;
- virtual const scoped_refptr<HttpAuthController>& GetAuthController() const
- override;
- virtual bool IsUsingSpdy() const override;
- virtual NextProto GetProtocolNegotiated() const override;
+ const HttpResponseInfo* GetConnectResponseInfo() const override;
+ HttpStream* CreateConnectResponseStream() override;
+ int RestartWithAuth(const CompletionCallback& callback) override;
+ const scoped_refptr<HttpAuthController>& GetAuthController() const override;
+ bool IsUsingSpdy() const override;
+ NextProto GetProtocolNegotiated() const override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
private:
enum State {
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 9dac090..988191b 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -111,12 +111,12 @@ class HttpProxyConnectJob : public ConnectJob {
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~HttpProxyConnectJob();
+ ~HttpProxyConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
- virtual void GetAdditionalErrorState(ClientSocketHandle* handle) override;
+ void GetAdditionalErrorState(ClientSocketHandle* handle) override;
private:
enum State {
@@ -157,7 +157,7 @@ class HttpProxyConnectJob : public ConnectJob {
// that the tunnel needs authentication credentials, the socket will be
// returned in this case, and must be release back to the pool; or
// a standard net error code will be returned.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<HttpProxySocketParams> params_;
TransportClientSocketPool* const transport_pool_;
@@ -197,59 +197,57 @@ class NET_EXPORT_PRIVATE HttpProxyClientSocketPool
const ProxyDelegate* proxy_delegate,
NetLog* net_log);
- virtual ~HttpProxyClientSocketPool();
+ ~HttpProxyClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* connect_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* connect_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
- virtual void FlushWithError(int error) override;
+ void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
+ int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// LowerLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
// HigherLayeredPool implementation.
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
private:
typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
@@ -264,12 +262,12 @@ class NET_EXPORT_PRIVATE HttpProxyClientSocketPool
NetLog* net_log);
// ClientSocketPoolBase::ConnectJobFactory methods.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 98b7322..d256646 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -66,8 +66,7 @@ class TestProxyDelegate : public ProxyDelegate {
on_tunnel_headers_received_called_(false) {
}
- virtual ~TestProxyDelegate() override {
- }
+ ~TestProxyDelegate() override {}
bool on_before_tunnel_request_called() const {
return on_before_tunnel_request_called_;
@@ -89,31 +88,26 @@ class TestProxyDelegate : public ProxyDelegate {
}
// ProxyDelegate:
- virtual void OnResolveProxy(const GURL& url,
- int load_flags,
- const ProxyService& proxy_service,
- ProxyInfo* result) override {
- }
+ void OnResolveProxy(const GURL& url,
+ int load_flags,
+ const ProxyService& proxy_service,
+ ProxyInfo* result) override {}
- virtual void OnFallback(const ProxyServer& bad_proxy,
- int net_error) override {
- }
+ void OnFallback(const ProxyServer& bad_proxy, int net_error) override {}
- virtual void OnBeforeSendHeaders(URLRequest* request,
- const ProxyInfo& proxy_info,
- HttpRequestHeaders* headers) override {
- }
+ void OnBeforeSendHeaders(URLRequest* request,
+ const ProxyInfo& proxy_info,
+ HttpRequestHeaders* headers) override {}
- virtual void OnBeforeTunnelRequest(
- const net::HostPortPair& proxy_server,
- net::HttpRequestHeaders* extra_headers) override {
+ void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server,
+ net::HttpRequestHeaders* extra_headers) override {
on_before_tunnel_request_called_ = true;
if (extra_headers) {
extra_headers->SetHeader("Foo", proxy_server.ToString());
}
}
- virtual void OnTunnelHeadersReceived(
+ void OnTunnelHeadersReceived(
const net::HostPortPair& origin,
const net::HostPortPair& proxy_server,
const net::HttpResponseHeaders& response_headers) override {
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 5a8713c..cb2f1a9 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -74,59 +74,56 @@ class MockHttpStream : public HttpStream {
is_last_chunk_zero_size_(false),
is_complete_(false),
weak_factory_(this) {}
- virtual ~MockHttpStream() {}
+ ~MockHttpStream() override {}
// HttpStream implementation.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual UploadProgress GetUploadProgress() const override {
- return UploadProgress();
- }
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ UploadProgress GetUploadProgress() const override { return UploadProgress(); }
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual bool CanFindEndOfResponse() const override { return true; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {}
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {}
+ bool CanFindEndOfResponse() const override { return true; }
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
+ bool IsConnectionReusable() const override { return false; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
+ void GetSSLInfo(SSLInfo* ssl_info) override {}
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
// Mocked API
- virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override {
CHECK(!closed_);
closed_ = true;
result_waiter_->set_result(not_reusable);
}
- virtual HttpStream* RenewStreamForAuth() override {
- return NULL;
- }
+ HttpStream* RenewStreamForAuth() override { return NULL; }
- virtual bool IsResponseBodyComplete() const override { return is_complete_; }
+ bool IsResponseBodyComplete() const override { return is_complete_; }
- virtual bool IsSpdyHttpStream() const override { return false; }
+ bool IsSpdyHttpStream() const override { return false; }
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override { return false; }
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
+ return false;
+ }
- virtual void Drain(HttpNetworkSession*) override {}
+ void Drain(HttpNetworkSession*) override {}
- virtual void SetPriority(RequestPriority priority) override {}
+ void SetPriority(RequestPriority priority) override {}
// Methods to tweak/observer mock behavior:
void set_stall_reads_forever() { stall_reads_forever_ = true; }
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index b68db36..7b5f2f6 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -30,7 +30,7 @@ class NET_EXPORT HttpServerPropertiesImpl
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
HttpServerPropertiesImpl();
- virtual ~HttpServerPropertiesImpl();
+ ~HttpServerPropertiesImpl() override;
// Initializes |spdy_servers_map_| with the servers (host/port) from
// |spdy_servers| that either support SPDY or not.
@@ -69,94 +69,89 @@ class NET_EXPORT HttpServerPropertiesImpl
// -----------------------------
// Gets a weak pointer for this object.
- virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
+ base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
// Deletes all data.
- virtual void Clear() override;
+ void Clear() override;
// Returns true if |server| supports SPDY.
- virtual bool SupportsSpdy(const HostPortPair& server) override;
+ bool SupportsSpdy(const HostPortPair& server) override;
// Add |server| into the persistent store.
- virtual void SetSupportsSpdy(const HostPortPair& server,
- bool support_spdy) override;
+ void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
// Returns true if |server| has an Alternate-Protocol header.
- virtual bool HasAlternateProtocol(const HostPortPair& server) override;
+ bool HasAlternateProtocol(const HostPortPair& server) override;
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
- virtual AlternateProtocolInfo GetAlternateProtocol(
+ AlternateProtocolInfo GetAlternateProtocol(
const HostPortPair& server) override;
// Sets the Alternate-Protocol for |server|.
- virtual void SetAlternateProtocol(
- const HostPortPair& server,
- uint16 alternate_port,
- AlternateProtocol alternate_protocol,
- double probability) override;
+ void SetAlternateProtocol(const HostPortPair& server,
+ uint16 alternate_port,
+ AlternateProtocol alternate_protocol,
+ double probability) override;
// Sets the Alternate-Protocol for |server| to be BROKEN.
- virtual void SetBrokenAlternateProtocol(const HostPortPair& server) override;
+ void SetBrokenAlternateProtocol(const HostPortPair& server) override;
// Returns true if Alternate-Protocol for |server| was recently BROKEN.
- virtual bool WasAlternateProtocolRecentlyBroken(
- const HostPortPair& server) override;
+ bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override;
// Confirms that Alternate-Protocol for |server| is working.
- virtual void ConfirmAlternateProtocol(const HostPortPair& server) override;
+ void ConfirmAlternateProtocol(const HostPortPair& server) override;
// Clears the Alternate-Protocol for |server|.
- virtual void ClearAlternateProtocol(const HostPortPair& server) override;
+ void ClearAlternateProtocol(const HostPortPair& server) override;
// Returns all Alternate-Protocol mappings.
- virtual const AlternateProtocolMap& alternate_protocol_map() const override;
+ const AlternateProtocolMap& alternate_protocol_map() const override;
- virtual void SetAlternateProtocolExperiment(
+ void SetAlternateProtocolExperiment(
AlternateProtocolExperiment experiment) override;
- virtual void SetAlternateProtocolProbabilityThreshold(
- double threshold) override;
+ void SetAlternateProtocolProbabilityThreshold(double threshold) override;
- virtual AlternateProtocolExperiment GetAlternateProtocolExperiment()
- const override;
+ AlternateProtocolExperiment GetAlternateProtocolExperiment() const override;
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
- virtual const SettingsMap& GetSpdySettings(
+ const SettingsMap& GetSpdySettings(
const HostPortPair& host_port_pair) override;
// Saves an individual SPDY setting for a host. Returns true if SPDY setting
// is to be persisted.
- virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
- SpdySettingsIds id,
- SpdySettingsFlags flags,
- uint32 value) override;
+ bool SetSpdySetting(const HostPortPair& host_port_pair,
+ SpdySettingsIds id,
+ SpdySettingsFlags flags,
+ uint32 value) override;
// Clears all entries in |spdy_settings_map_| for a host.
- virtual void ClearSpdySettings(const HostPortPair& host_port_pair) override;
+ void ClearSpdySettings(const HostPortPair& host_port_pair) override;
// Clears all entries in |spdy_settings_map_|.
- virtual void ClearAllSpdySettings() override;
+ void ClearAllSpdySettings() override;
// Returns all persistent SPDY settings.
- virtual const SpdySettingsMap& spdy_settings_map() const override;
+ const SpdySettingsMap& spdy_settings_map() const override;
// Methods for SupportsQuic.
- virtual SupportsQuic GetSupportsQuic(
+ SupportsQuic GetSupportsQuic(
const HostPortPair& host_port_pair) const override;
- virtual void SetSupportsQuic(const HostPortPair& host_port_pair,
- bool used_quic,
- const std::string& address) override;
+ void SetSupportsQuic(const HostPortPair& host_port_pair,
+ bool used_quic,
+ const std::string& address) override;
- virtual const SupportsQuicMap& supports_quic_map() const override;
+ const SupportsQuicMap& supports_quic_map() const override;
// Methods for NetworkStats.
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
- NetworkStats stats) override;
+ void SetServerNetworkStats(const HostPortPair& host_port_pair,
+ NetworkStats stats) override;
- virtual const NetworkStats* GetServerNetworkStats(
+ const NetworkStats* GetServerNetworkStats(
const HostPortPair& host_port_pair) const override;
private:
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index bcfe320..79506c4 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -57,7 +57,7 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
PrefService* pref_service,
const char* pref_path,
scoped_refptr<base::SequencedTaskRunner> network_task_runner);
- virtual ~HttpServerPropertiesManager();
+ ~HttpServerPropertiesManager() override;
// Initialize on Network thread.
void InitializeOnNetworkThread();
@@ -78,95 +78,90 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
// ----------------------------------
// Gets a weak pointer for this object.
- virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
+ base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
// Deletes all data. Works asynchronously.
- virtual void Clear() override;
+ void Clear() override;
// Returns true if |server| supports SPDY. Should only be called from IO
// thread.
- virtual bool SupportsSpdy(const HostPortPair& server) override;
+ bool SupportsSpdy(const HostPortPair& server) override;
// Add |server| as the SPDY server which supports SPDY protocol into the
// persisitent store. Should only be called from IO thread.
- virtual void SetSupportsSpdy(const HostPortPair& server,
- bool support_spdy) override;
+ void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
// Returns true if |server| has an Alternate-Protocol header.
- virtual bool HasAlternateProtocol(const HostPortPair& server) override;
+ bool HasAlternateProtocol(const HostPortPair& server) override;
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
- virtual AlternateProtocolInfo GetAlternateProtocol(
+ AlternateProtocolInfo GetAlternateProtocol(
const HostPortPair& server) override;
// Sets the Alternate-Protocol for |server|.
- virtual void SetAlternateProtocol(
- const HostPortPair& server,
- uint16 alternate_port,
- AlternateProtocol alternate_protocol,
- double alternate_probability) override;
+ void SetAlternateProtocol(const HostPortPair& server,
+ uint16 alternate_port,
+ AlternateProtocol alternate_protocol,
+ double alternate_probability) override;
// Sets the Alternate-Protocol for |server| to be BROKEN.
- virtual void SetBrokenAlternateProtocol(const HostPortPair& server) override;
+ void SetBrokenAlternateProtocol(const HostPortPair& server) override;
// Returns true if Alternate-Protocol for |server| was recently BROKEN.
- virtual bool WasAlternateProtocolRecentlyBroken(
- const HostPortPair& server) override;
+ bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override;
// Confirms that Alternate-Protocol for |server| is working.
- virtual void ConfirmAlternateProtocol(const HostPortPair& server) override;
+ void ConfirmAlternateProtocol(const HostPortPair& server) override;
// Clears the Alternate-Protocol for |server|.
- virtual void ClearAlternateProtocol(const HostPortPair& server) override;
+ void ClearAlternateProtocol(const HostPortPair& server) override;
// Returns all Alternate-Protocol mappings.
- virtual const AlternateProtocolMap& alternate_protocol_map() const override;
+ const AlternateProtocolMap& alternate_protocol_map() const override;
- virtual void SetAlternateProtocolExperiment(
+ void SetAlternateProtocolExperiment(
AlternateProtocolExperiment experiment) override;
- virtual void SetAlternateProtocolProbabilityThreshold(
- double threshold) override;
+ void SetAlternateProtocolProbabilityThreshold(double threshold) override;
- virtual AlternateProtocolExperiment GetAlternateProtocolExperiment()
- const override;
+ AlternateProtocolExperiment GetAlternateProtocolExperiment() const override;
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
- virtual const SettingsMap& GetSpdySettings(
+ const SettingsMap& GetSpdySettings(
const HostPortPair& host_port_pair) override;
// Saves an individual SPDY setting for a host. Returns true if SPDY setting
// is to be persisted.
- virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
- SpdySettingsIds id,
- SpdySettingsFlags flags,
- uint32 value) override;
+ bool SetSpdySetting(const HostPortPair& host_port_pair,
+ SpdySettingsIds id,
+ SpdySettingsFlags flags,
+ uint32 value) override;
// Clears all SPDY settings for a host.
- virtual void ClearSpdySettings(const HostPortPair& host_port_pair) override;
+ void ClearSpdySettings(const HostPortPair& host_port_pair) override;
// Clears all SPDY settings for all hosts.
- virtual void ClearAllSpdySettings() override;
+ void ClearAllSpdySettings() override;
// Returns all SPDY persistent settings.
- virtual const SpdySettingsMap& spdy_settings_map() const override;
+ const SpdySettingsMap& spdy_settings_map() const override;
// Methods for SupportsQuic.
- virtual SupportsQuic GetSupportsQuic(
+ SupportsQuic GetSupportsQuic(
const HostPortPair& host_port_pair) const override;
- virtual void SetSupportsQuic(const HostPortPair& host_port_pair,
- bool used_quic,
- const std::string& address) override;
+ void SetSupportsQuic(const HostPortPair& host_port_pair,
+ bool used_quic,
+ const std::string& address) override;
- virtual const SupportsQuicMap& supports_quic_map() const override;
+ const SupportsQuicMap& supports_quic_map() const override;
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
- NetworkStats stats) override;
+ void SetServerNetworkStats(const HostPortPair& host_port_pair,
+ NetworkStats stats) override;
- virtual const NetworkStats* GetServerNetworkStats(
+ const NetworkStats* GetServerNetworkStats(
const HostPortPair& host_port_pair) const override;
protected:
diff --git a/net/http/http_stream.h b/net/http/http_stream.h
index 22362e2..3dda50b 100644
--- a/net/http/http_stream.h
+++ b/net/http/http_stream.h
@@ -24,7 +24,7 @@ class IOBuffer;
class NET_EXPORT_PRIVATE HttpStream : public HttpStreamBase {
public:
HttpStream() {}
- virtual ~HttpStream() {}
+ ~HttpStream() override {}
// Queries the UploadDataStream for its progress (bytes sent).
virtual UploadProgress GetUploadProgress() const = 0;
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index 91a59c2..8ee03a6 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -29,18 +29,17 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
// RequestWebSocketHandshakeStream may only be called if |for_websockets|
// is true.
HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets);
- virtual ~HttpStreamFactoryImpl();
+ ~HttpStreamFactoryImpl() override;
// HttpStreamFactory interface
- virtual HttpStreamRequest* RequestStream(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override;
-
- virtual HttpStreamRequest* RequestWebSocketHandshakeStream(
+ HttpStreamRequest* RequestStream(const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log) override;
+
+ HttpStreamRequest* RequestWebSocketHandshakeStream(
const HttpRequestInfo& info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -49,12 +48,12 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
const BoundNetLog& net_log) override;
- virtual void PreconnectStreams(int num_streams,
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config) override;
- virtual const HostMappingRules* GetHostMappingRules() const override;
+ void PreconnectStreams(int num_streams,
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config) override;
+ const HostMappingRules* GetHostMappingRules() const override;
size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); }
diff --git a/net/http/http_stream_factory_impl_request.h b/net/http/http_stream_factory_impl_request.h
index 3ab7d95..70def25 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -27,7 +27,7 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
const BoundNetLog& net_log);
- virtual ~Request();
+ ~Request() override;
// The GURL from the HttpRequestInfo the started the Request.
const GURL& url() const { return url_; }
@@ -98,13 +98,12 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
// HttpStreamRequest methods.
- virtual int RestartTunnelWithProxyAuth(
- const AuthCredentials& credentials) override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual LoadState GetLoadState() const override;
- virtual bool was_npn_negotiated() const override;
- virtual NextProto protocol_negotiated() const override;
- virtual bool using_spdy() const override;
+ int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override;
+ void SetPriority(RequestPriority priority) override;
+ LoadState GetLoadState() const override;
+ bool was_npn_negotiated() const override;
+ NextProto protocol_negotiated() const override;
+ bool using_spdy() const override;
private:
// Used to orphan all jobs in |jobs_| other than |job| which becomes "bound"
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index 422abd0..e204c61 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -28,34 +28,30 @@ class DoNothingRequestDelegate : public HttpStreamRequest::Delegate {
public:
DoNothingRequestDelegate() {}
- virtual ~DoNothingRequestDelegate() {}
+ ~DoNothingRequestDelegate() override {}
// HttpStreamRequest::Delegate
- virtual void OnStreamReady(
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override {}
- virtual void OnStreamFailed(
- int status,
- const SSLConfig& used_ssl_config) override {}
- virtual void OnCertificateError(
- int status,
- const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override {}
- virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override {}
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override {}
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {}
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override {}
+ void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override {}
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override {}
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
};
} // namespace
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index c1c42c3..1efbd468 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -52,51 +52,49 @@ class MockWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {
explicit MockWebSocketHandshakeStream(StreamType type) : type_(type) {}
- virtual ~MockWebSocketHandshakeStream() {}
+ ~MockWebSocketHandshakeStream() override {}
StreamType type() const {
return type_;
}
// HttpStreamBase methods
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override { return false; }
- virtual bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
- virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
- override {
+ void Close(bool not_reusable) override {}
+ bool IsResponseBodyComplete() const override { return false; }
+ bool CanFindEndOfResponse() const override { return false; }
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
+ bool IsConnectionReusable() const override { return false; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
return false;
}
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {}
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {}
- virtual bool IsSpdyHttpStream() const override { return false; }
- virtual void Drain(HttpNetworkSession* session) override {}
- virtual void SetPriority(RequestPriority priority) override {}
-
- virtual scoped_ptr<WebSocketStream> Upgrade() override {
+ void GetSSLInfo(SSLInfo* ssl_info) override {}
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
+ bool IsSpdyHttpStream() const override { return false; }
+ void Drain(HttpNetworkSession* session) override {}
+ void SetPriority(RequestPriority priority) override {}
+
+ scoped_ptr<WebSocketStream> Upgrade() override {
return scoped_ptr<WebSocketStream>();
}
@@ -124,7 +122,7 @@ class MockHttpStreamFactoryImplForPreconnect : public HttpStreamFactoryImpl {
private:
// HttpStreamFactoryImpl methods.
- virtual void OnPreconnectsCompleteInternal() override {
+ void OnPreconnectsCompleteInternal() override {
preconnect_done_ = true;
if (waiting_for_preconnect_)
base::MessageLoop::current()->Quit();
@@ -142,10 +140,9 @@ class StreamRequestWaiter : public HttpStreamRequest::Delegate {
// HttpStreamRequest::Delegate
- virtual void OnStreamReady(
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {
stream_done_ = true;
if (waiting_for_stream_)
base::MessageLoop::current()->Quit();
@@ -154,7 +151,7 @@ class StreamRequestWaiter : public HttpStreamRequest::Delegate {
used_proxy_info_ = used_proxy_info;
}
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override {
@@ -166,27 +163,24 @@ class StreamRequestWaiter : public HttpStreamRequest::Delegate {
used_proxy_info_ = used_proxy_info;
}
- virtual void OnStreamFailed(
- int status,
- const SSLConfig& used_ssl_config) override {}
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {}
- virtual void OnCertificateError(
- int status,
- const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override {}
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override {}
- virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override {}
+ void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override {}
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override {}
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override {}
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
void WaitForStream() {
while (!stream_done_) {
@@ -232,7 +226,7 @@ class WebSocketSpdyHandshakeStream : public MockWebSocketHandshakeStream {
: MockWebSocketHandshakeStream(kStreamTypeSpdy),
spdy_session_(spdy_session) {}
- virtual ~WebSocketSpdyHandshakeStream() {}
+ ~WebSocketSpdyHandshakeStream() override {}
SpdySession* spdy_session() { return spdy_session_.get(); }
@@ -247,7 +241,7 @@ class WebSocketBasicHandshakeStream : public MockWebSocketHandshakeStream {
: MockWebSocketHandshakeStream(kStreamTypeBasic),
connection_(connection.Pass()) {}
- virtual ~WebSocketBasicHandshakeStream() {
+ ~WebSocketBasicHandshakeStream() override {
connection_->socket()->Disconnect();
}
@@ -260,15 +254,15 @@ class WebSocketBasicHandshakeStream : public MockWebSocketHandshakeStream {
class WebSocketStreamCreateHelper
: public WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual ~WebSocketStreamCreateHelper() {}
+ ~WebSocketStreamCreateHelper() override {}
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override {
return new WebSocketBasicHandshakeStream(connection.Pass());
}
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& spdy_session,
bool use_relative_url) override {
return new WebSocketSpdyHandshakeStream(spdy_session);
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 4c1041b..8cd876f 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -162,7 +162,7 @@ class HttpStreamParser::SeekableIOBuffer : public IOBuffer {
int capacity() const { return capacity_; };
private:
- virtual ~SeekableIOBuffer() {
+ ~SeekableIOBuffer() override {
// data_ will be deleted in IOBuffer::~IOBuffer().
data_ = real_data_;
}
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index e0f5bda..e6e8312 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -168,61 +168,57 @@ class MockNetworkTransaction
public:
MockNetworkTransaction(net::RequestPriority priority,
MockNetworkLayer* factory);
- virtual ~MockNetworkTransaction();
+ ~MockNetworkTransaction() override;
- virtual int Start(const net::HttpRequestInfo* request,
- const net::CompletionCallback& callback,
- const net::BoundNetLog& net_log) override;
+ int Start(const net::HttpRequestInfo* request,
+ const net::CompletionCallback& callback,
+ const net::BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
+ int RestartIgnoringLastError(
const net::CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- net::X509Certificate* client_cert,
- const net::CompletionCallback& callback) override;
+ int RestartWithCertificate(net::X509Certificate* client_cert,
+ const net::CompletionCallback& callback) override;
- virtual int RestartWithAuth(
- const net::AuthCredentials& credentials,
- const net::CompletionCallback& callback) override;
+ int RestartWithAuth(const net::AuthCredentials& credentials,
+ const net::CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
+ bool IsReadyToRestartForAuth() override;
- virtual int Read(net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
+ int Read(net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
- virtual void StopCaching() override;
+ void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- net::HttpRequestHeaders* headers) const override;
+ bool GetFullRequestHeaders(net::HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
+ void DoneReading() override;
- virtual const net::HttpResponseInfo* GetResponseInfo() const override;
+ const net::HttpResponseInfo* GetResponseInfo() const override;
- virtual net::LoadState GetLoadState() const override;
+ net::LoadState GetLoadState() const override;
- virtual net::UploadProgress GetUploadProgress() const override;
+ net::UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(
- net::QuicServerInfo* quic_server_info) override;
+ void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- net::LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(net::LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(net::RequestPriority priority) override;
+ void SetPriority(net::RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ void SetWebSocketHandshakeStreamCreateHelper(
CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
CreateHelper* websocket_handshake_stream_create_helper() {
return websocket_handshake_stream_create_helper_;
@@ -260,7 +256,7 @@ class MockNetworkLayer : public net::HttpTransactionFactory,
public base::SupportsWeakPtr<MockNetworkLayer> {
public:
MockNetworkLayer();
- virtual ~MockNetworkLayer();
+ ~MockNetworkLayer() override;
int transaction_count() const { return transaction_count_; }
bool done_reading_called() const { return done_reading_called_; }
@@ -290,11 +286,10 @@ class MockNetworkLayer : public net::HttpTransactionFactory,
}
// net::HttpTransactionFactory:
- virtual int CreateTransaction(
- net::RequestPriority priority,
- scoped_ptr<net::HttpTransaction>* trans) override;
- virtual net::HttpCache* GetCache() override;
- virtual net::HttpNetworkSession* GetSession() override;
+ int CreateTransaction(net::RequestPriority priority,
+ scoped_ptr<net::HttpTransaction>* trans) override;
+ net::HttpCache* GetCache() override;
+ net::HttpNetworkSession* GetSession() override;
private:
int transaction_count_;
diff --git a/net/http/mock_allow_url_security_manager.h b/net/http/mock_allow_url_security_manager.h
index 3e19f9b..2a0b205 100644
--- a/net/http/mock_allow_url_security_manager.h
+++ b/net/http/mock_allow_url_security_manager.h
@@ -14,10 +14,10 @@ namespace net {
class MockAllowURLSecurityManager : public URLSecurityManager {
public:
MockAllowURLSecurityManager();
- virtual ~MockAllowURLSecurityManager();
+ ~MockAllowURLSecurityManager() override;
- virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
- virtual bool CanDelegate(const GURL& auth_origin) const override;
+ bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
+ bool CanDelegate(const GURL& auth_origin) const override;
private:
DISALLOW_COPY_AND_ASSIGN(MockAllowURLSecurityManager);
diff --git a/net/http/mock_gssapi_library_posix.h b/net/http/mock_gssapi_library_posix.h
index cbd35e5..17e0d47 100644
--- a/net/http/mock_gssapi_library_posix.h
+++ b/net/http/mock_gssapi_library_posix.h
@@ -73,7 +73,7 @@ class MockGSSAPILibrary : public GSSAPILibrary {
};
MockGSSAPILibrary();
- virtual ~MockGSSAPILibrary();
+ ~MockGSSAPILibrary() override;
// Establishes an expectation for a |init_sec_context()| call.
//
@@ -122,67 +122,58 @@ class MockGSSAPILibrary : public GSSAPILibrary {
// Initializes the library, including any necessary dynamic libraries.
// This is done separately from construction (which happens at startup time)
// in order to delay work until the class is actually needed.
- virtual bool Init() override;
+ bool Init() override;
// These methods match the ones in the GSSAPI library.
- virtual OM_uint32 import_name(
- OM_uint32* minor_status,
- const gss_buffer_t input_name_buffer,
- const gss_OID input_name_type,
- gss_name_t* output_name) override;
- virtual OM_uint32 release_name(
- OM_uint32* minor_status,
- gss_name_t* input_name) override;
- virtual OM_uint32 release_buffer(
- OM_uint32* minor_status,
- gss_buffer_t buffer) override;
- virtual OM_uint32 display_name(
- OM_uint32* minor_status,
- const gss_name_t input_name,
- gss_buffer_t output_name_buffer,
- gss_OID* output_name_type) override;
- virtual OM_uint32 display_status(
- OM_uint32* minor_status,
- OM_uint32 status_value,
- int status_type,
- const gss_OID mech_type,
- OM_uint32* message_contex,
- gss_buffer_t status_string) override;
- virtual OM_uint32 init_sec_context(
- OM_uint32* minor_status,
- const gss_cred_id_t initiator_cred_handle,
- gss_ctx_id_t* context_handle,
- const gss_name_t target_name,
- const gss_OID mech_type,
- OM_uint32 req_flags,
- OM_uint32 time_req,
- const gss_channel_bindings_t input_chan_bindings,
- const gss_buffer_t input_token,
- gss_OID* actual_mech_type,
- gss_buffer_t output_token,
- OM_uint32* ret_flags,
- OM_uint32* time_rec) override;
- virtual OM_uint32 wrap_size_limit(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- int conf_req_flag,
- gss_qop_t qop_req,
- OM_uint32 req_output_size,
- OM_uint32* max_input_size) override;
- virtual OM_uint32 delete_sec_context(
- OM_uint32* minor_status,
- gss_ctx_id_t* context_handle,
- gss_buffer_t output_token) override;
- virtual OM_uint32 inquire_context(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- gss_name_t* src_name,
- gss_name_t* targ_name,
- OM_uint32* lifetime_rec,
- gss_OID* mech_type,
- OM_uint32* ctx_flags,
- int* locally_initiated,
- int* open) override;
+ OM_uint32 import_name(OM_uint32* minor_status,
+ const gss_buffer_t input_name_buffer,
+ const gss_OID input_name_type,
+ gss_name_t* output_name) override;
+ OM_uint32 release_name(OM_uint32* minor_status,
+ gss_name_t* input_name) override;
+ OM_uint32 release_buffer(OM_uint32* minor_status,
+ gss_buffer_t buffer) override;
+ OM_uint32 display_name(OM_uint32* minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t output_name_buffer,
+ gss_OID* output_name_type) override;
+ OM_uint32 display_status(OM_uint32* minor_status,
+ OM_uint32 status_value,
+ int status_type,
+ const gss_OID mech_type,
+ OM_uint32* message_contex,
+ gss_buffer_t status_string) override;
+ OM_uint32 init_sec_context(OM_uint32* minor_status,
+ const gss_cred_id_t initiator_cred_handle,
+ gss_ctx_id_t* context_handle,
+ const gss_name_t target_name,
+ const gss_OID mech_type,
+ OM_uint32 req_flags,
+ OM_uint32 time_req,
+ const gss_channel_bindings_t input_chan_bindings,
+ const gss_buffer_t input_token,
+ gss_OID* actual_mech_type,
+ gss_buffer_t output_token,
+ OM_uint32* ret_flags,
+ OM_uint32* time_rec) override;
+ OM_uint32 wrap_size_limit(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ int conf_req_flag,
+ gss_qop_t qop_req,
+ OM_uint32 req_output_size,
+ OM_uint32* max_input_size) override;
+ OM_uint32 delete_sec_context(OM_uint32* minor_status,
+ gss_ctx_id_t* context_handle,
+ gss_buffer_t output_token) override;
+ OM_uint32 inquire_context(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ gss_name_t* src_name,
+ gss_name_t* targ_name,
+ OM_uint32* lifetime_rec,
+ gss_OID* mech_type,
+ OM_uint32* ctx_flags,
+ int* locally_initiated,
+ int* open) override;
private:
FRIEND_TEST_ALL_PREFIXES(HttpAuthGSSAPIPOSIXTest, GSSAPICycle);
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index 325454e..4ca542e 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -459,8 +459,8 @@ int MockDiskCache::DoomEntriesSince(const base::Time initial_time,
class MockDiskCache::NotImplementedIterator : public Iterator {
public:
- virtual int OpenNextEntry(disk_cache::Entry** next_entry,
- const net::CompletionCallback& callback) override {
+ int OpenNextEntry(disk_cache::Entry** next_entry,
+ const net::CompletionCallback& callback) override {
return net::ERR_NOT_IMPLEMENTED;
}
};
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index 9b2caf5..7e3a67c 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -25,28 +25,38 @@ class MockDiskEntry : public disk_cache::Entry,
bool is_doomed() const { return doomed_; }
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int WriteSparseData(
- int64 offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int GetAvailableRange(
- int64 offset, int len, int64* start,
- const net::CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const net::CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(
const net::CompletionCallback& completion_callback) override;
// Fail most subsequent requests.
@@ -63,7 +73,7 @@ class MockDiskEntry : public disk_cache::Entry,
friend class base::RefCounted<MockDiskEntry>;
struct CallbackInfo;
- virtual ~MockDiskEntry();
+ ~MockDiskEntry() override;
// Unlike the callbacks for MockHttpTransaction, we want this one to run even
// if the consumer called Close on the MockDiskEntry. We achieve that by
@@ -96,28 +106,28 @@ class MockDiskEntry : public disk_cache::Entry,
class MockDiskCache : public disk_cache::Backend {
public:
MockDiskCache();
- virtual ~MockDiskCache();
-
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const net::CompletionCallback& callback) override;
- virtual int DoomAllEntries(const net::CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(
- base::Time initial_time,
- base::Time end_time,
- const net::CompletionCallback& callback) override;
- virtual int DoomEntriesSince(
- base::Time initial_time,
- const net::CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(
- std::vector<std::pair<std::string, std::string> >* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ ~MockDiskCache() override;
+
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const net::CompletionCallback& callback) override;
+ int DoomAllEntries(const net::CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const net::CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const net::CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(
+ std::vector<std::pair<std::string, std::string>>* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
// Returns number of times a cache entry was successfully opened.
int open_count() const { return open_count_; }
@@ -156,9 +166,9 @@ class MockDiskCache : public disk_cache::Backend {
class MockBackendFactory : public net::HttpCache::BackendFactory {
public:
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
};
class MockHttpCache {
@@ -210,26 +220,27 @@ class MockHttpCache {
// This version of the disk cache doesn't invoke CreateEntry callbacks.
class MockDiskCacheNoCB : public MockDiskCache {
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
};
class MockBackendNoCbFactory : public net::HttpCache::BackendFactory {
public:
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
};
// This backend factory allows us to control the backend instantiation.
class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
public:
MockBlockingBackendFactory();
- virtual ~MockBlockingBackendFactory();
+ ~MockBlockingBackendFactory() override;
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
// Completes the backend creation. Any blocked call will be notified via the
// provided callback.
diff --git a/net/http/proxy_client_socket.h b/net/http/proxy_client_socket.h
index da255f3..aa59038 100644
--- a/net/http/proxy_client_socket.h
+++ b/net/http/proxy_client_socket.h
@@ -25,7 +25,7 @@ class HttpAuthController;
class NET_EXPORT_PRIVATE ProxyClientSocket : public StreamSocket {
public:
ProxyClientSocket() {}
- virtual ~ProxyClientSocket() {}
+ ~ProxyClientSocket() override {}
// Returns the HttpResponseInfo (including HTTP Headers) from
// the response to the CONNECT request.
diff --git a/net/http/proxy_connect_redirect_http_stream.h b/net/http/proxy_connect_redirect_http_stream.h
index ddaf9b7..701d18d 100644
--- a/net/http/proxy_connect_redirect_http_stream.h
+++ b/net/http/proxy_connect_redirect_http_stream.h
@@ -20,52 +20,50 @@ class ProxyConnectRedirectHttpStream : public HttpStream {
// GetLoadTimingInfo(), or NULL if there is none. Does not take
// ownership of |load_timing_info|.
explicit ProxyConnectRedirectHttpStream(LoadTimingInfo* load_timing_info);
- virtual ~ProxyConnectRedirectHttpStream();
+ ~ProxyConnectRedirectHttpStream() override;
// All functions below are expected not to be called except for the
// marked one.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// This function may be called.
- virtual void Close(bool not_reusable) override;
+ void Close(bool not_reusable) override;
- virtual bool IsResponseBodyComplete() const override;
+ bool IsResponseBodyComplete() const override;
// This function may be called.
- virtual bool CanFindEndOfResponse() const override;
+ bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
// This function may be called.
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
// This function may be called.
- virtual void SetPriority(RequestPriority priority) override;
+ void SetPriority(RequestPriority priority) override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual HttpStream* RenewStreamForAuth() override;
+ UploadProgress GetUploadProgress() const override;
+ HttpStream* RenewStreamForAuth() override;
private:
bool has_load_timing_info_;
diff --git a/net/http/transport_security_persister.h b/net/http/transport_security_persister.h
index 5081c38..09b32ac 100644
--- a/net/http/transport_security_persister.h
+++ b/net/http/transport_security_persister.h
@@ -62,10 +62,10 @@ class NET_EXPORT TransportSecurityPersister
const base::FilePath& profile_path,
const scoped_refptr<base::SequencedTaskRunner>& background_runner,
bool readonly);
- virtual ~TransportSecurityPersister();
+ ~TransportSecurityPersister() override;
// Called by the TransportSecurityState when it changes its state.
- virtual void StateIsDirty(TransportSecurityState*) override;
+ void StateIsDirty(TransportSecurityState*) override;
// ImportantFileWriter::DataSerializer:
//
@@ -97,7 +97,7 @@ class NET_EXPORT TransportSecurityPersister
// The reason for hashing them is so that the stored state does not
// trivially reveal a user's browsing history to an attacker reading the
// serialized state on disk.
- virtual bool SerializeData(std::string* data) override;
+ bool SerializeData(std::string* data) override;
// Clears any existing non-static entries, and then re-populates
// |transport_security_state_|.
diff --git a/net/http/url_security_manager.h b/net/http/url_security_manager.h
index 2835d89..c0d93a2 100644
--- a/net/http/url_security_manager.h
+++ b/net/http/url_security_manager.h
@@ -61,11 +61,11 @@ class URLSecurityManagerWhitelist : public URLSecurityManager {
// The URLSecurityManagerWhitelist takes ownership of the whitelists.
URLSecurityManagerWhitelist(const HttpAuthFilter* whitelist_default,
const HttpAuthFilter* whitelist_delegation);
- virtual ~URLSecurityManagerWhitelist();
+ ~URLSecurityManagerWhitelist() override;
// URLSecurityManager methods.
- virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
- virtual bool CanDelegate(const GURL& auth_origin) const override;
+ bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
+ bool CanDelegate(const GURL& auth_origin) const override;
private:
scoped_ptr<const HttpAuthFilter> whitelist_default_;