summaryrefslogtreecommitdiffstats
path: root/net
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
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')
-rw-r--r--net/base/backoff_entry_unittest.cc6
-rw-r--r--net/base/capturing_net_log.h6
-rw-r--r--net/base/chunked_upload_data_stream.h8
-rw-r--r--net/base/directory_lister_unittest.cc5
-rw-r--r--net/base/elements_upload_data_stream.h13
-rw-r--r--net/base/io_buffer.h12
-rw-r--r--net/base/mock_file_stream.h21
-rw-r--r--net/base/net_log_logger.h4
-rw-r--r--net/base/net_log_unittest.cc22
-rw-r--r--net/base/net_util_icu.cc4
-rw-r--r--net/base/network_change_notifier.cc19
-rw-r--r--net/base/network_change_notifier_mac.cc10
-rw-r--r--net/base/network_change_notifier_mac.h13
-rw-r--r--net/base/network_config_watcher_mac.cc6
-rw-r--r--net/base/prioritized_dispatcher_unittest.cc2
-rw-r--r--net/base/sdch_dictionary_fetcher.h10
-rw-r--r--net/base/sdch_dictionary_fetcher_unittest.cc14
-rw-r--r--net/base/sdch_manager.h6
-rw-r--r--net/base/test_completion_callback.h8
-rw-r--r--net/base/trace_net_log_observer.cc4
-rw-r--r--net/base/trace_net_log_observer.h8
-rw-r--r--net/base/upload_bytes_element_reader.h20
-rw-r--r--net/base/upload_file_element_reader.h16
-rw-r--r--net/cert/cert_verify_proc_mac.h16
-rw-r--r--net/cert/cert_verify_proc_unittest.cc16
-rw-r--r--net/cert/mock_cert_verifier.h20
-rw-r--r--net/cert/multi_log_ct_verifier.h12
-rw-r--r--net/cert/multi_threaded_cert_verifier.h22
-rw-r--r--net/cert/multi_threaded_cert_verifier_unittest.cc20
-rw-r--r--net/cookies/cookie_monster.cc52
-rw-r--r--net/cookies/cookie_monster.h42
-rw-r--r--net/cookies/cookie_monster_store_test.h49
-rw-r--r--net/cookies/cookie_monster_unittest.cc19
-rw-r--r--net/cookies/cookie_store_test_helpers.h30
-rw-r--r--net/disk_cache/backend_unittest.cc6
-rw-r--r--net/disk_cache/blockfile/backend_impl.cc6
-rw-r--r--net/disk_cache/blockfile/backend_impl.h38
-rw-r--r--net/disk_cache/blockfile/backend_impl_v3.cc4
-rw-r--r--net/disk_cache/blockfile/backend_impl_v3.h38
-rw-r--r--net/disk_cache/blockfile/entry_impl.cc4
-rw-r--r--net/disk_cache/blockfile/entry_impl.h54
-rw-r--r--net/disk_cache/blockfile/entry_impl_v3.h54
-rw-r--r--net/disk_cache/blockfile/file_posix.cc2
-rw-r--r--net/disk_cache/blockfile/in_flight_backend_io.h7
-rw-r--r--net/disk_cache/blockfile/index_table_v3_unittest.cc10
-rw-r--r--net/disk_cache/blockfile/mapped_file.h2
-rw-r--r--net/disk_cache/blockfile/mapped_file_unittest.cc12
-rw-r--r--net/disk_cache/blockfile/sparse_control.cc4
-rw-r--r--net/disk_cache/entry_unittest.cc2
-rw-r--r--net/disk_cache/memory/mem_backend_impl.cc4
-rw-r--r--net/disk_cache/memory/mem_backend_impl.h40
-rw-r--r--net/disk_cache/memory/mem_entry_impl.h54
-rw-r--r--net/disk_cache/simple/simple_backend_impl.cc6
-rw-r--r--net/disk_cache/simple/simple_backend_impl.h44
-rw-r--r--net/disk_cache/simple/simple_entry_impl.h66
-rw-r--r--net/disk_cache/simple/simple_index_file_unittest.cc3
-rw-r--r--net/disk_cache/simple/simple_index_unittest.cc19
-rw-r--r--net/dns/address_sorter_posix.h8
-rw-r--r--net/dns/address_sorter_posix_unittest.cc38
-rw-r--r--net/dns/dns_client.cc10
-rw-r--r--net/dns/dns_config_service_posix.cc12
-rw-r--r--net/dns/dns_config_service_posix.h6
-rw-r--r--net/dns/dns_config_service_unittest.cc4
-rw-r--r--net/dns/dns_session_unittest.cc29
-rw-r--r--net/dns/dns_socket_pool.cc27
-rw-r--r--net/dns/dns_test_util.cc10
-rw-r--r--net/dns/dns_test_util.h10
-rw-r--r--net/dns/dns_transaction.cc30
-rw-r--r--net/dns/dns_transaction_unittest.cc12
-rw-r--r--net/dns/host_resolver_impl.cc14
-rw-r--r--net/dns/host_resolver_impl.h36
-rw-r--r--net/dns/host_resolver_impl_unittest.cc40
-rw-r--r--net/dns/host_resolver_proc.h13
-rw-r--r--net/dns/mapped_host_resolver.h28
-rw-r--r--net/dns/mock_host_resolver.h60
-rw-r--r--net/dns/notify_watcher_mac.h6
-rw-r--r--net/dns/serial_worker_unittest.cc6
-rw-r--r--net/dns/single_request_host_resolver_unittest.cc24
-rw-r--r--net/extras/sqlite/sqlite_channel_id_store.h10
-rw-r--r--net/filter/gzip_filter.h5
-rw-r--r--net/filter/mock_filter_context.h24
-rw-r--r--net/filter/sdch_filter.h5
-rw-r--r--net/ftp/ftp_network_layer.h6
-rw-r--r--net/ftp/ftp_network_transaction.h23
-rw-r--r--net/ftp/ftp_network_transaction_unittest.cc46
-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
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher.h11
-rw-r--r--net/proxy/mock_proxy_resolver.h23
-rw-r--r--net/proxy/mock_proxy_script_fetcher.h12
-rw-r--r--net/proxy/multi_threaded_proxy_resolver.cc12
-rw-r--r--net/proxy/multi_threaded_proxy_resolver.h23
-rw-r--r--net/proxy/multi_threaded_proxy_resolver_unittest.cc66
-rw-r--r--net/proxy/network_delegate_error_observer.h5
-rw-r--r--net/proxy/network_delegate_error_observer_unittest.cc66
-rw-r--r--net/proxy/polling_proxy_config_service.h10
-rw-r--r--net/proxy/proxy_bypass_rules.cc24
-rw-r--r--net/proxy/proxy_config_service_fixed.h8
-rw-r--r--net/proxy/proxy_config_service_mac.h15
-rw-r--r--net/proxy/proxy_resolver_mac.h23
-rw-r--r--net/proxy/proxy_resolver_perftest.cc15
-rw-r--r--net/proxy/proxy_resolver_v8.cc14
-rw-r--r--net/proxy/proxy_resolver_v8.h23
-rw-r--r--net/proxy/proxy_resolver_v8_tracing.cc14
-rw-r--r--net/proxy/proxy_resolver_v8_tracing.h23
-rw-r--r--net/proxy/proxy_resolver_v8_tracing_unittest.cc23
-rw-r--r--net/proxy/proxy_resolver_v8_unittest.cc16
-rw-r--r--net/proxy/proxy_script_decider_unittest.cc45
-rw-r--r--net/proxy/proxy_script_fetcher_impl.h25
-rw-r--r--net/proxy/proxy_script_fetcher_impl_unittest.cc64
-rw-r--r--net/proxy/proxy_service.cc62
-rw-r--r--net/proxy/proxy_service.h8
-rw-r--r--net/proxy/proxy_service_unittest.cc34
-rw-r--r--net/quic/congestion_control/pacing_sender.h50
-rw-r--r--net/quic/congestion_control/tcp_cubic_sender.h50
-rw-r--r--net/quic/congestion_control/tcp_loss_algorithm.h8
-rw-r--r--net/quic/congestion_control/tcp_receiver.h8
-rw-r--r--net/quic/congestion_control/time_loss_algorithm.h8
-rw-r--r--net/quic/crypto/aead_base_decrypter.h26
-rw-r--r--net/quic/crypto/aead_base_encrypter.h32
-rw-r--r--net/quic/crypto/aes_128_gcm_12_decrypter.h2
-rw-r--r--net/quic/crypto/aes_128_gcm_12_encrypter.h2
-rw-r--r--net/quic/crypto/chacha20_poly1305_decrypter.h2
-rw-r--r--net/quic/crypto/chacha20_poly1305_encrypter.h2
-rw-r--r--net/quic/crypto/channel_id_chromium.h17
-rw-r--r--net/quic/crypto/common_cert_set.cc12
-rw-r--r--net/quic/crypto/crypto_framer.cc5
-rw-r--r--net/quic/crypto/crypto_framer_test.cc5
-rw-r--r--net/quic/crypto/crypto_server_test.cc4
-rw-r--r--net/quic/crypto/curve25519_key_exchange.h12
-rw-r--r--net/quic/crypto/local_strike_register_client.h8
-rw-r--r--net/quic/crypto/local_strike_register_client_test.cc4
-rw-r--r--net/quic/crypto/null_decrypter.h26
-rw-r--r--net/quic/crypto/null_encrypter.h32
-rw-r--r--net/quic/crypto/p256_key_exchange.h12
-rw-r--r--net/quic/crypto/proof_source_chromium.h12
-rw-r--r--net/quic/crypto/proof_test.cc6
-rw-r--r--net/quic/crypto/proof_verifier_chromium.h21
-rw-r--r--net/quic/crypto/quic_crypto_client_config_test.cc4
-rw-r--r--net/quic/crypto/quic_crypto_server_config.cc4
-rw-r--r--net/quic/crypto/quic_crypto_server_config_test.cc9
-rw-r--r--net/quic/crypto/quic_random.cc9
-rw-r--r--net/quic/quic_alarm_test.cc4
-rw-r--r--net/quic/quic_client_session.h37
-rw-r--r--net/quic/quic_client_session_base.h4
-rw-r--r--net/quic/quic_config.h57
-rw-r--r--net/quic/quic_connection.cc10
-rw-r--r--net/quic/quic_connection.h73
-rw-r--r--net/quic/quic_connection_helper.cc4
-rw-r--r--net/quic/quic_connection_helper.h8
-rw-r--r--net/quic/quic_connection_helper_test.cc2
-rw-r--r--net/quic/quic_connection_logger.h69
-rw-r--r--net/quic/quic_connection_test.cc106
-rw-r--r--net/quic/quic_crypto_client_stream.h17
-rw-r--r--net/quic/quic_crypto_server_stream.h22
-rw-r--r--net/quic/quic_crypto_stream.h9
-rw-r--r--net/quic/quic_crypto_stream_test.cc3
-rw-r--r--net/quic/quic_data_stream.h8
-rw-r--r--net/quic/quic_data_stream_test.cc2
-rw-r--r--net/quic/quic_default_packet_writer.h16
-rw-r--r--net/quic/quic_dispatcher.cc63
-rw-r--r--net/quic/quic_dispatcher.h28
-rw-r--r--net/quic/quic_framer_test.cc134
-rw-r--r--net/quic/quic_headers_stream.cc84
-rw-r--r--net/quic/quic_headers_stream.h6
-rw-r--r--net/quic/quic_http_stream.h68
-rw-r--r--net/quic/quic_http_stream_test.cc6
-rw-r--r--net/quic/quic_packet_creator.h6
-rw-r--r--net/quic/quic_per_connection_packet_writer.h16
-rw-r--r--net/quic/quic_received_packet_manager.h4
-rw-r--r--net/quic/quic_reliable_client_stream.h10
-rw-r--r--net/quic/quic_server_packet_writer.h17
-rw-r--r--net/quic/quic_server_session.h16
-rw-r--r--net/quic/quic_session.cc33
-rw-r--r--net/quic/quic_session.h31
-rw-r--r--net/quic/quic_spdy_server_stream.h6
-rw-r--r--net/quic/quic_stream_factory.cc4
-rw-r--r--net/quic/quic_stream_factory.h8
-rw-r--r--net/quic/quic_time_wait_list_manager.cc2
-rw-r--r--net/quic/quic_time_wait_list_manager.h4
-rw-r--r--net/quic/reliable_quic_stream.cc14
-rw-r--r--net/quic/reliable_quic_stream_test.cc4
-rw-r--r--net/quic/test_tools/crypto_test_utils.cc28
-rw-r--r--net/quic/test_tools/crypto_test_utils_chromium.cc33
-rw-r--r--net/quic/test_tools/crypto_test_utils_openssl.cc11
-rw-r--r--net/quic/test_tools/delayed_verify_strike_register_client.h8
-rw-r--r--net/quic/test_tools/mock_clock.h8
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream.h7
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream_factory.h4
-rw-r--r--net/quic/test_tools/mock_random.h7
-rw-r--r--net/quic/test_tools/quic_test_utils.cc9
-rw-r--r--net/quic/test_tools/quic_test_utils.h82
-rw-r--r--net/quic/test_tools/simple_quic_framer.cc58
-rw-r--r--net/quic/test_tools/test_task_runner.h10
-rw-r--r--net/server/http_connection.h4
-rw-r--r--net/server/http_server_unittest.cc82
-rw-r--r--net/server/web_socket.cc12
-rw-r--r--net/socket/client_socket_factory.cc16
-rw-r--r--net/socket/client_socket_pool.h2
-rw-r--r--net/socket/client_socket_pool_base.h6
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc156
-rw-r--r--net/socket/client_socket_pool_manager_impl.h22
-rw-r--r--net/socket/mock_client_socket_pool_manager.h18
-rw-r--r--net/socket/socket_libevent.h6
-rw-r--r--net/socket/socket_test_util.h374
-rw-r--r--net/socket/socks5_client_socket.h50
-rw-r--r--net/socket/socks_client_socket.h50
-rw-r--r--net/socket/socks_client_socket_pool.h72
-rw-r--r--net/socket/socks_client_socket_unittest.cc20
-rw-r--r--net/socket/ssl_client_socket.h4
-rw-r--r--net/socket/ssl_client_socket_openssl.h68
-rw-r--r--net/socket/ssl_client_socket_pool.h76
-rw-r--r--net/socket/ssl_client_socket_unittest.cc190
-rw-r--r--net/socket/ssl_server_socket.h2
-rw-r--r--net/socket/ssl_server_socket_openssl.h58
-rw-r--r--net/socket/ssl_server_socket_unittest.cc68
-rw-r--r--net/socket/ssl_socket.h2
-rw-r--r--net/socket/stream_listen_socket.h6
-rw-r--r--net/socket/stream_socket.h2
-rw-r--r--net/socket/tcp_client_socket.h46
-rw-r--r--net/socket/tcp_listen_socket.h8
-rw-r--r--net/socket/tcp_listen_socket_unittest.h13
-rw-r--r--net/socket/tcp_server_socket.h10
-rw-r--r--net/socket/transport_client_socket_pool.h70
-rw-r--r--net/socket/transport_client_socket_pool_test_util.cc150
-rw-r--r--net/socket/transport_client_socket_pool_test_util.h10
-rw-r--r--net/socket/transport_client_socket_pool_unittest.cc2
-rw-r--r--net/socket/transport_client_socket_unittest.cc8
-rw-r--r--net/socket/unix_domain_client_socket_posix.h44
-rw-r--r--net/socket/unix_domain_listen_socket_posix.h8
-rw-r--r--net/socket/unix_domain_listen_socket_posix_unittest.cc14
-rw-r--r--net/socket/unix_domain_server_socket_posix.h16
-rw-r--r--net/socket/websocket_endpoint_lock_manager_unittest.cc52
-rw-r--r--net/socket/websocket_transport_client_socket_pool.h64
-rw-r--r--net/socket/websocket_transport_client_socket_pool_unittest.cc2
-rw-r--r--net/socket/websocket_transport_connect_sub_job.h4
-rw-r--r--net/socket_stream/socket_stream.h4
-rw-r--r--net/socket_stream/socket_stream_unittest.cc53
-rw-r--r--net/spdy/buffered_spdy_framer.h70
-rw-r--r--net/spdy/buffered_spdy_framer_unittest.cc75
-rw-r--r--net/spdy/spdy_buffer.cc2
-rw-r--r--net/spdy/spdy_buffer_producer.h4
-rw-r--r--net/spdy/spdy_framer.cc33
-rw-r--r--net/spdy/spdy_framer_test.cc186
-rw-r--r--net/spdy/spdy_http_stream.h70
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc2
-rw-r--r--net/spdy/spdy_protocol.h42
-rw-r--r--net/spdy/spdy_proxy_client_socket.h69
-rw-r--r--net/spdy/spdy_proxy_client_socket_unittest.cc3
-rw-r--r--net/spdy/spdy_session.h92
-rw-r--r--net/spdy/spdy_session_pool.h10
-rw-r--r--net/spdy/spdy_session_pool_unittest.cc12
-rw-r--r--net/spdy/spdy_session_test_util.h6
-rw-r--r--net/spdy/spdy_session_unittest.cc18
-rw-r--r--net/spdy/spdy_stream.cc4
-rw-r--r--net/spdy/spdy_stream_test_util.h38
-rw-r--r--net/spdy/spdy_test_util_common.cc99
-rw-r--r--net/spdy/spdy_test_util_common.h19
-rw-r--r--net/spdy/spdy_websocket_stream.h12
-rw-r--r--net/spdy/spdy_websocket_stream_unittest.cc14
-rw-r--r--net/spdy/spdy_write_queue_unittest.cc4
-rw-r--r--net/ssl/channel_id_service_unittest.cc34
-rw-r--r--net/ssl/client_cert_store_mac.h8
-rw-r--r--net/ssl/default_channel_id_store.cc20
-rw-r--r--net/ssl/default_channel_id_store.h45
-rw-r--r--net/ssl/default_channel_id_store_unittest.cc10
-rw-r--r--net/ssl/ssl_client_auth_cache.h4
-rw-r--r--net/ssl/ssl_config_service_defaults.h4
-rw-r--r--net/ssl/ssl_config_service_unittest.cc6
-rw-r--r--net/test/embedded_test_server/embedded_test_server.cc2
-rw-r--r--net/test/embedded_test_server/embedded_test_server.h16
-rw-r--r--net/test/embedded_test_server/embedded_test_server_unittest.cc6
-rw-r--r--net/test/embedded_test_server/http_response.h4
-rw-r--r--net/test/net_test_suite.h6
-rw-r--r--net/test/spawned_test_server/local_test_server.h2
-rw-r--r--net/test/spawned_test_server/local_test_server_posix.cc2
-rw-r--r--net/test/url_request/url_request_failed_job.h4
-rw-r--r--net/test/url_request/url_request_mock_http_job.cc4
-rw-r--r--net/test/url_request/url_request_mock_http_job.h15
-rw-r--r--net/tools/balsa/balsa_frame.h59
-rw-r--r--net/tools/balsa/simple_buffer.h28
-rw-r--r--net/tools/dump_cache/cache_dumper.h38
-rw-r--r--net/tools/gdig/file_net_log.h4
-rw-r--r--net/tools/get_server_time/get_server_time.cc19
-rw-r--r--net/tools/net_watcher/net_watcher.cc16
-rw-r--r--net/udp/datagram_client_socket.h2
-rw-r--r--net/udp/datagram_server_socket.h2
-rw-r--r--net/udp/udp_client_socket.h26
-rw-r--r--net/udp/udp_server_socket.h50
-rw-r--r--net/udp/udp_socket_libevent.h8
-rw-r--r--net/url_request/data_protocol_handler.h7
-rw-r--r--net/url_request/file_protocol_handler.h9
-rw-r--r--net/url_request/ftp_protocol_handler.h7
-rw-r--r--net/url_request/static_http_user_agent_settings.h6
-rw-r--r--net/url_request/test_url_fetcher_factory.h119
-rw-r--r--net/url_request/test_url_request_interceptor.cc8
-rw-r--r--net/url_request/url_fetcher_core.h18
-rw-r--r--net/url_request/url_fetcher_impl.h81
-rw-r--r--net/url_request/url_fetcher_impl_unittest.cc88
-rw-r--r--net/url_request/url_fetcher_response_writer.h28
-rw-r--r--net/url_request/url_range_request_job.h5
-rw-r--r--net/url_request/url_request.h2
-rw-r--r--net/url_request/url_request_about_job.h6
-rw-r--r--net/url_request/url_request_context_builder.cc64
-rw-r--r--net/url_request/url_request_context_builder_unittest.cc18
-rw-r--r--net/url_request/url_request_context_getter.h8
-rw-r--r--net/url_request/url_request_data_job.h10
-rw-r--r--net/url_request/url_request_error_job.h4
-rw-r--r--net/url_request/url_request_file_dir_job.h19
-rw-r--r--net/url_request/url_request_file_job.h20
-rw-r--r--net/url_request/url_request_file_job_unittest.cc18
-rw-r--r--net/url_request/url_request_filter.cc7
-rw-r--r--net/url_request/url_request_filter.h4
-rw-r--r--net/url_request/url_request_filter_unittest.cc7
-rw-r--r--net/url_request/url_request_ftp_job.h32
-rw-r--r--net/url_request/url_request_ftp_job_unittest.cc17
-rw-r--r--net/url_request/url_request_http_job.cc24
-rw-r--r--net/url_request/url_request_http_job.h72
-rw-r--r--net/url_request/url_request_http_job_unittest.cc54
-rw-r--r--net/url_request/url_request_intercepting_job_factory.h10
-rw-r--r--net/url_request/url_request_job.h4
-rw-r--r--net/url_request/url_request_job_factory_impl.h10
-rw-r--r--net/url_request/url_request_job_factory_impl_unittest.cc9
-rw-r--r--net/url_request/url_request_redirect_job.h13
-rw-r--r--net/url_request/url_request_simple_job.h12
-rw-r--r--net/url_request/url_request_simple_job_unittest.cc12
-rw-r--r--net/url_request/url_request_test_job.cc5
-rw-r--r--net/url_request/url_request_test_job.h24
-rw-r--r--net/url_request/url_request_test_util.h105
-rw-r--r--net/url_request/url_request_throttler_entry.h15
-rw-r--r--net/url_request/url_request_throttler_header_adapter.h6
-rw-r--r--net/url_request/url_request_throttler_manager.h6
-rw-r--r--net/url_request/url_request_throttler_simulation_unittest.cc20
-rw-r--r--net/url_request/url_request_throttler_test_support.h10
-rw-r--r--net/url_request/url_request_throttler_unittest.cc10
-rw-r--r--net/url_request/url_request_unittest.cc115
-rw-r--r--net/url_request/view_cache_helper_unittest.cc4
-rw-r--r--net/websockets/websocket_basic_handshake_stream.h54
-rw-r--r--net/websockets/websocket_basic_stream.h16
-rw-r--r--net/websockets/websocket_basic_stream_test.cc2
-rw-r--r--net/websockets/websocket_channel.cc10
-rw-r--r--net/websockets/websocket_channel_test.cc122
-rw-r--r--net/websockets/websocket_deflate_predictor_impl.h10
-rw-r--r--net/websockets/websocket_deflate_stream.h16
-rw-r--r--net/websockets/websocket_deflate_stream_test.cc10
-rw-r--r--net/websockets/websocket_handshake_stream_base.h4
-rw-r--r--net/websockets/websocket_handshake_stream_create_helper.h6
-rw-r--r--net/websockets/websocket_handshake_stream_create_helper_test.cc12
-rw-r--r--net/websockets/websocket_inflater.cc2
-rw-r--r--net/websockets/websocket_job.h51
-rw-r--r--net/websockets/websocket_job_test.cc132
-rw-r--r--net/websockets/websocket_stream.cc33
-rw-r--r--net/websockets/websocket_stream_test.cc12
-rw-r--r--net/websockets/websocket_throttle_test.cc16
396 files changed, 5092 insertions, 5581 deletions
diff --git a/net/base/backoff_entry_unittest.cc b/net/base/backoff_entry_unittest.cc
index f5393e8..89ec2c4 100644
--- a/net/base/backoff_entry_unittest.cc
+++ b/net/base/backoff_entry_unittest.cc
@@ -23,11 +23,9 @@ class TestBackoffEntry : public BackoffEntry {
SetCustomReleaseTime(TimeTicks());
}
- virtual ~TestBackoffEntry() {}
+ ~TestBackoffEntry() override {}
- virtual TimeTicks ImplGetTimeNow() const override {
- return now_;
- }
+ TimeTicks ImplGetTimeNow() const override { return now_; }
void set_now(const TimeTicks& now) {
now_ = now;
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index a58b6ff..5977533 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -72,7 +72,7 @@ class CapturingNetLog : public NetLog {
typedef std::vector<CapturedEntry> CapturedEntryList;
CapturingNetLog();
- virtual ~CapturingNetLog();
+ ~CapturingNetLog() override;
void SetLogLevel(LogLevel log_level);
@@ -89,7 +89,7 @@ class CapturingNetLog : public NetLog {
class Observer : public NetLog::ThreadSafeObserver {
public:
Observer();
- virtual ~Observer();
+ ~Observer() override;
// Returns the list of all entries in the log.
void GetEntries(CapturedEntryList* entry_list) const;
@@ -105,7 +105,7 @@ class CapturingNetLog : public NetLog {
private:
// ThreadSafeObserver implementation:
- virtual void OnAddEntry(const Entry& entry) override;
+ void OnAddEntry(const Entry& entry) override;
// Needs to be "mutable" so can use it in GetEntries().
mutable base::Lock lock_;
diff --git a/net/base/chunked_upload_data_stream.h b/net/base/chunked_upload_data_stream.h
index 71b1e5c6..d17c8da 100644
--- a/net/base/chunked_upload_data_stream.h
+++ b/net/base/chunked_upload_data_stream.h
@@ -25,7 +25,7 @@ class NET_EXPORT ChunkedUploadDataStream : public UploadDataStream {
public:
ChunkedUploadDataStream(int64 identifier);
- virtual ~ChunkedUploadDataStream();
+ ~ChunkedUploadDataStream() override;
// Adds data to the stream. |is_done| should be true if this is the last
// data to be appended. |data_len| must not be 0 unless |is_done| is true.
@@ -35,9 +35,9 @@ class NET_EXPORT ChunkedUploadDataStream : public UploadDataStream {
private:
// UploadDataStream implementation.
- virtual int InitInternal() override;
- virtual int ReadInternal(IOBuffer* buf, int buf_len) override;
- virtual void ResetInternal() override;
+ int InitInternal() override;
+ int ReadInternal(IOBuffer* buf, int buf_len) override;
+ void ResetInternal() override;
int ReadChunk(IOBuffer* buf, int buf_len);
diff --git a/net/base/directory_lister_unittest.cc b/net/base/directory_lister_unittest.cc
index f52e23e..98ecbbd 100644
--- a/net/base/directory_lister_unittest.cc
+++ b/net/base/directory_lister_unittest.cc
@@ -27,15 +27,14 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
quit_loop_after_each_file_(quit_loop_after_each_file) {
}
- virtual void OnListFile(
- const DirectoryLister::DirectoryListerData& data) override {
+ void OnListFile(const DirectoryLister::DirectoryListerData& data) override {
file_list_.push_back(data.info);
paths_.push_back(data.path);
if (quit_loop_after_each_file_)
base::MessageLoop::current()->Quit();
}
- virtual void OnListDone(int error) override {
+ void OnListDone(int error) override {
error_ = error;
base::MessageLoop::current()->Quit();
if (recursive_)
diff --git a/net/base/elements_upload_data_stream.h b/net/base/elements_upload_data_stream.h
index 1a008fc..5101114 100644
--- a/net/base/elements_upload_data_stream.h
+++ b/net/base/elements_upload_data_stream.h
@@ -26,7 +26,7 @@ class NET_EXPORT ElementsUploadDataStream : public UploadDataStream {
ElementsUploadDataStream(ScopedVector<UploadElementReader> element_readers,
int64 identifier);
- virtual ~ElementsUploadDataStream();
+ ~ElementsUploadDataStream() override;
// Creates an ElementsUploadDataStream with a single reader. Returns a
// scoped_ptr<UploadDataStream> for ease of use.
@@ -36,12 +36,11 @@ class NET_EXPORT ElementsUploadDataStream : public UploadDataStream {
private:
// UploadDataStream implementation.
- virtual bool IsInMemory() const override;
- virtual const ScopedVector<UploadElementReader>*
- GetElementReaders() const override;
- virtual int InitInternal() override;
- virtual int ReadInternal(IOBuffer* buf, int buf_len) override;
- virtual void ResetInternal() override;
+ bool IsInMemory() const override;
+ const ScopedVector<UploadElementReader>* GetElementReaders() const override;
+ int InitInternal() override;
+ int ReadInternal(IOBuffer* buf, int buf_len) override;
+ void ResetInternal() override;
// Runs Init() for all element readers.
// This method is used to implement InitInternal().
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index 2d87058..04bbc88 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -104,7 +104,7 @@ class NET_EXPORT IOBufferWithSize : public IOBuffer {
// constructor IOBuffer(char*) thus allowing subclass to use underlying
// memory it does not own.
IOBufferWithSize(char* data, int size);
- virtual ~IOBufferWithSize();
+ ~IOBufferWithSize() override;
int size_;
};
@@ -119,7 +119,7 @@ class NET_EXPORT StringIOBuffer : public IOBuffer {
int size() const { return static_cast<int>(string_data_.size()); }
private:
- virtual ~StringIOBuffer();
+ ~StringIOBuffer() override;
std::string string_data_;
};
@@ -162,7 +162,7 @@ class NET_EXPORT DrainableIOBuffer : public IOBuffer {
int size() const { return size_; }
private:
- virtual ~DrainableIOBuffer();
+ ~DrainableIOBuffer() override;
scoped_refptr<IOBuffer> base_;
int size_;
@@ -202,7 +202,7 @@ class NET_EXPORT GrowableIOBuffer : public IOBuffer {
char* StartOfBuffer();
private:
- virtual ~GrowableIOBuffer();
+ ~GrowableIOBuffer() override;
scoped_ptr<char, base::FreeDeleter> real_data_;
int capacity_;
@@ -222,7 +222,7 @@ class NET_EXPORT PickledIOBuffer : public IOBuffer {
void Done();
private:
- virtual ~PickledIOBuffer();
+ ~PickledIOBuffer() override;
Pickle pickle_;
};
@@ -237,7 +237,7 @@ class NET_EXPORT WrappedIOBuffer : public IOBuffer {
explicit WrappedIOBuffer(const char* data);
protected:
- virtual ~WrappedIOBuffer();
+ ~WrappedIOBuffer() override;
};
} // namespace net
diff --git a/net/base/mock_file_stream.h b/net/base/mock_file_stream.h
index abceb1b..7b7dea8 100644
--- a/net/base/mock_file_stream.h
+++ b/net/base/mock_file_stream.h
@@ -25,18 +25,19 @@ class MockFileStream : public net::FileStream {
explicit MockFileStream(const scoped_refptr<base::TaskRunner>& task_runner);
MockFileStream(base::File file,
const scoped_refptr<base::TaskRunner>& task_runner);
- virtual ~MockFileStream();
+ ~MockFileStream() override;
// FileStream methods.
- virtual int Seek(base::File::Whence whence, int64 offset,
- const Int64CompletionCallback& callback) override;
- 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 Flush(const CompletionCallback& callback) override;
+ int Seek(base::File::Whence whence,
+ int64 offset,
+ const Int64CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Flush(const CompletionCallback& callback) override;
void set_forced_error_async(int error) {
forced_error_ = error;
diff --git a/net/base/net_log_logger.h b/net/base/net_log_logger.h
index 6604b82..406841e 100644
--- a/net/base/net_log_logger.h
+++ b/net/base/net_log_logger.h
@@ -28,7 +28,7 @@ class NET_EXPORT NetLogLogger : public NetLog::ThreadSafeObserver {
// starts. |file| must be non-NULL handle and be open for writing.
// |constants| is a legend for decoding constant values used in the log.
NetLogLogger(FILE* file, const base::Value& constants);
- virtual ~NetLogLogger();
+ ~NetLogLogger() override;
// Sets the log level to log at. Must be called before StartObserving.
void set_log_level(NetLog::LogLevel log_level);
@@ -41,7 +41,7 @@ class NET_EXPORT NetLogLogger : public NetLog::ThreadSafeObserver {
void StopObserving();
// net::NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const NetLog::Entry& entry) override;
+ void OnAddEntry(const NetLog::Entry& entry) override;
// Create a dictionary containing legend for net/ constants. Caller takes
// ownership of returned value.
diff --git a/net/base/net_log_unittest.cc b/net/base/net_log_unittest.cc
index d1e7dde..0f5b0eb 100644
--- a/net/base/net_log_unittest.cc
+++ b/net/base/net_log_unittest.cc
@@ -75,14 +75,12 @@ class CountingObserver : public NetLog::ThreadSafeObserver {
public:
CountingObserver() : count_(0) {}
- virtual ~CountingObserver() {
+ ~CountingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
- ++count_;
- }
+ void OnAddEntry(const NetLog::Entry& entry) override { ++count_; }
int count() const { return count_; }
@@ -94,12 +92,12 @@ class LoggingObserver : public NetLog::ThreadSafeObserver {
public:
LoggingObserver() {}
- virtual ~LoggingObserver() {
+ ~LoggingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
+ void OnAddEntry(const NetLog::Entry& entry) override {
base::Value* value = entry.ToValue();
base::DictionaryValue* dict = NULL;
ASSERT_TRUE(value->GetAsDictionary(&dict));
@@ -138,7 +136,7 @@ class NetLogTestThread : public base::SimpleThread {
net_log_ = net_log;
}
- virtual void Run() override {
+ void Run() override {
start_event_->Wait();
RunTestThread();
}
@@ -162,10 +160,10 @@ class NetLogTestThread : public base::SimpleThread {
class AddEventsTestThread : public NetLogTestThread {
public:
AddEventsTestThread() {}
- virtual ~AddEventsTestThread() {}
+ ~AddEventsTestThread() override {}
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i)
AddEvent(net_log_);
}
@@ -178,12 +176,10 @@ class AddRemoveObserverTestThread : public NetLogTestThread {
public:
AddRemoveObserverTestThread() {}
- virtual ~AddRemoveObserverTestThread() {
- EXPECT_TRUE(!observer_.net_log());
- }
+ ~AddRemoveObserverTestThread() override { EXPECT_TRUE(!observer_.net_log()); }
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i) {
ASSERT_FALSE(observer_.net_log());
diff --git a/net/base/net_util_icu.cc b/net/base/net_util_icu.cc
index bd5625b..8526eda 100644
--- a/net/base/net_util_icu.cc
+++ b/net/base/net_util_icu.cc
@@ -491,7 +491,7 @@ class HostComponentTransform : public AppendComponentTransform {
}
private:
- virtual base::string16 Execute(
+ base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const override {
return IDNToUnicodeWithAdjustments(component_text, languages_,
@@ -508,7 +508,7 @@ class NonHostComponentTransform : public AppendComponentTransform {
}
private:
- virtual base::string16 Execute(
+ base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const override {
return (unescape_rules_ == UnescapeRule::NONE) ?
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index bea6759..afd6b23 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -45,7 +45,7 @@ NetworkChangeNotifierFactory* g_network_change_notifier_factory = NULL;
class MockNetworkChangeNotifier : public NetworkChangeNotifier {
public:
- virtual ConnectionType GetCurrentConnectionType() const override {
+ ConnectionType GetCurrentConnectionType() const override {
return CONNECTION_UNKNOWN;
}
};
@@ -83,7 +83,7 @@ class HistogramWatcher
NetworkChangeNotifier::AddNetworkChangeObserver(this);
}
- virtual ~HistogramWatcher() {
+ ~HistogramWatcher() override {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(g_network_change_notifier);
NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
@@ -93,7 +93,7 @@ class HistogramWatcher
}
// NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
+ void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.IPAddressChange",
SinceLast(&last_ip_address_change_));
@@ -103,7 +103,7 @@ class HistogramWatcher
}
// NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeTicks now = base::TimeTicks::Now();
@@ -264,15 +264,14 @@ class HistogramWatcher
}
// NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged() override {
+ void OnDNSChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.DNSConfigChange",
SinceLast(&last_dns_change_));
}
// NetworkChangeNotifier::NetworkChangeObserver implementation.
- virtual void OnNetworkChanged(
- NetworkChangeNotifier::ConnectionType type) override {
+ void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
if (type != NetworkChangeNotifier::CONNECTION_NONE) {
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.NetworkOnlineChange",
@@ -424,7 +423,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
AddIPAddressObserver(this);
}
- virtual ~NetworkChangeCalculator() {
+ ~NetworkChangeCalculator() override {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(g_network_change_notifier);
RemoveConnectionTypeObserver(this);
@@ -432,7 +431,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
}
// NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
+ void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
? params_.ip_address_offline_delay_ : params_.ip_address_online_delay_;
@@ -441,7 +440,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
}
// NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(ConnectionType type) override {
+ void OnConnectionTypeChanged(ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
pending_connection_type_ = type;
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc
index e378418..14ec554 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -43,18 +43,14 @@ class NetworkChangeNotifierMac::DnsConfigServiceThread : public base::Thread {
public:
DnsConfigServiceThread() : base::Thread("DnsConfigService") {}
- virtual ~DnsConfigServiceThread() {
- Stop();
- }
+ ~DnsConfigServiceThread() override { Stop(); }
- virtual void Init() override {
+ void Init() override {
service_ = DnsConfigService::CreateSystemService();
service_->WatchConfig(base::Bind(&NetworkChangeNotifier::SetDnsConfig));
}
- virtual void CleanUp() override {
- service_.reset();
- }
+ void CleanUp() override { service_.reset(); }
private:
scoped_ptr<DnsConfigService> service_;
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 1598c4c..6f34087 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -21,10 +21,10 @@ namespace net {
class NetworkChangeNotifierMac: public NetworkChangeNotifier {
public:
NetworkChangeNotifierMac();
- virtual ~NetworkChangeNotifierMac();
+ ~NetworkChangeNotifierMac() override;
// NetworkChangeNotifier implementation:
- virtual ConnectionType GetCurrentConnectionType() const override;
+ ConnectionType GetCurrentConnectionType() const override;
// Forwarder just exists to keep the NetworkConfigWatcherMac API out of
// NetworkChangeNotifierMac's public API.
@@ -34,11 +34,10 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
: net_config_watcher_(net_config_watcher) {}
// NetworkConfigWatcherMac::Delegate implementation:
- virtual void Init() override;
- virtual void StartReachabilityNotifications() override;
- virtual void SetDynamicStoreNotificationKeys(
- SCDynamicStoreRef store) override;
- virtual void OnNetworkConfigChange(CFArrayRef changed_keys) override;
+ void Init() override;
+ void StartReachabilityNotifications() override;
+ void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) override;
+ void OnNetworkConfigChange(CFArrayRef changed_keys) override;
private:
NetworkChangeNotifierMac* const net_config_watcher_;
diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc
index 7d2377c..bdf75c3 100644
--- a/net/base/network_config_watcher_mac.cc
+++ b/net/base/network_config_watcher_mac.cc
@@ -31,12 +31,12 @@ void DynamicStoreCallback(SCDynamicStoreRef /* store */,
class NetworkConfigWatcherMacThread : public base::Thread {
public:
NetworkConfigWatcherMacThread(NetworkConfigWatcherMac::Delegate* delegate);
- virtual ~NetworkConfigWatcherMacThread();
+ ~NetworkConfigWatcherMacThread() override;
protected:
// base::Thread
- virtual void Init() override;
- virtual void CleanUp() override;
+ void Init() override;
+ void CleanUp() override;
private:
// The SystemConfiguration calls in this function can lead to contention early
diff --git a/net/base/prioritized_dispatcher_unittest.cc b/net/base/prioritized_dispatcher_unittest.cc
index 4cdf53b..40c7425 100644
--- a/net/base/prioritized_dispatcher_unittest.cc
+++ b/net/base/prioritized_dispatcher_unittest.cc
@@ -117,7 +117,7 @@ class PrioritizedDispatcherTest : public testing::Test {
}
// PriorityDispatch::Job interface
- virtual void Start() override {
+ void Start() override {
EXPECT_FALSE(running_);
handle_ = PrioritizedDispatcher::Handle();
running_ = true;
diff --git a/net/base/sdch_dictionary_fetcher.h b/net/base/sdch_dictionary_fetcher.h
index 86aaf48..d74f643 100644
--- a/net/base/sdch_dictionary_fetcher.h
+++ b/net/base/sdch_dictionary_fetcher.h
@@ -41,15 +41,15 @@ class NET_EXPORT SdchDictionaryFetcher
// this object.
SdchDictionaryFetcher(SdchFetcher::Delegate* consumer,
URLRequestContext* context);
- virtual ~SdchDictionaryFetcher();
+ ~SdchDictionaryFetcher() override;
// Implementation of SdchFetcher methods.
- virtual void Schedule(const GURL& dictionary_url) override;
- virtual void Cancel() override;
+ void Schedule(const GURL& dictionary_url) override;
+ void Cancel() override;
// Implementation of URLRequest::Delegate methods.
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
enum State {
diff --git a/net/base/sdch_dictionary_fetcher_unittest.cc b/net/base/sdch_dictionary_fetcher_unittest.cc
index a8b3040..af66681 100644
--- a/net/base/sdch_dictionary_fetcher_unittest.cc
+++ b/net/base/sdch_dictionary_fetcher_unittest.cc
@@ -58,11 +58,11 @@ class URLRequestSpecifiedResponseJob : public URLRequestSimpleJob {
static int jobs_requested() { return jobs_requested_; }
private:
- virtual ~URLRequestSpecifiedResponseJob() {};
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override {
+ ~URLRequestSpecifiedResponseJob() override{};
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override {
GURL url(request_->url());
*data = ExpectedResponseForURL(url);
return OK;
@@ -86,8 +86,8 @@ class SdchTestDelegate : public SdchFetcher::Delegate {
GURL dictionary_url;
};
- virtual void AddSdchDictionary(const std::string& dictionary_text,
- const GURL& dictionary_url) override {
+ void AddSdchDictionary(const std::string& dictionary_text,
+ const GURL& dictionary_url) override {
dictionary_additions.push_back(
DictionaryAdditions(dictionary_text, dictionary_url));
}
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 18f6749..b5f901b 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -252,7 +252,7 @@ class NET_EXPORT SdchManager
};
SdchManager();
- virtual ~SdchManager();
+ ~SdchManager() override;
// Clear data (for browser data removal).
void ClearData();
@@ -355,8 +355,8 @@ class NET_EXPORT SdchManager
// dictionaries. This addition will fail if addition is illegal
// (data in the dictionary is not acceptable from the
// dictionary_url; dictionary already added, etc.).
- virtual void AddSdchDictionary(const std::string& dictionary_text,
- const GURL& dictionary_url) override;
+ void AddSdchDictionary(const std::string& dictionary_text,
+ const GURL& dictionary_url) override;
private:
struct BlacklistInfo {
diff --git a/net/base/test_completion_callback.h b/net/base/test_completion_callback.h
index 469d12f..f5a9f8d 100644
--- a/net/base/test_completion_callback.h
+++ b/net/base/test_completion_callback.h
@@ -87,7 +87,7 @@ typedef internal::TestCompletionCallbackTemplate<int64>
class TestCompletionCallback : public TestCompletionCallbackBase {
public:
TestCompletionCallback();
- virtual ~TestCompletionCallback();
+ ~TestCompletionCallback() override;
const CompletionCallback& callback() const { return callback_; }
@@ -100,7 +100,7 @@ class TestCompletionCallback : public TestCompletionCallbackBase {
class TestInt64CompletionCallback : public TestInt64CompletionCallbackBase {
public:
TestInt64CompletionCallback();
- virtual ~TestInt64CompletionCallback();
+ ~TestInt64CompletionCallback() override;
const Int64CompletionCallback& callback() const { return callback_; }
@@ -114,10 +114,10 @@ class TestInt64CompletionCallback : public TestInt64CompletionCallbackBase {
class ReleaseBufferCompletionCallback: public TestCompletionCallback {
public:
explicit ReleaseBufferCompletionCallback(IOBuffer* buffer);
- virtual ~ReleaseBufferCompletionCallback();
+ ~ReleaseBufferCompletionCallback() override;
private:
- virtual void SetResult(int result) override;
+ void SetResult(int result) override;
IOBuffer* buffer_;
DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback);
diff --git a/net/base/trace_net_log_observer.cc b/net/base/trace_net_log_observer.cc
index 77945fb..15960c3 100644
--- a/net/base/trace_net_log_observer.cc
+++ b/net/base/trace_net_log_observer.cc
@@ -24,9 +24,9 @@ class TracedValue : public base::debug::ConvertableToTraceFormat {
explicit TracedValue(scoped_ptr<base::Value> value) : value_(value.Pass()) {}
private:
- virtual ~TracedValue() {}
+ ~TracedValue() override {}
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
if (value_) {
std::string tmp;
base::JSONWriter::Write(value_.get(), &tmp);
diff --git a/net/base/trace_net_log_observer.h b/net/base/trace_net_log_observer.h
index 567ba3f..9fc062b 100644
--- a/net/base/trace_net_log_observer.h
+++ b/net/base/trace_net_log_observer.h
@@ -19,10 +19,10 @@ class NET_EXPORT TraceNetLogObserver
public base::debug::TraceLog::EnabledStateObserver {
public:
TraceNetLogObserver();
- virtual ~TraceNetLogObserver();
+ ~TraceNetLogObserver() override;
// net::NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const NetLog::Entry& entry) override;
+ void OnAddEntry(const NetLog::Entry& entry) override;
// Start to watch for TraceLog enable and disable events.
// This can't be called if already watching for events.
@@ -35,8 +35,8 @@ class NET_EXPORT TraceNetLogObserver
void StopWatchForTraceStart();
// base::debug::TraceLog::EnabledStateChangedObserver implementation:
- virtual void OnTraceLogEnabled() override;
- virtual void OnTraceLogDisabled() override;
+ void OnTraceLogEnabled() override;
+ void OnTraceLogDisabled() override;
private:
NetLog* net_log_to_watch_;
diff --git a/net/base/upload_bytes_element_reader.h b/net/base/upload_bytes_element_reader.h
index 589e287..3246d12 100644
--- a/net/base/upload_bytes_element_reader.h
+++ b/net/base/upload_bytes_element_reader.h
@@ -20,20 +20,20 @@ namespace net {
class NET_EXPORT UploadBytesElementReader : public UploadElementReader {
public:
UploadBytesElementReader(const char* bytes, uint64 length);
- virtual ~UploadBytesElementReader();
+ ~UploadBytesElementReader() override;
const char* bytes() const { return bytes_; }
uint64 length() const { return length_; }
// UploadElementReader overrides:
- virtual const UploadBytesElementReader* AsBytesReader() const override;
- virtual int Init(const CompletionCallback& callback) override;
- virtual uint64 GetContentLength() const override;
- virtual uint64 BytesRemaining() const override;
- virtual bool IsInMemory() const override;
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override;
+ const UploadBytesElementReader* AsBytesReader() const override;
+ int Init(const CompletionCallback& callback) override;
+ uint64 GetContentLength() const override;
+ uint64 BytesRemaining() const override;
+ bool IsInMemory() const override;
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override;
private:
const char* const bytes_;
@@ -49,7 +49,7 @@ class NET_EXPORT UploadOwnedBytesElementReader
public:
// |data| is cleared by this ctor.
explicit UploadOwnedBytesElementReader(std::vector<char>* data);
- virtual ~UploadOwnedBytesElementReader();
+ ~UploadOwnedBytesElementReader() override;
// Creates UploadOwnedBytesElementReader with a string.
static UploadOwnedBytesElementReader* CreateWithString(
diff --git a/net/base/upload_file_element_reader.h b/net/base/upload_file_element_reader.h
index dc27585..fc3f334 100644
--- a/net/base/upload_file_element_reader.h
+++ b/net/base/upload_file_element_reader.h
@@ -32,7 +32,7 @@ class NET_EXPORT UploadFileElementReader : public UploadElementReader {
uint64 range_offset,
uint64 range_length,
const base::Time& expected_modification_time);
- virtual ~UploadFileElementReader();
+ ~UploadFileElementReader() override;
const base::FilePath& path() const { return path_; }
uint64 range_offset() const { return range_offset_; }
@@ -42,13 +42,13 @@ class NET_EXPORT UploadFileElementReader : public UploadElementReader {
}
// UploadElementReader overrides:
- virtual const UploadFileElementReader* AsFileReader() const override;
- virtual int Init(const CompletionCallback& callback) override;
- virtual uint64 GetContentLength() const override;
- virtual uint64 BytesRemaining() const override;
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override;
+ const UploadFileElementReader* AsFileReader() const override;
+ int Init(const CompletionCallback& callback) override;
+ uint64 GetContentLength() const override;
+ uint64 BytesRemaining() const override;
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override;
private:
FRIEND_TEST_ALL_PREFIXES(ElementsUploadDataStreamTest, FileSmallerThanLength);
diff --git a/net/cert/cert_verify_proc_mac.h b/net/cert/cert_verify_proc_mac.h
index f26768f..5cd7f4c 100644
--- a/net/cert/cert_verify_proc_mac.h
+++ b/net/cert/cert_verify_proc_mac.h
@@ -15,18 +15,18 @@ class CertVerifyProcMac : public CertVerifyProc {
public:
CertVerifyProcMac();
- virtual bool SupportsAdditionalTrustAnchors() const override;
+ bool SupportsAdditionalTrustAnchors() const override;
protected:
- virtual ~CertVerifyProcMac();
+ ~CertVerifyProcMac() override;
private:
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override;
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override;
};
} // namespace net
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc
index a71aa9a..4031eac 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -58,18 +58,18 @@ class WellKnownCaCertVerifyProc : public CertVerifyProc {
: is_well_known_(is_well_known) {}
// CertVerifyProc implementation:
- virtual bool SupportsAdditionalTrustAnchors() const override { return false; }
+ bool SupportsAdditionalTrustAnchors() const override { return false; }
protected:
- virtual ~WellKnownCaCertVerifyProc() {}
+ ~WellKnownCaCertVerifyProc() override {}
private:
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override;
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override;
const bool is_well_known_;
diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h
index e76f78f..000da11 100644
--- a/net/cert/mock_cert_verifier.h
+++ b/net/cert/mock_cert_verifier.h
@@ -22,18 +22,18 @@ class MockCertVerifier : public CertVerifier {
// handle a certificate or certificate and host.
MockCertVerifier();
- virtual ~MockCertVerifier();
+ ~MockCertVerifier() override;
// CertVerifier implementation
- virtual int Verify(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- CertVerifyResult* verify_result,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
+ int Verify(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ CertVerifyResult* verify_result,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
// Sets the default return value for Verify() for certificates/hosts that do
// not have explicit results added via the AddResult*() methods.
diff --git a/net/cert/multi_log_ct_verifier.h b/net/cert/multi_log_ct_verifier.h
index 70adf52..85bfa63 100644
--- a/net/cert/multi_log_ct_verifier.h
+++ b/net/cert/multi_log_ct_verifier.h
@@ -31,17 +31,17 @@ class CTLogVerifier;
class NET_EXPORT MultiLogCTVerifier : public CTVerifier {
public:
MultiLogCTVerifier();
- virtual ~MultiLogCTVerifier();
+ ~MultiLogCTVerifier() override;
void AddLog(scoped_ptr<CTLogVerifier> log_verifier);
void AddLogs(ScopedVector<CTLogVerifier> log_verifiers);
// CTVerifier implementation:
- virtual int Verify(X509Certificate* cert,
- const std::string& stapled_ocsp_response,
- const std::string& sct_list_from_tls_extension,
- ct::CTVerifyResult* result,
- const BoundNetLog& net_log) override;
+ int Verify(X509Certificate* cert,
+ const std::string& stapled_ocsp_response,
+ const std::string& sct_list_from_tls_extension,
+ ct::CTVerifyResult* result,
+ const BoundNetLog& net_log) override;
private:
// Mapping from a log's ID to the verifier for this log.
diff --git a/net/cert/multi_threaded_cert_verifier.h b/net/cert/multi_threaded_cert_verifier.h
index 2ca10f1..6880960 100644
--- a/net/cert/multi_threaded_cert_verifier.h
+++ b/net/cert/multi_threaded_cert_verifier.h
@@ -41,7 +41,7 @@ class NET_EXPORT_PRIVATE MultiThreadedCertVerifier
// When the verifier is destroyed, all certificate verifications requests are
// canceled, and their completion callbacks will not be called.
- virtual ~MultiThreadedCertVerifier();
+ ~MultiThreadedCertVerifier() override;
// Configures a source of additional certificates that should be treated as
// trust anchors during verification, provided that the underlying
@@ -54,16 +54,16 @@ class NET_EXPORT_PRIVATE MultiThreadedCertVerifier
CertTrustAnchorProvider* trust_anchor_provider);
// CertVerifier implementation
- virtual int Verify(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- CertVerifyResult* verify_result,
- const CompletionCallback& callback,
- CertVerifier::RequestHandle* out_req,
- const BoundNetLog& net_log) override;
+ int Verify(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ CertVerifyResult* verify_result,
+ const CompletionCallback& callback,
+ CertVerifier::RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(CertVerifier::RequestHandle req) override;
+ void CancelRequest(CertVerifier::RequestHandle req) override;
private:
friend class CertVerifierWorker; // Calls HandleResult.
@@ -137,7 +137,7 @@ class NET_EXPORT_PRIVATE MultiThreadedCertVerifier
const CertVerifyResult& verify_result);
// CertDatabase::Observer methods:
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
// For unit testing.
void ClearCache() { cache_.Clear(); }
diff --git a/net/cert/multi_threaded_cert_verifier_unittest.cc b/net/cert/multi_threaded_cert_verifier_unittest.cc
index cdf9b1d..bac47b0 100644
--- a/net/cert/multi_threaded_cert_verifier_unittest.cc
+++ b/net/cert/multi_threaded_cert_verifier_unittest.cc
@@ -36,19 +36,17 @@ class MockCertVerifyProc : public CertVerifyProc {
MockCertVerifyProc() {}
private:
- virtual ~MockCertVerifyProc() {}
+ ~MockCertVerifyProc() override {}
// CertVerifyProc implementation
- virtual bool SupportsAdditionalTrustAnchors() const override {
- return false;
- }
-
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override {
+ bool SupportsAdditionalTrustAnchors() const override { return false; }
+
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override {
verify_result->Reset();
verify_result->verified_cert = cert;
verify_result->cert_status = CERT_STATUS_COMMON_NAME_INVALID;
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 10a6f6b..dd64cce 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -428,10 +428,10 @@ class CookieMonster::SetCookieWithDetailsTask : public CookieMonsterTask {
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~SetCookieWithDetailsTask() {}
+ ~SetCookieWithDetailsTask() override {}
private:
GURL url_;
@@ -468,10 +468,10 @@ class CookieMonster::GetAllCookiesTask : public CookieMonsterTask {
}
// CookieMonsterTask
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetAllCookiesTask() {}
+ ~GetAllCookiesTask() override {}
private:
GetCookieListCallback callback_;
@@ -503,10 +503,10 @@ class CookieMonster::GetAllCookiesForURLWithOptionsTask
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetAllCookiesForURLWithOptionsTask() {}
+ ~GetAllCookiesForURLWithOptionsTask() override {}
private:
GURL url_;
@@ -596,10 +596,10 @@ class CookieMonster::DeleteAllTask : public DeleteTask<int> {
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllTask() {}
+ ~DeleteAllTask() override {}
private:
DISALLOW_COPY_AND_ASSIGN(DeleteAllTask);
@@ -622,10 +622,10 @@ class CookieMonster::DeleteAllCreatedBetweenTask : public DeleteTask<int> {
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllCreatedBetweenTask() {}
+ ~DeleteAllCreatedBetweenTask() override {}
private:
Time delete_begin_;
@@ -650,10 +650,10 @@ class CookieMonster::DeleteAllForHostTask : public DeleteTask<int> {
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllForHostTask() {}
+ ~DeleteAllForHostTask() override {}
private:
GURL url_;
@@ -682,10 +682,10 @@ class CookieMonster::DeleteAllCreatedBetweenForHostTask
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllCreatedBetweenForHostTask() {}
+ ~DeleteAllCreatedBetweenForHostTask() override {}
private:
Time delete_begin_;
@@ -711,10 +711,10 @@ class CookieMonster::DeleteCanonicalCookieTask : public DeleteTask<bool> {
}
// DeleteTask:
- virtual bool RunDeleteTask() override;
+ bool RunDeleteTask() override;
protected:
- virtual ~DeleteCanonicalCookieTask() {}
+ ~DeleteCanonicalCookieTask() override {}
private:
CanonicalCookie cookie_;
@@ -742,10 +742,10 @@ class CookieMonster::SetCookieWithOptionsTask : public CookieMonsterTask {
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~SetCookieWithOptionsTask() {}
+ ~SetCookieWithOptionsTask() override {}
private:
GURL url_;
@@ -779,10 +779,10 @@ class CookieMonster::GetCookiesWithOptionsTask : public CookieMonsterTask {
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetCookiesWithOptionsTask() {}
+ ~GetCookiesWithOptionsTask() override {}
private:
GURL url_;
@@ -814,10 +814,10 @@ class CookieMonster::DeleteCookieTask : public DeleteTask<void> {
}
// DeleteTask:
- virtual void RunDeleteTask() override;
+ void RunDeleteTask() override;
protected:
- virtual ~DeleteCookieTask() {}
+ ~DeleteCookieTask() override {}
private:
GURL url_;
@@ -839,10 +839,10 @@ class CookieMonster::DeleteSessionCookiesTask : public DeleteTask<int> {
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteSessionCookiesTask() {}
+ ~DeleteSessionCookiesTask() override {}
private:
DISALLOW_COPY_AND_ASSIGN(DeleteSessionCookiesTask);
@@ -865,10 +865,10 @@ class CookieMonster::HasCookiesForETLDP1Task : public CookieMonsterTask {
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~HasCookiesForETLDP1Task() {}
+ ~HasCookiesForETLDP1Task() override {}
private:
std::string etldp1_;
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 746f2a4..741c22e 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -239,38 +239,34 @@ class NET_EXPORT CookieMonster : public CookieStore {
// Sets the cookies specified by |cookie_list| returned from |url|
// with options |options| in effect.
- virtual void SetCookieWithOptionsAsync(
- const GURL& url,
- const std::string& cookie_line,
- const CookieOptions& options,
- const SetCookiesCallback& callback) override;
+ void SetCookieWithOptionsAsync(const GURL& url,
+ const std::string& cookie_line,
+ const CookieOptions& options,
+ const SetCookiesCallback& callback) override;
// Gets all cookies that apply to |url| given |options|.
// The returned cookies are ordered by longest path, then earliest
// creation date.
- virtual void GetCookiesWithOptionsAsync(
- const GURL& url,
- const CookieOptions& options,
- const GetCookiesCallback& callback) override;
+ void GetCookiesWithOptionsAsync(const GURL& url,
+ const CookieOptions& options,
+ const GetCookiesCallback& callback) override;
// Invokes GetAllCookiesForURLWithOptions with options set to include HTTP
// only cookies.
- virtual void GetAllCookiesForURLAsync(
- const GURL& url,
- const GetCookieListCallback& callback) override;
+ void GetAllCookiesForURLAsync(const GURL& url,
+ const GetCookieListCallback& callback) override;
// Deletes all cookies with that might apply to |url| that has |cookie_name|.
- virtual void DeleteCookieAsync(
- const GURL& url, const std::string& cookie_name,
- const base::Closure& callback) override;
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override;
// Deletes all of the cookies that have a creation_date greater than or equal
// to |delete_begin| and less than |delete_end|.
// Returns the number of cookies that have been deleted.
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override;
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override;
// Deletes all of the cookies that match the host of the given URL
// regardless of path and that have a creation_date greater than or
@@ -278,15 +274,15 @@ class NET_EXPORT CookieMonster : public CookieStore {
// all http_only and secure cookies, but does not include any domain
// cookies that may apply to this host.
// Returns the number of cookies deleted.
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
const DeleteCallback& callback) override;
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override;
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override;
- virtual CookieMonster* GetCookieMonster() override;
+ CookieMonster* GetCookieMonster() override;
// Enables writing session cookies into the cookie database. If this this
// method is called, it must be called before first use of the instance
@@ -408,7 +404,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
// Record statistics every kRecordStatisticsIntervalSeconds of uptime.
static const int kRecordStatisticsIntervalSeconds = 10 * 60;
- virtual ~CookieMonster();
+ ~CookieMonster() override;
// The following are synchronous calls to which the asynchronous methods
// delegate either immediately (if the store is loaded) or through a deferred
diff --git a/net/cookies/cookie_monster_store_test.h b/net/cookies/cookie_monster_store_test.h
index c3a2827..4a3f9a9 100644
--- a/net/cookies/cookie_monster_store_test.h
+++ b/net/cookies/cookie_monster_store_test.h
@@ -82,25 +82,23 @@ class MockPersistentCookieStore
return commands_;
}
- virtual void Load(const LoadedCallback& loaded_callback) override;
+ void Load(const LoadedCallback& loaded_callback) override;
- virtual void LoadCookiesForKey(const std::string& key,
- const LoadedCallback& loaded_callback) override;
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override;
- virtual void AddCookie(const CanonicalCookie& cookie) override;
+ void AddCookie(const CanonicalCookie& cookie) override;
- virtual void UpdateCookieAccessTime(
- const CanonicalCookie& cookie) override;
+ void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
- virtual void DeleteCookie(
- const CanonicalCookie& cookie) override;
+ void DeleteCookie(const CanonicalCookie& cookie) override;
- virtual void Flush(const base::Closure& callback) override;
+ void Flush(const base::Closure& callback) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockPersistentCookieStore();
+ ~MockPersistentCookieStore() override;
private:
CommandList commands_;
@@ -127,15 +125,14 @@ class MockCookieMonsterDelegate : public CookieMonsterDelegate {
void reset() { changes_.clear(); }
- virtual void OnCookieChanged(
- const CanonicalCookie& cookie,
- bool removed,
- CookieMonsterDelegate::ChangeCause cause) override;
+ void OnCookieChanged(const CanonicalCookie& cookie,
+ bool removed,
+ CookieMonsterDelegate::ChangeCause cause) override;
- virtual void OnLoaded() override;
+ void OnLoaded() override;
private:
- virtual ~MockCookieMonsterDelegate();
+ ~MockCookieMonsterDelegate() override;
std::vector<CookieNotification> changes_;
@@ -161,23 +158,23 @@ class MockSimplePersistentCookieStore
public:
MockSimplePersistentCookieStore();
- virtual void Load(const LoadedCallback& loaded_callback) override;
+ void Load(const LoadedCallback& loaded_callback) override;
- virtual void LoadCookiesForKey(const std::string& key,
- const LoadedCallback& loaded_callback) override;
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override;
- virtual void AddCookie(const CanonicalCookie& cookie) override;
+ void AddCookie(const CanonicalCookie& cookie) override;
- virtual void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
+ void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
- virtual void DeleteCookie(const CanonicalCookie& cookie) override;
+ void DeleteCookie(const CanonicalCookie& cookie) override;
- virtual void Flush(const base::Closure& callback) override;
+ void Flush(const base::Closure& callback) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockSimplePersistentCookieStore();
+ ~MockSimplePersistentCookieStore() override;
private:
typedef std::map<int64, CanonicalCookie> CanonicalCookieMap;
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 34a50bb..5c76e8a 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -2165,7 +2165,7 @@ class FlushablePersistentStore : public CookieMonster::PersistentCookieStore {
public:
FlushablePersistentStore() : flush_count_(0) {}
- virtual void Load(const LoadedCallback& loaded_callback) override {
+ void Load(const LoadedCallback& loaded_callback) override {
std::vector<CanonicalCookie*> out_cookies;
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -2173,18 +2173,17 @@ class FlushablePersistentStore : public CookieMonster::PersistentCookieStore {
new net::LoadedCallbackTask(loaded_callback, out_cookies)));
}
- virtual void LoadCookiesForKey(
- const std::string& key,
- const LoadedCallback& loaded_callback) override {
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override {
Load(loaded_callback);
}
- virtual void AddCookie(const CanonicalCookie&) override {}
- virtual void UpdateCookieAccessTime(const CanonicalCookie&) override {}
- virtual void DeleteCookie(const CanonicalCookie&) override {}
- virtual void SetForceKeepSessionState() override {}
+ void AddCookie(const CanonicalCookie&) override {}
+ void UpdateCookieAccessTime(const CanonicalCookie&) override {}
+ void DeleteCookie(const CanonicalCookie&) override {}
+ void SetForceKeepSessionState() override {}
- virtual void Flush(const base::Closure& callback) override {
+ void Flush(const base::Closure& callback) override {
++flush_count_;
if (!callback.is_null())
callback.Run();
@@ -2195,7 +2194,7 @@ class FlushablePersistentStore : public CookieMonster::PersistentCookieStore {
}
private:
- virtual ~FlushablePersistentStore() {}
+ ~FlushablePersistentStore() override {}
volatile int flush_count_;
};
diff --git a/net/cookies/cookie_store_test_helpers.h b/net/cookies/cookie_store_test_helpers.h
index e4e7156..2b8b245 100644
--- a/net/cookies/cookie_store_test_helpers.h
+++ b/net/cookies/cookie_store_test_helpers.h
@@ -23,20 +23,19 @@ class DelayedCookieMonster : public CookieStore {
// invoke the internal callback.
// Post a delayed task to invoke the original callback with the results.
- virtual void SetCookieWithOptionsAsync(
+ void SetCookieWithOptionsAsync(
const GURL& url,
const std::string& cookie_line,
const CookieOptions& options,
const CookieMonster::SetCookiesCallback& callback) override;
- virtual void GetCookiesWithOptionsAsync(
+ void GetCookiesWithOptionsAsync(
const GURL& url,
const CookieOptions& options,
const CookieMonster::GetCookiesCallback& callback) override;
- virtual void GetAllCookiesForURLAsync(
- const GURL& url,
- const GetCookieListCallback& callback) override;
+ void GetAllCookiesForURLAsync(const GURL& url,
+ const GetCookieListCallback& callback) override;
virtual bool SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
@@ -48,24 +47,23 @@ class DelayedCookieMonster : public CookieStore {
virtual void DeleteCookie(const GURL& url,
const std::string& cookie_name);
- virtual void DeleteCookieAsync(const GURL& url,
- const std::string& cookie_name,
- const base::Closure& callback) override;
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override;
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override;
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override;
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
const DeleteCallback& callback) override;
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override;
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override;
- virtual CookieMonster* GetCookieMonster() override;
+ CookieMonster* GetCookieMonster() override;
private:
@@ -84,7 +82,7 @@ class DelayedCookieMonster : public CookieStore {
const CookieMonster::GetCookiesCallback& callback);
friend class base::RefCountedThreadSafe<DelayedCookieMonster>;
- virtual ~DelayedCookieMonster();
+ ~DelayedCookieMonster() override;
scoped_refptr<CookieMonster> cookie_monster_;
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index b3b80b4..e06efd9 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -1840,10 +1840,10 @@ TEST_F(DiskCacheTest, WrongVersion) {
class BadEntropyProvider : public base::FieldTrial::EntropyProvider {
public:
- virtual ~BadEntropyProvider() {}
+ ~BadEntropyProvider() override {}
- virtual double GetEntropyForTrial(const std::string& trial_name,
- uint32 randomization_seed) const override {
+ double GetEntropyForTrial(const std::string& trial_name,
+ uint32 randomization_seed) const override {
return 0.5;
}
};
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index bcac374..20995b7 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -1254,13 +1254,13 @@ class BackendImpl::IteratorImpl : public Backend::Iterator {
iterator_(new Rankings::Iterator()) {
}
- virtual ~IteratorImpl() {
+ ~IteratorImpl() override {
if (background_queue_)
background_queue_->EndEnumeration(iterator_.Pass());
}
- virtual int OpenNextEntry(Entry** next_entry,
- const net::CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const net::CompletionCallback& callback) override {
if (!background_queue_)
return net::ERR_FAILED;
background_queue_->OpenNextEntry(iterator_.get(), next_entry, callback);
diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h
index e81b928..d3a81ac 100644
--- a/net/disk_cache/blockfile/backend_impl.h
+++ b/net/disk_cache/blockfile/backend_impl.h
@@ -57,7 +57,7 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
uint32 mask,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~BackendImpl();
+ ~BackendImpl() override;
// Performs general initialization for this current instance of the cache.
int Init(const CompletionCallback& callback);
@@ -259,20 +259,22 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
void FlushIndex();
// Backend implementation.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
// NOTE: The blockfile Backend::Iterator::OpenNextEntry method does not modify
// the last_used field of the entry, and therefore it does not impact the
// eviction ranking of the entry. However, an enumeration will go through all
@@ -281,9 +283,9 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
// the iterator (for example, deleting the entry) will invalidate the
// iterator. Performing operations on an entry that modify the entry may
// result in loops in the iteration, skipped entries or similar.
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(StatsItems* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(StatsItems* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
private:
typedef base::hash_map<CacheAddr, EntryImpl*> EntriesMap;
diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index 09794d3..a1024b4 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -1510,8 +1510,8 @@ int BackendImplV3::DoomEntriesSince(base::Time initial_time,
class BackendImplV3::NotImplementedIterator : public Backend::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/disk_cache/blockfile/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h
index 6f4f882..45ce6ac 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.h
+++ b/net/disk_cache/blockfile/backend_impl_v3.h
@@ -50,7 +50,7 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
BackendImplV3(const base::FilePath& path,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~BackendImplV3();
+ ~BackendImplV3() override;
// Performs general initialization for this current instance of the cache.
int Init(const CompletionCallback& callback);
@@ -172,23 +172,25 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
int SelfCheck();
// Backend implementation.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(StatsItems* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(StatsItems* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
private:
friend class EvictionV3;
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index 2b98470..0a882de 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -44,9 +44,9 @@ class SyncCallback: public disk_cache::FileIOCallback {
entry->AddRef();
entry->IncrementIoCount();
}
- virtual ~SyncCallback() {}
+ ~SyncCallback() override {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
void Discard();
private:
diff --git a/net/disk_cache/blockfile/entry_impl.h b/net/disk_cache/blockfile/entry_impl.h
index fea815dc..1dc7ed5 100644
--- a/net/disk_cache/blockfile/entry_impl.h
+++ b/net/disk_cache/blockfile/entry_impl.h
@@ -147,26 +147,38 @@ class NET_EXPORT_PRIVATE EntryImpl
static int NumBlocksForEntry(int key_size);
// Entry interface.
- 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, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ 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,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
enum {
@@ -174,7 +186,7 @@ class NET_EXPORT_PRIVATE EntryImpl
};
class UserBuffer;
- virtual ~EntryImpl();
+ ~EntryImpl() override;
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/blockfile/entry_impl_v3.h b/net/disk_cache/blockfile/entry_impl_v3.h
index 4215000..c693c2a 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.h
+++ b/net/disk_cache/blockfile/entry_impl_v3.h
@@ -77,26 +77,38 @@ class NET_EXPORT_PRIVATE EntryImplV3
const net::BoundNetLog& net_log() const;
// Entry interface.
- 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, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ 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,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
enum {
@@ -104,7 +116,7 @@ class NET_EXPORT_PRIVATE EntryImplV3
};
class UserBuffer;
- virtual ~EntryImplV3();
+ ~EntryImplV3() override;
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/blockfile/file_posix.cc b/net/disk_cache/blockfile/file_posix.cc
index c451aa3..828673f 100644
--- a/net/disk_cache/blockfile/file_posix.cc
+++ b/net/disk_cache/blockfile/file_posix.cc
@@ -24,7 +24,7 @@ class FileWorkerPool : public base::SequencedWorkerPool {
FileWorkerPool() : base::SequencedWorkerPool(kMaxThreads, "CachePool") {}
protected:
- virtual ~FileWorkerPool() {}
+ ~FileWorkerPool() override {}
};
base::LazyInstance<FileWorkerPool>::Leaky s_worker_pool =
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.h b/net/disk_cache/blockfile/in_flight_backend_io.h
index 4b10405..e2fa4e7 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.h
+++ b/net/disk_cache/blockfile/in_flight_backend_io.h
@@ -107,7 +107,7 @@ class BackendIO : public BackgroundIO {
OP_IS_READY
};
- virtual ~BackendIO();
+ ~BackendIO() override;
// Returns true if this operation returns an entry.
bool ReturnsEntry();
@@ -149,7 +149,7 @@ class InFlightBackendIO : public InFlightIO {
InFlightBackendIO(
BackendImpl* backend,
const scoped_refptr<base::SingleThreadTaskRunner>& background_thread);
- virtual ~InFlightBackendIO();
+ ~InFlightBackendIO() override;
// Proxied operations.
void Init(const net::CompletionCallback& callback);
@@ -204,8 +204,7 @@ class InFlightBackendIO : public InFlightIO {
base::WeakPtr<InFlightBackendIO> GetWeakPtr();
protected:
- virtual void OnOperationComplete(BackgroundIO* operation,
- bool cancel) override;
+ void OnOperationComplete(BackgroundIO* operation, bool cancel) override;
private:
void PostOperation(BackendIO* operation);
diff --git a/net/disk_cache/blockfile/index_table_v3_unittest.cc b/net/disk_cache/blockfile/index_table_v3_unittest.cc
index 7f68ee3..ee48951 100644
--- a/net/disk_cache/blockfile/index_table_v3_unittest.cc
+++ b/net/disk_cache/blockfile/index_table_v3_unittest.cc
@@ -30,17 +30,17 @@ int GetChecksum(const IndexCell& source) {
class MockIndexBackend : public disk_cache::IndexTableBackend {
public:
MockIndexBackend() : grow_called_(false), buffer_len_(-1) {}
- virtual ~MockIndexBackend() {}
+ ~MockIndexBackend() override {}
bool grow_called() const { return grow_called_; }
int buffer_len() const { return buffer_len_; }
- virtual void GrowIndex() override { grow_called_ = true; }
- virtual void SaveIndex(net::IOBuffer* buffer, int buffer_len) override {
+ void GrowIndex() override { grow_called_ = true; }
+ void SaveIndex(net::IOBuffer* buffer, int buffer_len) override {
buffer_len_ = buffer_len;
}
- virtual void DeleteCell(EntryCell cell) override {}
- virtual void FixCell(EntryCell cell) override {}
+ void DeleteCell(EntryCell cell) override {}
+ void FixCell(EntryCell cell) override {}
private:
bool grow_called_;
diff --git a/net/disk_cache/blockfile/mapped_file.h b/net/disk_cache/blockfile/mapped_file.h
index f0efa41..7634cb7 100644
--- a/net/disk_cache/blockfile/mapped_file.h
+++ b/net/disk_cache/blockfile/mapped_file.h
@@ -51,7 +51,7 @@ class NET_EXPORT_PRIVATE MappedFile : public File {
bool Preload();
private:
- virtual ~MappedFile();
+ ~MappedFile() override;
bool init_;
#if defined(OS_WIN)
diff --git a/net/disk_cache/blockfile/mapped_file_unittest.cc b/net/disk_cache/blockfile/mapped_file_unittest.cc
index 8093e9a1..9b31d6d 100644
--- a/net/disk_cache/blockfile/mapped_file_unittest.cc
+++ b/net/disk_cache/blockfile/mapped_file_unittest.cc
@@ -21,9 +21,9 @@ class FileCallbackTest: public disk_cache::FileIOCallback {
helper_(helper),
max_id_(max_id) {
}
- virtual ~FileCallbackTest() {}
+ ~FileCallbackTest() override {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
private:
int id_;
@@ -45,12 +45,12 @@ class TestFileBlock : public disk_cache::FileBlock {
TestFileBlock() {
CacheTestFillBuffer(buffer_, sizeof(buffer_), false);
}
- virtual ~TestFileBlock() {}
+ ~TestFileBlock() override {}
// FileBlock interface.
- virtual void* buffer() const override { return const_cast<char*>(buffer_); }
- virtual size_t size() const override { return sizeof(buffer_); }
- virtual int offset() const override { return 1024; }
+ void* buffer() const override { return const_cast<char*>(buffer_); }
+ size_t size() const override { return sizeof(buffer_); }
+ int offset() const override { return 1024; }
private:
char buffer_[20];
diff --git a/net/disk_cache/blockfile/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc
index ddb57b6..30ea836 100644
--- a/net/disk_cache/blockfile/sparse_control.cc
+++ b/net/disk_cache/blockfile/sparse_control.cc
@@ -56,7 +56,7 @@ class ChildrenDeleter
ChildrenDeleter(disk_cache::BackendImpl* backend, const std::string& name)
: backend_(backend->GetWeakPtr()), name_(name), signature_(0) {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
// Two ways of deleting the children: if we have the children map, use Start()
// directly, otherwise pass the data address to ReadData().
@@ -65,7 +65,7 @@ class ChildrenDeleter
private:
friend class base::RefCounted<ChildrenDeleter>;
- virtual ~ChildrenDeleter() {}
+ ~ChildrenDeleter() override {}
void DeleteChildren();
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index a3a7747..6081137 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2063,7 +2063,7 @@ class SparseTestCompletionCallback: public net::TestCompletionCallback {
}
private:
- virtual void SetResult(int result) override {
+ void SetResult(int result) override {
cache_.reset();
TestCompletionCallback::SetResult(result);
}
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 046623f..cc33a00 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -187,8 +187,8 @@ class MemBackendImpl::MemIterator : public Backend::Iterator {
: backend_(backend), current_(NULL) {
}
- virtual int OpenNextEntry(Entry** next_entry,
- const CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const CompletionCallback& callback) override {
if (!backend_)
return net::ERR_FAILED;
diff --git a/net/disk_cache/memory/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h
index 46505ea..7b18ca0 100644
--- a/net/disk_cache/memory/mem_backend_impl.h
+++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -26,7 +26,7 @@ class MemEntryImpl;
class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
public:
explicit MemBackendImpl(net::NetLog* net_log);
- virtual ~MemBackendImpl();
+ ~MemBackendImpl() override;
// Returns an instance of a Backend implemented only in memory. The returned
// object should be deleted when not needed anymore. max_bytes is the maximum
@@ -63,24 +63,26 @@ class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
void RemoveFromRankingList(MemEntryImpl* entry);
// Backend interface.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const 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;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const 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;
private:
class MemIterator;
diff --git a/net/disk_cache/memory/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
index d31e14a..0d9acbe 100644
--- a/net/disk_cache/memory/mem_entry_impl.h
+++ b/net/disk_cache/memory/mem_entry_impl.h
@@ -87,26 +87,38 @@ class MemEntryImpl : public Entry {
}
// Entry interface.
- 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, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override {}
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ 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,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override {}
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
typedef base::hash_map<int, MemEntryImpl*> EntryMap;
@@ -115,7 +127,7 @@ class MemEntryImpl : public Entry {
NUM_STREAMS = 3
};
- virtual ~MemEntryImpl();
+ ~MemEntryImpl() override;
// Do all the work for corresponding public functions. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 32b074a..6385a37 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -198,7 +198,7 @@ void RecordIndexLoad(net::CacheType cache_type,
class SimpleBackendImpl::ActiveEntryProxy
: public SimpleEntryImpl::ActiveEntryProxy {
public:
- virtual ~ActiveEntryProxy() {
+ ~ActiveEntryProxy() override {
if (backend_) {
DCHECK_EQ(1U, backend_->active_entries_.count(entry_hash_));
backend_->active_entries_.erase(entry_hash_);
@@ -475,8 +475,8 @@ class SimpleBackendImpl::SimpleIterator final : public Iterator {
}
// From Backend::Iterator:
- virtual int OpenNextEntry(Entry** next_entry,
- const CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const CompletionCallback& callback) override {
CompletionCallback open_next_entry_impl =
base::Bind(&SimpleIterator::OpenNextEntryImpl,
weak_factory_.GetWeakPtr(), next_entry, callback);
diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h
index e5a50da..503fc49 100644
--- a/net/disk_cache/simple/simple_backend_impl.h
+++ b/net/disk_cache/simple/simple_backend_impl.h
@@ -56,7 +56,7 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~SimpleBackendImpl();
+ ~SimpleBackendImpl() override;
net::CacheType cache_type() const { return cache_type_; }
SimpleIndex* index() { return index_.get(); }
@@ -84,28 +84,30 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
void OnDoomComplete(uint64 entry_hash);
// SimpleIndexDelegate:
- virtual void DoomEntries(std::vector<uint64>* entry_hashes,
- const CompletionCallback& callback) override;
+ void DoomEntries(std::vector<uint64>* entry_hashes,
+ const CompletionCallback& callback) override;
// Backend:
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const 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;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const 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;
private:
class SimpleIterator;
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 7c11b96..ebc6bf1 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -80,38 +80,38 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry,
void SetKey(const std::string& key);
// From Entry:
- 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 stream_index,
- int offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int stream_index,
- int offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset,
- int len,
- int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ 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 stream_index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int stream_index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
class ScopedOperationRunner;
@@ -144,7 +144,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry,
CRC_CHECK_MAX = 4,
};
- virtual ~SimpleEntryImpl();
+ ~SimpleEntryImpl() override;
// Must be used to invoke a client-provided completion callback for an
// operation initiated through the backend (e.g. create, open) so that clients
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 19ea0f8..49eb8fb 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -79,8 +79,7 @@ class WrappedSimpleIndexFile : public SimpleIndexFile {
base::ThreadTaskRunnerHandle::Get(),
net::DISK_CACHE,
index_file_directory) {}
- virtual ~WrappedSimpleIndexFile() {
- }
+ ~WrappedSimpleIndexFile() override {}
const base::FilePath& GetIndexFilePath() const {
return index_file_;
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index 43e99ad..dc63989 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -57,19 +57,18 @@ class MockSimpleIndexFile : public SimpleIndexFile,
load_index_entries_calls_(0),
disk_writes_(0) {}
- virtual void LoadIndexEntries(
- base::Time cache_last_modified,
- const base::Closure& callback,
- SimpleIndexLoadResult* out_load_result) override {
+ void LoadIndexEntries(base::Time cache_last_modified,
+ const base::Closure& callback,
+ SimpleIndexLoadResult* out_load_result) override {
load_callback_ = callback;
load_result_ = out_load_result;
++load_index_entries_calls_;
}
- virtual void WriteToDisk(const SimpleIndex::EntrySet& entry_set,
- uint64 cache_size,
- const base::TimeTicks& start,
- bool app_on_background) override {
+ void WriteToDisk(const SimpleIndex::EntrySet& entry_set,
+ uint64 cache_size,
+ const base::TimeTicks& start,
+ bool app_on_background) override {
disk_writes_++;
disk_write_entry_set_ = entry_set;
}
@@ -120,8 +119,8 @@ class SimpleIndexTest : public testing::Test, public SimpleIndexDelegate {
}
// From SimpleIndexDelegate:
- virtual void DoomEntries(std::vector<uint64>* entry_hashes,
- const net::CompletionCallback& callback) override {
+ void DoomEntries(std::vector<uint64>* entry_hashes,
+ const net::CompletionCallback& callback) override {
std::for_each(entry_hashes->begin(), entry_hashes->end(),
std::bind1st(std::mem_fun(&SimpleIndex::Remove),
index_.get()));
diff --git a/net/dns/address_sorter_posix.h b/net/dns/address_sorter_posix.h
index ce3ffdb..cae787f 100644
--- a/net/dns/address_sorter_posix.h
+++ b/net/dns/address_sorter_posix.h
@@ -61,17 +61,17 @@ class NET_EXPORT_PRIVATE AddressSorterPosix
typedef std::map<IPAddressNumber, SourceAddressInfo> SourceAddressMap;
explicit AddressSorterPosix(ClientSocketFactory* socket_factory);
- virtual ~AddressSorterPosix();
+ ~AddressSorterPosix() override;
// AddressSorter:
- virtual void Sort(const AddressList& list,
- const CallbackType& callback) const override;
+ void Sort(const AddressList& list,
+ const CallbackType& callback) const override;
private:
friend class AddressSorterPosixTest;
// NetworkChangeNotifier::IPAddressObserver:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// Fills |info| with values for |address| from policy tables.
void FillPolicy(const IPAddressNumber& address,
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc
index 9039850..5dcfe709 100644
--- a/net/dns/address_sorter_posix_unittest.cc
+++ b/net/dns/address_sorter_posix_unittest.cc
@@ -33,36 +33,32 @@ class TestUDPClientSocket : public DatagramClientSocket {
explicit TestUDPClientSocket(const AddressMapping* mapping)
: mapping_(mapping), connected_(false) {}
- virtual ~TestUDPClientSocket() {}
+ ~TestUDPClientSocket() override {}
- virtual int Read(IOBuffer*, int, const CompletionCallback&) override {
+ int Read(IOBuffer*, int, const CompletionCallback&) override {
NOTIMPLEMENTED();
return OK;
}
- virtual int Write(IOBuffer*, int, const CompletionCallback&) override {
+ int Write(IOBuffer*, int, const CompletionCallback&) override {
NOTIMPLEMENTED();
return OK;
}
- virtual int SetReceiveBufferSize(int32) override {
- return OK;
- }
- virtual int SetSendBufferSize(int32) override {
- return OK;
- }
+ int SetReceiveBufferSize(int32) override { return OK; }
+ int SetSendBufferSize(int32) override { return OK; }
- virtual void Close() override {}
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ void Close() override {}
+ int GetPeerAddress(IPEndPoint* address) const override {
NOTIMPLEMENTED();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!connected_)
return ERR_UNEXPECTED;
*address = local_endpoint_;
return OK;
}
- virtual int Connect(const IPEndPoint& remote) override {
+ int Connect(const IPEndPoint& remote) override {
if (connected_)
return ERR_UNEXPECTED;
AddressMapping::const_iterator it = mapping_->find(remote.address());
@@ -73,9 +69,7 @@ class TestUDPClientSocket : public DatagramClientSocket {
return OK;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
+ const BoundNetLog& NetLog() const override { return net_log_; }
private:
BoundNetLog net_log_;
@@ -90,23 +84,23 @@ class TestUDPClientSocket : public DatagramClientSocket {
class TestSocketFactory : public ClientSocketFactory {
public:
TestSocketFactory() {}
- virtual ~TestSocketFactory() {}
+ ~TestSocketFactory() override {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType,
const RandIntCallback&,
NetLog*,
const NetLog::Source&) override {
return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_));
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList&,
NetLog*,
const NetLog::Source&) override {
NOTIMPLEMENTED();
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle>,
const HostPortPair&,
const SSLConfig&,
@@ -114,9 +108,7 @@ class TestSocketFactory : public ClientSocketFactory {
NOTIMPLEMENTED();
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
void AddMapping(const IPAddressNumber& dst, const IPAddressNumber& src) {
mapping_[dst] = src;
diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc
index de96c02..f3980df 100644
--- a/net/dns/dns_client.cc
+++ b/net/dns/dns_client.cc
@@ -24,7 +24,7 @@ class DnsClientImpl : public DnsClient {
: address_sorter_(AddressSorter::CreateAddressSorter()),
net_log_(net_log) {}
- virtual void SetConfig(const DnsConfig& config) override {
+ void SetConfig(const DnsConfig& config) override {
factory_.reset();
session_ = NULL;
if (config.IsValid() && !config.unhandled_options) {
@@ -40,17 +40,15 @@ class DnsClientImpl : public DnsClient {
}
}
- virtual const DnsConfig* GetConfig() const override {
+ const DnsConfig* GetConfig() const override {
return session_.get() ? &session_->config() : NULL;
}
- virtual DnsTransactionFactory* GetTransactionFactory() override {
+ DnsTransactionFactory* GetTransactionFactory() override {
return session_.get() ? factory_.get() : NULL;
}
- virtual AddressSorter* GetAddressSorter() override {
- return address_sorter_.get();
- }
+ AddressSorter* GetAddressSorter() override { return address_sorter_.get(); }
private:
scoped_refptr<DnsSession> session_;
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index c0664eb..6b79f9c 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -263,7 +263,7 @@ class DnsConfigServicePosix::ConfigReader : public SerialWorker {
explicit ConfigReader(DnsConfigServicePosix* service)
: service_(service), success_(false) {}
- virtual void DoWork() override {
+ void DoWork() override {
base::TimeTicks start_time = base::TimeTicks::Now();
ConfigParsePosixResult result = ReadDnsConfig(&dns_config_);
switch (result) {
@@ -285,7 +285,7 @@ class DnsConfigServicePosix::ConfigReader : public SerialWorker {
base::TimeTicks::Now() - start_time);
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
DCHECK(!IsCancelled());
if (success_) {
service_->OnConfigRead(dns_config_);
@@ -295,7 +295,7 @@ class DnsConfigServicePosix::ConfigReader : public SerialWorker {
}
private:
- virtual ~ConfigReader() {}
+ ~ConfigReader() override {}
DnsConfigServicePosix* service_;
// Written in DoWork, read in OnWorkFinished, no locking necessary.
@@ -312,9 +312,9 @@ class DnsConfigServicePosix::HostsReader : public SerialWorker {
: service_(service), path_(kFilePathHosts), success_(false) {}
private:
- virtual ~HostsReader() {}
+ ~HostsReader() override {}
- virtual void DoWork() override {
+ void DoWork() override {
base::TimeTicks start_time = base::TimeTicks::Now();
success_ = ParseHostsFile(path_, &hosts_);
UMA_HISTOGRAM_BOOLEAN("AsyncDNS.HostParseResult", success_);
@@ -322,7 +322,7 @@ class DnsConfigServicePosix::HostsReader : public SerialWorker {
base::TimeTicks::Now() - start_time);
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
if (success_) {
service_->OnHostsRead(hosts_);
} else {
diff --git a/net/dns/dns_config_service_posix.h b/net/dns/dns_config_service_posix.h
index 598d6ad..349c82d 100644
--- a/net/dns/dns_config_service_posix.h
+++ b/net/dns/dns_config_service_posix.h
@@ -23,12 +23,12 @@ namespace internal {
class NET_EXPORT_PRIVATE DnsConfigServicePosix : public DnsConfigService {
public:
DnsConfigServicePosix();
- virtual ~DnsConfigServicePosix();
+ ~DnsConfigServicePosix() override;
protected:
// DnsConfigService:
- virtual void ReadNow() override;
- virtual bool StartWatching() override;
+ void ReadNow() override;
+ bool StartWatching() override;
private:
class Watcher;
diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc
index 0239f80..74020c8 100644
--- a/net/dns/dns_config_service_unittest.cc
+++ b/net/dns/dns_config_service_unittest.cc
@@ -121,8 +121,8 @@ class DnsConfigServiceTest : public testing::Test {
protected:
class TestDnsConfigService : public DnsConfigService {
public:
- virtual void ReadNow() override {}
- virtual bool StartWatching() override { return true; }
+ void ReadNow() override {}
+ bool StartWatching() override { return true; }
// Expose the protected methods to this test suite.
void InvalidateConfig() {
diff --git a/net/dns/dns_session_unittest.cc b/net/dns/dns_session_unittest.cc
index 166abef..67080ca 100644
--- a/net/dns/dns_session_unittest.cc
+++ b/net/dns/dns_session_unittest.cc
@@ -24,22 +24,23 @@ namespace {
class TestClientSocketFactory : public ClientSocketFactory {
public:
- virtual ~TestClientSocketFactory();
+ ~TestClientSocketFactory() override;
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
const net::NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
- NetLog*, const NetLog::Source&) override {
+ NetLog*,
+ const NetLog::Source&) override {
NOTIMPLEMENTED();
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -48,9 +49,7 @@ class TestClientSocketFactory : public ClientSocketFactory {
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
private:
std::list<SocketDataProvider*> data_providers_;
@@ -88,23 +87,21 @@ class MockDnsSocketPool : public DnsSocketPool {
MockDnsSocketPool(ClientSocketFactory* factory, DnsSessionTest* test)
: DnsSocketPool(factory), test_(test) { }
- virtual ~MockDnsSocketPool() { }
+ ~MockDnsSocketPool() override {}
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override {
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override {
InitializeInternal(nameservers, net_log);
}
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override {
test_->OnSocketAllocated(server_index);
return CreateConnectedSocket(server_index);
}
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override {
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override {
test_->OnSocketFreed(server_index);
}
diff --git a/net/dns/dns_socket_pool.cc b/net/dns/dns_socket_pool.cc
index 09aca5a..2c3c8c2 100644
--- a/net/dns/dns_socket_pool.cc
+++ b/net/dns/dns_socket_pool.cc
@@ -95,21 +95,18 @@ class NullDnsSocketPool : public DnsSocketPool {
: DnsSocketPool(factory) {
}
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override {
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override {
InitializeInternal(nameservers, net_log);
}
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override {
return CreateConnectedSocket(server_index);
}
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override {
- }
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override {}
private:
DISALLOW_COPY_AND_ASSIGN(NullDnsSocketPool);
@@ -127,18 +124,16 @@ class DefaultDnsSocketPool : public DnsSocketPool {
: DnsSocketPool(factory) {
};
- virtual ~DefaultDnsSocketPool();
+ ~DefaultDnsSocketPool() override;
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override;
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override;
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override;
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override;
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override;
private:
void FillPool(unsigned server_index, unsigned size);
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index 6327ed2..aee3ba7 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -25,9 +25,9 @@ namespace {
class MockAddressSorter : public AddressSorter {
public:
- virtual ~MockAddressSorter() {}
- virtual void Sort(const AddressList& list,
- const CallbackType& callback) const override {
+ ~MockAddressSorter() override {}
+ void Sort(const AddressList& list,
+ const CallbackType& callback) const override {
// Do nothing.
callback.Run(true, list);
}
@@ -166,9 +166,9 @@ class MockTransactionFactory : public DnsTransactionFactory {
explicit MockTransactionFactory(const MockDnsClientRuleList& rules)
: rules_(rules) {}
- virtual ~MockTransactionFactory() {}
+ ~MockTransactionFactory() override {}
- virtual scoped_ptr<DnsTransaction> CreateTransaction(
+ scoped_ptr<DnsTransaction> CreateTransaction(
const std::string& hostname,
uint16 qtype,
const DnsTransactionFactory::CallbackType& callback,
diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h
index 5b363c7..e168afc 100644
--- a/net/dns/dns_test_util.h
+++ b/net/dns/dns_test_util.h
@@ -208,13 +208,13 @@ typedef std::vector<MockDnsClientRule> MockDnsClientRuleList;
class MockDnsClient : public DnsClient {
public:
MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules);
- virtual ~MockDnsClient();
+ ~MockDnsClient() override;
// DnsClient interface:
- virtual void SetConfig(const DnsConfig& config) override;
- virtual const DnsConfig* GetConfig() const override;
- virtual DnsTransactionFactory* GetTransactionFactory() override;
- virtual AddressSorter* GetAddressSorter() override;
+ void SetConfig(const DnsConfig& config) override;
+ const DnsConfig* GetConfig() const override;
+ DnsTransactionFactory* GetTransactionFactory() override;
+ AddressSorter* GetAddressSorter() override;
// Completes all DnsTransactions that were delayed by a rule.
void CompleteDelayedTransactions();
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 32b5602..03eb7f2 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -141,7 +141,7 @@ class DnsUDPAttempt : public DnsAttempt {
query_(query.Pass()) {}
// DnsAttempt:
- virtual int Start(const CompletionCallback& callback) override {
+ int Start(const CompletionCallback& callback) override {
DCHECK_EQ(STATE_NONE, next_state_);
callback_ = callback;
start_time_ = base::TimeTicks::Now();
@@ -149,16 +149,14 @@ class DnsUDPAttempt : public DnsAttempt {
return DoLoop(OK);
}
- virtual const DnsQuery* GetQuery() const override {
- return query_.get();
- }
+ const DnsQuery* GetQuery() const override { return query_.get(); }
- virtual const DnsResponse* GetResponse() const override {
+ const DnsResponse* GetResponse() const override {
const DnsResponse* resp = response_.get();
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- virtual const BoundNetLog& GetSocketNetLog() const override {
+ const BoundNetLog& GetSocketNetLog() const override {
return socket_lease_->socket()->NetLog();
}
@@ -306,7 +304,7 @@ class DnsTCPAttempt : public DnsAttempt {
response_length_(0) {}
// DnsAttempt:
- virtual int Start(const CompletionCallback& callback) override {
+ int Start(const CompletionCallback& callback) override {
DCHECK_EQ(STATE_NONE, next_state_);
callback_ = callback;
start_time_ = base::TimeTicks::Now();
@@ -320,16 +318,14 @@ class DnsTCPAttempt : public DnsAttempt {
return DoLoop(rv);
}
- virtual const DnsQuery* GetQuery() const override {
- return query_.get();
- }
+ const DnsQuery* GetQuery() const override { return query_.get(); }
- virtual const DnsResponse* GetResponse() const override {
+ const DnsResponse* GetResponse() const override {
const DnsResponse* resp = response_.get();
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- virtual const BoundNetLog& GetSocketNetLog() const override {
+ const BoundNetLog& GetSocketNetLog() const override {
return socket_->NetLog();
}
@@ -567,24 +563,24 @@ class DnsTransactionImpl : public DnsTransaction,
DCHECK(!IsIPLiteral(hostname_));
}
- virtual ~DnsTransactionImpl() {
+ ~DnsTransactionImpl() override {
if (!callback_.is_null()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_DNS_TRANSACTION,
ERR_ABORTED);
} // otherwise logged in DoCallback or Start
}
- virtual const std::string& GetHostname() const override {
+ const std::string& GetHostname() const override {
DCHECK(CalledOnValidThread());
return hostname_;
}
- virtual uint16 GetType() const override {
+ uint16 GetType() const override {
DCHECK(CalledOnValidThread());
return qtype_;
}
- virtual void Start() override {
+ void Start() override {
DCHECK(!callback_.is_null());
DCHECK(attempts_.empty());
net_log_.BeginEvent(NetLog::TYPE_DNS_TRANSACTION,
@@ -968,7 +964,7 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory {
session_ = session;
}
- virtual scoped_ptr<DnsTransaction> CreateTransaction(
+ scoped_ptr<DnsTransaction> CreateTransaction(
const std::string& hostname,
uint16 qtype,
const CallbackType& callback,
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index e074966..5581f22 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -152,8 +152,8 @@ class FailingUDPClientSocket : public MockUDPClientSocket {
net::NetLog* net_log)
: MockUDPClientSocket(data, net_log) {
}
- virtual ~FailingUDPClientSocket() {}
- virtual int Connect(const IPEndPoint& endpoint) override {
+ ~FailingUDPClientSocket() override {}
+ int Connect(const IPEndPoint& endpoint) override {
return ERR_CONNECTION_REFUSED;
}
@@ -169,8 +169,8 @@ class TestUDPClientSocket : public MockUDPClientSocket {
net::NetLog* net_log)
: MockUDPClientSocket(data, net_log), factory_(factory) {
}
- virtual ~TestUDPClientSocket() {}
- virtual int Connect(const IPEndPoint& endpoint) override;
+ ~TestUDPClientSocket() override {}
+ int Connect(const IPEndPoint& endpoint) override;
private:
TestSocketFactory* factory_;
@@ -182,9 +182,9 @@ class TestUDPClientSocket : public MockUDPClientSocket {
class TestSocketFactory : public MockClientSocketFactory {
public:
TestSocketFactory() : fail_next_socket_(false) {}
- virtual ~TestSocketFactory() {}
+ ~TestSocketFactory() override {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 5632ef9..8913f17f 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -1221,7 +1221,7 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job,
&key_.hostname));
}
- virtual ~Job() {
+ ~Job() override {
if (is_running()) {
// |resolver_| was destroyed with this Job still in flight.
// Clean-up, record in the log, but don't run any callbacks.
@@ -1424,7 +1424,7 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job,
}
// PriorityDispatch::Job:
- virtual void Start() override {
+ void Start() override {
DCHECK_LE(num_occupied_job_slots_, 1u);
handle_.Reset();
@@ -1587,10 +1587,10 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job,
// HostResolverImpl::DnsTask::Delegate implementation:
- virtual void OnDnsTaskComplete(base::TimeTicks start_time,
- int net_error,
- const AddressList& addr_list,
- base::TimeDelta ttl) override {
+ void OnDnsTaskComplete(base::TimeTicks start_time,
+ int net_error,
+ const AddressList& addr_list,
+ base::TimeDelta ttl) override {
DCHECK(is_dns_running());
base::TimeDelta duration = base::TimeTicks::Now() - start_time;
@@ -1625,7 +1625,7 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job,
bounded_ttl);
}
- virtual void OnFirstDnsTransactionComplete() override {
+ void OnFirstDnsTransactionComplete() override {
DCHECK(dns_task_->needs_two_transactions());
DCHECK_EQ(dns_task_->needs_another_transaction(), is_queued());
// No longer need to occupy two dispatcher slots.
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index edd64fc..35ecb06 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -111,7 +111,7 @@ class NET_EXPORT HostResolverImpl
// If any completion callbacks are pending when the resolver is destroyed,
// the host resolutions are cancelled, and the completion callbacks will not
// be called.
- virtual ~HostResolverImpl();
+ ~HostResolverImpl() override;
// Configures maximum number of Jobs in the queue. Exposed for testing.
// Only allowed when the queue is empty.
@@ -124,21 +124,21 @@ class NET_EXPORT HostResolverImpl
void SetDnsClient(scoped_ptr<DnsClient> dns_client);
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& source_net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& source_net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual void SetDefaultAddressFamily(AddressFamily address_family) override;
- virtual AddressFamily GetDefaultAddressFamily() const override;
- virtual void SetDnsClientEnabled(bool enabled) override;
- virtual HostCache* GetHostCache() override;
- virtual base::Value* GetDnsConfigAsValue() const override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& source_net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& source_net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ void SetDefaultAddressFamily(AddressFamily address_family) override;
+ AddressFamily GetDefaultAddressFamily() const override;
+ void SetDnsClientEnabled(bool enabled) override;
+ HostCache* GetHostCache() override;
+ base::Value* GetDnsConfigAsValue() const override;
void set_proc_params_for_test(const ProcTaskParams& proc_params) {
proc_params_ = proc_params;
@@ -220,10 +220,10 @@ class NET_EXPORT HostResolverImpl
void TryServingAllJobsFromHosts();
// NetworkChangeNotifier::IPAddressObserver:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// NetworkChangeNotifier::DNSObserver:
- virtual void OnDNSChanged() override;
+ void OnDNSChanged() override;
// True if have a DnsClient with a valid DnsConfig.
bool HaveDnsConfig() const;
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index dadc03d..017625f 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -125,11 +125,11 @@ class MockHostResolverProc : public HostResolverProc {
AddRule(hostname, ADDRESS_FAMILY_IPV6, result);
}
- virtual int Resolve(const std::string& hostname,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override {
+ int Resolve(const std::string& hostname,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override {
base::AutoLock lock(lock_);
capture_list_.push_back(ResolveKey(hostname, address_family));
++num_requests_waiting_;
@@ -166,7 +166,7 @@ class MockHostResolverProc : public HostResolverProc {
}
protected:
- virtual ~MockHostResolverProc() {}
+ ~MockHostResolverProc() override {}
private:
mutable base::Lock lock_;
@@ -361,11 +361,11 @@ class LookupAttemptHostResolverProc : public HostResolverProc {
int resolved_attempt_number() { return resolved_attempt_number_; }
// HostResolverProc methods.
- virtual int Resolve(const std::string& host,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override {
+ int Resolve(const std::string& host,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override {
bool wait_for_right_attempt_to_complete = true;
{
base::AutoLock auto_lock(lock_);
@@ -401,7 +401,7 @@ class LookupAttemptHostResolverProc : public HostResolverProc {
}
protected:
- virtual ~LookupAttemptHostResolverProc() {}
+ ~LookupAttemptHostResolverProc() override {}
private:
int attempt_number_to_resolve_;
@@ -439,7 +439,7 @@ class HostResolverImplTest : public testing::Test {
protected:
// A Request::Handler which is a proxy to the HostResolverImplTest fixture.
struct Handler : public Request::Handler {
- virtual ~Handler() {}
+ ~Handler() override {}
// Proxy functions so that classes derived from Handler can access them.
Request* CreateRequest(const HostResolver::RequestInfo& info,
@@ -732,7 +732,7 @@ TEST_F(HostResolverImplTest, CanceledRequestsReleaseJobSlots) {
TEST_F(HostResolverImplTest, CancelWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
// Port 80 is the first request that the callback will be invoked for.
// While we are executing within that callback, cancel the other requests
// in the job and start another request.
@@ -761,7 +761,7 @@ TEST_F(HostResolverImplTest, CancelWithinCallback) {
TEST_F(HostResolverImplTest, DeleteWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
EXPECT_EQ("a", req->info().hostname());
EXPECT_EQ(80, req->info().port());
@@ -787,7 +787,7 @@ TEST_F(HostResolverImplTest, DeleteWithinCallback) {
TEST_F(HostResolverImplTest, DeleteWithinAbortedCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
EXPECT_EQ("a", req->info().hostname());
EXPECT_EQ(80, req->info().port());
@@ -827,7 +827,7 @@ TEST_F(HostResolverImplTest, DeleteWithinAbortedCallback) {
TEST_F(HostResolverImplTest, StartWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
if (req->index() == 0) {
// On completing the first request, start another request for "a".
// Since caching is disabled, this will result in another async request.
@@ -858,7 +858,7 @@ TEST_F(HostResolverImplTest, StartWithinCallback) {
TEST_F(HostResolverImplTest, BypassCache) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
if (req->index() == 0) {
// On completing the first request, start another request for "a".
// Since caching is enabled, this should complete synchronously.
@@ -956,7 +956,7 @@ TEST_F(HostResolverImplTest, ObeyPoolConstraintsAfterIPAddressChange) {
// will not be aborted.
TEST_F(HostResolverImplTest, AbortOnlyExistingRequestsOnIPAddressChange) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
// Start new request for a different hostname to ensure that the order
// of jobs in HostResolverImpl is not stable.
std::string hostname;
@@ -1379,7 +1379,7 @@ class HostResolverImplDnsTest : public HostResolverImplTest {
}
// HostResolverImplTest implementation:
- virtual void CreateResolverWithLimitsAndParams(
+ void CreateResolverWithLimitsAndParams(
size_t max_concurrent_resolves,
const HostResolverImpl::ProcTaskParams& params) override {
HostResolverImpl::Options options = DefaultOptions();
diff --git a/net/dns/host_resolver_proc.h b/net/dns/host_resolver_proc.h
index 695e3bc..cb61e19 100644
--- a/net/dns/host_resolver_proc.h
+++ b/net/dns/host_resolver_proc.h
@@ -95,13 +95,14 @@ NET_EXPORT_PRIVATE int SystemHostResolverCall(
class NET_EXPORT_PRIVATE SystemHostResolverProc : public HostResolverProc {
public:
SystemHostResolverProc();
- virtual int Resolve(const std::string& hostname,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addr_list,
- int* os_error) override;
+ int Resolve(const std::string& hostname,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addr_list,
+ int* os_error) override;
+
protected:
- virtual ~SystemHostResolverProc();
+ ~SystemHostResolverProc() override;
DISALLOW_COPY_AND_ASSIGN(SystemHostResolverProc);
};
diff --git a/net/dns/mapped_host_resolver.h b/net/dns/mapped_host_resolver.h
index 6d4ab92..ecdc2e8 100644
--- a/net/dns/mapped_host_resolver.h
+++ b/net/dns/mapped_host_resolver.h
@@ -23,7 +23,7 @@ class NET_EXPORT MappedHostResolver : public HostResolver {
// Creates a MappedHostResolver that forwards all of its requests through
// |impl|.
explicit MappedHostResolver(scoped_ptr<HostResolver> impl);
- virtual ~MappedHostResolver();
+ ~MappedHostResolver() override;
// Adds a rule to this mapper. The format of the rule can be one of:
//
@@ -45,19 +45,19 @@ class NET_EXPORT MappedHostResolver : public HostResolver {
}
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual void SetDnsClientEnabled(bool enabled) override;
- virtual HostCache* GetHostCache() override;
- virtual base::Value* GetDnsConfigAsValue() const override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ void SetDnsClientEnabled(bool enabled) override;
+ HostCache* GetHostCache() override;
+ base::Value* GetDnsConfigAsValue() const override;
private:
// Modify the request |info| according to |rules_|. Returns either OK or
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h
index 9d5339f..501d0fc 100644
--- a/net/dns/mock_host_resolver.h
+++ b/net/dns/mock_host_resolver.h
@@ -55,7 +55,7 @@ class MockHostResolverBase : public HostResolver,
public base::SupportsWeakPtr<MockHostResolverBase>,
public base::NonThreadSafe {
public:
- virtual ~MockHostResolverBase();
+ ~MockHostResolverBase() override;
RuleBasedHostResolverProc* rules() { return rules_.get(); }
void set_rules(RuleBasedHostResolverProc* rules) { rules_ = rules; }
@@ -74,17 +74,17 @@ class MockHostResolverBase : public HostResolver,
}
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual HostCache* GetHostCache() override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ HostCache* GetHostCache() override;
// Resolves all pending requests. It is only valid to invoke this if
// set_ondemand_mode was set before. The requests are resolved asynchronously,
@@ -144,7 +144,7 @@ class MockHostResolverBase : public HostResolver,
class MockHostResolver : public MockHostResolverBase {
public:
MockHostResolver() : MockHostResolverBase(false /*use_caching*/) {}
- virtual ~MockHostResolver() {}
+ ~MockHostResolver() override {}
};
// Same as MockHostResolver, except internally it uses a host-cache.
@@ -155,7 +155,7 @@ class MockHostResolver : public MockHostResolverBase {
class MockCachingHostResolver : public MockHostResolverBase {
public:
MockCachingHostResolver() : MockHostResolverBase(true /*use_caching*/) {}
- virtual ~MockCachingHostResolver() {}
+ ~MockCachingHostResolver() override {}
};
// RuleBasedHostResolverProc applies a set of rules to map a host string to
@@ -202,17 +202,17 @@ class RuleBasedHostResolverProc : public HostResolverProc {
void ClearRules();
// HostResolverProc methods:
- virtual int Resolve(const std::string& host,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override;
+ int Resolve(const std::string& host,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override;
private:
struct Rule;
typedef std::list<Rule> RuleList;
- virtual ~RuleBasedHostResolverProc();
+ ~RuleBasedHostResolverProc() override;
RuleList rules_;
};
@@ -223,16 +223,16 @@ RuleBasedHostResolverProc* CreateCatchAllHostResolverProc();
// HangingHostResolver never completes its |Resolve| request.
class HangingHostResolver : public HostResolver {
public:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override {}
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override {}
};
// This class sets the default HostResolverProc for a particular scope. The
diff --git a/net/dns/notify_watcher_mac.h b/net/dns/notify_watcher_mac.h
index 0951c2f..ded752c 100644
--- a/net/dns/notify_watcher_mac.h
+++ b/net/dns/notify_watcher_mac.h
@@ -20,7 +20,7 @@ class NotifyWatcherMac : public base::MessageLoopForIO::Watcher {
NotifyWatcherMac();
// When deleted, automatically cancels.
- virtual ~NotifyWatcherMac();
+ ~NotifyWatcherMac() override;
// Registers for notifications for |key|. Returns true if succeeds. If so,
// will deliver asynchronous notifications and errors to |callback|.
@@ -31,8 +31,8 @@ class NotifyWatcherMac : public base::MessageLoopForIO::Watcher {
private:
// MessageLoopForIO::Watcher:
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {}
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override {}
int notify_fd_;
int notify_token_;
diff --git a/net/dns/serial_worker_unittest.cc b/net/dns/serial_worker_unittest.cc
index c670a75..8e30e28 100644
--- a/net/dns/serial_worker_unittest.cc
+++ b/net/dns/serial_worker_unittest.cc
@@ -21,16 +21,16 @@ class SerialWorkerTest : public testing::Test {
public:
explicit TestSerialWorker(SerialWorkerTest* t)
: test_(t) {}
- virtual void DoWork() override {
+ void DoWork() override {
ASSERT_TRUE(test_);
test_->OnWork();
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
ASSERT_TRUE(test_);
test_->OnWorkFinished();
}
private:
- virtual ~TestSerialWorker() {}
+ ~TestSerialWorker() override {}
SerialWorkerTest* test_;
};
diff --git a/net/dns/single_request_host_resolver_unittest.cc b/net/dns/single_request_host_resolver_unittest.cc
index 7b09193..a1442bd 100644
--- a/net/dns/single_request_host_resolver_unittest.cc
+++ b/net/dns/single_request_host_resolver_unittest.cc
@@ -22,20 +22,18 @@ class HangingHostResolver : public HostResolver {
public:
HangingHostResolver() : outstanding_request_(NULL) {}
- virtual ~HangingHostResolver() {
- EXPECT_TRUE(!has_outstanding_request());
- }
+ ~HangingHostResolver() override { EXPECT_TRUE(!has_outstanding_request()); }
bool has_outstanding_request() const {
return outstanding_request_ != NULL;
}
- 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 {
EXPECT_FALSE(has_outstanding_request());
outstanding_request_ = reinterpret_cast<RequestHandle>(0x1234);
*out_req = outstanding_request_;
@@ -45,14 +43,14 @@ class HangingHostResolver : public HostResolver {
return ERR_IO_PENDING;
}
- 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 {
NOTIMPLEMENTED();
return ERR_UNEXPECTED;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_TRUE(has_outstanding_request());
EXPECT_EQ(req, outstanding_request_);
outstanding_request_ = NULL;
diff --git a/net/extras/sqlite/sqlite_channel_id_store.h b/net/extras/sqlite/sqlite_channel_id_store.h
index e743ba6..fc85458 100644
--- a/net/extras/sqlite/sqlite_channel_id_store.h
+++ b/net/extras/sqlite/sqlite_channel_id_store.h
@@ -36,18 +36,18 @@ class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore {
const scoped_refptr<base::SequencedTaskRunner>& background_task_runner);
// DefaultChannelIDStore::PersistentStore:
- virtual void Load(const LoadedCallback& loaded_callback) override;
- virtual void AddChannelID(
+ void Load(const LoadedCallback& loaded_callback) override;
+ void AddChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void DeleteChannelID(
+ void DeleteChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
// Delete channel ids from servers in |server_identifiers|.
void DeleteAllInList(const std::list<std::string>& server_identifiers);
private:
- virtual ~SQLiteChannelIDStore();
+ ~SQLiteChannelIDStore() override;
class Backend;
diff --git a/net/filter/gzip_filter.h b/net/filter/gzip_filter.h
index 07b7821..597c2e7 100644
--- a/net/filter/gzip_filter.h
+++ b/net/filter/gzip_filter.h
@@ -27,7 +27,7 @@ class GZipHeader;
class GZipFilter : public Filter {
public:
- virtual ~GZipFilter();
+ ~GZipFilter() override;
// Initializes filter decoding mode and internal control blocks.
// Parameter filter_type specifies the type of filter, which corresponds to
@@ -48,8 +48,7 @@ class GZipFilter : public Filter {
// stream_buffer_. On the other hand, *dest_len can be 0 upon successful
// return. For example, the internal zlib may process some pre-filter data
// but not produce output yet.
- virtual FilterStatus ReadFilteredData(char* dest_buffer,
- int* dest_len) override;
+ FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override;
private:
enum DecodingStatus {
diff --git a/net/filter/mock_filter_context.h b/net/filter/mock_filter_context.h
index bdef812..8150e8b 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -18,7 +18,7 @@ class URLRequestContext;
class MockFilterContext : public FilterContext {
public:
MockFilterContext();
- virtual ~MockFilterContext();
+ ~MockFilterContext() override;
void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; }
void SetURL(const GURL& gurl) { gurl_ = gurl; }
@@ -41,37 +41,37 @@ class MockFilterContext : public FilterContext {
// of those interfaces as coding errors.
void NukeUnstableInterfaces();
- virtual bool GetMimeType(std::string* mime_type) const override;
+ bool GetMimeType(std::string* mime_type) const override;
// What URL was used to access this data?
// Return false if gurl is not present.
- virtual bool GetURL(GURL* gurl) const override;
+ bool GetURL(GURL* gurl) const override;
// What Content-Disposition did the server supply for this data?
// Return false if Content-Disposition was not present.
- virtual bool GetContentDisposition(std::string* disposition) const override;
+ bool GetContentDisposition(std::string* disposition) const override;
// What was this data requested from a server?
- virtual base::Time GetRequestTime() const override;
+ base::Time GetRequestTime() const override;
// Is data supplied from cache, or fresh across the net?
- virtual bool IsCachedContent() const override;
+ bool IsCachedContent() const override;
// Is this a download?
- virtual bool IsDownload() const override;
+ bool IsDownload() const override;
// Was this data flagged as a response to a request with an SDCH dictionary?
- virtual bool SdchResponseExpected() const override;
+ bool SdchResponseExpected() const override;
// How many bytes were fed to filter(s) so far?
- virtual int64 GetByteReadCount() const override;
+ int64 GetByteReadCount() const override;
- virtual int GetResponseCode() const override;
+ int GetResponseCode() const override;
// The URLRequestContext associated with the request.
- virtual const URLRequestContext* GetURLRequestContext() const override;
+ const URLRequestContext* GetURLRequestContext() const override;
- virtual void RecordPacketStats(StatisticSelector statistic) const override {}
+ void RecordPacketStats(StatisticSelector statistic) const override {}
private:
int buffer_size_;
diff --git a/net/filter/sdch_filter.h b/net/filter/sdch_filter.h
index 861a9ae..e9648b1 100644
--- a/net/filter/sdch_filter.h
+++ b/net/filter/sdch_filter.h
@@ -29,7 +29,7 @@ namespace net {
class NET_EXPORT_PRIVATE SdchFilter : public Filter {
public:
- virtual ~SdchFilter();
+ ~SdchFilter() override;
// Initializes filter decoding mode and internal control blocks.
bool InitDecoding(Filter::FilterType filter_type);
@@ -40,8 +40,7 @@ class NET_EXPORT_PRIVATE SdchFilter : public Filter {
// Upon entry, *dest_len is the total size (in number of chars) of the
// destination buffer. Upon exit, *dest_len is the actual number of chars
// written into the destination buffer.
- virtual FilterStatus ReadFilteredData(char* dest_buffer,
- int* dest_len) override;
+ FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override;
private:
// Internal status. Once we enter an error state, we stop processing data.
diff --git a/net/ftp/ftp_network_layer.h b/net/ftp/ftp_network_layer.h
index 6242f74..f174df9 100644
--- a/net/ftp/ftp_network_layer.h
+++ b/net/ftp/ftp_network_layer.h
@@ -19,13 +19,13 @@ class HostResolver;
class NET_EXPORT FtpNetworkLayer : public FtpTransactionFactory {
public:
explicit FtpNetworkLayer(HostResolver* host_resolver);
- virtual ~FtpNetworkLayer();
+ ~FtpNetworkLayer() override;
static FtpTransactionFactory* CreateFactory(HostResolver* host_resolver);
// FtpTransactionFactory methods:
- virtual FtpTransaction* CreateTransaction() override;
- virtual void Suspend(bool suspend) override;
+ FtpTransaction* CreateTransaction() override;
+ void Suspend(bool suspend) override;
private:
scoped_refptr<FtpNetworkSession> session_;
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index ee0f28a..c8ed550 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -30,22 +30,23 @@ class NET_EXPORT_PRIVATE FtpNetworkTransaction : public FtpTransaction {
public:
FtpNetworkTransaction(FtpNetworkSession* session,
ClientSocketFactory* socket_factory);
- virtual ~FtpNetworkTransaction();
+ ~FtpNetworkTransaction() override;
virtual int Stop(int error);
virtual int RestartIgnoringLastError(const CompletionCallback& callback);
// FtpTransaction methods:
- virtual int Start(const FtpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual const FtpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual uint64 GetUploadProgress() const override;
+ int Start(const FtpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ const FtpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ uint64 GetUploadProgress() const override;
private:
FRIEND_TEST_ALL_PREFIXES(FtpNetworkTransactionTest,
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index de407d5..4ee812d 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -63,7 +63,7 @@ class FtpSocketDataProvider : public DynamicSocketDataProvider {
Init();
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -131,7 +131,7 @@ class FtpSocketDataProvider : public DynamicSocketDataProvider {
return state_;
}
- virtual void Reset() override {
+ void Reset() override {
DynamicSocketDataProvider::Reset();
Init();
}
@@ -205,7 +205,7 @@ class FtpSocketDataProviderDirectoryListing : public FtpSocketDataProvider {
FtpSocketDataProviderDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -232,7 +232,7 @@ class FtpSocketDataProviderDirectoryListingWithPasvFallback
FtpSocketDataProviderDirectoryListingWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -258,7 +258,7 @@ class FtpSocketDataProviderDirectoryListingZeroSize
FtpSocketDataProviderDirectoryListingZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -278,7 +278,7 @@ class FtpSocketDataProviderVMSDirectoryListing : public FtpSocketDataProvider {
FtpSocketDataProviderVMSDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -312,7 +312,7 @@ class FtpSocketDataProviderVMSDirectoryListingRootDirectory
FtpSocketDataProviderVMSDirectoryListingRootDirectory() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -348,7 +348,7 @@ class FtpSocketDataProviderFileDownloadWithFileTypecode
FtpSocketDataProviderFileDownloadWithFileTypecode() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -371,7 +371,7 @@ class FtpSocketDataProviderFileDownload : public FtpSocketDataProvider {
FtpSocketDataProviderFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -398,7 +398,7 @@ class FtpSocketDataProviderFileNotFound : public FtpSocketDataProvider {
FtpSocketDataProviderFileNotFound() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -428,7 +428,7 @@ class FtpSocketDataProviderFileDownloadWithPasvFallback
FtpSocketDataProviderFileDownloadWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -453,7 +453,7 @@ class FtpSocketDataProviderFileDownloadZeroSize
FtpSocketDataProviderFileDownloadZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -479,7 +479,7 @@ class FtpSocketDataProviderFileDownloadCWD451
FtpSocketDataProviderFileDownloadCWD451() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -501,7 +501,7 @@ class FtpSocketDataProviderVMSFileDownload : public FtpSocketDataProvider {
FtpSocketDataProviderVMSFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -536,7 +536,7 @@ class FtpSocketDataProviderEscaping : public FtpSocketDataProviderFileDownload {
FtpSocketDataProviderEscaping() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -565,7 +565,7 @@ class FtpSocketDataProviderFileDownloadTransferStarting
FtpSocketDataProviderFileDownloadTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -589,7 +589,7 @@ class FtpSocketDataProviderDirectoryListingTransferStarting
FtpSocketDataProviderDirectoryListingTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -614,7 +614,7 @@ class FtpSocketDataProviderFileDownloadInvalidResponse
FtpSocketDataProviderFileDownloadInvalidResponse() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -648,7 +648,7 @@ class FtpSocketDataProviderEvilEpsv : public FtpSocketDataProviderFileDownload {
epsv_response_length_(epsv_response_length),
expected_state_(expected_state) {}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -676,7 +676,7 @@ class FtpSocketDataProviderEvilPasv
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -701,7 +701,7 @@ class FtpSocketDataProviderEvilSize : public FtpSocketDataProviderFileDownload {
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -728,7 +728,7 @@ class FtpSocketDataProviderEvilLogin
expected_password_(expected_password) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -755,7 +755,7 @@ class FtpSocketDataProviderCloseConnection : public FtpSocketDataProvider {
FtpSocketDataProviderCloseConnection() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
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_;
diff --git a/net/proxy/dhcp_proxy_script_fetcher.h b/net/proxy/dhcp_proxy_script_fetcher.h
index bb293de..85d4df8 100644
--- a/net/proxy/dhcp_proxy_script_fetcher.h
+++ b/net/proxy/dhcp_proxy_script_fetcher.h
@@ -83,12 +83,13 @@ class NET_EXPORT_PRIVATE DoNothingDhcpProxyScriptFetcher
: public DhcpProxyScriptFetcher {
public:
DoNothingDhcpProxyScriptFetcher();
- virtual ~DoNothingDhcpProxyScriptFetcher();
+ ~DoNothingDhcpProxyScriptFetcher() override;
+
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ const GURL& GetPacURL() const override;
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual const GURL& GetPacURL() const override;
private:
GURL gurl_;
DISALLOW_COPY_AND_ASSIGN(DoNothingDhcpProxyScriptFetcher);
diff --git a/net/proxy/mock_proxy_resolver.h b/net/proxy/mock_proxy_resolver.h
index 5a616dd..8ae551d9 100644
--- a/net/proxy/mock_proxy_resolver.h
+++ b/net/proxy/mock_proxy_resolver.h
@@ -70,20 +70,19 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
typedef std::vector<scoped_refptr<Request> > RequestsList;
- virtual ~MockAsyncProxyResolverBase();
+ ~MockAsyncProxyResolverBase() override;
// ProxyResolver implementation.
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& callback,
- RequestHandle* request_handle,
- const BoundNetLog& /*net_log*/) override;
- virtual void CancelRequest(RequestHandle request_handle) override;
- virtual LoadState GetLoadState(RequestHandle request_handle) const override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& callback) override;
- virtual void CancelSetPacScript() override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ RequestHandle* request_handle,
+ const BoundNetLog& /*net_log*/) override;
+ void CancelRequest(RequestHandle request_handle) override;
+ LoadState GetLoadState(RequestHandle request_handle) const override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& callback) override;
+ void CancelSetPacScript() override;
const RequestsList& pending_requests() const {
return pending_requests_;
diff --git a/net/proxy/mock_proxy_script_fetcher.h b/net/proxy/mock_proxy_script_fetcher.h
index 910c6b2..458f477 100644
--- a/net/proxy/mock_proxy_script_fetcher.h
+++ b/net/proxy/mock_proxy_script_fetcher.h
@@ -20,14 +20,14 @@ class URLRequestContext;
class MockProxyScriptFetcher : public ProxyScriptFetcher {
public:
MockProxyScriptFetcher();
- virtual ~MockProxyScriptFetcher();
+ ~MockProxyScriptFetcher() override;
// ProxyScriptFetcher implementation.
- virtual int Fetch(const GURL& url,
- base::string16* text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual URLRequestContext* GetRequestContext() const override;
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ URLRequestContext* GetRequestContext() const override;
void NotifyFetchCompletion(int result, const std::string& ascii_text);
const GURL& pending_request_url() const;
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index a2a6515..863711c 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -175,7 +175,7 @@ class MultiThreadedProxyResolver::SetPacScriptJob
}
// Runs on the worker thread.
- virtual void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
+ void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
ProxyResolver* resolver = executor()->resolver();
int rv = resolver->SetPacScript(script_data_, CompletionCallback());
@@ -186,7 +186,7 @@ class MultiThreadedProxyResolver::SetPacScriptJob
}
protected:
- virtual ~SetPacScriptJob() {}
+ ~SetPacScriptJob() override {}
private:
// Runs the completion callback on the origin thread.
@@ -222,12 +222,12 @@ class MultiThreadedProxyResolver::GetProxyForURLJob
BoundNetLog* net_log() { return &net_log_; }
- virtual void WaitingForThread() override {
+ void WaitingForThread() override {
was_waiting_for_thread_ = true;
net_log_.BeginEvent(NetLog::TYPE_WAITING_FOR_PROXY_RESOLVER_THREAD);
}
- virtual void FinishedWaitingForThread() override {
+ void FinishedWaitingForThread() override {
DCHECK(executor());
if (was_waiting_for_thread_) {
@@ -240,7 +240,7 @@ class MultiThreadedProxyResolver::GetProxyForURLJob
}
// Runs on the worker thread.
- virtual void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
+ void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
ProxyResolver* resolver = executor()->resolver();
int rv = resolver->GetProxyForURL(
url_, &results_buf_, CompletionCallback(), NULL, net_log_);
@@ -252,7 +252,7 @@ class MultiThreadedProxyResolver::GetProxyForURLJob
}
protected:
- virtual ~GetProxyForURLJob() {}
+ ~GetProxyForURLJob() override {}
private:
// Runs the completion callback on the origin thread.
diff --git a/net/proxy/multi_threaded_proxy_resolver.h b/net/proxy/multi_threaded_proxy_resolver.h
index 0a14461..107e5f8 100644
--- a/net/proxy/multi_threaded_proxy_resolver.h
+++ b/net/proxy/multi_threaded_proxy_resolver.h
@@ -88,20 +88,19 @@ class NET_EXPORT_PRIVATE MultiThreadedProxyResolver
MultiThreadedProxyResolver(ProxyResolverFactory* resolver_factory,
size_t max_num_threads);
- virtual ~MultiThreadedProxyResolver();
+ ~MultiThreadedProxyResolver() override;
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override;
private:
class Executor;
diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
index d2e465c..7a8db63 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -36,11 +36,11 @@ class MockProxyResolver : public ProxyResolver {
request_count_(0) {}
// ProxyResolver implementation.
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
if (resolve_latency_ != base::TimeDelta())
base::PlatformThread::Sleep(resolve_latency_);
@@ -58,22 +58,17 @@ class MockProxyResolver : public ProxyResolver {
return request_count_++;
}
- 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>& script_data,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override {
CheckIsOnWorkerThread();
last_script_data_ = script_data;
return OK;
@@ -133,11 +128,11 @@ class BlockableProxyResolver : public MockProxyResolver {
blocked_.Wait();
}
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
if (should_block_) {
blocked_.Signal();
unblocked_.Wait();
@@ -160,31 +155,28 @@ class ForwardingProxyResolver : public ProxyResolver {
: ProxyResolver(impl->expects_pac_bytes()),
impl_(impl) {}
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
return impl_->GetProxyForURL(
query_url, results, callback, request, net_log);
}
- virtual void CancelRequest(RequestHandle request) override {
+ void CancelRequest(RequestHandle request) override {
impl_->CancelRequest(request);
}
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- impl_->CancelSetPacScript();
- }
+ void CancelSetPacScript() override { impl_->CancelSetPacScript(); }
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override {
return impl_->SetPacScript(script_data, callback);
}
@@ -200,7 +192,7 @@ class ForwardingProxyResolverFactory : public ProxyResolverFactory {
: ProxyResolverFactory(resolver->expects_pac_bytes()),
resolver_(resolver) {}
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
return new ForwardingProxyResolver(resolver_);
}
@@ -213,11 +205,9 @@ class BlockableProxyResolverFactory : public ProxyResolverFactory {
public:
BlockableProxyResolverFactory() : ProxyResolverFactory(true) {}
- virtual ~BlockableProxyResolverFactory() {
- STLDeleteElements(&resolvers_);
- }
+ ~BlockableProxyResolverFactory() override { STLDeleteElements(&resolvers_); }
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
BlockableProxyResolver* resolver = new BlockableProxyResolver;
resolvers_.push_back(resolver);
return new ForwardingProxyResolver(resolver);
diff --git a/net/proxy/network_delegate_error_observer.h b/net/proxy/network_delegate_error_observer.h
index 70a2bed..6fad578 100644
--- a/net/proxy/network_delegate_error_observer.h
+++ b/net/proxy/network_delegate_error_observer.h
@@ -24,11 +24,10 @@ class NET_EXPORT_PRIVATE NetworkDelegateErrorObserver
public:
NetworkDelegateErrorObserver(NetworkDelegate* network_delegate,
base::MessageLoopProxy* origin_loop);
- virtual ~NetworkDelegateErrorObserver();
+ ~NetworkDelegateErrorObserver() override;
// ProxyResolverErrorObserver implementation.
- virtual void OnPACScriptError(int line_number, const base::string16& error)
- override;
+ void OnPACScriptError(int line_number, const base::string16& error) override;
private:
class Core;
diff --git a/net/proxy/network_delegate_error_observer_unittest.cc b/net/proxy/network_delegate_error_observer_unittest.cc
index 8547761..5d2c501 100644
--- a/net/proxy/network_delegate_error_observer_unittest.cc
+++ b/net/proxy/network_delegate_error_observer_unittest.cc
@@ -19,25 +19,25 @@ namespace {
class TestNetworkDelegate : public net::NetworkDelegate {
public:
TestNetworkDelegate() : got_pac_error_(false) {}
- virtual ~TestNetworkDelegate() {}
+ ~TestNetworkDelegate() override {}
bool got_pac_error() const { return got_pac_error_; }
private:
// net::NetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -45,44 +45,40 @@ class TestNetworkDelegate : public net::NetworkDelegate {
GURL* allowed_unsafe_redirect_url) override {
return net::OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
+ void OnResponseStarted(URLRequest* request) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {
+ void OnPACScriptError(int line_number, const base::string16& error) override {
got_pac_error_ = true;
}
- virtual AuthRequiredResponse OnAuthRequired(
- URLRequest* request,
- const AuthChallengeInfo& auth_info,
- const AuthCallback& callback,
- AuthCredentials* credentials) override {
+ AuthRequiredResponse OnAuthRequired(URLRequest* request,
+ const AuthChallengeInfo& auth_info,
+ const AuthCallback& callback,
+ AuthCredentials* credentials) override {
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
return false;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
diff --git a/net/proxy/polling_proxy_config_service.h b/net/proxy/polling_proxy_config_service.h
index dc0db488..c823056 100644
--- a/net/proxy/polling_proxy_config_service.h
+++ b/net/proxy/polling_proxy_config_service.h
@@ -20,10 +20,10 @@ namespace net {
class NET_EXPORT_PRIVATE PollingProxyConfigService : public ProxyConfigService {
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override;
- virtual void RemoveObserver(Observer* observer) override;
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
- virtual void OnLazyPoll() override;
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void OnLazyPoll() override;
protected:
// Function for retrieving the current proxy configuration.
@@ -38,7 +38,7 @@ class NET_EXPORT_PRIVATE PollingProxyConfigService : public ProxyConfigService {
base::TimeDelta poll_interval,
GetConfigFunction get_config_func);
- virtual ~PollingProxyConfigService();
+ ~PollingProxyConfigService() override;
// Polls for changes by posting a task to the worker pool.
void CheckForChangesNow();
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc
index debb2e8..970e3bb 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -27,7 +27,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
optional_port_(optional_port) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (optional_port_ != -1 && url.EffectiveIntPort() != optional_port_)
return false; // Didn't match port expectation.
@@ -40,7 +40,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
hostname_pattern_);
}
- virtual std::string ToString() const override {
+ std::string ToString() const override {
std::string str;
if (!optional_scheme_.empty())
base::StringAppendF(&str, "%s://", optional_scheme_.c_str());
@@ -50,7 +50,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
return str;
}
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new HostnamePatternRule(optional_scheme_,
hostname_pattern_,
optional_port_);
@@ -64,20 +64,16 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
class BypassLocalRule : public ProxyBypassRules::Rule {
public:
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
const std::string& host = url.host();
if (host == "127.0.0.1" || host == "[::1]")
return true;
return host.find('.') == std::string::npos;
}
- virtual std::string ToString() const override {
- return "<local>";
- }
+ std::string ToString() const override { return "<local>"; }
- virtual Rule* Clone() const override {
- return new BypassLocalRule();
- }
+ Rule* Clone() const override { return new BypassLocalRule(); }
};
// Rule for matching a URL that is an IP address, if that IP address falls
@@ -96,7 +92,7 @@ class BypassIPBlockRule : public ProxyBypassRules::Rule {
prefix_length_in_bits_(prefix_length_in_bits) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (!url.HostIsIPAddress())
return false;
@@ -113,11 +109,9 @@ class BypassIPBlockRule : public ProxyBypassRules::Rule {
prefix_length_in_bits_);
}
- virtual std::string ToString() const override {
- return description_;
- }
+ std::string ToString() const override { return description_; }
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new BypassIPBlockRule(description_,
optional_scheme_,
ip_prefix_,
diff --git a/net/proxy/proxy_config_service_fixed.h b/net/proxy/proxy_config_service_fixed.h
index 14185c6..a95bf78 100644
--- a/net/proxy/proxy_config_service_fixed.h
+++ b/net/proxy/proxy_config_service_fixed.h
@@ -16,12 +16,12 @@ namespace net {
class NET_EXPORT ProxyConfigServiceFixed : public ProxyConfigService {
public:
explicit ProxyConfigServiceFixed(const ProxyConfig& pc);
- virtual ~ProxyConfigServiceFixed();
+ ~ProxyConfigServiceFixed() override;
// ProxyConfigService methods:
- virtual void AddObserver(Observer* observer) override {}
- virtual void RemoveObserver(Observer* observer) override {}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void AddObserver(Observer* observer) override {}
+ void RemoveObserver(Observer* observer) override {}
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
private:
ProxyConfig pc_;
diff --git a/net/proxy/proxy_config_service_mac.h b/net/proxy/proxy_config_service_mac.h
index 6c60daf..87c8162 100644
--- a/net/proxy/proxy_config_service_mac.h
+++ b/net/proxy/proxy_config_service_mac.h
@@ -27,13 +27,13 @@ class ProxyConfigServiceMac : public ProxyConfigService {
// (however it may be constructed from a different thread).
explicit ProxyConfigServiceMac(
const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_task_runner);
- virtual ~ProxyConfigServiceMac();
+ ~ProxyConfigServiceMac() override;
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override;
- virtual void RemoveObserver(Observer* observer) override;
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
private:
class Helper;
@@ -46,10 +46,9 @@ class ProxyConfigServiceMac : public ProxyConfigService {
: proxy_config_service_(proxy_config_service) {}
// NetworkConfigWatcherMac::Delegate implementation:
- virtual void StartReachabilityNotifications() override {}
- virtual void SetDynamicStoreNotificationKeys(
- SCDynamicStoreRef store) override;
- virtual void OnNetworkConfigChange(CFArrayRef changed_keys) override;
+ void StartReachabilityNotifications() override {}
+ void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) override;
+ void OnNetworkConfigChange(CFArrayRef changed_keys) override;
private:
ProxyConfigServiceMac* const proxy_config_service_;
diff --git a/net/proxy/proxy_resolver_mac.h b/net/proxy/proxy_resolver_mac.h
index c732988..ef10b5c 100644
--- a/net/proxy/proxy_resolver_mac.h
+++ b/net/proxy/proxy_resolver_mac.h
@@ -18,24 +18,23 @@ namespace net {
class NET_EXPORT ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac();
- virtual ~ProxyResolverMac();
+ ~ProxyResolverMac() override;
// ProxyResolver methods:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
+ void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
+ LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
+ void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& /*callback*/) override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& /*callback*/) override;
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 061c13e..5db69d8 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -199,20 +199,17 @@ class MockJSBindings : public net::ProxyResolverV8::JSBindings {
public:
MockJSBindings() {}
- virtual void Alert(const base::string16& message) override {
- CHECK(false);
- }
+ void Alert(const base::string16& message) override { CHECK(false); }
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override {
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override {
CHECK(false);
return false;
}
- virtual void OnError(int line_number,
- const base::string16& message) override {
+ void OnError(int line_number, const base::string16& message) override {
CHECK(false);
}
};
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index dc224cd..d7916e0 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -93,13 +93,11 @@ class V8ExternalStringFromScriptData
const scoped_refptr<ProxyResolverScriptData>& script_data)
: script_data_(script_data) {}
- virtual const uint16_t* data() const override {
+ const uint16_t* data() const override {
return reinterpret_cast<const uint16*>(script_data_->utf16().data());
}
- virtual size_t length() const override {
- return script_data_->utf16().size();
- }
+ size_t length() const override { return script_data_->utf16().size(); }
private:
const scoped_refptr<ProxyResolverScriptData> script_data_;
@@ -117,13 +115,9 @@ class V8ExternalASCIILiteral
DCHECK(base::IsStringASCII(ascii));
}
- virtual const char* data() const override {
- return ascii_;
- }
+ const char* data() const override { return ascii_; }
- virtual size_t length() const override {
- return length_;
- }
+ size_t length() const override { return length_; }
private:
const char* ascii_;
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 38b958d..64d1983 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -76,23 +76,22 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
// Constructs a ProxyResolverV8.
ProxyResolverV8();
- virtual ~ProxyResolverV8();
+ ~ProxyResolverV8() override;
JSBindings* js_bindings() const { return js_bindings_; }
void set_js_bindings(JSBindings* js_bindings) { js_bindings_ = js_bindings; }
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& /*callback*/,
- RequestHandle* /*request*/,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& /*callback*/) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& /*callback*/,
+ RequestHandle* /*request*/,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& /*callback*/) override;
// Create an isolate to use for the proxy resolver. If the embedder invokes
// this method multiple times, it must be invoked in a thread safe manner,
diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc
index b5e934b..17145d1 100644
--- a/net/proxy/proxy_resolver_v8_tracing.cc
+++ b/net/proxy/proxy_resolver_v8_tracing.cc
@@ -119,7 +119,7 @@ class ProxyResolverV8Tracing::Job
base::string16 message;
};
- virtual ~Job();
+ ~Job() override;
void CheckIsOnWorkerThread() const;
void CheckIsOnOriginThread() const;
@@ -145,12 +145,12 @@ class ProxyResolverV8Tracing::Job
int ExecuteProxyResolver();
// Implementation of ProxyResolverv8::JSBindings
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override;
- virtual void Alert(const base::string16& message) override;
- virtual void OnError(int line_number, const base::string16& error) override;
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override;
+ void Alert(const base::string16& message) override;
+ void OnError(int line_number, const base::string16& error) override;
bool ResolveDnsBlocking(const std::string& host,
ResolveDnsOperation op,
diff --git a/net/proxy/proxy_resolver_v8_tracing.h b/net/proxy/proxy_resolver_v8_tracing.h
index 92eac03..85aca51 100644
--- a/net/proxy/proxy_resolver_v8_tracing.h
+++ b/net/proxy/proxy_resolver_v8_tracing.h
@@ -42,20 +42,19 @@ class NET_EXPORT_PRIVATE ProxyResolverV8Tracing
ProxyResolverErrorObserver* error_observer,
NetLog* net_log);
- virtual ~ProxyResolverV8Tracing();
+ ~ProxyResolverV8Tracing() override;
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override;
private:
class Job;
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index a6e38cb..0c16a1a 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -70,8 +70,7 @@ class MockErrorObserver : public ProxyResolverErrorObserver {
public:
MockErrorObserver() : event_(true, false) {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {
+ void OnPACScriptError(int line_number, const base::string16& error) override {
{
base::AutoLock l(lock_);
output += base::StringPrintf("Error: line %d: %s\n", line_number,
@@ -763,12 +762,12 @@ class BlockableHostResolver : public HostResolver {
BlockableHostResolver()
: num_cancelled_requests_(0), waiting_for_resolve_(false) {}
- 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 {
EXPECT_FALSE(callback.is_null());
EXPECT_TRUE(out_req);
@@ -789,14 +788,14 @@ class BlockableHostResolver : public HostResolver {
return ERR_IO_PENDING;
}
- 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 {
NOTREACHED();
return ERR_DNS_CACHE_MISS;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_EQ(reinterpret_cast<RequestHandle*>(1), req);
num_cancelled_requests_++;
}
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index d0d01d9..76ad232 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -26,15 +26,15 @@ class MockJSBindings : public ProxyResolverV8::JSBindings {
MockJSBindings() : my_ip_address_count(0), my_ip_address_ex_count(0),
should_terminate(false) {}
- virtual void Alert(const base::string16& message) override {
+ void Alert(const base::string16& message) override {
VLOG(1) << "PAC-alert: " << message; // Helpful when debugging.
alerts.push_back(base::UTF16ToUTF8(message));
}
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override {
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override {
*terminate = should_terminate;
if (op == MY_IP_ADDRESS) {
@@ -65,8 +65,7 @@ class MockJSBindings : public ProxyResolverV8::JSBindings {
return false;
}
- virtual void OnError(int line_number,
- const base::string16& message) override {
+ void OnError(int line_number, const base::string16& message) override {
// Helpful when debugging.
VLOG(1) << "PAC-error: [" << line_number << "] " << message;
@@ -102,8 +101,7 @@ class ProxyResolverV8WithMockBindings : public ProxyResolverV8 {
set_js_bindings(&mock_js_bindings_);
}
- virtual ~ProxyResolverV8WithMockBindings() {
- }
+ ~ProxyResolverV8WithMockBindings() override {}
MockJSBindings* mock_js_bindings() {
return &mock_js_bindings_;
diff --git a/net/proxy/proxy_script_decider_unittest.cc b/net/proxy/proxy_script_decider_unittest.cc
index 880a187..ee2958c 100644
--- a/net/proxy/proxy_script_decider_unittest.cc
+++ b/net/proxy/proxy_script_decider_unittest.cc
@@ -105,9 +105,9 @@ class RuleBasedProxyScriptFetcher : public ProxyScriptFetcher {
}
// ProxyScriptFetcher implementation.
- virtual int Fetch(const GURL& url,
- base::string16* text,
- const CompletionCallback& callback) override {
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const CompletionCallback& callback) override {
const Rules::Rule& rule = rules_->GetRuleByUrl(url);
int rv = rule.fetch_error;
EXPECT_NE(ERR_UNEXPECTED, rv);
@@ -116,9 +116,9 @@ class RuleBasedProxyScriptFetcher : public ProxyScriptFetcher {
return rv;
}
- virtual void Cancel() override {}
+ void Cancel() override {}
- virtual URLRequestContext* GetRequestContext() const override {
+ URLRequestContext* GetRequestContext() const override {
return request_context_;
}
@@ -131,12 +131,12 @@ class RuleBasedProxyScriptFetcher : public ProxyScriptFetcher {
class MockDhcpProxyScriptFetcher : public DhcpProxyScriptFetcher {
public:
MockDhcpProxyScriptFetcher();
- virtual ~MockDhcpProxyScriptFetcher();
+ ~MockDhcpProxyScriptFetcher() override;
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual const GURL& GetPacURL() const override;
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ const GURL& GetPacURL() const override;
virtual void SetPacURL(const GURL& url);
@@ -642,18 +642,15 @@ class SynchronousSuccessDhcpFetcher : public DhcpProxyScriptFetcher {
: gurl_("http://dhcppac/"), expected_text_(expected_text) {
}
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override {
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override {
*utf16_text = expected_text_;
return OK;
}
- virtual void Cancel() override {
- }
+ void Cancel() override {}
- virtual const GURL& GetPacURL() const override {
- return gurl_;
- }
+ const GURL& GetPacURL() const override { return gurl_; }
const base::string16& expected_text() const {
return expected_text_;
@@ -722,10 +719,10 @@ class AsyncFailDhcpFetcher
public base::SupportsWeakPtr<AsyncFailDhcpFetcher> {
public:
AsyncFailDhcpFetcher() {}
- virtual ~AsyncFailDhcpFetcher() {}
+ ~AsyncFailDhcpFetcher() override {}
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override {
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override {
callback_ = callback;
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -733,13 +730,9 @@ class AsyncFailDhcpFetcher
return ERR_IO_PENDING;
}
- virtual void Cancel() override {
- callback_.Reset();
- }
+ void Cancel() override { callback_.Reset(); }
- virtual const GURL& GetPacURL() const override {
- return dummy_gurl_;
- }
+ const GURL& GetPacURL() const override { return dummy_gurl_; }
void CallbackWithFailure() {
if (!callback_.is_null())
diff --git a/net/proxy/proxy_script_fetcher_impl.h b/net/proxy/proxy_script_fetcher_impl.h
index 8cdcf81..54afa4c 100644
--- a/net/proxy/proxy_script_fetcher_impl.h
+++ b/net/proxy/proxy_script_fetcher_impl.h
@@ -36,7 +36,7 @@ class NET_EXPORT ProxyScriptFetcherImpl : public ProxyScriptFetcher,
// fetcher and the context; you can break such cycles by calling Cancel().
explicit ProxyScriptFetcherImpl(URLRequestContext* url_request_context);
- virtual ~ProxyScriptFetcherImpl();
+ ~ProxyScriptFetcherImpl() override;
// Used by unit-tests to modify the default limits.
base::TimeDelta SetTimeoutConstraint(base::TimeDelta timeout);
@@ -45,19 +45,20 @@ class NET_EXPORT ProxyScriptFetcherImpl : public ProxyScriptFetcher,
void OnResponseCompleted(URLRequest* request);
// ProxyScriptFetcher methods:
- virtual int Fetch(const GURL& url, base::string16* text,
- const net::CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual URLRequestContext* GetRequestContext() const override;
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const net::CompletionCallback& callback) override;
+ void Cancel() override;
+ URLRequestContext* GetRequestContext() const override;
// URLRequest::Delegate methods:
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool is_hsts_ok) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request, int num_bytes) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool is_hsts_ok) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int num_bytes) override;
private:
enum { kBufSize = 4096 };
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index 5eb887e..2073d00 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -84,9 +84,7 @@ class RequestContext : public URLRequestContext {
storage_.set_job_factory(job_factory);
}
- virtual ~RequestContext() {
- AssertNoURLRequests();
- }
+ ~RequestContext() override { AssertNoURLRequests(); }
private:
URLRequestContextStorage storage_;
@@ -112,26 +110,26 @@ GURL GetTestFileUrl(const std::string& relpath) {
class BasicNetworkDelegate : public NetworkDelegate {
public:
BasicNetworkDelegate() {}
- virtual ~BasicNetworkDelegate() {}
+ ~BasicNetworkDelegate() override {}
private:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
EXPECT_TRUE(request->load_flags() & LOAD_DISABLE_CERT_REVOCATION_CHECKING);
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -140,22 +138,21 @@ class BasicNetworkDelegate : public NetworkDelegate {
return OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
+ void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {}
+ void OnPACScriptError(int line_number, const base::string16& error) override {
+ }
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -163,28 +160,27 @@ class BasicNetworkDelegate : public NetworkDelegate {
return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
return false;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index cb1011c..f83806c 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -119,9 +119,9 @@ class DefaultPollPolicy : public ProxyService::PacPollPolicy {
public:
DefaultPollPolicy() {}
- virtual Mode GetNextDelay(int initial_error,
- TimeDelta current_delay,
- TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int initial_error,
+ TimeDelta current_delay,
+ TimeDelta* next_delay) const override {
if (initial_error != OK) {
// Re-try policy for failures.
const int kDelay1Seconds = 8;
@@ -160,10 +160,9 @@ class DefaultPollPolicy : public ProxyService::PacPollPolicy {
class ProxyConfigServiceDirect : public ProxyConfigService {
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override {}
- virtual void RemoveObserver(Observer* observer) override {}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config)
- override {
+ void AddObserver(Observer* observer) override {}
+ void RemoveObserver(Observer* observer) override {}
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override {
*config = ProxyConfig::CreateDirect();
config->set_source(PROXY_CONFIG_SOURCE_UNKNOWN);
return CONFIG_VALID;
@@ -176,28 +175,24 @@ class ProxyResolverNull : public ProxyResolver {
ProxyResolverNull() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver implementation.
- 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 {
return ERR_NOT_IMPLEMENTED;
}
- 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(
+ int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& /*script_data*/,
const CompletionCallback& /*callback*/) override {
return ERR_NOT_IMPLEMENTED;
@@ -212,31 +207,26 @@ class ProxyResolverFromPacString : public ProxyResolver {
: ProxyResolver(false /*expects_pac_bytes*/),
pac_string_(pac_string) {}
- 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 {
results->UsePacString(pac_string_);
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>& pac_script,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& pac_script,
+ const CompletionCallback& callback) override {
return OK;
}
@@ -250,7 +240,7 @@ class ProxyResolverFactoryForSystem : public ProxyResolverFactory {
ProxyResolverFactoryForSystem()
: ProxyResolverFactory(false /*expects_pac_bytes*/) {}
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
DCHECK(IsSupported());
#if defined(OS_WIN)
return new ProxyResolverWinHttp();
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 942c6a4..040a0f8 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -97,7 +97,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
ProxyResolver* resolver,
NetLog* net_log);
- virtual ~ProxyService();
+ ~ProxyService() override;
// Used internally to handle PAC queries.
// TODO(eroman): consider naming this simply "Request".
@@ -375,14 +375,14 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// NetworkChangeNotifier::IPAddressObserver
// When this is called, we re-fetch PAC scripts and re-run WPAD.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// NetworkChangeNotifier::DNSObserver
// We respond as above.
- virtual void OnDNSChanged() override;
+ void OnDNSChanged() override;
// ProxyConfigService::Observer
- virtual void OnProxyConfigChanged(
+ void OnProxyConfigChanged(
const ProxyConfig& config,
ProxyConfigService::ConfigAvailability availability) override;
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index acc015e..aab3de3 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -37,8 +37,9 @@ class ImmediatePollPolicy : public ProxyService::PacPollPolicy {
public:
ImmediatePollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta::FromMilliseconds(1);
return MODE_USE_TIMER;
}
@@ -53,8 +54,9 @@ class NeverPollPolicy : public ProxyService::PacPollPolicy {
public:
NeverPollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta::FromDays(60);
return MODE_USE_TIMER;
}
@@ -68,8 +70,9 @@ class ImmediateAfterActivityPollPolicy : public ProxyService::PacPollPolicy {
public:
ImmediateAfterActivityPollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta();
return MODE_START_AFTER_ACTIVITY;
}
@@ -127,16 +130,15 @@ class MockProxyConfigService: public ProxyConfigService {
config_(ProxyConfig::CreateFromCustomPacURL(GURL(pac_url))) {
}
- virtual void AddObserver(Observer* observer) override {
+ void AddObserver(Observer* observer) override {
observers_.AddObserver(observer);
}
- virtual void RemoveObserver(Observer* observer) override {
+ void RemoveObserver(Observer* observer) override {
observers_.RemoveObserver(observer);
}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* results)
- override {
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* results) override {
if (availability_ == CONFIG_VALID)
*results = config_;
return availability_;
@@ -165,10 +167,10 @@ class TestResolveProxyNetworkDelegate : public NetworkDelegate {
proxy_service_(NULL) {
}
- 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 {
on_resolve_proxy_called_ = true;
proxy_service_ = &proxy_service;
DCHECK(!add_proxy_ || !remove_proxy_);
@@ -210,8 +212,8 @@ class TestProxyFallbackNetworkDelegate : public NetworkDelegate {
proxy_fallback_net_error_(OK) {
}
- virtual void OnProxyFallback(const ProxyServer& proxy_server,
- int net_error) override {
+ void OnProxyFallback(const ProxyServer& proxy_server,
+ int net_error) override {
proxy_server_ = proxy_server;
proxy_fallback_net_error_ = net_error;
on_proxy_fallback_called_ = true;
diff --git a/net/quic/congestion_control/pacing_sender.h b/net/quic/congestion_control/pacing_sender.h
index 2424a85..5271dbc 100644
--- a/net/quic/congestion_control/pacing_sender.h
+++ b/net/quic/congestion_control/pacing_sender.h
@@ -32,38 +32,38 @@ class NET_EXPORT_PRIVATE PacingSender : public SendAlgorithmInterface {
PacingSender(SendAlgorithmInterface* sender,
QuicTime::Delta alarm_granularity,
uint32 initial_packet_burst);
- virtual ~PacingSender();
+ ~PacingSender() override;
// SendAlgorithmInterface methods.
- virtual void SetFromConfig(const QuicConfig& config, bool is_server) override;
- virtual void SetNumEmulatedConnections(int num_connections) override;
- virtual void OnIncomingQuicCongestionFeedbackFrame(
+ void SetFromConfig(const QuicConfig& config, bool is_server) override;
+ void SetNumEmulatedConnections(int num_connections) override;
+ void OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time) override;
- virtual void OnCongestionEvent(bool rtt_updated,
- QuicByteCount bytes_in_flight,
- const CongestionVector& acked_packets,
- const CongestionVector& lost_packets) override;
- virtual bool OnPacketSent(QuicTime sent_time,
- QuicByteCount bytes_in_flight,
- QuicPacketSequenceNumber sequence_number,
- QuicByteCount bytes,
- HasRetransmittableData is_retransmittable) override;
- virtual void OnRetransmissionTimeout(bool packets_retransmitted) override;
- virtual void RevertRetransmissionTimeout() override;
- virtual QuicTime::Delta TimeUntilSend(
+ void OnCongestionEvent(bool rtt_updated,
+ QuicByteCount bytes_in_flight,
+ const CongestionVector& acked_packets,
+ const CongestionVector& lost_packets) override;
+ bool OnPacketSent(QuicTime sent_time,
+ QuicByteCount bytes_in_flight,
+ QuicPacketSequenceNumber sequence_number,
+ QuicByteCount bytes,
+ HasRetransmittableData is_retransmittable) override;
+ void OnRetransmissionTimeout(bool packets_retransmitted) override;
+ void RevertRetransmissionTimeout() override;
+ QuicTime::Delta TimeUntilSend(
QuicTime now,
QuicByteCount bytes_in_flight,
HasRetransmittableData has_retransmittable_data) const override;
- virtual QuicBandwidth PacingRate() const override;
- virtual QuicBandwidth BandwidthEstimate() const override;
- virtual bool HasReliableBandwidthEstimate() const override;
- virtual QuicTime::Delta RetransmissionDelay() const override;
- virtual QuicByteCount GetCongestionWindow() const override;
- virtual bool InSlowStart() const override;
- virtual bool InRecovery() const override;
- virtual QuicByteCount GetSlowStartThreshold() const override;
- virtual CongestionControlType GetCongestionControlType() const override;
+ QuicBandwidth PacingRate() const override;
+ QuicBandwidth BandwidthEstimate() const override;
+ bool HasReliableBandwidthEstimate() const override;
+ QuicTime::Delta RetransmissionDelay() const override;
+ QuicByteCount GetCongestionWindow() const override;
+ bool InSlowStart() const override;
+ bool InRecovery() const override;
+ QuicByteCount GetSlowStartThreshold() const override;
+ CongestionControlType GetCongestionControlType() const override;
private:
scoped_ptr<SendAlgorithmInterface> sender_; // Underlying sender.
diff --git a/net/quic/congestion_control/tcp_cubic_sender.h b/net/quic/congestion_control/tcp_cubic_sender.h
index bfcc0fa..ed0428a 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.h
+++ b/net/quic/congestion_control/tcp_cubic_sender.h
@@ -35,38 +35,38 @@ class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
bool reno,
QuicTcpCongestionWindow max_tcp_congestion_window,
QuicConnectionStats* stats);
- virtual ~TcpCubicSender();
+ ~TcpCubicSender() override;
// Start implementation of SendAlgorithmInterface.
- virtual void SetFromConfig(const QuicConfig& config, bool is_server) override;
- virtual void SetNumEmulatedConnections(int num_connections) override;
- virtual void OnIncomingQuicCongestionFeedbackFrame(
+ void SetFromConfig(const QuicConfig& config, bool is_server) override;
+ void SetNumEmulatedConnections(int num_connections) override;
+ void OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time) override;
- virtual void OnCongestionEvent(bool rtt_updated,
- QuicByteCount bytes_in_flight,
- const CongestionVector& acked_packets,
- const CongestionVector& lost_packets) override;
- virtual bool OnPacketSent(QuicTime sent_time,
- QuicByteCount bytes_in_flight,
- QuicPacketSequenceNumber sequence_number,
- QuicByteCount bytes,
- HasRetransmittableData is_retransmittable) override;
- virtual void OnRetransmissionTimeout(bool packets_retransmitted) override;
- virtual void RevertRetransmissionTimeout() override;
- virtual QuicTime::Delta TimeUntilSend(
+ void OnCongestionEvent(bool rtt_updated,
+ QuicByteCount bytes_in_flight,
+ const CongestionVector& acked_packets,
+ const CongestionVector& lost_packets) override;
+ bool OnPacketSent(QuicTime sent_time,
+ QuicByteCount bytes_in_flight,
+ QuicPacketSequenceNumber sequence_number,
+ QuicByteCount bytes,
+ HasRetransmittableData is_retransmittable) override;
+ void OnRetransmissionTimeout(bool packets_retransmitted) override;
+ void RevertRetransmissionTimeout() override;
+ QuicTime::Delta TimeUntilSend(
QuicTime now,
QuicByteCount bytes_in_flight,
HasRetransmittableData has_retransmittable_data) const override;
- virtual QuicBandwidth PacingRate() const override;
- virtual QuicBandwidth BandwidthEstimate() const override;
- virtual bool HasReliableBandwidthEstimate() const override;
- virtual QuicTime::Delta RetransmissionDelay() const override;
- virtual QuicByteCount GetCongestionWindow() const override;
- virtual bool InSlowStart() const override;
- virtual bool InRecovery() const override;
- virtual QuicByteCount GetSlowStartThreshold() const override;
- virtual CongestionControlType GetCongestionControlType() const override;
+ QuicBandwidth PacingRate() const override;
+ QuicBandwidth BandwidthEstimate() const override;
+ bool HasReliableBandwidthEstimate() const override;
+ QuicTime::Delta RetransmissionDelay() const override;
+ QuicByteCount GetCongestionWindow() const override;
+ bool InSlowStart() const override;
+ bool InRecovery() const override;
+ QuicByteCount GetSlowStartThreshold() const override;
+ CongestionControlType GetCongestionControlType() const override;
// End implementation of SendAlgorithmInterface.
private:
diff --git a/net/quic/congestion_control/tcp_loss_algorithm.h b/net/quic/congestion_control/tcp_loss_algorithm.h
index 201354b..0b1c995 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm.h
+++ b/net/quic/congestion_control/tcp_loss_algorithm.h
@@ -21,19 +21,19 @@ namespace net {
class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface {
public:
TCPLossAlgorithm();
- virtual ~TCPLossAlgorithm() {}
+ ~TCPLossAlgorithm() override {}
- virtual LossDetectionType GetLossDetectionType() const override;
+ LossDetectionType GetLossDetectionType() const override;
// Uses nack counts to decide when packets are lost.
- virtual SequenceNumberSet DetectLostPackets(
+ SequenceNumberSet DetectLostPackets(
const QuicUnackedPacketMap& unacked_packets,
const QuicTime& time,
QuicPacketSequenceNumber largest_observed,
const RttStats& rtt_stats) override;
// Returns a non-zero value when the early retransmit timer is active.
- virtual QuicTime GetLossTimeout() const override;
+ QuicTime GetLossTimeout() const override;
private:
QuicTime loss_detection_timeout_;
diff --git a/net/quic/congestion_control/tcp_receiver.h b/net/quic/congestion_control/tcp_receiver.h
index 89e9186..7dae4f4 100644
--- a/net/quic/congestion_control/tcp_receiver.h
+++ b/net/quic/congestion_control/tcp_receiver.h
@@ -24,12 +24,12 @@ class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface {
static const QuicByteCount kReceiveWindowTCP;
// Start implementation of SendAlgorithmInterface.
- virtual bool GenerateCongestionFeedback(
+ bool GenerateCongestionFeedback(
QuicCongestionFeedbackFrame* feedback) override;
- virtual void RecordIncomingPacket(QuicByteCount bytes,
- QuicPacketSequenceNumber sequence_number,
- QuicTime timestamp) override;
+ void RecordIncomingPacket(QuicByteCount bytes,
+ QuicPacketSequenceNumber sequence_number,
+ QuicTime timestamp) override;
private:
QuicByteCount receive_window_;
diff --git a/net/quic/congestion_control/time_loss_algorithm.h b/net/quic/congestion_control/time_loss_algorithm.h
index de517ef..794a07d 100644
--- a/net/quic/congestion_control/time_loss_algorithm.h
+++ b/net/quic/congestion_control/time_loss_algorithm.h
@@ -21,14 +21,14 @@ namespace net {
class NET_EXPORT_PRIVATE TimeLossAlgorithm : public LossDetectionInterface {
public:
TimeLossAlgorithm();
- virtual ~TimeLossAlgorithm() {}
+ ~TimeLossAlgorithm() override {}
- virtual LossDetectionType GetLossDetectionType() const override;
+ LossDetectionType GetLossDetectionType() const override;
// Declares pending packets less than the largest observed lost when it has
// been 1.25 RTT since they were sent. Packets larger than the largest
// observed are retransmitted via TLP.
- virtual SequenceNumberSet DetectLostPackets(
+ SequenceNumberSet DetectLostPackets(
const QuicUnackedPacketMap& unacked_packets,
const QuicTime& time,
QuicPacketSequenceNumber largest_observed,
@@ -39,7 +39,7 @@ class NET_EXPORT_PRIVATE TimeLossAlgorithm : public LossDetectionInterface {
// TODO(ianswett): Ideally the RTT variance and the RTT would be used to
// determine the time a packet is considered lost.
// TODO(ianswett): Consider using Max(1.25 * srtt, 1.125 * last_rtt).
- virtual QuicTime GetLossTimeout() const override;
+ QuicTime GetLossTimeout() const override;
private:
QuicTime loss_detection_timeout_;
diff --git a/net/quic/crypto/aead_base_decrypter.h b/net/quic/crypto/aead_base_decrypter.h
index 116dbe1..5118b11 100644
--- a/net/quic/crypto/aead_base_decrypter.h
+++ b/net/quic/crypto/aead_base_decrypter.h
@@ -37,21 +37,21 @@ class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter {
size_t auth_tag_size,
size_t nonce_prefix_size);
#endif
- virtual ~AeadBaseDecrypter();
+ ~AeadBaseDecrypter() override;
// QuicDecrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Decrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override;
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext) override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Decrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override;
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext) override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
protected:
// Make these constants available to the subclasses so that the subclasses
diff --git a/net/quic/crypto/aead_base_encrypter.h b/net/quic/crypto/aead_base_encrypter.h
index 89c7a1f..7d9b6fc 100644
--- a/net/quic/crypto/aead_base_encrypter.h
+++ b/net/quic/crypto/aead_base_encrypter.h
@@ -37,24 +37,24 @@ class NET_EXPORT_PRIVATE AeadBaseEncrypter : public QuicEncrypter {
size_t auth_tag_size,
size_t nonce_prefix_size);
#endif
- virtual ~AeadBaseEncrypter();
+ ~AeadBaseEncrypter() override;
// QuicEncrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Encrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece plaintext,
- unsigned char* output) override;
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece plaintext) override;
- virtual size_t GetKeySize() const override;
- virtual size_t GetNoncePrefixSize() const override;
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Encrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext,
+ unsigned char* output) override;
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext) override;
+ size_t GetKeySize() const override;
+ size_t GetNoncePrefixSize() const override;
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
+ size_t GetCiphertextSize(size_t plaintext_size) const override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
protected:
// Make these constants available to the subclasses so that the subclasses
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter.h b/net/quic/crypto/aes_128_gcm_12_decrypter.h
index 4395dc2..3de537e 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter.h
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter.h
@@ -23,7 +23,7 @@ class NET_EXPORT_PRIVATE Aes128Gcm12Decrypter : public AeadBaseDecrypter {
};
Aes128Gcm12Decrypter();
- virtual ~Aes128Gcm12Decrypter();
+ ~Aes128Gcm12Decrypter() override;
#if !defined(USE_OPENSSL)
protected:
diff --git a/net/quic/crypto/aes_128_gcm_12_encrypter.h b/net/quic/crypto/aes_128_gcm_12_encrypter.h
index afbeb14..bff3ec5 100644
--- a/net/quic/crypto/aes_128_gcm_12_encrypter.h
+++ b/net/quic/crypto/aes_128_gcm_12_encrypter.h
@@ -23,7 +23,7 @@ class NET_EXPORT_PRIVATE Aes128Gcm12Encrypter : public AeadBaseEncrypter {
};
Aes128Gcm12Encrypter();
- virtual ~Aes128Gcm12Encrypter();
+ ~Aes128Gcm12Encrypter() override;
#if !defined(USE_OPENSSL)
protected:
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter.h b/net/quic/crypto/chacha20_poly1305_decrypter.h
index e3c3e7f..04f5341 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter.h
+++ b/net/quic/crypto/chacha20_poly1305_decrypter.h
@@ -24,7 +24,7 @@ class NET_EXPORT_PRIVATE ChaCha20Poly1305Decrypter : public AeadBaseDecrypter {
};
ChaCha20Poly1305Decrypter();
- virtual ~ChaCha20Poly1305Decrypter();
+ ~ChaCha20Poly1305Decrypter() override;
// Returns true if the underlying crypto library supports ChaCha20+Poly1305.
static bool IsSupported();
diff --git a/net/quic/crypto/chacha20_poly1305_encrypter.h b/net/quic/crypto/chacha20_poly1305_encrypter.h
index b99fa27..1dcfd7c 100644
--- a/net/quic/crypto/chacha20_poly1305_encrypter.h
+++ b/net/quic/crypto/chacha20_poly1305_encrypter.h
@@ -24,7 +24,7 @@ class NET_EXPORT_PRIVATE ChaCha20Poly1305Encrypter : public AeadBaseEncrypter {
};
ChaCha20Poly1305Encrypter();
- virtual ~ChaCha20Poly1305Encrypter();
+ ~ChaCha20Poly1305Encrypter() override;
// Returns true if the underlying crypto library supports ChaCha20+Poly1305.
static bool IsSupported();
diff --git a/net/quic/crypto/channel_id_chromium.h b/net/quic/crypto/channel_id_chromium.h
index 72f694d6..20a1d8d 100644
--- a/net/quic/crypto/channel_id_chromium.h
+++ b/net/quic/crypto/channel_id_chromium.h
@@ -20,12 +20,12 @@ class ChannelIDService;
class NET_EXPORT_PRIVATE ChannelIDKeyChromium: public ChannelIDKey {
public:
explicit ChannelIDKeyChromium(crypto::ECPrivateKey* ec_private_key);
- virtual ~ChannelIDKeyChromium();
+ ~ChannelIDKeyChromium() override;
// ChannelIDKey interface
- virtual bool Sign(base::StringPiece signed_data,
- std::string* out_signature) const override;
- virtual std::string SerializeKey() const override;
+ bool Sign(base::StringPiece signed_data,
+ std::string* out_signature) const override;
+ std::string SerializeKey() const override;
private:
scoped_ptr<crypto::ECPrivateKey> ec_private_key_;
@@ -36,13 +36,12 @@ class ChannelIDSourceChromium : public ChannelIDSource {
public:
explicit ChannelIDSourceChromium(
ChannelIDService* channel_id_service);
- virtual ~ChannelIDSourceChromium();
+ ~ChannelIDSourceChromium() override;
// ChannelIDSource interface
- virtual QuicAsyncStatus GetChannelIDKey(
- const std::string& hostname,
- scoped_ptr<ChannelIDKey>* channel_id_key,
- ChannelIDSourceCallback* callback) override;
+ QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
+ scoped_ptr<ChannelIDKey>* channel_id_key,
+ ChannelIDSourceCallback* callback) override;
private:
class Job;
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc
index 0d39ecc..cc4f91b 100644
--- a/net/quic/crypto/common_cert_set.cc
+++ b/net/quic/crypto/common_cert_set.cc
@@ -69,12 +69,12 @@ int Compare(StringPiece a, const unsigned char* b, size_t b_len) {
class CommonCertSetsQUIC : public CommonCertSets {
public:
// CommonCertSets interface.
- virtual StringPiece GetCommonHashes() const override {
+ StringPiece GetCommonHashes() const override {
return StringPiece(reinterpret_cast<const char*>(kSetHashes),
sizeof(uint64) * arraysize(kSetHashes));
}
- virtual StringPiece GetCert(uint64 hash, uint32 index) const override {
+ StringPiece GetCert(uint64 hash, uint32 index) const override {
for (size_t i = 0; i < arraysize(kSets); i++) {
if (kSets[i].hash == hash) {
if (index < kSets[i].num_certs) {
@@ -89,8 +89,10 @@ class CommonCertSetsQUIC : public CommonCertSets {
return StringPiece();
}
- virtual bool MatchCert(StringPiece cert, StringPiece common_set_hashes,
- uint64* out_hash, uint32* out_index) const override {
+ bool MatchCert(StringPiece cert,
+ StringPiece common_set_hashes,
+ uint64* out_hash,
+ uint32* out_index) const override {
if (common_set_hashes.size() % sizeof(uint64) != 0) {
return false;
}
@@ -140,7 +142,7 @@ class CommonCertSetsQUIC : public CommonCertSets {
private:
CommonCertSetsQUIC() {}
- virtual ~CommonCertSetsQUIC() {}
+ ~CommonCertSetsQUIC() override {}
friend struct DefaultSingletonTraits<CommonCertSetsQUIC>;
DISALLOW_COPY_AND_ASSIGN(CommonCertSetsQUIC);
diff --git a/net/quic/crypto/crypto_framer.cc b/net/quic/crypto/crypto_framer.cc
index 3f61115..029ec53 100644
--- a/net/quic/crypto/crypto_framer.cc
+++ b/net/quic/crypto/crypto_framer.cc
@@ -26,10 +26,9 @@ class OneShotVisitor : public CryptoFramerVisitorInterface {
public:
OneShotVisitor() : error_(false) {}
- virtual void OnError(CryptoFramer* framer) override { error_ = true; }
+ void OnError(CryptoFramer* framer) override { error_ = true; }
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
out_.reset(new CryptoHandshakeMessage(message));
}
diff --git a/net/quic/crypto/crypto_framer_test.cc b/net/quic/crypto/crypto_framer_test.cc
index f9ea55d..ce815a8 100644
--- a/net/quic/crypto/crypto_framer_test.cc
+++ b/net/quic/crypto/crypto_framer_test.cc
@@ -33,13 +33,12 @@ class TestCryptoVisitor : public ::net::CryptoFramerVisitorInterface {
public:
TestCryptoVisitor() : error_count_(0) {}
- virtual void OnError(CryptoFramer* framer) override {
+ void OnError(CryptoFramer* framer) override {
DLOG(ERROR) << "CryptoFramer Error: " << framer->error();
++error_count_;
}
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index 1f3380a..1905109 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -155,8 +155,8 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
*called_ = false;
}
- virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
- const Result& result) override {
+ void RunImpl(const CryptoHandshakeMessage& client_hello,
+ const Result& result) override {
{
// Ensure that the strike register client lock is not held.
QuicCryptoServerConfigPeer peer(&test_->config_);
diff --git a/net/quic/crypto/curve25519_key_exchange.h b/net/quic/crypto/curve25519_key_exchange.h
index 310c614..cdb6d1a 100644
--- a/net/quic/crypto/curve25519_key_exchange.h
+++ b/net/quic/crypto/curve25519_key_exchange.h
@@ -20,7 +20,7 @@ class QuicRandom;
// Diffie-Hellman on curve25519. See http://cr.yp.to/ecdh.html
class NET_EXPORT_PRIVATE Curve25519KeyExchange : public KeyExchange {
public:
- virtual ~Curve25519KeyExchange();
+ ~Curve25519KeyExchange() override;
// New creates a new object from a private key. If the private key is
// invalid, nullptr is returned.
@@ -31,11 +31,11 @@ class NET_EXPORT_PRIVATE Curve25519KeyExchange : public KeyExchange {
static std::string NewPrivateKey(QuicRandom* rand);
// KeyExchange interface.
- virtual KeyExchange* NewKeyPair(QuicRandom* rand) const override;
- virtual bool CalculateSharedKey(const base::StringPiece& peer_public_value,
- std::string* shared_key) const override;
- virtual base::StringPiece public_value() const override;
- virtual QuicTag tag() const override;
+ KeyExchange* NewKeyPair(QuicRandom* rand) const override;
+ bool CalculateSharedKey(const base::StringPiece& peer_public_value,
+ std::string* shared_key) const override;
+ base::StringPiece public_value() const override;
+ QuicTag tag() const override;
private:
Curve25519KeyExchange();
diff --git a/net/quic/crypto/local_strike_register_client.h b/net/quic/crypto/local_strike_register_client.h
index b121299..5f576e9 100644
--- a/net/quic/crypto/local_strike_register_client.h
+++ b/net/quic/crypto/local_strike_register_client.h
@@ -26,10 +26,10 @@ class NET_EXPORT_PRIVATE LocalStrikeRegisterClient
const uint8 orbit[8],
StrikeRegister::StartupType startup);
- virtual bool IsKnownOrbit(base::StringPiece orbit) const override;
- virtual void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override;
+ bool IsKnownOrbit(base::StringPiece orbit) const override;
+ void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override;
private:
mutable base::Lock m_;
diff --git a/net/quic/crypto/local_strike_register_client_test.cc b/net/quic/crypto/local_strike_register_client_test.cc
index 70d2428..a2c3ce2 100644
--- a/net/quic/crypto/local_strike_register_client_test.cc
+++ b/net/quic/crypto/local_strike_register_client_test.cc
@@ -35,8 +35,8 @@ class RecordResultCallback : public StrikeRegisterClient::ResultCallback {
}
protected:
- virtual void RunImpl(bool nonce_is_valid_and_unique,
- InsertStatus nonce_error) override {
+ void RunImpl(bool nonce_is_valid_and_unique,
+ InsertStatus nonce_error) override {
*called_ = true;
*saved_value_ = nonce_is_valid_and_unique;
*saved_nonce_error_ = nonce_error;
diff --git a/net/quic/crypto/null_decrypter.h b/net/quic/crypto/null_decrypter.h
index 03038bd..6f23290 100644
--- a/net/quic/crypto/null_decrypter.h
+++ b/net/quic/crypto/null_decrypter.h
@@ -19,21 +19,21 @@ class QuicDataReader;
class NET_EXPORT_PRIVATE NullDecrypter : public QuicDecrypter {
public:
NullDecrypter();
- virtual ~NullDecrypter() {}
+ ~NullDecrypter() override {}
// QuicDecrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Decrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override;
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext) override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Decrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override;
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext) override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
private:
bool ReadHash(QuicDataReader* reader, uint128* hash);
diff --git a/net/quic/crypto/null_encrypter.h b/net/quic/crypto/null_encrypter.h
index fbd2dff..b52bd9c 100644
--- a/net/quic/crypto/null_encrypter.h
+++ b/net/quic/crypto/null_encrypter.h
@@ -17,24 +17,24 @@ namespace net {
class NET_EXPORT_PRIVATE NullEncrypter : public QuicEncrypter {
public:
NullEncrypter();
- virtual ~NullEncrypter() {}
+ ~NullEncrypter() override {}
// QuicEncrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Encrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece plaintext,
- unsigned char* output) override;
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece plaintext) override;
- virtual size_t GetKeySize() const override;
- virtual size_t GetNoncePrefixSize() const override;
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Encrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext,
+ unsigned char* output) override;
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext) override;
+ size_t GetKeySize() const override;
+ size_t GetNoncePrefixSize() const override;
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
+ size_t GetCiphertextSize(size_t plaintext_size) const override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
private:
size_t GetHashLength() const;
diff --git a/net/quic/crypto/p256_key_exchange.h b/net/quic/crypto/p256_key_exchange.h
index 36ba296..9e22a33 100644
--- a/net/quic/crypto/p256_key_exchange.h
+++ b/net/quic/crypto/p256_key_exchange.h
@@ -26,7 +26,7 @@ namespace net {
// Diffie-Hellman on NIST P-256.
class NET_EXPORT_PRIVATE P256KeyExchange : public KeyExchange {
public:
- virtual ~P256KeyExchange();
+ ~P256KeyExchange() override;
// New creates a new key exchange object from a private key. If
// |private_key| is invalid, nullptr is returned.
@@ -38,11 +38,11 @@ class NET_EXPORT_PRIVATE P256KeyExchange : public KeyExchange {
static std::string NewPrivateKey();
// KeyExchange interface.
- virtual KeyExchange* NewKeyPair(QuicRandom* rand) const override;
- virtual bool CalculateSharedKey(const base::StringPiece& peer_public_value,
- std::string* shared_key) const override;
- virtual base::StringPiece public_value() const override;
- virtual QuicTag tag() const override;
+ KeyExchange* NewKeyPair(QuicRandom* rand) const override;
+ bool CalculateSharedKey(const base::StringPiece& peer_public_value,
+ std::string* shared_key) const override;
+ base::StringPiece public_value() const override;
+ QuicTag tag() const override;
private:
enum {
diff --git a/net/quic/crypto/proof_source_chromium.h b/net/quic/crypto/proof_source_chromium.h
index 3d1849e..334466c 100644
--- a/net/quic/crypto/proof_source_chromium.h
+++ b/net/quic/crypto/proof_source_chromium.h
@@ -20,14 +20,14 @@ namespace net {
class NET_EXPORT_PRIVATE ProofSourceChromium : public ProofSource {
public:
ProofSourceChromium();
- virtual ~ProofSourceChromium() {}
+ ~ProofSourceChromium() override {}
// ProofSource interface
- virtual bool GetProof(const std::string& hostname,
- const std::string& server_config,
- bool ecdsa_ok,
- const std::vector<std::string>** out_certs,
- std::string* out_signature) override;
+ bool GetProof(const std::string& hostname,
+ const std::string& server_config,
+ bool ecdsa_ok,
+ const std::vector<std::string>** out_certs,
+ std::string* out_signature) override;
private:
DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium);
diff --git a/net/quic/crypto/proof_test.cc b/net/quic/crypto/proof_test.cc
index 0dde97c..5336e72 100644
--- a/net/quic/crypto/proof_test.cc
+++ b/net/quic/crypto/proof_test.cc
@@ -38,9 +38,9 @@ class TestProofVerifierCallback : public ProofVerifierCallback {
ok_(ok),
error_details_(error_details) {}
- virtual void Run(bool ok,
- const string& error_details,
- scoped_ptr<ProofVerifyDetails>* details) override {
+ void Run(bool ok,
+ const string& error_details,
+ scoped_ptr<ProofVerifyDetails>* details) override {
*ok_ = ok;
*error_details_ = error_details;
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h
index 057cc16..c51a024 100644
--- a/net/quic/crypto/proof_verifier_chromium.h
+++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -30,7 +30,7 @@ class NET_EXPORT_PRIVATE ProofVerifyDetailsChromium
public:
// ProofVerifyDetails implementation
- virtual ProofVerifyDetails* Clone() const override;
+ ProofVerifyDetails* Clone() const override;
CertVerifyResult cert_verify_result;
@@ -56,18 +56,17 @@ class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
public:
ProofVerifierChromium(CertVerifier* cert_verifier,
TransportSecurityState* transport_security_state);
- virtual ~ProofVerifierChromium();
+ ~ProofVerifierChromium() override;
// ProofVerifier interface
- virtual QuicAsyncStatus VerifyProof(
- const std::string& hostname,
- const std::string& server_config,
- const std::vector<std::string>& certs,
- const std::string& signature,
- const ProofVerifyContext* verify_context,
- std::string* error_details,
- scoped_ptr<ProofVerifyDetails>* verify_details,
- ProofVerifierCallback* callback) override;
+ QuicAsyncStatus VerifyProof(const std::string& hostname,
+ const std::string& server_config,
+ const std::vector<std::string>& certs,
+ const std::string& signature,
+ const ProofVerifyContext* verify_context,
+ std::string* error_details,
+ scoped_ptr<ProofVerifyDetails>* verify_details,
+ ProofVerifierCallback* callback) override;
private:
class Job;
diff --git a/net/quic/crypto/quic_crypto_client_config_test.cc b/net/quic/crypto/quic_crypto_client_config_test.cc
index d2c4920..21f4bd3 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -18,10 +18,10 @@ namespace test {
namespace {
class TestProofVerifyDetails : public ProofVerifyDetails {
- virtual ~TestProofVerifyDetails() {}
+ ~TestProofVerifyDetails() override {}
// ProofVerifyDetails implementation
- virtual ProofVerifyDetails* Clone() const override {
+ ProofVerifyDetails* Clone() const override {
return new TestProofVerifyDetails;
}
};
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index d5a2b75..08cdb7e 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -107,8 +107,8 @@ class VerifyNonceIsValidAndUniqueCallback
}
protected:
- virtual void RunImpl(bool nonce_is_valid_and_unique,
- InsertStatus nonce_error) override {
+ void RunImpl(bool nonce_is_valid_and_unique,
+ InsertStatus nonce_error) override {
DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique
<< " nonce_error: " << nonce_error;
result_->info.unique = nonce_is_valid_and_unique;
diff --git a/net/quic/crypto/quic_crypto_server_config_test.cc b/net/quic/crypto/quic_crypto_server_config_test.cc
index 59d6cf4..0743a18 100644
--- a/net/quic/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/crypto/quic_crypto_server_config_test.cc
@@ -207,7 +207,7 @@ class TestStrikeRegisterClient : public StrikeRegisterClient {
is_known_orbit_called_(false) {
}
- virtual bool IsKnownOrbit(StringPiece orbit) const override {
+ bool IsKnownOrbit(StringPiece orbit) const override {
// Ensure that the strike register client lock is not held.
QuicCryptoServerConfigPeer peer(config_);
base::Lock* m = peer.GetStrikeRegisterClientLock();
@@ -220,10 +220,9 @@ class TestStrikeRegisterClient : public StrikeRegisterClient {
return true;
}
- virtual void VerifyNonceIsValidAndUnique(
- StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override {
+ void VerifyNonceIsValidAndUnique(StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override {
LOG(FATAL) << "Not implemented";
}
diff --git a/net/quic/crypto/quic_random.cc b/net/quic/crypto/quic_random.cc
index bc85c2d..6b34465 100644
--- a/net/quic/crypto/quic_random.cc
+++ b/net/quic/crypto/quic_random.cc
@@ -17,14 +17,13 @@ class DefaultRandom : public QuicRandom {
static DefaultRandom* GetInstance();
// QuicRandom implementation
- virtual void RandBytes(void* data, size_t len) override;
- virtual uint64 RandUint64() override;
- virtual void Reseed(const void* additional_entropy,
- size_t entropy_len) override;
+ void RandBytes(void* data, size_t len) override;
+ uint64 RandUint64() override;
+ void Reseed(const void* additional_entropy, size_t entropy_len) override;
private:
DefaultRandom() {};
- virtual ~DefaultRandom() {}
+ ~DefaultRandom() override {}
friend struct DefaultSingletonTraits<DefaultRandom>;
DISALLOW_COPY_AND_ASSIGN(DefaultRandom);
diff --git a/net/quic/quic_alarm_test.cc b/net/quic/quic_alarm_test.cc
index 47e23e3..dfd40ed 100644
--- a/net/quic/quic_alarm_test.cc
+++ b/net/quic/quic_alarm_test.cc
@@ -32,12 +32,12 @@ class TestAlarm : public QuicAlarm {
}
protected:
- virtual void SetImpl() override {
+ void SetImpl() override {
DCHECK(deadline().IsInitialized());
scheduled_ = true;
}
- virtual void CancelImpl() override {
+ void CancelImpl() override {
DCHECK(!deadline().IsInitialized());
scheduled_ = false;
}
diff --git a/net/quic/quic_client_session.h b/net/quic/quic_client_session.h
index 430ef52..b1a35d9 100644
--- a/net/quic/quic_client_session.h
+++ b/net/quic/quic_client_session.h
@@ -98,7 +98,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
const QuicConfig& config,
base::TaskRunner* task_runner,
NetLog* net_log);
- virtual ~QuicClientSession();
+ ~QuicClientSession() override;
// Initialize session's connection to |server_id|.
void InitializeSession(
@@ -123,31 +123,28 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
void CancelRequest(StreamRequest* request);
// QuicSession methods:
- virtual void OnStreamFrames(
- const std::vector<QuicStreamFrame>& frames) override;
- virtual QuicReliableClientStream* CreateOutgoingDataStream() override;
- virtual QuicCryptoClientStream* GetCryptoStream() override;
- virtual void CloseStream(QuicStreamId stream_id) override;
- virtual void SendRstStream(QuicStreamId id,
- QuicRstStreamErrorCode error,
- QuicStreamOffset bytes_written) override;
- virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
- virtual void OnCryptoHandshakeMessageSent(
+ void OnStreamFrames(const std::vector<QuicStreamFrame>& frames) override;
+ QuicReliableClientStream* CreateOutgoingDataStream() override;
+ QuicCryptoClientStream* GetCryptoStream() override;
+ void CloseStream(QuicStreamId stream_id) override;
+ void SendRstStream(QuicStreamId id,
+ QuicRstStreamErrorCode error,
+ QuicStreamOffset bytes_written) override;
+ void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
+ void OnCryptoHandshakeMessageSent(
const CryptoHandshakeMessage& message) override;
- virtual void OnCryptoHandshakeMessageReceived(
+ void OnCryptoHandshakeMessageReceived(
const CryptoHandshakeMessage& message) override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) const override;
// QuicClientSessionBase methods:
- virtual void OnProofValid(
- const QuicCryptoClientConfig::CachedState& cached) override;
- virtual void OnProofVerifyDetailsAvailable(
+ void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override;
+ void OnProofVerifyDetailsAvailable(
const ProofVerifyDetails& verify_details) override;
// QuicConnectionVisitorInterface methods:
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
// Performs a crypto handshake with the server.
int CryptoConnect(bool require_confirmation,
@@ -182,7 +179,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
protected:
// QuicSession methods:
- virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
+ QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
private:
friend class test::QuicClientSessionPeer;
diff --git a/net/quic/quic_client_session_base.h b/net/quic/quic_client_session_base.h
index ae0644e..d72996c 100644
--- a/net/quic/quic_client_session_base.h
+++ b/net/quic/quic_client_session_base.h
@@ -16,7 +16,7 @@ class NET_EXPORT_PRIVATE QuicClientSessionBase : public QuicSession {
QuicClientSessionBase(QuicConnection* connection,
const QuicConfig& config);
- virtual ~QuicClientSessionBase();
+ ~QuicClientSessionBase() override;
// Called when the proof in |cached| is marked valid. If this is a secure
// QUIC session, then this will happen only after the proof verifier
@@ -33,7 +33,7 @@ class NET_EXPORT_PRIVATE QuicClientSessionBase : public QuicSession {
const ProofVerifyDetails& verify_details) = 0;
// Override base class to set FEC policy before any data is sent by client.
- virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
+ void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
private:
DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase);
diff --git a/net/quic/quic_config.h b/net/quic/quic_config.h
index 7be4569..5328ef6 100644
--- a/net/quic/quic_config.h
+++ b/net/quic/quic_config.h
@@ -61,7 +61,7 @@ class NET_EXPORT_PRIVATE QuicConfigValue {
class NET_EXPORT_PRIVATE QuicNegotiableValue : public QuicConfigValue {
public:
QuicNegotiableValue(QuicTag tag, QuicConfigPresence presence);
- virtual ~QuicNegotiableValue();
+ ~QuicNegotiableValue() override;
bool negotiated() const {
return negotiated_;
@@ -75,7 +75,7 @@ class NET_EXPORT_PRIVATE QuicNegotiableUint32 : public QuicNegotiableValue {
public:
// Default and max values default to 0.
QuicNegotiableUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableUint32();
+ ~QuicNegotiableUint32() override;
// Sets the maximum possible value that can be achieved after negotiation and
// also the default values to be assumed if PRESENCE_OPTIONAL and the *HLO msg
@@ -89,16 +89,15 @@ class NET_EXPORT_PRIVATE QuicNegotiableUint32 : public QuicNegotiableValue {
// Serialises |name_| and value to |out|. If |negotiated_| is true then
// |negotiated_value_| is serialised, otherwise |max_value_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |negotiated_value_| to the minimum of |max_value_| and the
// corresponding value from |peer_hello|. If the corresponding value is
// missing and PRESENCE_OPTIONAL then |negotiated_value_| is set to
// |default_value_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 max_value_;
@@ -109,7 +108,7 @@ class NET_EXPORT_PRIVATE QuicNegotiableUint32 : public QuicNegotiableValue {
class NET_EXPORT_PRIVATE QuicNegotiableTag : public QuicNegotiableValue {
public:
QuicNegotiableTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableTag();
+ ~QuicNegotiableTag() override;
// Sets the possible values that |negotiated_tag_| can take after negotiation
// and the default value that |negotiated_tag_| takes if OPTIONAL and *HLO
@@ -123,15 +122,14 @@ class NET_EXPORT_PRIVATE QuicNegotiableTag : public QuicNegotiableValue {
// Serialises |name_| and vector (either possible or negotiated) to |out|. If
// |negotiated_| is true then |negotiated_tag_| is serialised, otherwise
// |possible_values_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Selects the tag common to both tags in |client_hello| for |name_| and
// |possible_values_| with preference to tag in |possible_values_|. The
// selected tag is set as |negotiated_tag_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
// Reads the vector corresponding to |name_| from |msg| into |out|. If the
@@ -151,7 +149,7 @@ class NET_EXPORT_PRIVATE QuicNegotiableTag : public QuicNegotiableValue {
class NET_EXPORT_PRIVATE QuicFixedUint32 : public QuicConfigValue {
public:
QuicFixedUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedUint32();
+ ~QuicFixedUint32() override;
bool HasSendValue() const;
@@ -166,13 +164,12 @@ class NET_EXPORT_PRIVATE QuicFixedUint32 : public QuicConfigValue {
void SetReceivedValue(uint32 value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |peer_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 send_value_;
@@ -185,7 +182,7 @@ class NET_EXPORT_PRIVATE QuicFixedUint32 : public QuicConfigValue {
class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
public:
QuicFixedTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTag();
+ ~QuicFixedTag() override;
bool HasSendValue() const;
@@ -200,13 +197,12 @@ class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
void SetReceivedValue(QuicTag value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |client_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTag send_value_;
@@ -219,7 +215,7 @@ class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
public:
QuicFixedTagVector(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTagVector();
+ ~QuicFixedTagVector() override;
bool HasSendValues() const;
@@ -235,14 +231,13 @@ class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
// If has_send_value is true, serialises |tag_vector_| and |send_value_| to
// |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |receive_values_| to the corresponding value from |client_hello_| if
// it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTagVector send_values_;
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 72f66dc..a0794f3 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -69,7 +69,7 @@ class AckAlarm : public QuicAlarm::Delegate {
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->SendAck();
return QuicTime::Zero();
}
@@ -89,7 +89,7 @@ class RetransmissionAlarm : public QuicAlarm::Delegate {
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->OnRetransmissionTimeout();
return QuicTime::Zero();
}
@@ -108,7 +108,7 @@ class SendAlarm : public QuicAlarm::Delegate {
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->WriteIfNotBlocked();
// Never reschedule the alarm, since CanWrite does that.
return QuicTime::Zero();
@@ -126,7 +126,7 @@ class TimeoutAlarm : public QuicAlarm::Delegate {
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->CheckForTimeout();
// Never reschedule the alarm, since CheckForTimeout does that.
return QuicTime::Zero();
@@ -144,7 +144,7 @@ class PingAlarm : public QuicAlarm::Delegate {
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->SendPing();
return QuicTime::Zero();
}
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 45183ee..0b5dd00 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -121,7 +121,7 @@ class NET_EXPORT_PRIVATE QuicConnectionDebugVisitor
: public QuicPacketGenerator::DebugDelegate,
public QuicSentPacketManager::DebugDelegate {
public:
- virtual ~QuicConnectionDebugVisitor() {}
+ ~QuicConnectionDebugVisitor() override {}
// Called when a packet has been sent.
virtual void OnPacketSent(const SerializedPacket& serialized_packet,
@@ -252,7 +252,7 @@ class NET_EXPORT_PRIVATE QuicConnection
bool owns_writer,
bool is_server,
const QuicVersionVector& supported_versions);
- virtual ~QuicConnection();
+ ~QuicConnection() override;
// Sets connection parameters from the supplied |config|.
void SetFromConfig(const QuicConfig& config);
@@ -299,7 +299,7 @@ class NET_EXPORT_PRIVATE QuicConnection
virtual void SendConnectionCloseWithDetails(QuicErrorCode error,
const std::string& details);
// Notifies the visitor of the close and marks the connection as disconnected.
- virtual void CloseConnection(QuicErrorCode error, bool from_peer) override;
+ void CloseConnection(QuicErrorCode error, bool from_peer) override;
virtual void SendGoAway(QuicErrorCode error,
QuicStreamId last_good_stream_id,
const std::string& reason);
@@ -317,7 +317,7 @@ class NET_EXPORT_PRIVATE QuicConnection
// QuicBlockedWriterInterface
// Called when the underlying connection becomes writable to allow queued
// writes to happen.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// Called when an error occurs while attempting to write a packet to the
// network.
@@ -335,47 +335,44 @@ class NET_EXPORT_PRIVATE QuicConnection
}
// From QuicFramerVisitorInterface
- virtual void OnError(QuicFramer* framer) override;
- virtual bool OnProtocolVersionMismatch(QuicVersion received_version) override;
- virtual void OnPacket() override;
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override;
- virtual void OnVersionNegotiationPacket(
+ void OnError(QuicFramer* framer) override;
+ bool OnProtocolVersionMismatch(QuicVersion received_version) override;
+ void OnPacket() override;
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override;
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override;
- virtual void OnRevivedPacket() override;
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnRevivedPacket() override;
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override;
- virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
- virtual void OnDecryptedPacket(EncryptionLevel level) override;
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnFecProtectedPayload(base::StringPiece payload) override;
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual bool OnAckFrame(const QuicAckFrame& frame) override;
- virtual bool OnCongestionFeedbackFrame(
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
+ void OnDecryptedPacket(EncryptionLevel level) override;
+ bool OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnFecProtectedPayload(base::StringPiece payload) override;
+ bool OnStreamFrame(const QuicStreamFrame& frame) override;
+ bool OnAckFrame(const QuicAckFrame& frame) override;
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
- virtual bool OnPingFrame(const QuicPingFrame& frame) override;
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnFecData(const QuicFecData& fec) override;
- virtual void OnPacketComplete() override;
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ bool OnPingFrame(const QuicPingFrame& frame) override;
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnFecData(const QuicFecData& fec) override;
+ void OnPacketComplete() override;
// QuicPacketGenerator::DelegateInterface
- virtual bool ShouldGeneratePacket(TransmissionType transmission_type,
- HasRetransmittableData retransmittable,
- IsHandshake handshake) override;
- virtual QuicAckFrame* CreateAckFrame() override;
- virtual QuicCongestionFeedbackFrame* CreateFeedbackFrame() override;
- virtual QuicStopWaitingFrame* CreateStopWaitingFrame() override;
- virtual void OnSerializedPacket(const SerializedPacket& packet) override;
+ bool ShouldGeneratePacket(TransmissionType transmission_type,
+ HasRetransmittableData retransmittable,
+ IsHandshake handshake) override;
+ QuicAckFrame* CreateAckFrame() override;
+ QuicCongestionFeedbackFrame* CreateFeedbackFrame() override;
+ QuicStopWaitingFrame* CreateStopWaitingFrame() override;
+ void OnSerializedPacket(const SerializedPacket& packet) override;
// QuicSentPacketManager::NetworkChangeVisitor
- virtual void OnCongestionWindowChange(
- QuicByteCount congestion_window) override;
+ void OnCongestionWindowChange(QuicByteCount congestion_window) override;
// Called by the crypto stream when the handshake completes. In the server's
// case this is when the SHLO has been ACKed. Clients call this on receipt of
diff --git a/net/quic/quic_connection_helper.cc b/net/quic/quic_connection_helper.cc
index 83c1648..195dfb3 100644
--- a/net/quic/quic_connection_helper.cc
+++ b/net/quic/quic_connection_helper.cc
@@ -29,7 +29,7 @@ class QuicChromeAlarm : public QuicAlarm {
weak_factory_(this) {}
protected:
- virtual void SetImpl() override {
+ void SetImpl() override {
DCHECK(deadline().IsInitialized());
if (task_deadline_.IsInitialized()) {
if (task_deadline_ <= deadline()) {
@@ -54,7 +54,7 @@ class QuicChromeAlarm : public QuicAlarm {
task_deadline_ = deadline();
}
- virtual void CancelImpl() override {
+ void CancelImpl() override {
DCHECK(!deadline().IsInitialized());
// Since tasks can not be un-posted, OnAlarm will be invoked which
// will notice that deadline is not Initialized and will do nothing.
diff --git a/net/quic/quic_connection_helper.h b/net/quic/quic_connection_helper.h
index e1754e5..140bf9a 100644
--- a/net/quic/quic_connection_helper.h
+++ b/net/quic/quic_connection_helper.h
@@ -34,12 +34,12 @@ class NET_EXPORT_PRIVATE QuicConnectionHelper
QuicConnectionHelper(base::TaskRunner* task_runner,
const QuicClock* clock,
QuicRandom* random_generator);
- virtual ~QuicConnectionHelper();
+ ~QuicConnectionHelper() override;
// QuicConnectionHelperInterface
- virtual const QuicClock* GetClock() const override;
- virtual QuicRandom* GetRandomGenerator() override;
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
+ const QuicClock* GetClock() const override;
+ QuicRandom* GetRandomGenerator() override;
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
private:
base::TaskRunner* task_runner_;
diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_connection_helper_test.cc
index 8a2c931..f5a6907 100644
--- a/net/quic/quic_connection_helper_test.cc
+++ b/net/quic/quic_connection_helper_test.cc
@@ -17,7 +17,7 @@ class TestDelegate : public QuicAlarm::Delegate {
public:
TestDelegate() : fired_(false) {}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
fired_ = true;
return QuicTime::Zero();
}
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index c714e3b..1d38049 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -29,49 +29,44 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
public:
QuicConnectionLogger(QuicSession* session, const BoundNetLog& net_log);
- virtual ~QuicConnectionLogger();
+ ~QuicConnectionLogger() override;
// QuicPacketGenerator::DebugDelegateInterface
- virtual void OnFrameAddedToPacket(const QuicFrame& frame) override;
+ void OnFrameAddedToPacket(const QuicFrame& frame) override;
// QuicConnectionDebugVisitorInterface
- virtual void OnPacketSent(const SerializedPacket& serialized_packet,
- QuicPacketSequenceNumber original_sequence_number,
- EncryptionLevel level,
- TransmissionType transmission_type,
- const QuicEncryptedPacket& packet,
- QuicTime sent_time) override;
- virtual void OnPacketReceived(const IPEndPoint& self_address,
- const IPEndPoint& peer_address,
- const QuicEncryptedPacket& packet) override;
- virtual void OnIncorrectConnectionId(
- QuicConnectionId connection_id) override;
- virtual void OnUndecryptablePacket() override;
- virtual void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number)
- override;
- virtual void OnProtocolVersionMismatch(QuicVersion version) override;
- virtual void OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual void OnAckFrame(const QuicAckFrame& frame) override;
- virtual void OnCongestionFeedbackFrame(
+ void OnPacketSent(const SerializedPacket& serialized_packet,
+ QuicPacketSequenceNumber original_sequence_number,
+ EncryptionLevel level,
+ TransmissionType transmission_type,
+ const QuicEncryptedPacket& packet,
+ QuicTime sent_time) override;
+ void OnPacketReceived(const IPEndPoint& self_address,
+ const IPEndPoint& peer_address,
+ const QuicEncryptedPacket& packet) override;
+ void OnIncorrectConnectionId(QuicConnectionId connection_id) override;
+ void OnUndecryptablePacket() override;
+ void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number) override;
+ void OnProtocolVersionMismatch(QuicVersion version) override;
+ void OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnStreamFrame(const QuicStreamFrame& frame) override;
+ void OnAckFrame(const QuicAckFrame& frame) override;
+ void OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
- virtual void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual void OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual void OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual void OnPingFrame(const QuicPingFrame& frame) override;
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override;
- virtual void OnVersionNegotiationPacket(
+ void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ void OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ void OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ void OnPingFrame(const QuicPingFrame& frame) override;
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override;
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override;
- virtual void OnRevivedPacket(const QuicPacketHeader& revived_header,
- base::StringPiece payload) override;
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
+ void OnRevivedPacket(const QuicPacketHeader& revived_header,
+ base::StringPiece payload) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
void OnCryptoHandshakeMessageReceived(
const CryptoHandshakeMessage& message);
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 7923be2..1c47f32 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -90,51 +90,45 @@ class TaggingEncrypter : public QuicEncrypter {
: tag_(tag) {
}
- virtual ~TaggingEncrypter() {}
+ ~TaggingEncrypter() override {}
// QuicEncrypter interface.
- virtual bool SetKey(StringPiece key) override { return true; }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
- virtual bool Encrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece plaintext,
- unsigned char* output) override {
+ bool Encrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece plaintext,
+ unsigned char* output) override {
memcpy(output, plaintext.data(), plaintext.size());
output += plaintext.size();
memset(output, tag_, kTagSize);
return true;
}
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece plaintext) override {
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece plaintext) override {
const size_t len = plaintext.size() + kTagSize;
uint8* buffer = new uint8[len];
Encrypt(StringPiece(), associated_data, plaintext, buffer);
return new QuicData(reinterpret_cast<char*>(buffer), len, true);
}
- virtual size_t GetKeySize() const override { return 0; }
- virtual size_t GetNoncePrefixSize() const override { return 0; }
+ size_t GetKeySize() const override { return 0; }
+ size_t GetNoncePrefixSize() const override { return 0; }
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
return ciphertext_size - kTagSize;
}
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override {
+ size_t GetCiphertextSize(size_t plaintext_size) const override {
return plaintext_size + kTagSize;
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
private:
enum {
@@ -150,19 +144,17 @@ class TaggingEncrypter : public QuicEncrypter {
// have the same value and then removes them.
class TaggingDecrypter : public QuicDecrypter {
public:
- virtual ~TaggingDecrypter() {}
+ ~TaggingDecrypter() override {}
// QuicDecrypter interface
- virtual bool SetKey(StringPiece key) override { return true; }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
-
- virtual bool Decrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override {
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
+
+ bool Decrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override {
if (ciphertext.size() < kTagSize) {
return false;
}
@@ -174,9 +166,9 @@ class TaggingDecrypter : public QuicDecrypter {
return true;
}
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece ciphertext) override {
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece ciphertext) override {
if (ciphertext.size() < kTagSize) {
return nullptr;
}
@@ -190,8 +182,8 @@ class TaggingDecrypter : public QuicDecrypter {
true /* owns buffer */);
}
- virtual StringPiece GetKey() const override { return StringPiece(); }
- virtual StringPiece GetNoncePrefix() const override { return StringPiece(); }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
protected:
virtual uint8 GetTag(StringPiece ciphertext) {
@@ -219,12 +211,10 @@ class TaggingDecrypter : public QuicDecrypter {
class StrictTaggingDecrypter : public TaggingDecrypter {
public:
explicit StrictTaggingDecrypter(uint8 tag) : tag_(tag) {}
- virtual ~StrictTaggingDecrypter() {}
+ ~StrictTaggingDecrypter() override {}
// TaggingQuicDecrypter
- virtual uint8 GetTag(StringPiece ciphertext) override {
- return tag_;
- }
+ uint8 GetTag(StringPiece ciphertext) override { return tag_; }
private:
const uint8 tag_;
@@ -238,8 +228,8 @@ class TestConnectionHelper : public QuicConnectionHelperInterface {
: QuicAlarm(delegate) {
}
- virtual void SetImpl() override {}
- virtual void CancelImpl() override {}
+ void SetImpl() override {}
+ void CancelImpl() override {}
using QuicAlarm::Fire;
};
@@ -250,15 +240,11 @@ class TestConnectionHelper : public QuicConnectionHelperInterface {
}
// QuicConnectionHelperInterface
- virtual const QuicClock* GetClock() const override {
- return clock_;
- }
+ const QuicClock* GetClock() const override { return clock_; }
- virtual QuicRandom* GetRandomGenerator() override {
- return random_generator_;
- }
+ QuicRandom* GetRandomGenerator() override { return random_generator_; }
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override {
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override {
return new TestAlarm(delegate);
}
@@ -285,10 +271,10 @@ class TestPacketWriter : public QuicPacketWriter {
}
// QuicPacketWriter interface
- virtual WriteResult WritePacket(
- const char* buffer, size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override {
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override {
QuicEncryptedPacket packet(buffer, buf_len);
++packets_write_attempts_;
@@ -313,13 +299,13 @@ class TestPacketWriter : public QuicPacketWriter {
return WriteResult(WRITE_STATUS_OK, last_packet_size_);
}
- virtual bool IsWriteBlockedDataBuffered() const override {
+ bool IsWriteBlockedDataBuffered() const override {
return is_write_blocked_data_buffered_;
}
- virtual bool IsWriteBlocked() const override { return write_blocked_; }
+ bool IsWriteBlocked() const override { return write_blocked_; }
- virtual void SetWritable() override { write_blocked_ = false; }
+ void SetWritable() override { write_blocked_ = false; }
void BlockOnNextWrite() { block_on_next_write_ = true; }
@@ -590,8 +576,8 @@ class TestConnection : public QuicConnection {
class FecQuicConnectionDebugVisitor
: public QuicConnectionDebugVisitor {
public:
- virtual void OnRevivedPacket(const QuicPacketHeader& header,
- StringPiece data) override {
+ void OnRevivedPacket(const QuicPacketHeader& header,
+ StringPiece data) override {
revived_header_ = header;
}
diff --git a/net/quic/quic_crypto_client_stream.h b/net/quic/quic_crypto_client_stream.h
index 801c3da..f2a4244 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -29,11 +29,10 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
QuicClientSessionBase* session,
ProofVerifyContext* verify_context,
QuicCryptoClientConfig* crypto_config);
- virtual ~QuicCryptoClientStream();
+ ~QuicCryptoClientStream() override;
// CryptoFramerVisitorInterface implementation
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// Performs a crypto handshake with the server. Returns true if the crypto
// handshake is started successfully.
@@ -59,10 +58,10 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
class ChannelIDSourceCallbackImpl : public ChannelIDSourceCallback {
public:
explicit ChannelIDSourceCallbackImpl(QuicCryptoClientStream* stream);
- virtual ~ChannelIDSourceCallbackImpl();
+ ~ChannelIDSourceCallbackImpl() override;
// ChannelIDSourceCallback interface.
- virtual void Run(scoped_ptr<ChannelIDKey>* channel_id_key) override;
+ void Run(scoped_ptr<ChannelIDKey>* channel_id_key) override;
// Cancel causes any future callbacks to be ignored. It must be called on
// the same thread as the callback will be made on.
@@ -78,12 +77,12 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
class ProofVerifierCallbackImpl : public ProofVerifierCallback {
public:
explicit ProofVerifierCallbackImpl(QuicCryptoClientStream* stream);
- virtual ~ProofVerifierCallbackImpl();
+ ~ProofVerifierCallbackImpl() override;
// ProofVerifierCallback interface.
- virtual void Run(bool ok,
- const string& error_details,
- scoped_ptr<ProofVerifyDetails>* details) override;
+ void Run(bool ok,
+ const string& error_details,
+ scoped_ptr<ProofVerifyDetails>* details) override;
// Cancel causes any future callbacks to be ignored. It must be called on
// the same thread as the callback will be made on.
diff --git a/net/quic/quic_crypto_server_stream.h b/net/quic/quic_crypto_server_stream.h
index c31a07d..692a713 100644
--- a/net/quic/quic_crypto_server_stream.h
+++ b/net/quic/quic_crypto_server_stream.h
@@ -33,15 +33,14 @@ class NET_EXPORT_PRIVATE ServerHelloNotifier : public
: server_stream_(stream) {}
// QuicAckNotifier::DelegateInterface implementation
- virtual void OnAckNotification(
- int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed) override;
+ void OnAckNotification(int num_original_packets,
+ int num_original_bytes,
+ int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed) override;
private:
- virtual ~ServerHelloNotifier() {}
+ ~ServerHelloNotifier() override {}
QuicCryptoServerStream* server_stream_;
@@ -52,15 +51,14 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
public:
QuicCryptoServerStream(const QuicCryptoServerConfig& crypto_config,
QuicSession* session);
- virtual ~QuicCryptoServerStream();
+ ~QuicCryptoServerStream() override;
// Cancel any outstanding callbacks, such as asynchronous validation of client
// hello.
void CancelOutstandingCallbacks();
// CryptoFramerVisitorInterface implementation
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// GetBase64SHA256ClientChannelID sets |*output| to the base64 encoded,
// SHA-256 hash of the client's ChannelID key and returns true, if the client
@@ -110,8 +108,8 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
void Cancel();
// From ValidateClientHelloResultCallback
- virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
- const Result& result) override;
+ void RunImpl(const CryptoHandshakeMessage& client_hello,
+ const Result& result) override;
private:
QuicCryptoServerStream* parent_;
diff --git a/net/quic/quic_crypto_stream.h b/net/quic/quic_crypto_stream.h
index 6698e3e..37a2a91 100644
--- a/net/quic/quic_crypto_stream.h
+++ b/net/quic/quic_crypto_stream.h
@@ -34,13 +34,12 @@ class NET_EXPORT_PRIVATE QuicCryptoStream
explicit QuicCryptoStream(QuicSession* session);
// CryptoFramerVisitorInterface implementation
- virtual void OnError(CryptoFramer* framer) override;
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnError(CryptoFramer* framer) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// ReliableQuicStream implementation
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ QuicPriority EffectivePriority() const override;
// Sends |message| to the peer.
// TODO(wtc): return a success/failure status.
diff --git a/net/quic/quic_crypto_stream_test.cc b/net/quic/quic_crypto_stream_test.cc
index e79a1f3..a491235 100644
--- a/net/quic/quic_crypto_stream_test.cc
+++ b/net/quic/quic_crypto_stream_test.cc
@@ -29,8 +29,7 @@ class MockQuicCryptoStream : public QuicCryptoStream {
: QuicCryptoStream(session) {
}
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
diff --git a/net/quic/quic_data_stream.h b/net/quic/quic_data_stream.h
index 7cb9816..0337b30 100644
--- a/net/quic/quic_data_stream.h
+++ b/net/quic/quic_data_stream.h
@@ -54,16 +54,16 @@ class NET_EXPORT_PRIVATE QuicDataStream : public ReliableQuicStream {
QuicDataStream(QuicStreamId id, QuicSession* session);
- virtual ~QuicDataStream();
+ ~QuicDataStream() override;
// ReliableQuicStream implementation
- virtual void OnClose() override;
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ void OnClose() override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
// By default, this is the same as priority(), however it allows streams
// to temporarily alter effective priority. For example if a SPDY stream has
// compressed but not written headers it can write the headers with a higher
// priority.
- virtual QuicPriority EffectivePriority() const override;
+ QuicPriority EffectivePriority() const override;
// Overridden by subclasses to process data. The headers will be delivered
// via OnStreamHeaders, so only data will be delivered through this method.
diff --git a/net/quic/quic_data_stream_test.cc b/net/quic/quic_data_stream_test.cc
index 1104f4d..16e6341 100644
--- a/net/quic/quic_data_stream_test.cc
+++ b/net/quic/quic_data_stream_test.cc
@@ -40,7 +40,7 @@ class TestStream : public QuicDataStream {
: QuicDataStream(id, session),
should_process_data_(should_process_data) {}
- virtual uint32 ProcessData(const char* data, uint32 data_len) override {
+ uint32 ProcessData(const char* data, uint32 data_len) override {
EXPECT_NE(0u, data_len);
DVLOG(1) << "ProcessData data_len: " << data_len;
data_ += string(data, data_len);
diff --git a/net/quic/quic_default_packet_writer.h b/net/quic/quic_default_packet_writer.h
index 329f7cc..e282d88 100644
--- a/net/quic/quic_default_packet_writer.h
+++ b/net/quic/quic_default_packet_writer.h
@@ -23,16 +23,16 @@ class NET_EXPORT_PRIVATE QuicDefaultPacketWriter : public QuicPacketWriter {
public:
QuicDefaultPacketWriter();
explicit QuicDefaultPacketWriter(DatagramClientSocket* socket);
- virtual ~QuicDefaultPacketWriter();
+ ~QuicDefaultPacketWriter() override;
// QuicPacketWriter
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
void OnWriteComplete(int rv);
void SetConnection(QuicConnection* connection) {
diff --git a/net/quic/quic_dispatcher.cc b/net/quic/quic_dispatcher.cc
index 121e32f..cbdd540 100644
--- a/net/quic/quic_dispatcher.cc
+++ b/net/quic/quic_dispatcher.cc
@@ -28,7 +28,7 @@ class DeleteSessionsAlarm : public QuicAlarm::Delegate {
: dispatcher_(dispatcher) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
dispatcher_->DeleteSessions();
return QuicTime::Zero();
}
@@ -44,23 +44,21 @@ class QuicDispatcher::QuicFramerVisitor : public QuicFramerVisitorInterface {
connection_id_(0) {}
// QuicFramerVisitorInterface implementation
- virtual void OnPacket() override {}
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnPacket() override {}
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
connection_id_ = header.connection_id;
return dispatcher_->OnUnauthenticatedPublicHeader(header);
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
dispatcher_->OnUnauthenticatedHeader(header);
return false;
}
- virtual void OnError(QuicFramer* framer) override {
+ void OnError(QuicFramer* framer) override {
DVLOG(1) << QuicUtils::ErrorToString(framer->error());
}
- virtual bool OnProtocolVersionMismatch(
- QuicVersion /*received_version*/) override {
+ bool OnProtocolVersionMismatch(QuicVersion /*received_version*/) override {
if (dispatcher_->time_wait_list_manager()->IsConnectionIdInTimeWait(
connection_id_)) {
// Keep processing after protocol mismatch - this will be dealt with by
@@ -76,77 +74,66 @@ class QuicDispatcher::QuicFramerVisitor : public QuicFramerVisitorInterface {
// The following methods should never get called because we always return
// false from OnUnauthenticatedHeader(). As a result, we never process the
// payload of the packet.
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& /*packet*/) override {
+ void OnPublicResetPacket(const QuicPublicResetPacket& /*packet*/) override {
DCHECK(false);
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& /*packet*/) override {
DCHECK(false);
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {
- DCHECK(false);
- }
- virtual bool OnPacketHeader(const QuicPacketHeader& /*header*/) override {
+ void OnDecryptedPacket(EncryptionLevel level) override { DCHECK(false); }
+ bool OnPacketHeader(const QuicPacketHeader& /*header*/) override {
DCHECK(false);
return false;
}
- virtual void OnRevivedPacket() override {
- DCHECK(false);
- }
- virtual void OnFecProtectedPayload(StringPiece /*payload*/) override {
+ void OnRevivedPacket() override { DCHECK(false); }
+ void OnFecProtectedPayload(StringPiece /*payload*/) override {
DCHECK(false);
}
- virtual bool OnStreamFrame(const QuicStreamFrame& /*frame*/) override {
+ bool OnStreamFrame(const QuicStreamFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnAckFrame(const QuicAckFrame& /*frame*/) override {
+ bool OnAckFrame(const QuicAckFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnStopWaitingFrame(
- const QuicStopWaitingFrame& /*frame*/) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnPingFrame(const QuicPingFrame& /*frame*/) override {
+ bool OnPingFrame(const QuicPingFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& /*frame*/) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame & /*frame*/) override {
+ bool OnConnectionCloseFrame(
+ const QuicConnectionCloseFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& /*frame*/) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& /*frame*/)
- override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
DCHECK(false);
return false;
}
- virtual void OnFecData(const QuicFecData& /*fec*/) override {
- DCHECK(false);
- }
- virtual void OnPacketComplete() override {
- DCHECK(false);
- }
+ void OnFecData(const QuicFecData& /*fec*/) override { DCHECK(false); }
+ void OnPacketComplete() override { DCHECK(false); }
private:
QuicDispatcher* dispatcher_;
diff --git a/net/quic/quic_dispatcher.h b/net/quic/quic_dispatcher.h
index b4be0ee..640cec8 100644
--- a/net/quic/quic_dispatcher.h
+++ b/net/quic/quic_dispatcher.h
@@ -60,11 +60,10 @@ class QuicDispatcher : public QuicBlockedWriterInterface,
// Creates ordinary QuicPerConnectionPacketWriter instances.
class DefaultPacketWriterFactory : public PacketWriterFactory {
public:
- virtual ~DefaultPacketWriterFactory() {}
+ ~DefaultPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(
- QuicServerPacketWriter* writer,
- QuicConnection* connection) override;
+ QuicPacketWriter* Create(QuicServerPacketWriter* writer,
+ QuicConnection* connection) override;
};
// Ideally we'd have a linked_hash_set: the boolean is unused.
@@ -80,16 +79,16 @@ class QuicDispatcher : public QuicBlockedWriterInterface,
PacketWriterFactory* packet_writer_factory,
QuicConnectionHelperInterface* helper);
- virtual ~QuicDispatcher();
+ ~QuicDispatcher() override;
// Takes ownership of the packet writer.
virtual void Initialize(QuicServerPacketWriter* writer);
// Process the incoming packet by creating a new session, passing it to
// an existing session, or passing it to the TimeWaitListManager.
- virtual void ProcessPacket(const IPEndPoint& server_address,
- const IPEndPoint& client_address,
- const QuicEncryptedPacket& packet) override;
+ void ProcessPacket(const IPEndPoint& server_address,
+ const IPEndPoint& client_address,
+ const QuicEncryptedPacket& packet) override;
// Returns true if there's anything in the blocked writer list.
virtual bool HasPendingWrites() const;
@@ -99,16 +98,15 @@ class QuicDispatcher : public QuicBlockedWriterInterface,
// QuicBlockedWriterInterface implementation:
// Called when the socket becomes writable to allow queued writes to happen.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// QuicServerSessionVisitor interface implementation:
// Ensure that the closed connection is cleaned up asynchronously.
- virtual void OnConnectionClosed(QuicConnectionId connection_id,
- QuicErrorCode error) override;
+ void OnConnectionClosed(QuicConnectionId connection_id,
+ QuicErrorCode error) override;
// Queues the blocked writer for later resumption.
- virtual void OnWriteBlocked(
- QuicBlockedWriterInterface* blocked_writer) override;
+ void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override;
typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap;
@@ -183,9 +181,9 @@ class QuicDispatcher : public QuicBlockedWriterInterface,
public QuicConnection::PacketWriterFactory {
public:
PacketWriterFactoryAdapter(QuicDispatcher* dispatcher);
- virtual ~PacketWriterFactoryAdapter ();
+ ~PacketWriterFactoryAdapter() override;
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override;
+ QuicPacketWriter* Create(QuicConnection* connection) const override;
private:
QuicDispatcher* dispatcher_;
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index 9a9120b..b2dc6eb 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -103,46 +103,34 @@ const size_t kPublicResetPacketMessageTagOffset =
class TestEncrypter : public QuicEncrypter {
public:
- virtual ~TestEncrypter() {}
- virtual bool SetKey(StringPiece key) override {
- return true;
- }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
- virtual bool Encrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece plaintext,
- unsigned char* output) override {
+ ~TestEncrypter() override {}
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
+ bool Encrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece plaintext,
+ unsigned char* output) override {
CHECK(false) << "Not implemented";
return false;
}
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece plaintext) override {
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece plaintext) override {
sequence_number_ = sequence_number;
associated_data_ = associated_data.as_string();
plaintext_ = plaintext.as_string();
return new QuicData(plaintext.data(), plaintext.length());
}
- virtual size_t GetKeySize() const override {
- return 0;
- }
- virtual size_t GetNoncePrefixSize() const override {
- return 0;
- }
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
+ size_t GetKeySize() const override { return 0; }
+ size_t GetNoncePrefixSize() const override { return 0; }
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
return ciphertext_size;
}
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override {
+ size_t GetCiphertextSize(size_t plaintext_size) const override {
return plaintext_size;
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
QuicPacketSequenceNumber sequence_number_;
string associated_data_;
string plaintext_;
@@ -150,35 +138,27 @@ class TestEncrypter : public QuicEncrypter {
class TestDecrypter : public QuicDecrypter {
public:
- virtual ~TestDecrypter() {}
- virtual bool SetKey(StringPiece key) override {
- return true;
- }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
- virtual bool Decrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override {
+ ~TestDecrypter() override {}
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
+ bool Decrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override {
CHECK(false) << "Not implemented";
return false;
}
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece ciphertext) override {
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece ciphertext) override {
sequence_number_ = sequence_number;
associated_data_ = associated_data.as_string();
ciphertext_ = ciphertext.as_string();
return new QuicData(ciphertext.data(), ciphertext.length());
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
QuicPacketSequenceNumber sequence_number_;
string associated_data_;
string ciphertext_;
@@ -198,7 +178,7 @@ class TestQuicVisitor : public ::net::QuicFramerVisitorInterface {
accept_public_header_(true) {
}
- virtual ~TestQuicVisitor() {
+ ~TestQuicVisitor() override {
STLDeleteElements(&stream_frames_);
STLDeleteElements(&ack_frames_);
STLDeleteElements(&congestion_feedback_frames_);
@@ -207,70 +187,66 @@ class TestQuicVisitor : public ::net::QuicFramerVisitorInterface {
STLDeleteElements(&fec_data_);
}
- virtual void OnError(QuicFramer* f) override {
+ void OnError(QuicFramer* f) override {
DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error())
<< " (" << f->error() << ")";
++error_count_;
}
- virtual void OnPacket() override {}
+ void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {
public_reset_packet_.reset(new QuicPublicResetPacket(packet));
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {
version_negotiation_packet_.reset(new QuicVersionNegotiationPacket(packet));
}
- virtual void OnRevivedPacket() override {
- ++revived_packets_;
- }
+ void OnRevivedPacket() override { ++revived_packets_; }
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override {
+ bool OnProtocolVersionMismatch(QuicVersion version) override {
DVLOG(1) << "QuicFramer Version Mismatch, version: " << version;
++version_mismatch_;
return true;
}
- virtual bool OnUnauthenticatedPublicHeader(
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
public_header_.reset(new QuicPacketPublicHeader(header));
return accept_public_header_;
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
return true;
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
+ void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override {
+ bool OnPacketHeader(const QuicPacketHeader& header) override {
++packet_count_;
header_.reset(new QuicPacketHeader(header));
return accept_packet_;
}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override {
+ bool OnStreamFrame(const QuicStreamFrame& frame) override {
++frame_count_;
stream_frames_.push_back(new QuicStreamFrame(frame));
return true;
}
- virtual void OnFecProtectedPayload(StringPiece payload) override {
+ void OnFecProtectedPayload(StringPiece payload) override {
fec_protected_payload_ = payload.as_string();
}
- virtual bool OnAckFrame(const QuicAckFrame& frame) override {
+ bool OnAckFrame(const QuicAckFrame& frame) override {
++frame_count_;
ack_frames_.push_back(new QuicAckFrame(frame));
return true;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override {
++frame_count_;
congestion_feedback_frames_.push_back(
@@ -278,50 +254,46 @@ class TestQuicVisitor : public ::net::QuicFramerVisitorInterface {
return true;
}
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
++frame_count_;
stop_waiting_frames_.push_back(new QuicStopWaitingFrame(frame));
return true;
}
- virtual bool OnPingFrame(const QuicPingFrame& frame) override {
+ bool OnPingFrame(const QuicPingFrame& frame) override {
++frame_count_;
ping_frames_.push_back(new QuicPingFrame(frame));
return true;
}
- virtual void OnFecData(const QuicFecData& fec) override {
+ void OnFecData(const QuicFecData& fec) override {
++fec_count_;
fec_data_.push_back(new QuicFecData(fec));
}
- virtual void OnPacketComplete() override {
- ++complete_packets_;
- }
+ void OnPacketComplete() override { ++complete_packets_; }
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
rst_stream_frame_ = frame;
return true;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override {
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override {
connection_close_frame_ = frame;
return true;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
goaway_frame_ = frame;
return true;
}
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame)
- override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override {
window_update_frame_ = frame;
return true;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
blocked_frame_ = frame;
return true;
}
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 56b700e..b99e9d2 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -26,11 +26,11 @@ class QuicHeadersStream::SpdyFramerVisitor
explicit SpdyFramerVisitor(QuicHeadersStream* stream) : stream_(stream) {}
// SpdyFramerVisitorInterface implementation
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
if (!stream_->IsConnected()) {
return;
}
@@ -48,7 +48,7 @@ class QuicHeadersStream::SpdyFramerVisitor
stream_->OnSynStream(stream_id, priority, fin);
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
if (!stream_->IsConnected()) {
return;
}
@@ -56,9 +56,9 @@ class QuicHeadersStream::SpdyFramerVisitor
stream_->OnSynReply(stream_id, fin);
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
if (!stream_->IsConnected()) {
return false;
}
@@ -66,10 +66,10 @@ class QuicHeadersStream::SpdyFramerVisitor
return true;
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
if (fin && len == 0) {
// The framer invokes OnStreamFrameData with zero-length data and
// fin = true after processing a SYN_STREAM or SYN_REPLY frame
@@ -79,78 +79,76 @@ class QuicHeadersStream::SpdyFramerVisitor
CloseConnection("SPDY DATA frame received.");
}
- virtual void OnError(SpdyFramer* framer) override {
+ void OnError(SpdyFramer* framer) override {
CloseConnection("SPDY framing error.");
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
CloseConnection("SPDY DATA frame received.");
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
CloseConnection("SPDY RST_STREAM frame received.");
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnSettingsAck() override {
+ void OnSettingsAck() override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnSettingsEnd() override {
+ void OnSettingsEnd() override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {
CloseConnection("SPDY PING frame received.");
}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
CloseConnection("SPDY GOAWAY frame received.");
}
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
CloseConnection("SPDY HEADERS frame received.");
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
CloseConnection("SPDY WINDOW_UPDATE frame received.");
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
LOG(DFATAL) << "PUSH_PROMISE frame received from a SPDY/3 framer";
CloseConnection("SPDY PUSH_PROMISE frame received.");
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
CloseConnection("SPDY CONTINUATION frame received.");
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
CloseConnection("SPDY unknown frame received.");
return false;
}
// SpdyFramerDebugVisitorInterface implementation
- virtual void OnSendCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override {}
-
- virtual void OnReceiveCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override {
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override {}
+
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override {
if (stream_->IsConnected()) {
stream_->OnCompressedFrameSize(frame_len);
}
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h
index fb96ec7..95066b6 100644
--- a/net/quic/quic_headers_stream.h
+++ b/net/quic/quic_headers_stream.h
@@ -21,7 +21,7 @@ namespace net {
class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
public:
explicit QuicHeadersStream(QuicSession* session);
- virtual ~QuicHeadersStream();
+ ~QuicHeadersStream() override;
// Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY
// frame to the peer. If |fin| is true, the fin flag will be set on
@@ -34,8 +34,8 @@ class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
// ReliableQuicStream implementation
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ QuicPriority EffectivePriority() const override;
private:
class SpdyFramerVisitor;
diff --git a/net/quic/quic_http_stream.h b/net/quic/quic_http_stream.h
index 44e98e8..81d4be9 100644
--- a/net/quic/quic_http_stream.h
+++ b/net/quic/quic_http_stream.h
@@ -29,47 +29,45 @@ class NET_EXPORT_PRIVATE QuicHttpStream :
public:
explicit QuicHttpStream(const base::WeakPtr<QuicClientSession>& session);
- virtual ~QuicHttpStream();
+ ~QuicHttpStream() override;
// HttpStream implementation.
- 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 UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual 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;
- virtual void SetPriority(RequestPriority priority) 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;
+ UploadProgress GetUploadProgress() const override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override;
+ HttpStream* RenewStreamForAuth() override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// QuicReliableClientStream::Delegate implementation
- virtual int OnDataReceived(const char* data, int length) override;
- virtual void OnClose(QuicErrorCode error) override;
- virtual void OnError(int error) override;
- virtual bool HasSendHeadersComplete() override;
+ int OnDataReceived(const char* data, int length) override;
+ void OnClose(QuicErrorCode error) override;
+ void OnError(int error) override;
+ bool HasSendHeadersComplete() override;
// QuicClientSession::Observer implementation
- virtual void OnCryptoHandshakeConfirmed() override;
- virtual void OnSessionClosed(int error) override;
+ void OnCryptoHandshakeConfirmed() override;
+ void OnSessionClosed(int error) override;
private:
friend class test::QuicHttpStreamPeer;
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index b6ecc77..53be4dd 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -98,7 +98,7 @@ class AutoClosingStream : public QuicHttpStream {
: QuicHttpStream(session) {
}
- virtual int OnDataReceived(const char* data, int length) override {
+ int OnDataReceived(const char* data, int length) override {
Close(false);
return OK;
}
@@ -108,9 +108,9 @@ class TestPacketWriterFactory : public QuicConnection::PacketWriterFactory {
public:
explicit TestPacketWriterFactory(DatagramClientSocket* socket)
: socket_(socket) {}
- virtual ~TestPacketWriterFactory() {}
+ ~TestPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override {
+ QuicPacketWriter* Create(QuicConnection* connection) const override {
return new QuicDefaultPacketWriter(socket_);
}
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index cb4cb05..55de997 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -34,11 +34,11 @@ class NET_EXPORT_PRIVATE QuicPacketCreator : public QuicFecBuilderInterface {
QuicFramer* framer,
QuicRandom* random_generator);
- virtual ~QuicPacketCreator();
+ ~QuicPacketCreator() override;
// QuicFecBuilderInterface
- virtual void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
- base::StringPiece payload) override;
+ void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
+ base::StringPiece payload) override;
// Turn on FEC protection for subsequently created packets. FEC should be
// enabled first (max_packets_per_fec_group should be non-zero) for FEC
diff --git a/net/quic/quic_per_connection_packet_writer.h b/net/quic/quic_per_connection_packet_writer.h
index 4e5e8c8..6d91312 100644
--- a/net/quic/quic_per_connection_packet_writer.h
+++ b/net/quic/quic_per_connection_packet_writer.h
@@ -22,20 +22,20 @@ class QuicPerConnectionPacketWriter : public QuicPacketWriter {
// Does not take ownership of |shared_writer| or |connection|.
QuicPerConnectionPacketWriter(QuicServerPacketWriter* shared_writer,
QuicConnection* connection);
- virtual ~QuicPerConnectionPacketWriter();
+ ~QuicPerConnectionPacketWriter() override;
QuicPacketWriter* shared_writer() const;
QuicConnection* connection() const { return connection_; }
// Default implementation of the QuicPacketWriter interface: Passes everything
// to |shared_writer_|.
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
private:
void OnWriteComplete(WriteResult result);
diff --git a/net/quic/quic_received_packet_manager.h b/net/quic/quic_received_packet_manager.h
index 9eccfe0..a15d570 100644
--- a/net/quic/quic_received_packet_manager.h
+++ b/net/quic/quic_received_packet_manager.h
@@ -96,7 +96,7 @@ class NET_EXPORT_PRIVATE QuicReceivedPacketManager :
};
explicit QuicReceivedPacketManager(QuicConnectionStats* stats);
- virtual ~QuicReceivedPacketManager();
+ ~QuicReceivedPacketManager() override;
// Updates the internal state concerning which packets have been received.
// bytes: the packet size in bytes including Quic Headers.
@@ -128,7 +128,7 @@ class NET_EXPORT_PRIVATE QuicReceivedPacketManager :
// QuicReceivedEntropyHashCalculatorInterface
// Called by QuicFramer, when the outgoing ack gets truncated, to recalculate
// the received entropy hash for the truncated ack frame.
- virtual QuicPacketEntropyHash EntropyHash(
+ QuicPacketEntropyHash EntropyHash(
QuicPacketSequenceNumber sequence_number) const override;
// Updates internal state based on |stop_waiting|.
diff --git a/net/quic/quic_reliable_client_stream.h b/net/quic/quic_reliable_client_stream.h
index 065db9e..9ed6601 100644
--- a/net/quic/quic_reliable_client_stream.h
+++ b/net/quic/quic_reliable_client_stream.h
@@ -51,13 +51,13 @@ class NET_EXPORT_PRIVATE QuicReliableClientStream : public QuicDataStream {
QuicSession* session,
const BoundNetLog& net_log);
- virtual ~QuicReliableClientStream();
+ ~QuicReliableClientStream() override;
// QuicDataStream
- virtual uint32 ProcessData(const char* data, uint32 data_len) override;
- virtual void OnFinRead() override;
- virtual void OnCanWrite() override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessData(const char* data, uint32 data_len) override;
+ void OnFinRead() override;
+ void OnCanWrite() override;
+ QuicPriority EffectivePriority() const override;
// While the server's set_priority shouldn't be called externally, the creator
// of client-side streams should be able to set the priority.
diff --git a/net/quic/quic_server_packet_writer.h b/net/quic/quic_server_packet_writer.h
index 15c946b3..2e4646d 100644
--- a/net/quic/quic_server_packet_writer.h
+++ b/net/quic/quic_server_packet_writer.h
@@ -26,7 +26,7 @@ class QuicServerPacketWriter : public QuicPacketWriter {
QuicServerPacketWriter(UDPServerSocket* socket,
QuicBlockedWriterInterface* blocked_writer);
- virtual ~QuicServerPacketWriter();
+ ~QuicServerPacketWriter() override;
// Use this method to write packets rather than WritePacket:
// QuicServerPacketWriter requires a callback to exist for every write, which
@@ -41,16 +41,17 @@ class QuicServerPacketWriter : public QuicPacketWriter {
void OnWriteComplete(int rv);
// QuicPacketWriter implementation:
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
protected:
// Do not call WritePacket on its own -- use WritePacketWithCallback
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+
private:
UDPServerSocket* socket_;
diff --git a/net/quic/quic_server_session.h b/net/quic/quic_server_session.h
index 80b6443..2f0bdea 100644
--- a/net/quic/quic_server_session.h
+++ b/net/quic/quic_server_session.h
@@ -49,14 +49,14 @@ class QuicServerSession : public QuicSession {
QuicServerSessionVisitor* visitor);
// Override the base class to notify the owner of the connection close.
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnWriteBlocked() override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnWriteBlocked() override;
// Sends a server config update to the client, containing new bandwidth
// estimate.
- virtual void OnCongestionWindowChange(QuicTime now) override;
+ void OnCongestionWindowChange(QuicTime now) override;
- virtual ~QuicServerSession();
+ ~QuicServerSession() override;
virtual void InitializeSession(const QuicCryptoServerConfig& crypto_config);
@@ -65,7 +65,7 @@ class QuicServerSession : public QuicSession {
}
// Override base class to process FEC config received from client.
- virtual void OnConfigNegotiated() override;
+ void OnConfigNegotiated() override;
void set_serving_region(string serving_region) {
serving_region_ = serving_region;
@@ -73,9 +73,9 @@ class QuicServerSession : public QuicSession {
protected:
// QuicSession methods:
- virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
- virtual QuicDataStream* CreateOutgoingDataStream() override;
- virtual QuicCryptoServerStream* GetCryptoStream() override;
+ QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
+ QuicDataStream* CreateOutgoingDataStream() override;
+ QuicCryptoServerStream* GetCryptoStream() override;
// If we should create an incoming stream, returns true. Otherwise
// does error handling, including communicating the error to the client and
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 67c01c9..596be40 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -34,65 +34,60 @@ class VisitorShim : public QuicConnectionVisitorInterface {
public:
explicit VisitorShim(QuicSession* session) : session_(session) {}
- virtual void OnStreamFrames(const vector<QuicStreamFrame>& frames) override {
+ void OnStreamFrames(const vector<QuicStreamFrame>& frames) override {
session_->OnStreamFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnRstStream(const QuicRstStreamFrame& frame) override {
+ void OnRstStream(const QuicRstStreamFrame& frame) override {
session_->OnRstStream(frame);
session_->PostProcessAfterData();
}
- virtual void OnGoAway(const QuicGoAwayFrame& frame) override {
+ void OnGoAway(const QuicGoAwayFrame& frame) override {
session_->OnGoAway(frame);
session_->PostProcessAfterData();
}
- virtual void OnWindowUpdateFrames(const vector<QuicWindowUpdateFrame>& frames)
- override {
+ void OnWindowUpdateFrames(
+ const vector<QuicWindowUpdateFrame>& frames) override {
session_->OnWindowUpdateFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnBlockedFrames(const vector<QuicBlockedFrame>& frames)
- override {
+ void OnBlockedFrames(const vector<QuicBlockedFrame>& frames) override {
session_->OnBlockedFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnCanWrite() override {
+ void OnCanWrite() override {
session_->OnCanWrite();
session_->PostProcessAfterData();
}
- virtual void OnCongestionWindowChange(QuicTime now) override {
+ void OnCongestionWindowChange(QuicTime now) override {
session_->OnCongestionWindowChange(now);
}
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override {
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override {
session_->OnSuccessfulVersionNegotiation(version);
}
- virtual void OnConnectionClosed(
- QuicErrorCode error, bool from_peer) override {
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override {
session_->OnConnectionClosed(error, from_peer);
// The session will go away, so don't bother with cleanup.
}
- virtual void OnWriteBlocked() override {
- session_->OnWriteBlocked();
- }
+ void OnWriteBlocked() override { session_->OnWriteBlocked(); }
- virtual bool WillingAndAbleToWrite() const override {
+ bool WillingAndAbleToWrite() const override {
return session_->WillingAndAbleToWrite();
}
- virtual bool HasPendingHandshake() const override {
+ bool HasPendingHandshake() const override {
return session_->HasPendingHandshake();
}
- virtual bool HasOpenDataStreams() const override {
+ bool HasOpenDataStreams() const override {
return session_->HasOpenDataStreams();
}
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 6414b6d..1bca3aa 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -55,26 +55,23 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
QuicSession(QuicConnection* connection, const QuicConfig& config);
void InitializeSession();
- virtual ~QuicSession();
+ ~QuicSession() override;
// QuicConnectionVisitorInterface methods:
- virtual void OnStreamFrames(
- const std::vector<QuicStreamFrame>& frames) override;
- virtual void OnRstStream(const QuicRstStreamFrame& frame) override;
- virtual void OnGoAway(const QuicGoAwayFrame& frame) override;
- virtual void OnWindowUpdateFrames(
+ void OnStreamFrames(const std::vector<QuicStreamFrame>& frames) override;
+ void OnRstStream(const QuicRstStreamFrame& frame) override;
+ void OnGoAway(const QuicGoAwayFrame& frame) override;
+ void OnWindowUpdateFrames(
const std::vector<QuicWindowUpdateFrame>& frames) override;
- virtual void OnBlockedFrames(
- const std::vector<QuicBlockedFrame>& frames) override;
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnWriteBlocked() override {}
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
- virtual void OnCanWrite() override;
- virtual void OnCongestionWindowChange(QuicTime now) override {}
- virtual bool WillingAndAbleToWrite() const override;
- virtual bool HasPendingHandshake() const override;
- virtual bool HasOpenDataStreams() const override;
+ void OnBlockedFrames(const std::vector<QuicBlockedFrame>& frames) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnWriteBlocked() override {}
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
+ void OnCanWrite() override;
+ void OnCongestionWindowChange(QuicTime now) override {}
+ bool WillingAndAbleToWrite() const override;
+ bool HasPendingHandshake() const override;
+ bool HasOpenDataStreams() const override;
// Called by the headers stream when headers have been received for a stream.
virtual void OnStreamHeaders(QuicStreamId stream_id,
diff --git a/net/quic/quic_spdy_server_stream.h b/net/quic/quic_spdy_server_stream.h
index afd1291..54506d1 100644
--- a/net/quic/quic_spdy_server_stream.h
+++ b/net/quic/quic_spdy_server_stream.h
@@ -27,12 +27,12 @@ class QuicSpdyServerStreamPeer;
class QuicSpdyServerStream : public QuicDataStream {
public:
QuicSpdyServerStream(QuicStreamId id, QuicSession* session);
- virtual ~QuicSpdyServerStream();
+ ~QuicSpdyServerStream() override;
// ReliableQuicStream implementation called by the session when there's
// data for us.
- virtual uint32 ProcessData(const char* data, uint32 data_len) override;
- virtual void OnFinRead() override;
+ uint32 ProcessData(const char* data, uint32 data_len) override;
+ void OnFinRead() override;
void ParseRequestHeaders();
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 687ea4c..dac30962 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -103,9 +103,9 @@ class DefaultPacketWriterFactory : public QuicConnection::PacketWriterFactory {
public:
explicit DefaultPacketWriterFactory(DatagramClientSocket* socket)
: socket_(socket) {}
- virtual ~DefaultPacketWriterFactory() {}
+ ~DefaultPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override;
+ QuicPacketWriter* Create(QuicConnection* connection) const override;
private:
DatagramClientSocket* socket_;
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index f962699..7ee3681 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -105,7 +105,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
bool always_require_handshake_confirmation,
bool disable_connection_pooling,
const QuicTagVector& connection_options);
- virtual ~QuicStreamFactory();
+ ~QuicStreamFactory() override;
// Creates a new QuicHttpStream to |host_port_pair| which will be
// owned by |request|. |is_https| specifies if the protocol is https or not.
@@ -147,13 +147,13 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// Until the servers support roaming, close all connections when the local
// IP address changes.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// CertDatabase::Observer methods:
// We close all sessions when certificate database is changed.
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
bool require_confirmation() const {
return require_confirmation_;
diff --git a/net/quic/quic_time_wait_list_manager.cc b/net/quic/quic_time_wait_list_manager.cc
index 4e069d5..42dae00 100644
--- a/net/quic/quic_time_wait_list_manager.cc
+++ b/net/quic/quic_time_wait_list_manager.cc
@@ -41,7 +41,7 @@ class ConnectionIdCleanUpAlarm : public QuicAlarm::Delegate {
QuicTimeWaitListManager* time_wait_list_manager)
: time_wait_list_manager_(time_wait_list_manager) {}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
time_wait_list_manager_->CleanUpOldConnectionIds();
// Let the time wait manager register the alarm at appropriate time.
return QuicTime::Zero();
diff --git a/net/quic/quic_time_wait_list_manager.h b/net/quic/quic_time_wait_list_manager.h
index 13544b7..a01ad2e 100644
--- a/net/quic/quic_time_wait_list_manager.h
+++ b/net/quic/quic_time_wait_list_manager.h
@@ -48,7 +48,7 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
QuicServerSessionVisitor* visitor,
QuicConnectionHelperInterface* helper,
const QuicVersionVector& supported_versions);
- virtual ~QuicTimeWaitListManager();
+ ~QuicTimeWaitListManager() override;
// Adds the given connection_id to time wait state for kTimeWaitPeriod.
// Henceforth, any packet bearing this connection_id should not be processed
@@ -79,7 +79,7 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
// Called by the dispatcher when the underlying socket becomes writable again,
// since we might need to send pending public reset packets which we didn't
// send because the underlying socket was write blocked.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// Used to delete connection_id entries that have outlived their time wait
// period.
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index a65203b..7db9a57 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -76,12 +76,11 @@ class ReliableQuicStream::ProxyAckNotifierDelegate
num_retransmitted_bytes_(0) {
}
- virtual void OnAckNotification(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed)
- override {
+ void OnAckNotification(int num_original_packets,
+ int num_original_bytes,
+ int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed) override {
DCHECK_LT(0, pending_acks_);
--pending_acks_;
num_original_packets_ += num_original_packets;
@@ -106,8 +105,7 @@ class ReliableQuicStream::ProxyAckNotifierDelegate
protected:
// Delegates are ref counted.
- virtual ~ProxyAckNotifierDelegate() override {
- }
+ ~ProxyAckNotifierDelegate() override {}
private:
// Original delegate. delegate_->OnAckNotification will be called when:
diff --git a/net/quic/reliable_quic_stream_test.cc b/net/quic/reliable_quic_stream_test.cc
index 713d0e3..d63a5d8 100644
--- a/net/quic/reliable_quic_stream_test.cc
+++ b/net/quic/reliable_quic_stream_test.cc
@@ -48,14 +48,14 @@ class TestStream : public ReliableQuicStream {
: ReliableQuicStream(id, session),
should_process_data_(should_process_data) {}
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override {
+ uint32 ProcessRawData(const char* data, uint32 data_len) override {
EXPECT_NE(0u, data_len);
DVLOG(1) << "ProcessData data_len: " << data_len;
data_ += string(data, data_len);
return should_process_data_ ? data_len : 0;
}
- virtual QuicPriority EffectivePriority() const override {
+ QuicPriority EffectivePriority() const override {
return QuicUtils::HighestPriority();
}
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 9f4dc8b..814be7b 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -41,10 +41,9 @@ class CryptoFramerVisitor : public CryptoFramerVisitorInterface {
: error_(false) {
}
- virtual void OnError(CryptoFramer* framer) override { error_ = true; }
+ void OnError(CryptoFramer* framer) override { error_ = true; }
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
@@ -137,13 +136,12 @@ class AsyncTestChannelIDSource : public ChannelIDSource,
// Takes ownership of |sync_source|, a synchronous ChannelIDSource.
explicit AsyncTestChannelIDSource(ChannelIDSource* sync_source)
: sync_source_(sync_source) {}
- virtual ~AsyncTestChannelIDSource() {}
+ ~AsyncTestChannelIDSource() override {}
// ChannelIDSource implementation.
- virtual QuicAsyncStatus GetChannelIDKey(
- const string& hostname,
- scoped_ptr<ChannelIDKey>* channel_id_key,
- ChannelIDSourceCallback* callback) override {
+ QuicAsyncStatus GetChannelIDKey(const string& hostname,
+ scoped_ptr<ChannelIDKey>* channel_id_key,
+ ChannelIDSourceCallback* callback) override {
// Synchronous mode.
if (!callback) {
return sync_source_->GetChannelIDKey(hostname, channel_id_key, nullptr);
@@ -160,7 +158,7 @@ class AsyncTestChannelIDSource : public ChannelIDSource,
}
// CallbackSource implementation.
- virtual void RunPendingCallbacks() override {
+ void RunPendingCallbacks() override {
if (callback_.get()) {
callback_->Run(&channel_id_key_);
callback_.reset();
@@ -353,22 +351,22 @@ class MockCommonCertSets : public CommonCertSets {
index_(index) {
}
- virtual StringPiece GetCommonHashes() const override {
+ StringPiece GetCommonHashes() const override {
CHECK(false) << "not implemented";
return StringPiece();
}
- virtual StringPiece GetCert(uint64 hash, uint32 index) const override {
+ StringPiece GetCert(uint64 hash, uint32 index) const override {
if (hash == hash_ && index == index_) {
return cert_;
}
return StringPiece();
}
- virtual bool MatchCert(StringPiece cert,
- StringPiece common_set_hashes,
- uint64* out_hash,
- uint32* out_index) const override {
+ bool MatchCert(StringPiece cert,
+ StringPiece common_set_hashes,
+ uint64* out_hash,
+ uint32* out_index) const override {
if (cert != cert_) {
return false;
}
diff --git a/net/quic/test_tools/crypto_test_utils_chromium.cc b/net/quic/test_tools/crypto_test_utils_chromium.cc
index d5edc6c..0f0f83f 100644
--- a/net/quic/test_tools/crypto_test_utils_chromium.cc
+++ b/net/quic/test_tools/crypto_test_utils_chromium.cc
@@ -34,7 +34,7 @@ class TestProofVerifierChromium : public ProofVerifierChromium {
ImportCertFromFile(GetTestCertsDirectory(), cert_file);
scoped_root_.Reset(root_cert.get());
}
- virtual ~TestProofVerifierChromium() {}
+ ~TestProofVerifierChromium() override {}
private:
ScopedTestRoot scoped_root_;
@@ -52,14 +52,14 @@ class FakeProofSource : public ProofSource {
certs_[0] = kLeafCert;
certs_[1] = kIntermediateCert;
}
- virtual ~FakeProofSource() {}
+ ~FakeProofSource() override {}
// ProofSource interface
- virtual bool GetProof(const std::string& hostname,
- const std::string& server_config,
- bool ecdsa_ok,
- const std::vector<std::string>** out_certs,
- std::string* out_signature) override {
+ bool GetProof(const std::string& hostname,
+ const std::string& server_config,
+ bool ecdsa_ok,
+ const std::vector<std::string>** out_certs,
+ std::string* out_signature) override {
*out_certs = &certs_;
*out_signature = kSignature;
return true;
@@ -73,18 +73,17 @@ class FakeProofSource : public ProofSource {
class FakeProofVerifier : public ProofVerifier {
public:
FakeProofVerifier() {}
- virtual ~FakeProofVerifier() {}
+ ~FakeProofVerifier() override {}
// ProofVerifier interface
- virtual QuicAsyncStatus VerifyProof(
- const std::string& hostname,
- const std::string& server_config,
- const std::vector<std::string>& certs,
- const std::string& signature,
- const ProofVerifyContext* verify_context,
- std::string* error_details,
- scoped_ptr<ProofVerifyDetails>* verify_details,
- ProofVerifierCallback* callback) override {
+ QuicAsyncStatus VerifyProof(const std::string& hostname,
+ const std::string& server_config,
+ const std::vector<std::string>& certs,
+ const std::string& signature,
+ const ProofVerifyContext* verify_context,
+ std::string* error_details,
+ scoped_ptr<ProofVerifyDetails>* verify_details,
+ ProofVerifierCallback* callback) override {
error_details->clear();
scoped_ptr<ProofVerifyDetailsChromium> verify_details_chromium(
new ProofVerifyDetailsChromium);
diff --git a/net/quic/test_tools/crypto_test_utils_openssl.cc b/net/quic/test_tools/crypto_test_utils_openssl.cc
index 4db57b5..39b48a5 100644
--- a/net/quic/test_tools/crypto_test_utils_openssl.cc
+++ b/net/quic/test_tools/crypto_test_utils_openssl.cc
@@ -26,12 +26,11 @@ namespace test {
class TestChannelIDKey : public ChannelIDKey {
public:
explicit TestChannelIDKey(EVP_PKEY* ecdsa_key) : ecdsa_key_(ecdsa_key) {}
- virtual ~TestChannelIDKey() override {}
+ ~TestChannelIDKey() override {}
// ChannelIDKey implementation.
- virtual bool Sign(StringPiece signed_data,
- string* out_signature) const override {
+ bool Sign(StringPiece signed_data, string* out_signature) const override {
crypto::ScopedEVP_MD_CTX md_ctx(EVP_MD_CTX_create());
if (!md_ctx ||
EVP_DigestSignInit(md_ctx.get(), nullptr, EVP_sha256(), nullptr,
@@ -75,7 +74,7 @@ class TestChannelIDKey : public ChannelIDKey {
return true;
}
- virtual string SerializeKey() const override {
+ string SerializeKey() const override {
// i2d_PublicKey will produce an ANSI X9.62 public key which, for a P-256
// key, is 0x04 (meaning uncompressed) followed by the x and y field
// elements as 32-byte, big-endian numbers.
@@ -99,11 +98,11 @@ class TestChannelIDKey : public ChannelIDKey {
class TestChannelIDSource : public ChannelIDSource {
public:
- virtual ~TestChannelIDSource() {}
+ ~TestChannelIDSource() override {}
// ChannelIDSource implementation.
- virtual QuicAsyncStatus GetChannelIDKey(
+ QuicAsyncStatus GetChannelIDKey(
const string& hostname,
scoped_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* /*callback*/) override {
diff --git a/net/quic/test_tools/delayed_verify_strike_register_client.h b/net/quic/test_tools/delayed_verify_strike_register_client.h
index 479647b..6d5002b 100644
--- a/net/quic/test_tools/delayed_verify_strike_register_client.h
+++ b/net/quic/test_tools/delayed_verify_strike_register_client.h
@@ -23,11 +23,11 @@ class DelayedVerifyStrikeRegisterClient : public LocalStrikeRegisterClient {
uint32 window_secs,
const uint8 orbit[8],
StrikeRegister::StartupType startup);
- virtual ~DelayedVerifyStrikeRegisterClient();
+ ~DelayedVerifyStrikeRegisterClient() override;
- virtual void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override;
+ void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override;
// Start queueing verifications instead of executing them immediately.
void StartDelayingVerification() {
diff --git a/net/quic/test_tools/mock_clock.h b/net/quic/test_tools/mock_clock.h
index 4a2a28c..30c76dd 100644
--- a/net/quic/test_tools/mock_clock.h
+++ b/net/quic/test_tools/mock_clock.h
@@ -16,15 +16,15 @@ namespace net {
class MockClock : public QuicClock {
public:
MockClock();
- virtual ~MockClock();
+ ~MockClock() override;
void AdvanceTime(QuicTime::Delta delta);
- virtual QuicTime Now() const override;
+ QuicTime Now() const override;
- virtual QuicTime ApproximateNow() const override;
+ QuicTime ApproximateNow() const override;
- virtual QuicWallTime WallNow() const override;
+ QuicWallTime WallNow() const override;
base::TimeTicks NowInTicks() const;
diff --git a/net/quic/test_tools/mock_crypto_client_stream.h b/net/quic/test_tools/mock_crypto_client_stream.h
index 10803e8..636314a 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.h
+++ b/net/quic/test_tools/mock_crypto_client_stream.h
@@ -42,14 +42,13 @@ class MockCryptoClientStream : public QuicCryptoClientStream {
QuicCryptoClientConfig* crypto_config,
HandshakeMode handshake_mode,
const ProofVerifyDetails* proof_verify_details_);
- virtual ~MockCryptoClientStream();
+ ~MockCryptoClientStream() override;
// CryptoFramerVisitorInterface implementation.
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// QuicCryptoClientStream implementation.
- virtual bool CryptoConnect() override;
+ bool CryptoConnect() override;
// Invokes the sessions's CryptoHandshakeEvent method with the specified
// event.
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.h b/net/quic/test_tools/mock_crypto_client_stream_factory.h
index 5add188..b138c70 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.h
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.h
@@ -18,9 +18,9 @@ class QuicServerId;
class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
public:
MockCryptoClientStreamFactory();
- virtual ~MockCryptoClientStreamFactory() {}
+ ~MockCryptoClientStreamFactory() override {}
- virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
+ QuicCryptoClientStream* CreateQuicCryptoClientStream(
const QuicServerId& server_id,
QuicClientSession* session,
QuicCryptoClientConfig* crypto_config) override;
diff --git a/net/quic/test_tools/mock_random.h b/net/quic/test_tools/mock_random.h
index b04f170..44f9426 100644
--- a/net/quic/test_tools/mock_random.h
+++ b/net/quic/test_tools/mock_random.h
@@ -18,12 +18,11 @@ class MockRandom : public QuicRandom {
// QuicRandom:
// Fills the |data| buffer with a repeating byte, initially 'r'.
- virtual void RandBytes(void* data, size_t len) override;
+ void RandBytes(void* data, size_t len) override;
// Returns base + the current increment.
- virtual uint64 RandUint64() override;
+ uint64 RandUint64() override;
// Does nothing.
- virtual void Reseed(const void* additional_entropy,
- size_t entropy_len) override;
+ void Reseed(const void* additional_entropy, size_t entropy_len) override;
// ChangeValue increments |increment_|. This causes the value returned by
// |RandUint64| and the byte that |RandBytes| fills with, to change.
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 6cdd02a..7835e40 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -37,8 +37,8 @@ class TestAlarm : public QuicAlarm {
: QuicAlarm(delegate) {
}
- virtual void SetImpl() override {}
- virtual void CancelImpl() override {}
+ void SetImpl() override {}
+ void CancelImpl() override {}
};
} // namespace
@@ -226,10 +226,9 @@ class NiceMockPacketWriterFactory
: public QuicConnection::PacketWriterFactory {
public:
NiceMockPacketWriterFactory() {}
- virtual ~NiceMockPacketWriterFactory() {}
+ ~NiceMockPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(
- QuicConnection* /*connection*/) const override {
+ QuicPacketWriter* Create(QuicConnection* /*connection*/) const override {
return new testing::NiceMock<MockPacketWriter>();
}
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index 14406db..99a5ae5 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -190,35 +190,32 @@ class NoOpFramerVisitor : public QuicFramerVisitorInterface {
public:
NoOpFramerVisitor() {}
- virtual void OnError(QuicFramer* framer) override {}
- virtual void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {}
- virtual void OnVersionNegotiationPacket(
+ void OnError(QuicFramer* framer) override {}
+ void OnPacket() override {}
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {}
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {}
- virtual void OnRevivedPacket() override {}
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override;
- virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnRevivedPacket() override {}
+ bool OnProtocolVersionMismatch(QuicVersion version) override;
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override;
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnFecProtectedPayload(base::StringPiece payload) override {}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual bool OnAckFrame(const QuicAckFrame& frame) override;
- virtual bool OnCongestionFeedbackFrame(
+ void OnDecryptedPacket(EncryptionLevel level) override {}
+ bool OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnFecProtectedPayload(base::StringPiece payload) override {}
+ bool OnStreamFrame(const QuicStreamFrame& frame) override;
+ bool OnAckFrame(const QuicAckFrame& frame) override;
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual bool OnStopWaitingFrame(
- const QuicStopWaitingFrame& frame) override;
- virtual bool OnPingFrame(const QuicPingFrame& frame) override;
- virtual void OnFecData(const QuicFecData& fec) override {}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnPacketComplete() override {}
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ bool OnPingFrame(const QuicPingFrame& frame) override;
+ void OnFecData(const QuicFecData& fec) override {}
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnPacketComplete() override {}
private:
DISALLOW_COPY_AND_ASSIGN(NoOpFramerVisitor);
@@ -254,10 +251,10 @@ class MockConnectionVisitor : public QuicConnectionVisitorInterface {
class MockHelper : public QuicConnectionHelperInterface {
public:
MockHelper();
- virtual ~MockHelper();
- virtual const QuicClock* GetClock() const override;
- virtual QuicRandom* GetRandomGenerator() override;
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
+ ~MockHelper() override;
+ const QuicClock* GetClock() const override;
+ QuicRandom* GetRandomGenerator() override;
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
void AdvanceTime(QuicTime::Delta delta);
private:
@@ -329,9 +326,9 @@ class PacketSavingConnection : public MockConnection {
PacketSavingConnection(bool is_server,
const QuicVersionVector& supported_versions);
- virtual ~PacketSavingConnection();
+ ~PacketSavingConnection() override;
- virtual void SendOrQueuePacket(QueuedPacket packet) override;
+ void SendOrQueuePacket(QueuedPacket packet) override;
std::vector<QuicPacket*> packets_;
std::vector<QuicEncryptedPacket*> encrypted_packets_;
@@ -494,9 +491,9 @@ class TestEntropyCalculator :
public QuicReceivedEntropyHashCalculatorInterface {
public:
TestEntropyCalculator();
- virtual ~TestEntropyCalculator();
+ ~TestEntropyCalculator() override;
- virtual QuicPacketEntropyHash EntropyHash(
+ QuicPacketEntropyHash EntropyHash(
QuicPacketSequenceNumber sequence_number) const override;
private:
@@ -552,10 +549,10 @@ class MockNetworkChangeVisitor :
class TestWriterFactory : public QuicDispatcher::PacketWriterFactory {
public:
TestWriterFactory();
- virtual ~TestWriterFactory();
+ ~TestWriterFactory() override;
- virtual QuicPacketWriter* Create(QuicServerPacketWriter* writer,
- QuicConnection* connection) override;
+ QuicPacketWriter* Create(QuicServerPacketWriter* writer,
+ QuicConnection* connection) override;
// Calls OnPacketSent on the last QuicConnection to write through one of the
// packet writers created by this factory.
@@ -567,13 +564,12 @@ class TestWriterFactory : public QuicDispatcher::PacketWriterFactory {
PerConnectionPacketWriter(TestWriterFactory* factory,
QuicServerPacketWriter* writer,
QuicConnection* connection);
- virtual ~PerConnectionPacketWriter();
+ ~PerConnectionPacketWriter() override;
- virtual WriteResult WritePacket(
- const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
private:
TestWriterFactory* factory_;
diff --git a/net/quic/test_tools/simple_quic_framer.cc b/net/quic/test_tools/simple_quic_framer.cc
index 6999cf5..0f413d7 100644
--- a/net/quic/test_tools/simple_quic_framer.cc
+++ b/net/quic/test_tools/simple_quic_framer.cc
@@ -22,48 +22,40 @@ class SimpleFramerVisitor : public QuicFramerVisitorInterface {
: error_(QUIC_NO_ERROR) {
}
- virtual ~SimpleFramerVisitor() override {
- STLDeleteElements(&stream_data_);
- }
+ ~SimpleFramerVisitor() override { STLDeleteElements(&stream_data_); }
- virtual void OnError(QuicFramer* framer) override {
- error_ = framer->error();
- }
+ void OnError(QuicFramer* framer) override { error_ = framer->error(); }
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override {
- return false;
- }
+ bool OnProtocolVersionMismatch(QuicVersion version) override { return false; }
- virtual void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {
+ void OnPacket() override {}
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {
public_reset_packet_.reset(new QuicPublicResetPacket(packet));
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {
version_negotiation_packet_.reset(
new QuicVersionNegotiationPacket(packet));
}
- virtual void OnRevivedPacket() override {}
+ void OnRevivedPacket() override {}
- virtual bool OnUnauthenticatedPublicHeader(
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
return true;
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
return true;
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override {
+ void OnDecryptedPacket(EncryptionLevel level) override {}
+ bool OnPacketHeader(const QuicPacketHeader& header) override {
has_header_ = true;
header_ = header;
return true;
}
- virtual void OnFecProtectedPayload(StringPiece payload) override {}
+ void OnFecProtectedPayload(StringPiece payload) override {}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override {
+ bool OnStreamFrame(const QuicStreamFrame& frame) override {
// Save a copy of the data so it is valid after the packet is processed.
stream_data_.push_back(frame.GetDataAsString());
QuicStreamFrame stream_frame(frame);
@@ -75,61 +67,59 @@ class SimpleFramerVisitor : public QuicFramerVisitorInterface {
return true;
}
- virtual bool OnAckFrame(const QuicAckFrame& frame) override {
+ bool OnAckFrame(const QuicAckFrame& frame) override {
ack_frames_.push_back(frame);
return true;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override {
feedback_frames_.push_back(frame);
return true;
}
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
stop_waiting_frames_.push_back(frame);
return true;
}
- virtual bool OnPingFrame(const QuicPingFrame& frame) override {
+ bool OnPingFrame(const QuicPingFrame& frame) override {
ping_frames_.push_back(frame);
return true;
}
- virtual void OnFecData(const QuicFecData& fec) override {
+ void OnFecData(const QuicFecData& fec) override {
fec_data_ = fec;
fec_redundancy_ = fec_data_.redundancy.as_string();
fec_data_.redundancy = fec_redundancy_;
}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
rst_stream_frames_.push_back(frame);
return true;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override {
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override {
connection_close_frames_.push_back(frame);
return true;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
goaway_frames_.push_back(frame);
return true;
}
- virtual bool OnWindowUpdateFrame(
- const QuicWindowUpdateFrame& frame) override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override {
window_update_frames_.push_back(frame);
return true;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
blocked_frames_.push_back(frame);
return true;
}
- virtual void OnPacketComplete() override {}
+ void OnPacketComplete() override {}
const QuicPacketHeader& header() const { return header_; }
const vector<QuicAckFrame>& ack_frames() const { return ack_frames_; }
diff --git a/net/quic/test_tools/test_task_runner.h b/net/quic/test_tools/test_task_runner.h
index ea6793f..69a1bcb 100644
--- a/net/quic/test_tools/test_task_runner.h
+++ b/net/quic/test_tools/test_task_runner.h
@@ -26,17 +26,17 @@ class TestTaskRunner : public base::TaskRunner {
explicit TestTaskRunner(MockClock* clock);
// base::TaskRunner implementation.
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
const std::vector<PostedTask>& GetPostedTasks() const;
void RunNextTask();
protected:
- virtual ~TestTaskRunner();
+ ~TestTaskRunner() override;
private:
std::vector<PostedTask>::iterator FindNextTask();
diff --git a/net/server/http_connection.h b/net/server/http_connection.h
index c7225e1..8163ced 100644
--- a/net/server/http_connection.h
+++ b/net/server/http_connection.h
@@ -59,7 +59,7 @@ class HttpConnection {
}
private:
- virtual ~ReadIOBuffer();
+ ~ReadIOBuffer() override;
scoped_refptr<GrowableIOBuffer> base_;
int max_buffer_size_;
@@ -101,7 +101,7 @@ class HttpConnection {
}
private:
- virtual ~QueuedWriteIOBuffer();
+ ~QueuedWriteIOBuffer() override;
std::queue<std::string> pending_data_;
int total_size_;
diff --git a/net/server/http_server_unittest.cc b/net/server/http_server_unittest.cc
index be0e271d..5da2c0f 100644
--- a/net/server/http_server_unittest.cc
+++ b/net/server/http_server_unittest.cc
@@ -189,26 +189,25 @@ class HttpServerTest : public testing::Test,
ASSERT_EQ(OK, server_->GetLocalAddress(&server_address_));
}
- virtual void OnConnect(int connection_id) override {}
+ void OnConnect(int connection_id) override {}
- virtual void OnHttpRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnHttpRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
requests_.push_back(std::make_pair(info, connection_id));
if (requests_.size() == quit_after_request_count_)
run_loop_quit_func_.Run();
}
- virtual void OnWebSocketRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnWebSocketRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
NOTREACHED();
}
- virtual void OnWebSocketMessage(int connection_id,
- const std::string& data) override {
+ void OnWebSocketMessage(int connection_id, const std::string& data) override {
NOTREACHED();
}
- virtual void OnClose(int connection_id) override {}
+ void OnClose(int connection_id) override {}
bool RunUntilRequestsReceived(size_t count) {
quit_after_request_count_ = count;
@@ -248,18 +247,17 @@ class HttpServerTest : public testing::Test,
namespace {
class WebSocketTest : public HttpServerTest {
- virtual void OnHttpRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnHttpRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
NOTREACHED();
}
- virtual void OnWebSocketRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnWebSocketRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
HttpServerTest::OnHttpRequest(connection_id, info);
}
- virtual void OnWebSocketMessage(int connection_id,
- const std::string& data) override {
+ void OnWebSocketMessage(int connection_id, const std::string& data) override {
}
};
@@ -407,9 +405,9 @@ TEST_F(HttpServerTest, RequestWithTooLargeBody) {
public:
TestURLFetcherDelegate(const base::Closure& quit_loop_func)
: quit_loop_func_(quit_loop_func) {}
- virtual ~TestURLFetcherDelegate() {}
+ ~TestURLFetcherDelegate() override {}
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
EXPECT_EQ(HTTP_INTERNAL_SERVER_ERROR, source->GetResponseCode());
quit_loop_func_.Run();
}
@@ -473,10 +471,10 @@ class MockStreamSocket : public StreamSocket {
read_buf_len_(0) {}
// StreamSocket
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_NOT_IMPLEMENTED;
}
- virtual void Disconnect() override {
+ void Disconnect() override {
connected_ = false;
if (!read_callback_.is_null()) {
read_buf_ = NULL;
@@ -484,28 +482,27 @@ class MockStreamSocket : public StreamSocket {
base::ResetAndReturn(&read_callback_).Run(ERR_CONNECTION_CLOSED);
}
}
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override { return IsConnected(); }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override { return IsConnected(); }
+ int GetPeerAddress(IPEndPoint* address) const override {
return ERR_NOT_IMPLEMENTED;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return ERR_NOT_IMPLEMENTED;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return true; }
- virtual bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return true; }
+ bool UsingTCPFastOpen() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
if (!connected_) {
return ERR_SOCKET_NOT_CONNECTED;
}
@@ -522,16 +519,13 @@ class MockStreamSocket : public StreamSocket {
pending_read_data_.erase(0, read_len);
return read_len;
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
- return ERR_NOT_IMPLEMENTED;
- }
- virtual int SetReceiveBufferSize(int32 size) override {
- return ERR_NOT_IMPLEMENTED;
- }
- virtual int SetSendBufferSize(int32 size) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_NOT_IMPLEMENTED;
}
+ int SetReceiveBufferSize(int32 size) override { return ERR_NOT_IMPLEMENTED; }
+ int SetSendBufferSize(int32 size) override { return ERR_NOT_IMPLEMENTED; }
void DidRead(const char* data, int data_len) {
if (!read_buf_.get()) {
@@ -547,7 +541,7 @@ class MockStreamSocket : public StreamSocket {
}
private:
- virtual ~MockStreamSocket() {}
+ ~MockStreamSocket() override {}
bool connected_;
scoped_refptr<IOBuffer> read_buf_;
@@ -621,7 +615,7 @@ TEST_F(HttpServerTest, MultipleRequestsOnSameConnection) {
class CloseOnConnectHttpServerTest : public HttpServerTest {
public:
- virtual void OnConnect(int connection_id) override {
+ void OnConnect(int connection_id) override {
connection_ids_.push_back(connection_id);
server_->Close(connection_id);
}
diff --git a/net/server/web_socket.cc b/net/server/web_socket.cc
index 118cdf8..d67ecb6 100644
--- a/net/server/web_socket.cc
+++ b/net/server/web_socket.cc
@@ -54,7 +54,7 @@ class WebSocketHixie76 : public net::WebSocket {
return new WebSocketHixie76(server, connection, request, pos);
}
- virtual void Accept(const HttpServerRequestInfo& request) override {
+ void Accept(const HttpServerRequestInfo& request) override {
std::string key1 = request.GetHeaderValue("sec-websocket-key1");
std::string key2 = request.GetHeaderValue("sec-websocket-key2");
@@ -86,7 +86,7 @@ class WebSocketHixie76 : public net::WebSocket {
std::string(reinterpret_cast<char*>(digest.a), 16));
}
- virtual ParseResult Read(std::string* message) override {
+ ParseResult Read(std::string* message) override {
DCHECK(message);
HttpConnection::ReadIOBuffer* read_buf = connection_->read_buf();
if (read_buf->StartOfBuffer()[0])
@@ -103,7 +103,7 @@ class WebSocketHixie76 : public net::WebSocket {
return FRAME_OK;
}
- virtual void Send(const std::string& message) override {
+ void Send(const std::string& message) override {
char message_start = 0;
char message_end = -1;
server_->SendRaw(connection_->id(), std::string(1, message_start));
@@ -199,7 +199,7 @@ class WebSocketHybi17 : public WebSocket {
return new WebSocketHybi17(server, connection, request, pos);
}
- virtual void Accept(const HttpServerRequestInfo& request) override {
+ void Accept(const HttpServerRequestInfo& request) override {
static const char* const kWebSocketGuid =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
std::string key = request.GetHeaderValue("sec-websocket-key");
@@ -217,7 +217,7 @@ class WebSocketHybi17 : public WebSocket {
encoded_hash.c_str()));
}
- virtual ParseResult Read(std::string* message) override {
+ ParseResult Read(std::string* message) override {
HttpConnection::ReadIOBuffer* read_buf = connection_->read_buf();
base::StringPiece frame(read_buf->StartOfBuffer(), read_buf->GetSize());
int bytes_consumed = 0;
@@ -230,7 +230,7 @@ class WebSocketHybi17 : public WebSocket {
return result;
}
- virtual void Send(const std::string& message) override {
+ void Send(const std::string& message) override {
if (closed_)
return;
server_->SendRaw(connection_->id(),
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index f372aff..51aea71 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -50,24 +50,24 @@ class DefaultClientSocketFactory : public ClientSocketFactory,
CertDatabase::GetInstance()->AddObserver(this);
}
- virtual ~DefaultClientSocketFactory() {
+ ~DefaultClientSocketFactory() override {
// Note: This code never runs, as the factory is defined as a Leaky
// singleton.
CertDatabase::GetInstance()->RemoveObserver(this);
}
- virtual void OnCertAdded(const X509Certificate* cert) override {
+ void OnCertAdded(const X509Certificate* cert) override {
ClearSSLSessionCache();
}
- virtual void OnCACertChanged(const X509Certificate* cert) override {
+ void OnCACertChanged(const X509Certificate* cert) override {
// Per wtc, we actually only need to flush when trust is reduced.
// Always flush now because OnCACertChanged does not tell us this.
// See comments in ClientSocketPoolManager::OnCACertChanged.
ClearSSLSessionCache();
}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
@@ -76,7 +76,7 @@ class DefaultClientSocketFactory : public ClientSocketFactory,
new UDPClientSocket(bind_type, rand_int_cb, net_log, source));
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override {
@@ -84,7 +84,7 @@ class DefaultClientSocketFactory : public ClientSocketFactory,
new TCPClientSocket(addresses, net_log, source));
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -120,9 +120,7 @@ class DefaultClientSocketFactory : public ClientSocketFactory,
#endif
}
- virtual void ClearSSLSessionCache() override {
- SSLClientSocket::ClearSessionCache();
- }
+ void ClearSSLSessionCache() override { SSLClientSocket::ClearSessionCache(); }
private:
scoped_refptr<base::SequencedWorkerPool> worker_pool_;
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index 715cddb..2a2be36 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -182,7 +182,7 @@ class NET_EXPORT ClientSocketPool : public LowerLayeredPool {
protected:
ClientSocketPool();
- virtual ~ClientSocketPool();
+ ~ClientSocketPool() override;
// Return the connection timeout for this pool.
virtual base::TimeDelta ConnectionTimeout() const = 0;
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 0378c99..ec4e33c 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -219,7 +219,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
base::TimeDelta used_idle_socket_timeout,
ConnectJobFactory* connect_job_factory);
- virtual ~ClientSocketPoolBaseHelper();
+ ~ClientSocketPoolBaseHelper() override;
// Adds a lower layered pool to |this|, and adds |this| as a higher layered
// pool on top of |lower_pool|.
@@ -327,10 +327,10 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
void EnableConnectBackupJobs();
// ConnectJob::Delegate methods:
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override;
+ void OnConnectJobComplete(int result, ConnectJob* job) override;
// NetworkChangeNotifier::IPAddressObserver methods:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
private:
friend class base::RefCounted<ClientSocketPoolBaseHelper>;
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 3cafc89..e2666fb 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -128,9 +128,9 @@ class MockClientSocket : public StreamSocket {
}
// Socket implementation.
- virtual int Read(
- IOBuffer* /* buf */, int len,
- const CompletionCallback& /* callback */) override {
+ int Read(IOBuffer* /* buf */,
+ int len,
+ const CompletionCallback& /* callback */) override {
if (has_unread_data_ && len > 0) {
has_unread_data_ = false;
was_used_to_convey_data_ = true;
@@ -139,54 +139,44 @@ class MockClientSocket : public StreamSocket {
return ERR_UNEXPECTED;
}
- virtual int Write(
- IOBuffer* /* buf */, int len,
- const CompletionCallback& /* callback */) override {
+ int Write(IOBuffer* /* buf */,
+ int len,
+ const CompletionCallback& /* callback */) override {
was_used_to_convey_data_ = true;
return len;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
connected_ = true;
return OK;
}
- virtual void Disconnect() override { connected_ = false; }
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override {
+ void Disconnect() override { connected_ = false; }
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override {
return connected_ && !has_unread_data_;
}
- virtual int GetPeerAddress(IPEndPoint* /* address */) const override {
+ int GetPeerAddress(IPEndPoint* /* address */) const override {
return ERR_UNEXPECTED;
}
- virtual int GetLocalAddress(IPEndPoint* /* address */) const override {
+ int GetLocalAddress(IPEndPoint* /* address */) const override {
return ERR_UNEXPECTED;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override {
- return was_used_to_convey_data_;
- }
- virtual bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override {
- return false;
- }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
- return false;
- }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return was_used_to_convey_data_; }
+ bool UsingTCPFastOpen() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
private:
bool connected_;
@@ -203,7 +193,7 @@ class MockClientSocketFactory : public ClientSocketFactory {
public:
MockClientSocketFactory() : allocation_count_(0) {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
@@ -212,7 +202,7 @@ class MockClientSocketFactory : public ClientSocketFactory {
return scoped_ptr<DatagramClientSocket>();
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* /* net_log */,
const NetLog::Source& /*source*/) override {
@@ -220,7 +210,7 @@ class MockClientSocketFactory : public ClientSocketFactory {
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -229,9 +219,7 @@ class MockClientSocketFactory : public ClientSocketFactory {
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
void WaitForSignal(TestConnectJob* job) { waiting_jobs_.push_back(job); }
@@ -291,9 +279,9 @@ class TestConnectJob : public ConnectJob {
// From ConnectJob:
- virtual LoadState GetLoadState() const override { return load_state_; }
+ LoadState GetLoadState() const override { return load_state_; }
- virtual void GetAdditionalErrorState(ClientSocketHandle* handle) override {
+ void GetAdditionalErrorState(ClientSocketHandle* handle) override {
if (store_additional_error_state_) {
// Set all of the additional error state fields in some way.
handle->set_is_ssl_error(true);
@@ -306,7 +294,7 @@ class TestConnectJob : public ConnectJob {
private:
// From ConnectJob:
- virtual int ConnectInternal() override {
+ int ConnectInternal() override {
AddressList ignored;
client_socket_factory_->CreateTransportClientSocket(
ignored, NULL, net::NetLog::Source());
@@ -439,7 +427,7 @@ class TestConnectJobFactory
net_log_(net_log) {
}
- virtual ~TestConnectJobFactory() {}
+ ~TestConnectJobFactory() override {}
void set_job_type(TestConnectJob::JobType job_type) { job_type_ = job_type; }
@@ -454,7 +442,7 @@ class TestConnectJobFactory
// ConnectJobFactory implementation.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const TestClientSocketPoolBase::Request& request,
ConnectJob::Delegate* delegate) const override {
@@ -473,7 +461,7 @@ class TestConnectJobFactory
net_log_));
}
- virtual base::TimeDelta ConnectionTimeout() const override {
+ base::TimeDelta ConnectionTimeout() const override {
return timeout_duration_;
}
@@ -502,92 +490,78 @@ class TestClientSocketPool : public ClientSocketPool {
unused_idle_socket_timeout, used_idle_socket_timeout,
connect_job_factory) {}
- virtual ~TestClientSocketPool() {}
+ ~TestClientSocketPool() override {}
- virtual int RequestSocket(
- const std::string& group_name,
- const void* params,
- net::RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override {
+ int RequestSocket(const std::string& group_name,
+ const void* params,
+ net::RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override {
const scoped_refptr<TestSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
return base_.RequestSocket(group_name, *casted_socket_params, priority,
handle, callback, net_log);
}
- 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 {
const scoped_refptr<TestSocketParams>* casted_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
}
- virtual void CancelRequest(
- const std::string& group_name,
- ClientSocketHandle* handle) override {
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override {
base_.CancelRequest(group_name, handle);
}
- 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 {
base_.ReleaseSocket(group_name, socket.Pass(), id);
}
- virtual void FlushWithError(int error) override {
- base_.FlushWithError(error);
- }
+ void FlushWithError(int error) override { base_.FlushWithError(error); }
- virtual bool IsStalled() const override {
- return base_.IsStalled();
- }
+ bool IsStalled() const override { return base_.IsStalled(); }
- virtual void CloseIdleSockets() override {
- base_.CloseIdleSockets();
- }
+ void CloseIdleSockets() override { base_.CloseIdleSockets(); }
- virtual int IdleSocketCount() const override {
- return base_.idle_socket_count();
- }
+ int IdleSocketCount() const override { return base_.idle_socket_count(); }
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override {
+ int IdleSocketCountInGroup(const std::string& group_name) const override {
return base_.IdleSocketCountInGroup(group_name);
}
- 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 {
return base_.GetLoadState(group_name, handle);
}
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override {
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override {
base_.AddHigherLayeredPool(higher_pool);
}
- virtual void RemoveHigherLayeredPool(
- HigherLayeredPool* higher_pool) override {
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override {
base_.RemoveHigherLayeredPool(higher_pool);
}
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override {
return base_.GetInfoAsValue(name, type);
}
- virtual base::TimeDelta ConnectionTimeout() const override {
+ base::TimeDelta ConnectionTimeout() const override {
return base_.ConnectionTimeout();
}
- virtual ClientSocketPoolHistograms* histograms() const override {
+ ClientSocketPoolHistograms* histograms() const override {
return base_.histograms();
}
@@ -651,9 +625,9 @@ class TestConnectJobDelegate : public ConnectJob::Delegate {
public:
TestConnectJobDelegate()
: have_result_(false), waiting_for_result_(false), result_(OK) {}
- virtual ~TestConnectJobDelegate() {}
+ ~TestConnectJobDelegate() override {}
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override {
+ void OnConnectJobComplete(int result, ConnectJob* job) override {
result_ = result;
scoped_ptr<ConnectJob> owned_job(job);
scoped_ptr<StreamSocket> socket = owned_job->PassSocket();
@@ -1473,7 +1447,7 @@ class RequestSocketCallback : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
@@ -2591,7 +2565,7 @@ class TestReleasingSocketRequest : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~TestReleasingSocketRequest() {}
+ ~TestReleasingSocketRequest() override {}
ClientSocketHandle* handle() { return &handle_; }
@@ -2716,7 +2690,7 @@ class ConnectWithinCallback : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~ConnectWithinCallback() {}
+ ~ConnectWithinCallback() override {}
int WaitForNestedResult() {
return nested_callback_.WaitForResult();
diff --git a/net/socket/client_socket_pool_manager_impl.h b/net/socket/client_socket_pool_manager_impl.h
index 94fd55d..f9f8d3b 100644
--- a/net/socket/client_socket_pool_manager_impl.h
+++ b/net/socket/client_socket_pool_manager_impl.h
@@ -71,31 +71,31 @@ class ClientSocketPoolManagerImpl : public base::NonThreadSafe,
bool enable_ssl_connect_job_waiting,
ProxyDelegate* proxy_delegate,
HttpNetworkSession::SocketPoolType pool_type);
- virtual ~ClientSocketPoolManagerImpl();
+ ~ClientSocketPoolManagerImpl() override;
- virtual void FlushSocketPoolsWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void FlushSocketPoolsWithError(int error) override;
+ void CloseIdleSockets() override;
- virtual TransportClientSocketPool* GetTransportSocketPool() override;
+ TransportClientSocketPool* GetTransportSocketPool() override;
- virtual SSLClientSocketPool* GetSSLSocketPool() override;
+ SSLClientSocketPool* GetSSLSocketPool() override;
- virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
+ SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
const HostPortPair& socks_proxy) override;
- virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
+ HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
const HostPortPair& http_proxy) override;
- virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
+ SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
const HostPortPair& proxy_server) override;
// Creates a Value summary of the state of the socket pools. The caller is
// responsible for deleting the returned value.
- virtual base::Value* SocketPoolInfoToValue() const override;
+ base::Value* SocketPoolInfoToValue() const override;
// CertDatabase::Observer methods:
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
private:
typedef internal::OwnedPoolMap<HostPortPair, TransportClientSocketPool*>
diff --git a/net/socket/mock_client_socket_pool_manager.h b/net/socket/mock_client_socket_pool_manager.h
index 03930e3..76d7704 100644
--- a/net/socket/mock_client_socket_pool_manager.h
+++ b/net/socket/mock_client_socket_pool_manager.h
@@ -14,7 +14,7 @@ namespace net {
class MockClientSocketPoolManager : public ClientSocketPoolManager {
public:
MockClientSocketPoolManager();
- virtual ~MockClientSocketPoolManager();
+ ~MockClientSocketPoolManager() override;
// Sets "override" socket pools that get used instead.
void SetTransportSocketPool(TransportClientSocketPool* pool);
@@ -27,17 +27,17 @@ class MockClientSocketPoolManager : public ClientSocketPoolManager {
SSLClientSocketPool* pool);
// ClientSocketPoolManager methods:
- virtual void FlushSocketPoolsWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual TransportClientSocketPool* GetTransportSocketPool() override;
- virtual SSLClientSocketPool* GetSSLSocketPool() override;
- virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
+ void FlushSocketPoolsWithError(int error) override;
+ void CloseIdleSockets() override;
+ TransportClientSocketPool* GetTransportSocketPool() override;
+ SSLClientSocketPool* GetSSLSocketPool() override;
+ SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
const HostPortPair& socks_proxy) override;
- virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
+ HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
const HostPortPair& http_proxy) override;
- virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
+ SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
const HostPortPair& proxy_server) override;
- virtual base::Value* SocketPoolInfoToValue() const override;
+ base::Value* SocketPoolInfoToValue() const override;
private:
typedef internal::OwnedPoolMap<HostPortPair, TransportClientSocketPool*>
diff --git a/net/socket/socket_libevent.h b/net/socket/socket_libevent.h
index a072738..00a0ca6 100644
--- a/net/socket/socket_libevent.h
+++ b/net/socket/socket_libevent.h
@@ -27,7 +27,7 @@ class NET_EXPORT_PRIVATE SocketLibevent
: public base::MessageLoopForIO::Watcher {
public:
SocketLibevent();
- virtual ~SocketLibevent();
+ ~SocketLibevent() override;
// Opens a socket and returns net::OK if |address_family| is AF_INET, AF_INET6
// or AF_UNIX. Otherwise, it does DCHECK() and returns a net error.
@@ -81,8 +81,8 @@ class NET_EXPORT_PRIVATE SocketLibevent
private:
// base::MessageLoopForIO::Watcher methods.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
int DoAccept(scoped_ptr<SocketLibevent>* socket);
void AcceptCompleted();
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 1496aec..7bccdae 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -243,7 +243,7 @@ class StaticSocketDataProvider : public SocketDataProvider {
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~StaticSocketDataProvider();
+ ~StaticSocketDataProvider() override;
// These functions get access to the next available read and write data.
const MockRead& PeekRead() const;
@@ -262,9 +262,9 @@ class StaticSocketDataProvider : public SocketDataProvider {
virtual void CompleteRead() {}
// SocketDataProvider implementation.
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
private:
MockRead* reads_;
@@ -284,7 +284,7 @@ class StaticSocketDataProvider : public SocketDataProvider {
class DynamicSocketDataProvider : public SocketDataProvider {
public:
DynamicSocketDataProvider();
- virtual ~DynamicSocketDataProvider();
+ ~DynamicSocketDataProvider() override;
int short_read_limit() const { return short_read_limit_; }
void set_short_read_limit(int limit) { short_read_limit_ = limit; }
@@ -292,9 +292,9 @@ class DynamicSocketDataProvider : public SocketDataProvider {
void allow_unconsumed_reads(bool allow) { allow_unconsumed_reads_ = allow; }
// SocketDataProvider implementation.
- virtual MockRead GetNextRead() override;
+ MockRead GetNextRead() override;
virtual MockWriteResult OnWrite(const std::string& data) = 0;
- virtual void Reset() override;
+ void Reset() override;
protected:
// The next time there is a read from this socket, it will return |data|.
@@ -371,15 +371,15 @@ class DelayedSocketData : public StaticSocketDataProvider {
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~DelayedSocketData();
+ ~DelayedSocketData() override;
void ForceNextRead();
// StaticSocketDataProvider:
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override;
private:
int write_delay_;
@@ -412,7 +412,7 @@ class OrderedSocketData : public StaticSocketDataProvider {
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~OrderedSocketData();
+ ~OrderedSocketData() override;
// |connect| the result for the connect phase.
// |reads| the list of MockRead completions.
@@ -430,10 +430,10 @@ class OrderedSocketData : public StaticSocketDataProvider {
void EndLoop();
// StaticSocketDataProvider:
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override;
private:
int sequence_number_;
@@ -536,7 +536,7 @@ class DeterministicSocketData : public StaticSocketDataProvider {
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~DeterministicSocketData();
+ ~DeterministicSocketData() override;
// Consume all the data up to the give stop point (via SetStop()).
void Run();
@@ -560,14 +560,14 @@ class DeterministicSocketData : public StaticSocketDataProvider {
// When the socket calls Read(), that calls GetNextRead(), and expects either
// ERR_IO_PENDING or data.
- virtual MockRead GetNextRead() override;
+ MockRead GetNextRead() override;
// When the socket calls Write(), it always completes synchronously. OnWrite()
// checks to make sure the written data matches the expected data. The
// callback will not be invoked until its sequence number is reached.
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override {}
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override {}
private:
// Invoke the read and write callbacks, if the timing is appropriate.
@@ -633,7 +633,7 @@ class MockSSLClientSocket;
class MockClientSocketFactory : public ClientSocketFactory {
public:
MockClientSocketFactory();
- virtual ~MockClientSocketFactory();
+ ~MockClientSocketFactory() override;
void AddSocketDataProvider(SocketDataProvider* socket);
void AddSSLSocketDataProvider(SSLSocketDataProvider* socket);
@@ -650,21 +650,21 @@ class MockClientSocketFactory : public ClientSocketFactory {
}
// ClientSocketFactory
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
private:
SocketDataProviderArray<SocketDataProvider> mock_data_;
@@ -688,42 +688,41 @@ class MockClientSocket : public SSLClientSocket {
virtual int Write(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) = 0;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// StreamSocket implementation.
virtual int Connect(const CompletionCallback& callback) = 0;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(const base::Closure& cb) override;
- virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info)
- override;
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& cb) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ ChannelIDService* GetChannelIDService() const override;
protected:
- virtual ~MockClientSocket();
+ ~MockClientSocket() override;
void RunCallbackAsync(const CompletionCallback& callback, int result);
void RunCallback(const CompletionCallback& callback, int result);
// SSLClientSocket implementation.
- virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
+ scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
const override;
// True if Connect completed successfully and Disconnect hasn't been called.
@@ -745,32 +744,32 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
MockTCPClientSocket(const AddressList& addresses,
net::NetLog* net_log,
SocketDataProvider* socket);
- virtual ~MockTCPClientSocket();
+ ~MockTCPClientSocket() override;
const AddressList& addresses() const { return addresses_; }
// 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;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) 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 int GetPeerAddress(IPEndPoint* address) const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() 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;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// AsyncSocket:
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
private:
int CompleteRead();
@@ -851,36 +850,36 @@ class DeterministicMockUDPClientSocket
public:
DeterministicMockUDPClientSocket(net::NetLog* net_log,
DeterministicSocketData* data);
- virtual ~DeterministicMockUDPClientSocket();
+ ~DeterministicMockUDPClientSocket() override;
// DeterministicSocketData::Delegate:
- virtual bool WritePending() const override;
- virtual bool ReadPending() const override;
- virtual void CompleteWrite() override;
- virtual int CompleteRead() override;
+ bool WritePending() const override;
+ bool ReadPending() const override;
+ void CompleteWrite() override;
+ int CompleteRead() 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;
+ 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;
// DatagramSocket implementation.
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
+ int Connect(const IPEndPoint& address) override;
// AsyncSocket implementation.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
void set_source_port(int port) { source_port_ = port; }
@@ -902,35 +901,35 @@ class DeterministicMockTCPClientSocket
public:
DeterministicMockTCPClientSocket(net::NetLog* net_log,
DeterministicSocketData* data);
- virtual ~DeterministicMockTCPClientSocket();
+ ~DeterministicMockTCPClientSocket() override;
// DeterministicSocketData::Delegate:
- virtual bool WritePending() const override;
- virtual bool ReadPending() const override;
- virtual void CompleteWrite() override;
- virtual int CompleteRead() override;
+ bool WritePending() const override;
+ bool ReadPending() const override;
+ void CompleteWrite() override;
+ int CompleteRead() override;
// Socket:
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// StreamSocket:
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() 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;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// AsyncSocket:
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
private:
DeterministicSocketHelper helper_;
@@ -944,44 +943,43 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
SSLSocketDataProvider* socket);
- virtual ~MockSSLClientSocket();
+ ~MockSSLClientSocket() 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;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual bool WasNpnNegotiated() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(const base::Closure& cb) override;
- virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info)
- override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual bool set_was_npn_negotiated(bool negotiated) override;
- virtual void set_protocol_negotiated(NextProto protocol_negotiated) override;
- virtual NextProto GetNegotiatedProtocol() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& cb) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ bool set_was_npn_negotiated(bool negotiated) override;
+ void set_protocol_negotiated(NextProto protocol_negotiated) override;
+ NextProto GetNegotiatedProtocol() const override;
// This MockSocket does not implement the manual async IO feature.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
- virtual bool WasChannelIDSent() const override;
- virtual void set_channel_id_sent(bool channel_id_sent) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ bool WasChannelIDSent() const override;
+ void set_channel_id_sent(bool channel_id_sent) override;
+ ChannelIDService* GetChannelIDService() const override;
bool reached_connect() const { return reached_connect_; }
@@ -1028,30 +1026,30 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
class MockUDPClientSocket : public DatagramClientSocket, public AsyncSocket {
public:
MockUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log);
- virtual ~MockUDPClientSocket();
+ ~MockUDPClientSocket() 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;
+ 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;
// DatagramSocket implementation.
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
+ int Connect(const IPEndPoint& address) override;
// AsyncSocket implementation.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
void set_source_port(int port) { source_port_ = port;}
@@ -1087,7 +1085,7 @@ class TestSocketRequest : public TestCompletionCallbackBase {
public:
TestSocketRequest(std::vector<TestSocketRequest*>* request_order,
size_t* completion_count);
- virtual ~TestSocketRequest();
+ ~TestSocketRequest() override;
ClientSocketHandle* handle() { return &handle_; }
@@ -1207,7 +1205,7 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
ClientSocketPoolHistograms* histograms,
ClientSocketFactory* socket_factory);
- virtual ~MockTransportClientSocketPool();
+ ~MockTransportClientSocketPool() override;
RequestPriority last_request_priority() const {
return last_request_priority_;
@@ -1216,18 +1214,18 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
int cancel_count() const { return cancel_count_; }
// TransportClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* socket_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
-
- virtual 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;
+ int RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
private:
ClientSocketFactory* client_socket_factory_;
@@ -1242,7 +1240,7 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
class DeterministicMockClientSocketFactory : public ClientSocketFactory {
public:
DeterministicMockClientSocketFactory();
- virtual ~DeterministicMockClientSocketFactory();
+ ~DeterministicMockClientSocketFactory() override;
void AddSocketDataProvider(DeterministicSocketData* socket);
void AddSSLSocketDataProvider(SSLSocketDataProvider* socket);
@@ -1263,21 +1261,21 @@ class DeterministicMockClientSocketFactory : public ClientSocketFactory {
}
// ClientSocketFactory
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
private:
SocketDataProviderArray<DeterministicSocketData> mock_data_;
@@ -1298,21 +1296,21 @@ class MockSOCKSClientSocketPool : public SOCKSClientSocketPool {
ClientSocketPoolHistograms* histograms,
TransportClientSocketPool* transport_pool);
- virtual ~MockSOCKSClientSocketPool();
+ ~MockSOCKSClientSocketPool() override;
// SOCKSClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* socket_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
-
- virtual 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;
+ int RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h
index 5d4e060..a405212 100644
--- a/net/socket/socks5_client_socket.h
+++ b/net/socket/socks5_client_socket.h
@@ -38,37 +38,37 @@ class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket {
const HostResolver::RequestInfo& req_info);
// On destruction Disconnect() is called.
- virtual ~SOCKS5ClientSocket();
+ ~SOCKS5ClientSocket() override;
// StreamSocket implementation.
// Does the SOCKS handshake and completes the protocol.
- 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/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index d480de4..e792881 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -35,37 +35,37 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
HostResolver* host_resolver);
// On destruction Disconnect() is called.
- virtual ~SOCKSClientSocket();
+ ~SOCKSClientSocket() override;
// StreamSocket implementation.
// Does the SOCKS handshake and completes the protocol.
- 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:
FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake);
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index d324f0a..35f7146 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -63,10 +63,10 @@ class SOCKSConnectJob : public ConnectJob {
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~SOCKSConnectJob();
+ ~SOCKSConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
private:
enum State {
@@ -90,7 +90,7 @@ class SOCKSConnectJob : public ConnectJob {
// Begins the transport connection and the SOCKS handshake. Returns OK on
// success and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<SOCKSSocketParams> socks_params_;
TransportClientSocketPool* const transport_pool_;
@@ -117,59 +117,57 @@ class NET_EXPORT_PRIVATE SOCKSClientSocketPool
TransportClientSocketPool* transport_pool,
NetLog* net_log);
- virtual ~SOCKSClientSocketPool();
+ ~SOCKSClientSocketPool() 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<SOCKSSocketParams> PoolBase;
@@ -183,15 +181,15 @@ class NET_EXPORT_PRIVATE SOCKSClientSocketPool
host_resolver_(host_resolver),
net_log_(net_log) {}
- virtual ~SOCKSConnectJobFactory() {}
+ ~SOCKSConnectJobFactory() override {}
// 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/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 84aaf6f..ced7d9e4 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -96,12 +96,12 @@ class HangingHostResolverWithCancel : public HostResolver {
public:
HangingHostResolverWithCancel() : outstanding_request_(NULL) {}
- 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 {
DCHECK(addresses);
DCHECK_EQ(false, callback.is_null());
EXPECT_FALSE(HasOutstandingRequest());
@@ -110,14 +110,14 @@ class HangingHostResolverWithCancel : public HostResolver {
return ERR_IO_PENDING;
}
- 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 {
NOTIMPLEMENTED();
return ERR_UNEXPECTED;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_TRUE(HasOutstandingRequest());
EXPECT_EQ(outstanding_request_, req);
outstanding_request_ = NULL;
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index 8f40f84..c6bd366 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -87,8 +87,8 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
};
// StreamSocket:
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
// Computes a unique key string for the SSL session cache.
virtual std::string GetSessionCacheKey() const = 0;
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index dff457b..49a2b45 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -51,7 +51,7 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context);
- virtual ~SSLClientSocketOpenSSL();
+ ~SSLClientSocketOpenSSL() override;
const HostPortPair& host_and_port() const { return host_and_port_; }
const std::string& ssl_session_cache_shard() const {
@@ -59,48 +59,48 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
}
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(
- const base::Closure& callback) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& callback) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ ChannelIDService* GetChannelIDService() const override;
// SSLSocket implementation.
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) 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 int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) 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 GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() 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;
+ 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;
protected:
// SSLClientSocket implementation.
- virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
+ scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
const override;
private:
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 58540157..c7f613e 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -194,12 +194,12 @@ class SSLConnectJob : public ConnectJob {
const GetMessengerCallback& get_messenger_callback,
Delegate* delegate,
NetLog* net_log);
- virtual ~SSLConnectJob();
+ ~SSLConnectJob() 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 {
@@ -242,7 +242,7 @@ class SSLConnectJob : public ConnectJob {
// Starts the SSL connection process. Returns OK on success and
// ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<SSLSocketParams> params_;
TransportClientSocketPool* const transport_pool_;
@@ -294,59 +294,57 @@ class NET_EXPORT_PRIVATE SSLClientSocketPool
bool enable_ssl_connect_job_waiting,
NetLog* net_log);
- virtual ~SSLClientSocketPool();
+ ~SSLClientSocketPool() 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;
// Gets the SSLConnectJobMessenger for the given ssl session |cache_key|. If
// none exits, it creates one and stores it in |messenger_map_|.
@@ -363,7 +361,7 @@ class NET_EXPORT_PRIVATE SSLClientSocketPool
// When the user changes the SSL config, we flush all idle sockets so they
// won't get re-used.
- virtual void OnSSLConfigChanged() override;
+ void OnSSLConfigChanged() override;
class SSLConnectJobFactory : public PoolBase::ConnectJobFactory {
public:
@@ -377,15 +375,15 @@ class NET_EXPORT_PRIVATE SSLClientSocketPool
const SSLConnectJob::GetMessengerCallback& get_messenger_callback,
NetLog* net_log);
- virtual ~SSLConnectJobFactory();
+ ~SSLConnectJobFactory() override;
// 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/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 58e43c7..13a3863 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -57,65 +57,57 @@ class WrappedStreamSocket : public StreamSocket {
public:
explicit WrappedStreamSocket(scoped_ptr<StreamSocket> transport)
: transport_(transport.Pass()) {}
- virtual ~WrappedStreamSocket() {}
+ ~WrappedStreamSocket() override {}
// StreamSocket implementation:
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return transport_->Connect(callback);
}
- virtual void Disconnect() override { transport_->Disconnect(); }
- virtual bool IsConnected() const override {
- return transport_->IsConnected();
- }
- virtual bool IsConnectedAndIdle() const override {
+ void Disconnect() override { transport_->Disconnect(); }
+ bool IsConnected() const override { return transport_->IsConnected(); }
+ bool IsConnectedAndIdle() const override {
return transport_->IsConnectedAndIdle();
}
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
return transport_->GetPeerAddress(address);
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return transport_->GetLocalAddress(address);
}
- virtual const BoundNetLog& NetLog() const override {
- return transport_->NetLog();
- }
- virtual void SetSubresourceSpeculation() override {
+ const BoundNetLog& NetLog() const override { return transport_->NetLog(); }
+ void SetSubresourceSpeculation() override {
transport_->SetSubresourceSpeculation();
}
- virtual void SetOmniboxSpeculation() override {
- transport_->SetOmniboxSpeculation();
- }
- virtual bool WasEverUsed() const override {
- return transport_->WasEverUsed();
- }
- virtual bool UsingTCPFastOpen() const override {
+ void SetOmniboxSpeculation() override { transport_->SetOmniboxSpeculation(); }
+ bool WasEverUsed() const override { return transport_->WasEverUsed(); }
+ bool UsingTCPFastOpen() const override {
return transport_->UsingTCPFastOpen();
}
- virtual bool WasNpnNegotiated() const override {
+ bool WasNpnNegotiated() const override {
return transport_->WasNpnNegotiated();
}
- virtual NextProto GetNegotiatedProtocol() const override {
+ NextProto GetNegotiatedProtocol() const override {
return transport_->GetNegotiatedProtocol();
}
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
+ bool GetSSLInfo(SSLInfo* ssl_info) override {
return transport_->GetSSLInfo(ssl_info);
}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return transport_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return transport_->Write(buf, buf_len, callback);
}
- virtual int SetReceiveBufferSize(int32 size) override {
+ int SetReceiveBufferSize(int32 size) override {
return transport_->SetReceiveBufferSize(size);
}
- virtual int SetSendBufferSize(int32 size) override {
+ int SetSendBufferSize(int32 size) override {
return transport_->SetSendBufferSize(size);
}
@@ -132,12 +124,12 @@ class WrappedStreamSocket : public StreamSocket {
class ReadBufferingStreamSocket : public WrappedStreamSocket {
public:
explicit ReadBufferingStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~ReadBufferingStreamSocket() {}
+ ~ReadBufferingStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Sets the internal buffer to |size|. This must not be greater than
// the largest value supplied to Read() - that is, it does not handle
@@ -262,15 +254,15 @@ void ReadBufferingStreamSocket::OnReadCompleted(int result) {
class SynchronousErrorStreamSocket : public WrappedStreamSocket {
public:
explicit SynchronousErrorStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~SynchronousErrorStreamSocket() {}
+ ~SynchronousErrorStreamSocket() 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;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Sets the next Read() call and all future calls to return |error|.
// If there is already a pending asynchronous read, the configured error
@@ -333,15 +325,15 @@ int SynchronousErrorStreamSocket::Write(IOBuffer* buf,
class FakeBlockingStreamSocket : public WrappedStreamSocket {
public:
explicit FakeBlockingStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~FakeBlockingStreamSocket() {}
+ ~FakeBlockingStreamSocket() 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;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Blocks read results on the socket. Reads will not complete until
// UnblockReadResult() has been called and a result is ready from the
@@ -549,18 +541,18 @@ class CountingStreamSocket : public WrappedStreamSocket {
: WrappedStreamSocket(transport.Pass()),
read_count_(0),
write_count_(0) {}
- virtual ~CountingStreamSocket() {}
+ ~CountingStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
read_count_++;
return transport_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
write_count_++;
return transport_->Write(buf, buf_len, callback);
}
@@ -581,7 +573,7 @@ class DeleteSocketCallback : public TestCompletionCallbackBase {
: socket_(socket),
callback_(base::Bind(&DeleteSocketCallback::OnComplete,
base::Unretained(this))) {}
- virtual ~DeleteSocketCallback() {}
+ ~DeleteSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
@@ -605,62 +597,58 @@ class DeleteSocketCallback : public TestCompletionCallbackBase {
// A ChannelIDStore that always returns an error when asked for a
// channel id.
class FailingChannelIDStore : public ChannelIDStore {
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override {
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {}
- virtual void DeleteChannelID(const std::string& server_identifier,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAllCreatedBetween(base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAll(const base::Closure& completion_callback) override {}
- virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback)
- override {}
- virtual int GetChannelIDCount() override { return 0; }
- virtual void SetForceKeepSessionState() override {}
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {}
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback) override {}
+ void DeleteAllCreatedBetween(
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion_callback) override {}
+ void DeleteAll(const base::Closure& completion_callback) override {}
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override {}
+ int GetChannelIDCount() override { return 0; }
+ void SetForceKeepSessionState() override {}
};
// A ChannelIDStore that asynchronously returns an error when asked for a
// channel id.
class AsyncFailingChannelIDStore : public ChannelIDStore {
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override {
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, ERR_UNEXPECTED,
server_identifier, base::Time(), "", ""));
return ERR_IO_PENDING;
}
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {}
- virtual void DeleteChannelID(const std::string& server_identifier,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAllCreatedBetween(base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAll(const base::Closure& completion_callback) override {}
- virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback)
- override {}
- virtual int GetChannelIDCount() override { return 0; }
- virtual void SetForceKeepSessionState() override {}
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {}
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback) override {}
+ void DeleteAllCreatedBetween(
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion_callback) override {}
+ void DeleteAll(const base::Closure& completion_callback) override {}
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override {}
+ int GetChannelIDCount() override { return 0; }
+ void SetForceKeepSessionState() override {}
};
// A mock CTVerifier that records every call to Verify but doesn't verify
diff --git a/net/socket/ssl_server_socket.h b/net/socket/ssl_server_socket.h
index 8b607bf..88f7f94 100644
--- a/net/socket/ssl_server_socket.h
+++ b/net/socket/ssl_server_socket.h
@@ -23,7 +23,7 @@ class X509Certificate;
class SSLServerSocket : public SSLSocket {
public:
- virtual ~SSLServerSocket() {}
+ ~SSLServerSocket() override {}
// Perform the SSL server handshake, and notify the supplied callback
// if the process completes asynchronously. If Disconnect is called before
diff --git a/net/socket/ssl_server_socket_openssl.h b/net/socket/ssl_server_socket_openssl.h
index 379ca57..c58bd56 100644
--- a/net/socket/ssl_server_socket_openssl.h
+++ b/net/socket/ssl_server_socket_openssl.h
@@ -30,42 +30,44 @@ class SSLServerSocketOpenSSL : public SSLServerSocket {
scoped_refptr<X509Certificate> certificate,
crypto::RSAPrivateKey* key,
const SSLConfig& ssl_config);
- virtual ~SSLServerSocketOpenSSL();
+ ~SSLServerSocketOpenSSL() override;
// SSLServerSocket interface.
- virtual int Handshake(const CompletionCallback& callback) override;
+ int Handshake(const CompletionCallback& callback) override;
// SSLSocket interface.
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) override;
// Socket interface (via StreamSocket).
- 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;
+ 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;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) 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;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) 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;
private:
enum State {
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 1d70258..e9957f5 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -167,87 +167,65 @@ class FakeSocket : public StreamSocket {
outgoing_(outgoing_channel) {
}
- virtual ~FakeSocket() {
- }
+ ~FakeSocket() override {}
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Read random number of bytes.
buf_len = rand() % buf_len + 1;
return incoming_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Write random number of bytes.
buf_len = rand() % buf_len + 1;
return outgoing_->Write(buf, buf_len, callback);
}
- virtual int SetReceiveBufferSize(int32 size) override {
- return OK;
- }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override {
- return OK;
- }
+ int SetSendBufferSize(int32 size) override { return OK; }
- virtual int Connect(const CompletionCallback& callback) override {
- return OK;
- }
+ int Connect(const CompletionCallback& callback) override { return OK; }
- virtual void Disconnect() override {
+ void Disconnect() override {
incoming_->Close();
outgoing_->Close();
}
- virtual bool IsConnected() const override {
- return true;
- }
+ bool IsConnected() const override { return true; }
- virtual bool IsConnectedAndIdle() const override {
- return true;
- }
+ bool IsConnectedAndIdle() const override { return true; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(kIPv4AddressSize);
*address = IPEndPoint(ip_address, 0 /*port*/);
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(4);
*address = IPEndPoint(ip_address, 0);
return OK;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
-
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual bool WasEverUsed() const override {
- return true;
- }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
- virtual bool UsingTCPFastOpen() const override {
- return false;
- }
+ bool WasEverUsed() const override { return true; }
+ bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override {
- return false;
- }
+ bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
- return false;
- }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
private:
BoundNetLog net_log_;
diff --git a/net/socket/ssl_socket.h b/net/socket/ssl_socket.h
index 68d1e4a..0dc817b 100644
--- a/net/socket/ssl_socket.h
+++ b/net/socket/ssl_socket.h
@@ -15,7 +15,7 @@ namespace net {
// and server SSL sockets.
class NET_EXPORT SSLSocket : public StreamSocket {
public:
- virtual ~SSLSocket() {}
+ ~SSLSocket() override {}
// Exports data derived from the SSL master-secret (see RFC 5705).
// If |has_context| is false, uses the no-context construction from the
diff --git a/net/socket/stream_listen_socket.h b/net/socket/stream_listen_socket.h
index ead35c4..f8f9419 100644
--- a/net/socket/stream_listen_socket.h
+++ b/net/socket/stream_listen_socket.h
@@ -47,7 +47,7 @@ class NET_EXPORT StreamListenSocket
#endif
public:
- virtual ~StreamListenSocket();
+ ~StreamListenSocket() override;
// TODO(erikkay): this delegate should really be split into two parts
// to split up the listener from the connected socket. Perhaps this class
@@ -116,8 +116,8 @@ class NET_EXPORT StreamListenSocket
HANDLE socket_event_;
#elif defined(OS_POSIX)
// Called by MessagePumpLibevent when the socket is ready to do I/O.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
WaitState wait_state_;
// The socket's libevent wrapper.
base::MessageLoopForIO::FileDescriptorWatcher watcher_;
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h
index 7631e12..b41fed8 100644
--- a/net/socket/stream_socket.h
+++ b/net/socket/stream_socket.h
@@ -17,7 +17,7 @@ class SSLInfo;
class NET_EXPORT_PRIVATE StreamSocket : public Socket {
public:
- virtual ~StreamSocket() {}
+ ~StreamSocket() override {}
// Called to establish a connection. Returns OK if the connection could be
// established synchronously. Otherwise, ERR_IO_PENDING is returned and the
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
index 1672a95..0deec2a 100644
--- a/net/socket/tcp_client_socket.h
+++ b/net/socket/tcp_client_socket.h
@@ -32,37 +32,39 @@ class NET_EXPORT TCPClientSocket : public StreamSocket {
TCPClientSocket(scoped_ptr<TCPSocket> connected_socket,
const IPEndPoint& peer_address);
- virtual ~TCPClientSocket();
+ ~TCPClientSocket() override;
// Binds the socket to a local IP address and port.
int Bind(const IPEndPoint& address);
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) 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 void EnableTCPFastOpenIfSupported() 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;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ void EnableTCPFastOpenIfSupported() override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
// Multiple outstanding requests are not supported.
// Full duplex mode (reading and writing at the same time) is supported.
- 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;
+ 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;
virtual bool SetKeepAlive(bool enable, int delay);
virtual bool SetNoDelay(bool no_delay);
diff --git a/net/socket/tcp_listen_socket.h b/net/socket/tcp_listen_socket.h
index d726dcc84..1702e50 100644
--- a/net/socket/tcp_listen_socket.h
+++ b/net/socket/tcp_listen_socket.h
@@ -17,7 +17,7 @@ namespace net {
// Implements a TCP socket.
class NET_EXPORT TCPListenSocket : public StreamListenSocket {
public:
- virtual ~TCPListenSocket();
+ ~TCPListenSocket() override;
// Listen on port for the specified IP address. Use 127.0.0.1 to only
// accept local connections.
static scoped_ptr<TCPListenSocket> CreateAndListen(
@@ -34,7 +34,7 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del);
// Implements StreamListenSocket::Accept.
- virtual void Accept() override;
+ void Accept() override;
private:
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
@@ -44,10 +44,10 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
class NET_EXPORT TCPListenSocketFactory : public StreamListenSocketFactory {
public:
TCPListenSocketFactory(const std::string& ip, int port);
- virtual ~TCPListenSocketFactory();
+ ~TCPListenSocketFactory() override;
// StreamListenSocketFactory overrides.
- virtual scoped_ptr<StreamListenSocket> CreateAndListen(
+ scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const override;
private:
diff --git a/net/socket/tcp_listen_socket_unittest.h b/net/socket/tcp_listen_socket_unittest.h
index 9393370..984442a 100644
--- a/net/socket/tcp_listen_socket_unittest.h
+++ b/net/socket/tcp_listen_socket_unittest.h
@@ -90,11 +90,12 @@ class TCPListenSocketTester :
virtual bool Send(SocketDescriptor sock, const std::string& str);
// StreamListenSocket::Delegate:
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override;
- virtual void DidRead(StreamListenSocket* connection, const char* data,
- int len) override;
- virtual void DidClose(StreamListenSocket* sock) override;
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override;
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int len) override;
+ void DidClose(StreamListenSocket* sock) override;
scoped_ptr<base::Thread> thread_;
base::MessageLoopForIO* loop_;
@@ -111,7 +112,7 @@ class TCPListenSocketTester :
private:
friend class base::RefCountedThreadSafe<TCPListenSocketTester>;
- virtual ~TCPListenSocketTester();
+ ~TCPListenSocketTester() override;
virtual scoped_ptr<TCPListenSocket> DoListen();
diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h
index 9fc719ad..a3919e6 100644
--- a/net/socket/tcp_server_socket.h
+++ b/net/socket/tcp_server_socket.h
@@ -19,13 +19,13 @@ namespace net {
class NET_EXPORT_PRIVATE TCPServerSocket : public ServerSocket {
public:
TCPServerSocket(NetLog* net_log, const NetLog::Source& source);
- virtual ~TCPServerSocket();
+ ~TCPServerSocket() override;
// net::ServerSocket implementation.
- virtual int Listen(const IPEndPoint& address, int backlog) override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int Accept(scoped_ptr<StreamSocket>* socket,
- const CompletionCallback& callback) override;
+ int Listen(const IPEndPoint& address, int backlog) override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int Accept(scoped_ptr<StreamSocket>* socket,
+ const CompletionCallback& callback) override;
private:
// Converts |accepted_socket_| and stores the result in
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h
index 14af726..15cef5c 100644
--- a/net/socket/transport_client_socket_pool.h
+++ b/net/socket/transport_client_socket_pool.h
@@ -164,10 +164,10 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob {
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~TransportConnectJob();
+ ~TransportConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
// Rolls |addrlist| forward until the first IPv4 address, if any.
// WARNING: this method should only be used to implement the prefer-IPv4 hack.
@@ -194,7 +194,7 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob {
// Begins the host resolution and the TCP connect. Returns OK on success
// and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
TransportConnectJobHelper helper_;
@@ -223,43 +223,41 @@ class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool {
ClientSocketFactory* client_socket_factory,
NetLog* net_log);
- virtual ~TransportClientSocketPool();
+ ~TransportClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* resolve_info,
- 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;
- virtual 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;
- virtual void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ int RequestSocket(const std::string& group_name,
+ const void* resolve_info,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
+ void FlushWithError(int error) override;
+ void CloseIdleSockets() override;
+ int IdleSocketCount() const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ base::TimeDelta ConnectionTimeout() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// HigherLayeredPool implementation.
- virtual bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ bool IsStalled() const override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
protected:
// Methods shared with WebSocketTransportClientSocketPool
@@ -280,16 +278,16 @@ class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool {
host_resolver_(host_resolver),
net_log_(net_log) {}
- virtual ~TransportConnectJobFactory() {}
+ ~TransportConnectJobFactory() override {}
// 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:
ClientSocketFactory* const client_socket_factory_;
diff --git a/net/socket/transport_client_socket_pool_test_util.cc b/net/socket/transport_client_socket_pool_test_util.cc
index bfe6922..82ed8e6 100644
--- a/net/socket/transport_client_socket_pool_test_util.cc
+++ b/net/socket/transport_client_socket_pool_test_util.cc
@@ -38,19 +38,19 @@ class MockConnectClientSocket : public StreamSocket {
use_tcp_fastopen_(false) {}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
connected_ = true;
return OK;
}
- virtual void Disconnect() override { connected_ = false; }
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override { return connected_; }
+ void Disconnect() override { connected_ = false; }
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override { return connected_; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
*address = addrlist_.front();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!connected_)
return ERR_SOCKET_NOT_CONNECTED;
if (addrlist_.front().GetFamily() == ADDRESS_FAMILY_IPV4)
@@ -59,34 +59,30 @@ class MockConnectClientSocket : public StreamSocket {
SetIPv6Address(address);
return OK;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
bool connected_;
@@ -105,49 +101,45 @@ class MockFailingClientSocket : public StreamSocket {
use_tcp_fastopen_(false) {}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_CONNECTION_FAILED;
}
- virtual void Disconnect() override {}
+ void Disconnect() override {}
- virtual bool IsConnected() const override { return false; }
- virtual bool IsConnectedAndIdle() const override { return false; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return false; }
+ bool IsConnectedAndIdle() const override { return false; }
+ int GetPeerAddress(IPEndPoint* address) const override {
return ERR_UNEXPECTED;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return ERR_UNEXPECTED;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
const AddressList addrlist_;
@@ -211,21 +203,21 @@ class MockTriggerableClientSocket : public StreamSocket {
}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
DCHECK(callback_.is_null());
callback_ = callback;
return ERR_IO_PENDING;
}
- virtual void Disconnect() override {}
+ void Disconnect() override {}
- virtual bool IsConnected() const override { return is_connected_; }
- virtual bool IsConnectedAndIdle() const override { return is_connected_; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return is_connected_; }
+ bool IsConnectedAndIdle() const override { return is_connected_; }
+ int GetPeerAddress(IPEndPoint* address) const override {
*address = addrlist_.front();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!is_connected_)
return ERR_SOCKET_NOT_CONNECTED;
if (addrlist_.front().GetFamily() == ADDRESS_FAMILY_IPV4)
@@ -234,35 +226,31 @@ class MockTriggerableClientSocket : public StreamSocket {
SetIPv6Address(address);
return OK;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
void DoCallback() {
diff --git a/net/socket/transport_client_socket_pool_test_util.h b/net/socket/transport_client_socket_pool_test_util.h
index b4adb71..b375353 100644
--- a/net/socket/transport_client_socket_pool_test_util.h
+++ b/net/socket/transport_client_socket_pool_test_util.h
@@ -67,26 +67,26 @@ class MockTransportClientSocketFactory : public ClientSocketFactory {
};
explicit MockTransportClientSocketFactory(NetLog* net_log);
- virtual ~MockTransportClientSocketFactory();
+ ~MockTransportClientSocketFactory() override;
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* /* net_log */,
const NetLog::Source& /* source */) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
int allocation_count() const { return allocation_count_; }
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index 2a05b44..e3e9873 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -465,7 +465,7 @@ class RequestSocketCallback : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 8bfb674..ed68bf1 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -47,19 +47,19 @@ class TransportClientSocketTest
}
// Implement StreamListenSocket::Delegate methods
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override {
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override {
connected_sock_.reset(
static_cast<TCPListenSocket*>(connection.release()));
}
- virtual void DidRead(StreamListenSocket*, const char* str, int len) override {
+ void DidRead(StreamListenSocket*, const char* str, int len) override {
// TODO(dkegel): this might not be long enough to tickle some bugs.
connected_sock_->Send(kServerReply, arraysize(kServerReply) - 1,
false /* Don't append line feed */);
if (close_server_socket_on_next_send_)
CloseServerSocket();
}
- virtual void DidClose(StreamListenSocket* sock) override {}
+ void DidClose(StreamListenSocket* sock) override {}
// Testcase hooks
virtual void SetUp();
diff --git a/net/socket/unix_domain_client_socket_posix.h b/net/socket/unix_domain_client_socket_posix.h
index e70694a..2a8bdb6 100644
--- a/net/socket/unix_domain_client_socket_posix.h
+++ b/net/socket/unix_domain_client_socket_posix.h
@@ -32,7 +32,7 @@ class NET_EXPORT UnixDomainClientSocket : public StreamSocket {
// UnixDomainServerSocket uses this after it accepts a connection.
explicit UnixDomainClientSocket(scoped_ptr<SocketLibevent> socket);
- virtual ~UnixDomainClientSocket();
+ ~UnixDomainClientSocket() override;
// Fills |address| with |socket_path| and its length. For Android or Linux
// platform, this supports abstract namespaces.
@@ -41,28 +41,30 @@ class NET_EXPORT UnixDomainClientSocket : public StreamSocket {
SockaddrStorage* address);
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) 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;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) 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;
+ 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;
// Releases ownership of underlying SocketDescriptor to caller.
// Internal state is reset so that this object can be used again.
diff --git a/net/socket/unix_domain_listen_socket_posix.h b/net/socket/unix_domain_listen_socket_posix.h
index 8b9ba8e..b8f428d 100644
--- a/net/socket/unix_domain_listen_socket_posix.h
+++ b/net/socket/unix_domain_listen_socket_posix.h
@@ -30,7 +30,7 @@ class NET_EXPORT UnixDomainListenSocket : public StreamListenSocket {
public:
typedef UnixDomainServerSocket::AuthCallback AuthCallback;
- virtual ~UnixDomainListenSocket();
+ ~UnixDomainListenSocket() override;
// Note that the returned UnixDomainListenSocket instance does not take
// ownership of |del|.
@@ -64,7 +64,7 @@ class NET_EXPORT UnixDomainListenSocket : public StreamListenSocket {
bool use_abstract_namespace);
// StreamListenSocket:
- virtual void Accept() override;
+ void Accept() override;
AuthCallback auth_callback_;
@@ -79,10 +79,10 @@ class NET_EXPORT UnixDomainListenSocketFactory
UnixDomainListenSocketFactory(
const std::string& path,
const UnixDomainListenSocket::AuthCallback& auth_callback);
- virtual ~UnixDomainListenSocketFactory();
+ ~UnixDomainListenSocketFactory() override;
// StreamListenSocketFactory:
- virtual scoped_ptr<StreamListenSocket> CreateAndListen(
+ scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const override;
protected:
diff --git a/net/socket/unix_domain_listen_socket_posix_unittest.cc b/net/socket/unix_domain_listen_socket_posix_unittest.cc
index bea60c6..bfa9200 100644
--- a/net/socket/unix_domain_listen_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_listen_socket_posix_unittest.cc
@@ -94,16 +94,16 @@ class TestListenSocketDelegate : public StreamListenSocket::Delegate {
const scoped_refptr<EventManager>& event_manager)
: event_manager_(event_manager) {}
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override {
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override {
LOG(ERROR) << __PRETTY_FUNCTION__;
connection_ = connection.Pass();
Notify(EVENT_ACCEPT);
}
- virtual void DidRead(StreamListenSocket* connection,
- const char* data,
- int len) override {
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int len) override {
{
base::AutoLock lock(mutex_);
DCHECK(len);
@@ -112,9 +112,7 @@ class TestListenSocketDelegate : public StreamListenSocket::Delegate {
Notify(EVENT_READ);
}
- virtual void DidClose(StreamListenSocket* sock) override {
- Notify(EVENT_CLOSE);
- }
+ void DidClose(StreamListenSocket* sock) override { Notify(EVENT_CLOSE); }
void OnListenCompleted() {
Notify(EVENT_LISTEN);
diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h
index 8fd8b34..0a26eb3 100644
--- a/net/socket/unix_domain_server_socket_posix.h
+++ b/net/socket/unix_domain_server_socket_posix.h
@@ -44,20 +44,20 @@ class NET_EXPORT UnixDomainServerSocket : public ServerSocket {
UnixDomainServerSocket(const AuthCallback& auth_callack,
bool use_abstract_namespace);
- virtual ~UnixDomainServerSocket();
+ ~UnixDomainServerSocket() override;
// Gets credentials of peer to check permissions.
static bool GetPeerCredentials(SocketDescriptor socket_fd,
Credentials* credentials);
// ServerSocket implementation.
- virtual int Listen(const IPEndPoint& address, int backlog) override;
- virtual int ListenWithAddressAndPort(const std::string& unix_domain_path,
- int port_unused,
- int backlog) override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int Accept(scoped_ptr<StreamSocket>* socket,
- const CompletionCallback& callback) override;
+ int Listen(const IPEndPoint& address, int backlog) override;
+ int ListenWithAddressAndPort(const std::string& unix_domain_path,
+ int port_unused,
+ int backlog) override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int Accept(scoped_ptr<StreamSocket>* socket,
+ const CompletionCallback& callback) override;
// Accepts an incoming connection on |listen_socket_|, but passes back
// a raw SocketDescriptor instead of a StreamSocket.
diff --git a/net/socket/websocket_endpoint_lock_manager_unittest.cc b/net/socket/websocket_endpoint_lock_manager_unittest.cc
index cafd1aa..01c9dbc 100644
--- a/net/socket/websocket_endpoint_lock_manager_unittest.cc
+++ b/net/socket/websocket_endpoint_lock_manager_unittest.cc
@@ -22,57 +22,51 @@ class FakeStreamSocket : public StreamSocket {
FakeStreamSocket() {}
// StreamSocket implementation
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual void Disconnect() override { return; }
+ void Disconnect() override { return; }
- virtual bool IsConnected() const override { return false; }
+ bool IsConnected() const override { return false; }
- virtual bool IsConnectedAndIdle() const override { return false; }
+ bool IsConnectedAndIdle() const override { return false; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
- return ERR_FAILED;
- }
+ int GetPeerAddress(IPEndPoint* address) const override { return ERR_FAILED; }
- virtual int GetLocalAddress(IPEndPoint* address) const override {
- return ERR_FAILED;
- }
+ int GetLocalAddress(IPEndPoint* address) const override { return ERR_FAILED; }
- virtual const BoundNetLog& NetLog() const override { return bound_net_log_; }
+ const BoundNetLog& NetLog() const override { return bound_net_log_; }
- virtual void SetSubresourceSpeculation() override { return; }
- virtual void SetOmniboxSpeculation() override { return; }
+ void SetSubresourceSpeculation() override { return; }
+ void SetOmniboxSpeculation() override { return; }
- virtual bool WasEverUsed() const override { return false; }
+ bool WasEverUsed() const override { return false; }
- virtual bool UsingTCPFastOpen() const override { return false; }
+ bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return ERR_FAILED; }
+ int SetReceiveBufferSize(int32 size) override { return ERR_FAILED; }
- virtual int SetSendBufferSize(int32 size) override { return ERR_FAILED; }
+ int SetSendBufferSize(int32 size) override { return ERR_FAILED; }
private:
BoundNetLog bound_net_log_;
@@ -84,7 +78,7 @@ class FakeWaiter : public WebSocketEndpointLockManager::Waiter {
public:
FakeWaiter() : called_(false) {}
- virtual void GotEndpointLock() override {
+ void GotEndpointLock() override {
CHECK(!called_);
called_ = true;
}
diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h
index e918354..f0a94be 100644
--- a/net/socket/websocket_transport_client_socket_pool.h
+++ b/net/socket/websocket_transport_client_socket_pool.h
@@ -53,7 +53,7 @@ class NET_EXPORT_PRIVATE WebSocketTransportConnectJob : public ConnectJob {
Delegate* delegate,
NetLog* pool_net_log,
const BoundNetLog& request_net_log);
- virtual ~WebSocketTransportConnectJob();
+ ~WebSocketTransportConnectJob() override;
// Unlike normal socket pools, the WebSocketTransportClientPool uses
// early-binding of sockets.
@@ -65,7 +65,7 @@ class NET_EXPORT_PRIVATE WebSocketTransportConnectJob : public ConnectJob {
const BoundNetLog& request_net_log() const { return request_net_log_; }
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
private:
friend class WebSocketTransportConnectSubJob;
@@ -90,7 +90,7 @@ class NET_EXPORT_PRIVATE WebSocketTransportConnectJob : public ConnectJob {
// Begins the host resolution and the TCP connect. Returns OK on success
// and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
TransportConnectJobHelper helper_;
@@ -123,7 +123,7 @@ class NET_EXPORT_PRIVATE WebSocketTransportClientSocketPool
ClientSocketFactory* client_socket_factory,
NetLog* net_log);
- virtual ~WebSocketTransportClientSocketPool();
+ ~WebSocketTransportClientSocketPool() override;
// Allow another connection to be started to the IPEndPoint that this |handle|
// is connected to. Used when the WebSocket handshake completes successfully.
@@ -133,46 +133,44 @@ class NET_EXPORT_PRIVATE WebSocketTransportClientSocketPool
static void UnlockEndpoint(ClientSocketHandle* handle);
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* resolve_info,
- 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;
- virtual 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;
- virtual void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ int RequestSocket(const std::string& group_name,
+ const void* resolve_info,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
+ void FlushWithError(int error) override;
+ void CloseIdleSockets() override;
+ int IdleSocketCount() const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ base::TimeDelta ConnectionTimeout() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// HigherLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
private:
class ConnectJobDelegate : public ConnectJob::Delegate {
public:
explicit ConnectJobDelegate(WebSocketTransportClientSocketPool* owner);
- virtual ~ConnectJobDelegate();
+ ~ConnectJobDelegate() override;
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override;
+ void OnConnectJobComplete(int result, ConnectJob* job) override;
private:
WebSocketTransportClientSocketPool* owner_;
diff --git a/net/socket/websocket_transport_client_socket_pool_unittest.cc b/net/socket/websocket_transport_client_socket_pool_unittest.cc
index bfb2090..4d04c10 100644
--- a/net/socket/websocket_transport_client_socket_pool_unittest.cc
+++ b/net/socket/websocket_transport_client_socket_pool_unittest.cc
@@ -382,7 +382,7 @@ class RequestSocketCallback : public TestCompletionCallbackBase {
callback_(base::Bind(&RequestSocketCallback::OnComplete,
base::Unretained(this))) {}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/socket/websocket_transport_connect_sub_job.h b/net/socket/websocket_transport_connect_sub_job.h
index e6f81e82..5709a46 100644
--- a/net/socket/websocket_transport_connect_sub_job.h
+++ b/net/socket/websocket_transport_connect_sub_job.h
@@ -33,7 +33,7 @@ class WebSocketTransportConnectSubJob
WebSocketTransportConnectJob* parent_job,
SubJobType type);
- virtual ~WebSocketTransportConnectSubJob();
+ ~WebSocketTransportConnectSubJob() override;
// Start connecting.
int Start();
@@ -47,7 +47,7 @@ class WebSocketTransportConnectSubJob
scoped_ptr<StreamSocket> PassSocket() { return transport_socket_.Pass(); }
// Implementation of WebSocketEndpointLockManager::EndpointWaiter.
- virtual void GotEndpointLock() override;
+ void GotEndpointLock() override;
private:
enum State {
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index c9de0c1..7387eb6 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -212,7 +212,7 @@ class NET_EXPORT SocketStream
std::string headers_;
private:
- virtual ~RequestHeaders();
+ ~RequestHeaders() override;
};
class ResponseHeaders : public IOBuffer {
@@ -225,7 +225,7 @@ class NET_EXPORT SocketStream
void Realloc(size_t new_size);
private:
- virtual ~ResponseHeaders();
+ ~ResponseHeaders() override;
scoped_ptr<char, base::FreeDeleter> headers_;
};
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index 7c4b50e..6d47086 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -59,7 +59,7 @@ class SocketStreamEventRecorder : public SocketStream::Delegate {
// with the error code.
explicit SocketStreamEventRecorder(const CompletionCallback& callback)
: callback_(callback) {}
- virtual ~SocketStreamEventRecorder() {}
+ ~SocketStreamEventRecorder() override {}
void SetOnStartOpenConnection(
const base::Callback<int(SocketStreamEvent*)>& callback) {
@@ -88,9 +88,8 @@ class SocketStreamEventRecorder : public SocketStream::Delegate {
on_error_ = callback;
}
- virtual int OnStartOpenConnection(
- SocketStream* socket,
- const CompletionCallback& callback) override {
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override {
connection_callback_ = callback;
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
@@ -99,8 +98,8 @@ class SocketStreamEventRecorder : public SocketStream::Delegate {
return on_start_open_connection_.Run(&events_.back());
return OK;
}
- virtual void OnConnected(SocketStream* socket,
- int num_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int num_pending_send_allowed) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_CONNECTED,
socket, num_pending_send_allowed, std::string(),
@@ -108,23 +107,23 @@ class SocketStreamEventRecorder : public SocketStream::Delegate {
if (!on_connected_.is_null())
on_connected_.Run(&events_.back());
}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_SENT_DATA, socket,
amount_sent, std::string(), NULL, OK));
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_RECEIVED_DATA, socket, len,
std::string(data, len), NULL, OK));
if (!on_received_data_.is_null())
on_received_data_.Run(&events_.back());
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_CLOSE, socket, 0,
std::string(), NULL, OK));
@@ -133,15 +132,15 @@ class SocketStreamEventRecorder : public SocketStream::Delegate {
if (!callback_.is_null())
callback_.Run(OK);
}
- virtual void OnAuthRequired(SocketStream* socket,
- AuthChallengeInfo* auth_info) override {
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_AUTH_REQUIRED, socket, 0,
std::string(), auth_info, OK));
if (!on_auth_required_.is_null())
on_auth_required_.Run(&events_.back());
}
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_ERROR, NULL, 0,
std::string(), NULL, error));
@@ -195,10 +194,10 @@ class SelfDeletingDelegate : public SocketStream::Delegate {
explicit SelfDeletingDelegate(const CompletionCallback& callback)
: socket_stream_(), callback_(callback) {}
- virtual ~SelfDeletingDelegate() {}
+ ~SelfDeletingDelegate() override {}
// Call DetachDelegate(), delete |this|, then run the callback.
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
// callback_ will be deleted when we delete |this|, so copy it to call it
// afterwards.
CompletionCallback callback = callback_;
@@ -214,18 +213,19 @@ class SelfDeletingDelegate : public SocketStream::Delegate {
EXPECT_EQ(socket_stream_->delegate(), this);
}
- virtual void OnConnected(SocketStream* socket, int max_pending_send_allowed)
- override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
ADD_FAILURE() << "OnConnected() should not be called";
}
- virtual void OnSentData(SocketStream* socket, int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
ADD_FAILURE() << "OnSentData() should not be called";
}
- virtual void OnReceivedData(SocketStream* socket, const char* data, int len)
- override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
ADD_FAILURE() << "OnReceivedData() should not be called";
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
ADD_FAILURE() << "OnClose() should not be called";
}
@@ -243,18 +243,17 @@ class TestURLRequestContextWithProxy : public TestURLRequestContext {
context_storage_.set_proxy_service(ProxyService::CreateFixed(proxy));
Init();
}
- virtual ~TestURLRequestContextWithProxy() {}
+ ~TestURLRequestContextWithProxy() override {}
};
class TestSocketStreamNetworkDelegate : public TestNetworkDelegate {
public:
TestSocketStreamNetworkDelegate()
: before_connect_result_(OK) {}
- virtual ~TestSocketStreamNetworkDelegate() {}
+ ~TestSocketStreamNetworkDelegate() override {}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return before_connect_result_;
}
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h
index fba98d7..02fa583 100644
--- a/net/spdy/buffered_spdy_framer.h
+++ b/net/spdy/buffered_spdy_framer.h
@@ -121,7 +121,7 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramer
public:
BufferedSpdyFramer(SpdyMajorVersion version,
bool enable_compression);
- virtual ~BufferedSpdyFramer();
+ ~BufferedSpdyFramer() override;
// Sets callbacks to be called from the buffered spdy framer. A visitor must
// be set, or else the framer will likely crash. It is acceptable for the
@@ -135,41 +135,39 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramer
void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor);
// SpdyFramerVisitorInterface
- virtual void OnError(SpdyFramer* spdy_framer) override;
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override;
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override;
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override;
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override;
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override;
- virtual void OnSettings(bool clear_persisted) override;
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override;
- virtual void OnSettingsAck() override;
- virtual void OnSettingsEnd() override;
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override;
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override;
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override;
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override;
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override;
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override;
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override;
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
+ void OnError(SpdyFramer* spdy_framer) override;
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override;
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override;
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override;
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override;
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override;
+ void OnSettings(bool clear_persisted) override;
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override;
+ void OnSettingsAck() override;
+ void OnSettingsEnd() override;
+ void OnPing(SpdyPingId unique_id, bool is_ack) override;
+ void OnRstStream(SpdyStreamId stream_id, SpdyRstStreamStatus status) override;
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override;
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override;
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override;
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override;
+ void OnContinuation(SpdyStreamId stream_id, bool end) override;
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
// SpdyFramer methods.
size_t ProcessInput(const char* data, size_t len);
diff --git a/net/spdy/buffered_spdy_framer_unittest.cc b/net/spdy/buffered_spdy_framer_unittest.cc
index 0fc758b..6be20dd 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -25,79 +25,74 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
promised_stream_id_(static_cast<SpdyStreamId>(-1)) {
}
- virtual void OnError(SpdyFramer::SpdyError error_code) override {
+ void OnError(SpdyFramer::SpdyError error_code) override {
LOG(INFO) << "SpdyFramer Error: " << error_code;
error_count_++;
}
- virtual void OnStreamError(
- SpdyStreamId stream_id,
- const std::string& description) override {
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override {
LOG(INFO) << "SpdyFramer Error on stream: " << stream_id << " "
<< description;
error_count_++;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
syn_frame_count_++;
headers_ = headers;
}
- virtual void OnSynReply(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
syn_reply_frame_count_++;
headers_ = headers;
}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
headers_frame_count_++;
headers_ = headers;
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
ADD_FAILURE() << "Unexpected OnDataFrameHeader call.";
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
LOG(FATAL) << "Unexpected OnStreamFrameData call.";
}
- virtual void OnSettings(bool clear_persisted) override {}
+ void OnSettings(bool clear_persisted) override {}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
setting_count_++;
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {}
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
- }
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
- }
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {}
bool OnCredentialFrameData(const char*, size_t) {
LOG(FATAL) << "Unexpected OnCredentialFrameData call.";
@@ -111,12 +106,12 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
void OnRstStream(const SpdyFrame& frame) {}
void OnGoAway(const SpdyFrame& frame) {}
void OnPing(const SpdyFrame& frame) {}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {}
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
push_promise_frame_count_++;
@@ -125,7 +120,7 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
headers_ = headers;
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
return true;
}
diff --git a/net/spdy/spdy_buffer.cc b/net/spdy/spdy_buffer.cc
index 0a69cd3..c1a602e 100644
--- a/net/spdy/spdy_buffer.cc
+++ b/net/spdy/spdy_buffer.cc
@@ -45,7 +45,7 @@ class SpdyBuffer::SharedFrameIOBuffer : public IOBuffer {
offset_(offset) {}
private:
- virtual ~SharedFrameIOBuffer() {
+ ~SharedFrameIOBuffer() override {
// Prevent ~IOBuffer() from trying to delete |data_|.
data_ = NULL;
}
diff --git a/net/spdy/spdy_buffer_producer.h b/net/spdy/spdy_buffer_producer.h
index d8777af..d098bb9 100644
--- a/net/spdy/spdy_buffer_producer.h
+++ b/net/spdy/spdy_buffer_producer.h
@@ -35,9 +35,9 @@ class NET_EXPORT_PRIVATE SimpleBufferProducer : public SpdyBufferProducer {
public:
explicit SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer);
- virtual ~SimpleBufferProducer();
+ ~SimpleBufferProducer() override;
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override;
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override;
private:
scoped_ptr<SpdyBuffer> buffer_;
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 6affd7b..9d7ea87 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -2839,53 +2839,50 @@ namespace {
class FrameSerializationVisitor : public SpdyFrameVisitor {
public:
explicit FrameSerializationVisitor(SpdyFramer* framer) : framer_(framer) {}
- virtual ~FrameSerializationVisitor() {}
+ ~FrameSerializationVisitor() override {}
SpdySerializedFrame* ReleaseSerializedFrame() { return frame_.release(); }
- virtual void VisitData(const SpdyDataIR& data) override {
+ void VisitData(const SpdyDataIR& data) override {
frame_.reset(framer_->SerializeData(data));
}
- virtual void VisitSynStream(const SpdySynStreamIR& syn_stream) override {
+ void VisitSynStream(const SpdySynStreamIR& syn_stream) override {
frame_.reset(framer_->SerializeSynStream(syn_stream));
}
- virtual void VisitSynReply(const SpdySynReplyIR& syn_reply) override {
+ void VisitSynReply(const SpdySynReplyIR& syn_reply) override {
frame_.reset(framer_->SerializeSynReply(syn_reply));
}
- virtual void VisitRstStream(const SpdyRstStreamIR& rst_stream) override {
+ void VisitRstStream(const SpdyRstStreamIR& rst_stream) override {
frame_.reset(framer_->SerializeRstStream(rst_stream));
}
- virtual void VisitSettings(const SpdySettingsIR& settings) override {
+ void VisitSettings(const SpdySettingsIR& settings) override {
frame_.reset(framer_->SerializeSettings(settings));
}
- virtual void VisitPing(const SpdyPingIR& ping) override {
+ void VisitPing(const SpdyPingIR& ping) override {
frame_.reset(framer_->SerializePing(ping));
}
- virtual void VisitGoAway(const SpdyGoAwayIR& goaway) override {
+ void VisitGoAway(const SpdyGoAwayIR& goaway) override {
frame_.reset(framer_->SerializeGoAway(goaway));
}
- virtual void VisitHeaders(const SpdyHeadersIR& headers) override {
+ void VisitHeaders(const SpdyHeadersIR& headers) override {
frame_.reset(framer_->SerializeHeaders(headers));
}
- virtual void VisitWindowUpdate(
- const SpdyWindowUpdateIR& window_update) override {
+ void VisitWindowUpdate(const SpdyWindowUpdateIR& window_update) override {
frame_.reset(framer_->SerializeWindowUpdate(window_update));
}
- virtual void VisitBlocked(const SpdyBlockedIR& blocked) override {
+ void VisitBlocked(const SpdyBlockedIR& blocked) override {
frame_.reset(framer_->SerializeBlocked(blocked));
}
- virtual void VisitPushPromise(
- const SpdyPushPromiseIR& push_promise) override {
+ void VisitPushPromise(const SpdyPushPromiseIR& push_promise) override {
frame_.reset(framer_->SerializePushPromise(push_promise));
}
- virtual void VisitContinuation(
- const SpdyContinuationIR& continuation) override {
+ void VisitContinuation(const SpdyContinuationIR& continuation) override {
frame_.reset(framer_->SerializeContinuation(continuation));
}
- virtual void VisitAltSvc(const SpdyAltSvcIR& altsvc) override {
+ void VisitAltSvc(const SpdyAltSvcIR& altsvc) override {
frame_.reset(framer_->SerializeAltSvc(altsvc));
}
- virtual void VisitPriority(const SpdyPriorityIR& priority) override {
+ void VisitPriority(const SpdyPriorityIR& priority) override {
frame_.reset(framer_->SerializePriority(priority));
}
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 982e75c..35b8a46 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -82,22 +82,22 @@ class SpdyFramerTestUtil {
buffer_.reset(new char[kMaxDecompressedSize]);
}
- virtual void OnError(SpdyFramer* framer) override { LOG(FATAL); }
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnError(SpdyFramer* framer) override { LOG(FATAL); }
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
LOG(FATAL) << "Unexpected data frame header";
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
LOG(FATAL);
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
CHECK(buffer_.get() != NULL);
CHECK_GE(kMaxDecompressedSize, size_ + len);
CHECK(!finished_);
@@ -111,11 +111,11 @@ class SpdyFramerTestUtil {
return true;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdySynStreamIR syn_stream(stream_id);
@@ -129,7 +129,7 @@ class SpdyFramerTestUtil {
size_ += framer.GetSynStreamMinimumSize();
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
@@ -140,27 +140,21 @@ class SpdyFramerTestUtil {
size_ += framer.GetSynStreamMinimumSize();
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
LOG(FATAL);
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
LOG(FATAL);
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
- LOG(FATAL);
- }
- virtual void OnSettingsEnd() override { LOG(FATAL); }
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnPing(SpdyPingId unique_id, bool is_ack) override { LOG(FATAL); }
+ void OnSettingsEnd() override { LOG(FATAL); }
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
LOG(FATAL);
}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
@@ -175,9 +169,9 @@ class SpdyFramerTestUtil {
LOG(FATAL);
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyPushPromiseIR push_promise(stream_id, promised_stream_id);
@@ -187,19 +181,18 @@ class SpdyFramerTestUtil {
size_ += framer.GetPushPromiseMinimumSize();
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
LOG(FATAL);
}
- virtual void OnPriority(SpdyStreamId stream_id,
- SpdyStreamId parent_stream_id,
- uint8 weight,
- bool exclusive) override {
+ void OnPriority(SpdyStreamId stream_id,
+ SpdyStreamId parent_stream_id,
+ uint8 weight,
+ bool exclusive) override {
// Do nothing.
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id,
- int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
LOG(FATAL);
return false;
}
@@ -209,8 +202,8 @@ class SpdyFramerTestUtil {
return buffer_.release();
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
LOG(FATAL);
}
@@ -277,23 +270,23 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
header_control_type_(DATA),
header_buffer_valid_(false) {}
- virtual void OnError(SpdyFramer* f) override {
+ void OnError(SpdyFramer* f) override {
LOG(INFO) << "SpdyFramer Error: "
<< SpdyFramer::ErrorCodeToString(f->error_code());
++error_count_;
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
++data_frame_count_;
header_stream_id_ = stream_id;
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
EXPECT_EQ(header_stream_id_, stream_id);
if (len == 0)
++zero_length_data_frame_count_;
@@ -308,9 +301,9 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
std::cerr << "\", " << len << ")\n";
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
++control_frame_header_data_count_;
CHECK_EQ(header_stream_id_, stream_id);
if (len == 0) {
@@ -335,11 +328,11 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
return true;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
++syn_frame_count_;
if (framer_.protocol_version() > SPDY3) {
InitHeaderStreaming(HEADERS, stream_id);
@@ -351,7 +344,7 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
}
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
++syn_reply_frame_count_;
if (framer_.protocol_version() > SPDY3) {
InitHeaderStreaming(HEADERS, stream_id);
@@ -363,45 +356,40 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
}
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
++fin_frame_count_;
}
- virtual bool OnRstStreamFrameData(const char* rst_stream_data,
- size_t len) override {
+ bool OnRstStreamFrameData(const char* rst_stream_data, size_t len) override {
if ((rst_stream_data != NULL) && (len > 0)) {
fin_opaque_data_ += std::string(rst_stream_data, len);
}
return true;
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
++setting_count_;
}
- virtual void OnSettingsAck() override {
+ void OnSettingsAck() override {
DCHECK_LT(SPDY3, framer_.protocol_version());
++settings_ack_received_;
}
- virtual void OnSettingsEnd() override {
+ void OnSettingsEnd() override {
if (framer_.protocol_version() <= SPDY3) { return; }
++settings_ack_sent_;
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
- DLOG(FATAL);
- }
+ void OnPing(SpdyPingId unique_id, bool is_ack) override { DLOG(FATAL); }
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
++goaway_count_;
}
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
++headers_frame_count_;
InitHeaderStreaming(HEADERS, stream_id);
if (fin) {
@@ -409,31 +397,31 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
}
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
last_window_update_stream_ = stream_id;
last_window_update_delta_ = delta_window_size;
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
++push_promise_frame_count_;
InitHeaderStreaming(PUSH_PROMISE, stream_id);
last_push_promise_stream_ = stream_id;
last_push_promise_promised_stream_ = promised_stream_id;
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
++continuation_count_;
}
- virtual void OnAltSvc(SpdyStreamId stream_id,
- uint32 max_age,
- uint16 port,
- StringPiece protocol_id,
- StringPiece host,
- StringPiece origin) override {
+ void OnAltSvc(SpdyStreamId stream_id,
+ uint32 max_age,
+ uint16 port,
+ StringPiece protocol_id,
+ StringPiece host,
+ StringPiece origin) override {
test_altsvc_ir_.set_stream_id(stream_id);
test_altsvc_ir_.set_max_age(max_age);
test_altsvc_ir_.set_port(port);
@@ -445,29 +433,29 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
++altsvc_count_;
}
- virtual void OnPriority(SpdyStreamId stream_id,
- SpdyStreamId parent_stream_id,
- uint8 weight,
- bool exclusive) override {
+ void OnPriority(SpdyStreamId stream_id,
+ SpdyStreamId parent_stream_id,
+ uint8 weight,
+ bool exclusive) override {
++priority_count_;
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
DLOG(INFO) << "Unknown frame type " << frame_type;
return on_unknown_frame_result_;
}
- virtual void OnSendCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override {
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override {
last_payload_len_ = payload_len;
last_frame_len_ = frame_len;
}
- virtual void OnReceiveCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override {
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override {
last_frame_len_ = frame_len;
}
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index fe3c87d..db84be1 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -32,7 +32,7 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
public:
// |spdy_session| must not be NULL.
SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session, bool direct);
- virtual ~SpdyHttpStream();
+ ~SpdyHttpStream() override;
SpdyStream* stream() { return stream_.get(); }
@@ -41,47 +41,45 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
// HttpStream implementation.
- virtual 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;
- virtual UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
+
+ int SendRequest(const HttpRequestHeaders& headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ UploadProgress GetUploadProgress() const override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override;
+ HttpStream* RenewStreamForAuth() override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
// Must not be called if a NULL SpdySession was pssed into the
// constructor.
- virtual bool IsConnectionReused() const override;
-
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual 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;
- virtual void SetPriority(RequestPriority priority) override;
+ bool IsConnectionReused() const override;
+
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
// Must be called only when |request_info_| is non-NULL.
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index fc1b165..58dc73b 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1545,7 +1545,7 @@ class KillerCallback : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~KillerCallback() {}
+ ~KillerCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index cb9bdfe..c408f0a 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -559,7 +559,7 @@ class NET_EXPORT_PRIVATE SpdyFrameIR {
// to them.
class NET_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
public:
- virtual ~SpdyFrameWithStreamIdIR() {}
+ ~SpdyFrameWithStreamIdIR() override {}
SpdyStreamId stream_id() const { return stream_id_; }
void set_stream_id(SpdyStreamId stream_id) {
DCHECK_EQ(0u, stream_id & ~kStreamIdMask);
@@ -581,7 +581,7 @@ class NET_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
// flag. Implies SpdyFrameWithStreamIdIR.
class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR {
public:
- virtual ~SpdyFrameWithFinIR() {}
+ ~SpdyFrameWithFinIR() override {}
bool fin() const { return fin_; }
void set_fin(bool fin) { fin_ = fin; }
@@ -618,7 +618,7 @@ class NET_EXPORT_PRIVATE SpdyFrameWithNameValueBlockIR
protected:
explicit SpdyFrameWithNameValueBlockIR(SpdyStreamId stream_id);
- virtual ~SpdyFrameWithNameValueBlockIR();
+ ~SpdyFrameWithNameValueBlockIR() override;
private:
SpdyNameValueBlock name_value_block_;
@@ -635,7 +635,7 @@ class NET_EXPORT_PRIVATE SpdyDataIR
// Use in conjunction with SetDataShallow() for shallow-copy on data.
explicit SpdyDataIR(SpdyStreamId stream_id);
- virtual ~SpdyDataIR();
+ ~SpdyDataIR() override;
base::StringPiece data() const { return data_; }
@@ -663,7 +663,7 @@ class NET_EXPORT_PRIVATE SpdyDataIR
data_ = data;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
// Used to store data that this SpdyDataIR should own.
@@ -698,7 +698,7 @@ class NET_EXPORT_PRIVATE SpdySynStreamIR
unidirectional_ = unidirectional;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId associated_to_stream_id_;
@@ -713,7 +713,7 @@ class NET_EXPORT_PRIVATE SpdySynReplyIR : public SpdyFrameWithNameValueBlockIR {
explicit SpdySynReplyIR(SpdyStreamId stream_id)
: SpdyFrameWithNameValueBlockIR(stream_id) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
DISALLOW_COPY_AND_ASSIGN(SpdySynReplyIR);
@@ -724,7 +724,7 @@ class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR {
SpdyRstStreamIR(SpdyStreamId stream_id, SpdyRstStreamStatus status,
base::StringPiece description);
- virtual ~SpdyRstStreamIR();
+ ~SpdyRstStreamIR() override;
SpdyRstStreamStatus status() const {
return status_;
@@ -739,7 +739,7 @@ class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR {
description_ = description;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyRstStreamStatus status_;
@@ -763,7 +763,7 @@ class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR {
SpdySettingsIR();
- virtual ~SpdySettingsIR();
+ ~SpdySettingsIR() override;
// Overwrites as appropriate.
const ValueMap& values() const { return values_; }
@@ -785,7 +785,7 @@ class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR {
is_ack_ = is_ack;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
ValueMap values_;
@@ -804,7 +804,7 @@ class NET_EXPORT_PRIVATE SpdyPingIR : public SpdyFrameIR {
bool is_ack() const { return is_ack_; }
void set_is_ack(bool is_ack) { is_ack_ = is_ack; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyPingId id_;
@@ -817,7 +817,7 @@ class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR {
public:
SpdyGoAwayIR(SpdyStreamId last_good_stream_id, SpdyGoAwayStatus status,
const base::StringPiece& description);
- virtual ~SpdyGoAwayIR();
+ ~SpdyGoAwayIR() override;
SpdyStreamId last_good_stream_id() const { return last_good_stream_id_; }
void set_last_good_stream_id(SpdyStreamId last_good_stream_id) {
DCHECK_LE(0u, last_good_stream_id);
@@ -832,7 +832,7 @@ class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR {
const base::StringPiece& description() const;
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId last_good_stream_id_;
@@ -849,7 +849,7 @@ class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithNameValueBlockIR {
has_priority_(false),
priority_(0) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
bool has_priority() const { return has_priority_; }
void set_has_priority(bool has_priority) { has_priority_ = has_priority; }
@@ -876,7 +876,7 @@ class NET_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR {
delta_ = delta;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
int32 delta_;
@@ -890,7 +890,7 @@ class NET_EXPORT_PRIVATE SpdyBlockedIR
explicit SpdyBlockedIR(SpdyStreamId stream_id)
: SpdyFrameWithStreamIdIR(stream_id) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
DISALLOW_COPY_AND_ASSIGN(SpdyBlockedIR);
@@ -905,7 +905,7 @@ class NET_EXPORT_PRIVATE SpdyPushPromiseIR
SpdyStreamId promised_stream_id() const { return promised_stream_id_; }
void set_promised_stream_id(SpdyStreamId id) { promised_stream_id_ = id; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId promised_stream_id_;
@@ -921,7 +921,7 @@ class NET_EXPORT_PRIVATE SpdyContinuationIR
: SpdyFrameWithNameValueBlockIR(stream_id),
end_headers_(false) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
bool end_headers() const { return end_headers_; }
void set_end_headers(bool end_headers) {end_headers_ = end_headers;}
@@ -955,7 +955,7 @@ class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
origin_ = origin;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
uint32 max_age_;
@@ -980,7 +980,7 @@ class NET_EXPORT_PRIVATE SpdyPriorityIR : public SpdyFrameWithStreamIdIR {
bool exclusive() const { return exclusive_; }
void set_exclusive(bool exclusive) { exclusive_ = exclusive; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId parent_stream_id_;
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index 3b0736c..806af73 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -54,50 +54,49 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
// On destruction Disconnect() is called.
- virtual ~SpdyProxyClientSocket();
+ ~SpdyProxyClientSocket() override;
// ProxyClientSocket methods:
- virtual const HttpResponseInfo* GetConnectResponseInfo() const override;
- virtual HttpStream* CreateConnectResponseStream() override;
- virtual const scoped_refptr<HttpAuthController>& GetAuthController() const
- override;
- virtual int RestartWithAuth(const CompletionCallback& callback) override;
- virtual bool IsUsingSpdy() const override;
- virtual NextProto GetProtocolNegotiated() const override;
+ const HttpResponseInfo* GetConnectResponseInfo() const override;
+ HttpStream* CreateConnectResponseStream() override;
+ const scoped_refptr<HttpAuthController>& GetAuthController() const override;
+ int RestartWithAuth(const CompletionCallback& callback) 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;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
enum State {
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 13e6624..26785c6 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -1317,8 +1317,7 @@ class DeleteSockCallback : public TestCompletionCallbackBase {
base::Unretained(this))) {
}
- virtual ~DeleteSockCallback() {
- }
+ ~DeleteSockCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 293ed2b..ef2d8fe 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -250,7 +250,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
const HostPortPair& trusted_spdy_proxy,
NetLog* net_log);
- virtual ~SpdySession();
+ ~SpdySession() override;
const HostPortPair& host_port_pair() const {
return spdy_session_key_.host_port_proxy_pair().first;
@@ -517,7 +517,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
base::WeakPtr<SpdySession> GetWeakPtr();
// HigherLayeredPool implementation:
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
private:
friend class base::RefCounted<SpdySession>;
@@ -813,55 +813,49 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
void DeleteExpiredPushedStreams();
// BufferedSpdyFramerVisitorInterface:
- virtual void OnError(SpdyFramer::SpdyError error_code) override;
- virtual void OnStreamError(SpdyStreamId stream_id,
- const std::string& description) override;
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override;
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override;
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override;
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override;
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override;
- virtual void OnSettings(bool clear_persisted) override;
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override;
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override;
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override;
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override;
- virtual void OnSynReply(
- SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override;
- virtual void OnHeaders(
- SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override;
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
+ void OnError(SpdyFramer::SpdyError error_code) override;
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override;
+ void OnPing(SpdyPingId unique_id, bool is_ack) override;
+ void OnRstStream(SpdyStreamId stream_id, SpdyRstStreamStatus status) override;
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override;
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override;
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override;
+ void OnSettings(bool clear_persisted) override;
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override;
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override;
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override;
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override;
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override;
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override;
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
// SpdyFramerDebugVisitorInterface
- virtual void OnSendCompressedFrame(
- SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override;
- virtual void OnReceiveCompressedFrame(
- SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override;
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override;
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override;
// Called when bytes are consumed from a SpdyBuffer for a DATA frame
// that is to be written or is being written. Increases the send
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index de2ddfa..32b4ee3 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -61,7 +61,7 @@ class NET_EXPORT SpdySessionPool
size_t max_concurrent_streams_limit,
SpdySessionPool::TimeFunc time_func,
const std::string& trusted_spdy_proxy);
- virtual ~SpdySessionPool();
+ ~SpdySessionPool() override;
// In the functions below, a session is "available" if this pool has
// a reference to it and there is some SpdySessionKey for which
@@ -133,19 +133,19 @@ class NET_EXPORT SpdySessionPool
// We flush all idle sessions and release references to the active ones so
// they won't get re-used. The active ones will either complete successfully
// or error out due to the IP address change.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// SSLConfigService::Observer methods:
// We perform the same flushing as described above when SSL settings change.
- virtual void OnSSLConfigChanged() override;
+ void OnSSLConfigChanged() override;
// CertDatabase::Observer methods:
// We perform the same flushing as described above when certificate database
// is changed.
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
private:
friend class SpdySessionPoolPeer; // For testing.
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 0a9903c..fef27bf 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -62,20 +62,20 @@ class SessionOpeningDelegate : public SpdyStream::Delegate {
: spdy_session_pool_(spdy_session_pool),
key_(key) {}
- virtual ~SessionOpeningDelegate() {}
+ ~SessionOpeningDelegate() override {}
- virtual void OnRequestHeadersSent() override {}
+ void OnRequestHeadersSent() override {}
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override {
return RESPONSE_HEADERS_ARE_COMPLETE;
}
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
- virtual void OnDataSent() override {}
+ void OnDataSent() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_));
}
diff --git a/net/spdy/spdy_session_test_util.h b/net/spdy/spdy_session_test_util.h
index cc3f136..dcb1733 100644
--- a/net/spdy/spdy_session_test_util.h
+++ b/net/spdy/spdy_session_test_util.h
@@ -26,11 +26,11 @@ class SpdySessionTestTaskObserver : public base::MessageLoop::TaskObserver {
// function = "DoFoo"
SpdySessionTestTaskObserver(const std::string& file_name,
const std::string& function_name);
- virtual ~SpdySessionTestTaskObserver();
+ ~SpdySessionTestTaskObserver() override;
// Implements MessageLoop::TaskObserver.
- virtual void WillProcessTask(const base::PendingTask& pending_task) override;
- virtual void DidProcessTask(const base::PendingTask& pending_task) override;
+ void WillProcessTask(const base::PendingTask& pending_task) override;
+ void DidProcessTask(const base::PendingTask& pending_task) override;
// Returns the number of tasks posted by the given function and file.
uint16 executed_count() const { return executed_count_; }
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 914f6fe37..e56d9ef 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -207,7 +207,7 @@ class StreamRequestDestroyingCallback : public TestCompletionCallbackBase {
public:
StreamRequestDestroyingCallback() {}
- virtual ~StreamRequestDestroyingCallback() {}
+ ~StreamRequestDestroyingCallback() override {}
void SetRequestToDestroy(scoped_ptr<SpdyStreamRequest> request) {
request_ = request.Pass();
@@ -2303,9 +2303,9 @@ class SessionClosingDelegate : public test::StreamDelegateDoNothing {
: StreamDelegateDoNothing(stream),
session_to_close_(session_to_close) {}
- virtual ~SessionClosingDelegate() {}
+ ~SessionClosingDelegate() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
session_to_close_->CloseSessionOnError(ERR_SPDY_PROTOCOL_ERROR, "Error");
}
@@ -3379,9 +3379,9 @@ class StreamCreatingDelegate : public test::StreamDelegateDoNothing {
: StreamDelegateDoNothing(stream),
session_(session) {}
- virtual ~StreamCreatingDelegate() {}
+ ~StreamCreatingDelegate() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
GURL url(kDefaultURL);
ignore_result(
CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
@@ -3658,10 +3658,10 @@ class DropReceivedDataDelegate : public test::StreamDelegateSendImmediate {
base::StringPiece data)
: StreamDelegateSendImmediate(stream, data) {}
- virtual ~DropReceivedDataDelegate() {}
+ ~DropReceivedDataDelegate() override {}
// Drop any received data.
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
};
// Send data back and forth but use a delegate that drops its received
@@ -4243,13 +4243,13 @@ class StreamClosingDelegate : public test::StreamDelegateWithBody {
base::StringPiece data)
: StreamDelegateWithBody(stream, data) {}
- virtual ~StreamClosingDelegate() {}
+ ~StreamClosingDelegate() override {}
void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) {
stream_to_close_ = stream_to_close;
}
- virtual void OnDataSent() override {
+ void OnDataSent() override {
test::StreamDelegateWithBody::OnDataSent();
if (stream_to_close_.get()) {
stream_to_close_->Close();
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 6de0a39..e7dcd5b 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -61,9 +61,9 @@ class SpdyStream::SynStreamBufferProducer : public SpdyBufferProducer {
DCHECK(stream_.get());
}
- virtual ~SynStreamBufferProducer() {}
+ ~SynStreamBufferProducer() override {}
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override {
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override {
if (!stream_.get()) {
NOTREACHED();
return scoped_ptr<SpdyBuffer>();
diff --git a/net/spdy/spdy_stream_test_util.h b/net/spdy/spdy_stream_test_util.h
index 7df12e8..16f4efb 100644
--- a/net/spdy/spdy_stream_test_util.h
+++ b/net/spdy/spdy_stream_test_util.h
@@ -23,15 +23,15 @@ namespace test {
class ClosingDelegate : public SpdyStream::Delegate {
public:
explicit ClosingDelegate(const base::WeakPtr<SpdyStream>& stream);
- virtual ~ClosingDelegate();
+ ~ClosingDelegate() override;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
// Returns whether or not the stream is closed.
bool StreamIsClosed() const { return !stream_.get(); }
@@ -45,14 +45,14 @@ class ClosingDelegate : public SpdyStream::Delegate {
class StreamDelegateBase : public SpdyStream::Delegate {
public:
explicit StreamDelegateBase(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateBase();
+ ~StreamDelegateBase() override;
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
// Waits for the stream to be closed and returns the status passed
// to OnClose().
@@ -89,7 +89,7 @@ class StreamDelegateBase : public SpdyStream::Delegate {
class StreamDelegateDoNothing : public StreamDelegateBase {
public:
StreamDelegateDoNothing(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateDoNothing();
+ ~StreamDelegateDoNothing() override;
};
// Test delegate that sends data immediately in OnResponseHeadersUpdated().
@@ -98,9 +98,9 @@ class StreamDelegateSendImmediate : public StreamDelegateBase {
// |data| can be NULL.
StreamDelegateSendImmediate(const base::WeakPtr<SpdyStream>& stream,
base::StringPiece data);
- virtual ~StreamDelegateSendImmediate();
+ ~StreamDelegateSendImmediate() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
private:
@@ -112,9 +112,9 @@ class StreamDelegateWithBody : public StreamDelegateBase {
public:
StreamDelegateWithBody(const base::WeakPtr<SpdyStream>& stream,
base::StringPiece data);
- virtual ~StreamDelegateWithBody();
+ ~StreamDelegateWithBody() override;
- virtual void OnRequestHeadersSent() override;
+ void OnRequestHeadersSent() override;
private:
scoped_refptr<StringIOBuffer> buf_;
@@ -124,9 +124,9 @@ class StreamDelegateWithBody : public StreamDelegateBase {
class StreamDelegateCloseOnHeaders : public StreamDelegateBase {
public:
StreamDelegateCloseOnHeaders(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateCloseOnHeaders();
+ ~StreamDelegateCloseOnHeaders() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
};
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 2e1aba5..baa3548f 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -208,50 +208,49 @@ namespace {
class PriorityGetter : public BufferedSpdyFramerVisitorInterface {
public:
PriorityGetter() : priority_(0) {}
- virtual ~PriorityGetter() {}
+ ~PriorityGetter() override {}
SpdyPriority priority() const {
return priority_;
}
- virtual void OnError(SpdyFramer::SpdyError error_code) override {}
- virtual void OnStreamError(SpdyStreamId stream_id,
- const std::string& description) override {}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override {
+ void OnError(SpdyFramer::SpdyError error_code) override {}
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override {}
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override {
priority_ = priority;
}
- virtual void OnSynReply(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {}
- virtual void OnSettings(bool clear_persisted) override {}
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override {}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override {}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {}
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {}
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {}
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {}
+ void OnSettings(bool clear_persisted) override {}
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {}
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {}
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {}
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {}
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {}
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override {}
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
return false;
}
@@ -613,46 +612,46 @@ class FakeSpdySessionClientSocket : public MockClientSocket {
: MockClientSocket(BoundNetLog()),
read_result_(read_result) {}
- virtual ~FakeSpdySessionClientSocket() {}
+ ~FakeSpdySessionClientSocket() override {}
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return read_result_;
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
// Return kProtoUnknown to use the pool's default protocol.
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
// The functions below are not expected to be called.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual bool WasEverUsed() const override {
+ bool WasEverUsed() const override {
ADD_FAILURE();
return false;
}
- virtual bool UsingTCPFastOpen() const override {
+ bool UsingTCPFastOpen() const override {
ADD_FAILURE();
return false;
}
- virtual bool WasNpnNegotiated() const override {
+ bool WasNpnNegotiated() const override {
ADD_FAILURE();
return false;
}
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
+ bool GetSSLInfo(SSLInfo* ssl_info) override {
ADD_FAILURE();
return false;
}
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h
index 897f670..e91800d 100644
--- a/net/spdy/spdy_test_util_common.h
+++ b/net/spdy/spdy_test_util_common.h
@@ -125,7 +125,7 @@ class StreamReleaserCallback : public TestCompletionCallbackBase {
public:
StreamReleaserCallback();
- virtual ~StreamReleaserCallback();
+ ~StreamReleaserCallback() override;
// Returns a callback that releases |request|'s stream.
CompletionCallback MakeCallback(SpdyStreamRequest* request);
@@ -157,11 +157,11 @@ class MockECSignatureCreator : public crypto::ECSignatureCreator {
explicit MockECSignatureCreator(crypto::ECPrivateKey* key);
// crypto::ECSignatureCreator
- virtual bool Sign(const uint8* data,
- int data_len,
- std::vector<uint8>* signature) override;
- virtual bool DecodeSignature(const std::vector<uint8>& signature,
- std::vector<uint8>* out_raw_sig) override;
+ bool Sign(const uint8* data,
+ int data_len,
+ std::vector<uint8>* signature) override;
+ bool DecodeSignature(const std::vector<uint8>& signature,
+ std::vector<uint8>* out_raw_sig) override;
private:
crypto::ECPrivateKey* key_;
@@ -173,11 +173,10 @@ class MockECSignatureCreator : public crypto::ECSignatureCreator {
class MockECSignatureCreatorFactory : public crypto::ECSignatureCreatorFactory {
public:
MockECSignatureCreatorFactory();
- virtual ~MockECSignatureCreatorFactory();
+ ~MockECSignatureCreatorFactory() override;
// crypto::ECSignatureCreatorFactory
- virtual crypto::ECSignatureCreator* Create(
- crypto::ECPrivateKey* key) override;
+ crypto::ECSignatureCreator* Create(crypto::ECPrivateKey* key) override;
private:
DISALLOW_COPY_AND_ASSIGN(MockECSignatureCreatorFactory);
@@ -232,7 +231,7 @@ class SpdyURLRequestContext : public URLRequestContext {
SpdyURLRequestContext(NextProto protocol,
bool force_spdy_over_ssl,
bool force_spdy_always);
- virtual ~SpdyURLRequestContext();
+ ~SpdyURLRequestContext() override;
MockClientSocketFactory& socket_factory() { return socket_factory_; }
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 66a89e8..854afbf 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -60,7 +60,7 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
SpdyWebSocketStream(const base::WeakPtr<SpdySession>& spdy_session,
Delegate* delegate);
- virtual ~SpdyWebSocketStream();
+ ~SpdyWebSocketStream() override;
// Initializes SPDY stream for the WebSocket.
// It might create SPDY stream asynchronously. In this case, this method
@@ -75,12 +75,12 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
void Close();
// SpdyStream::Delegate
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
friend class SpdyWebSocketStreamTest;
diff --git a/net/spdy/spdy_websocket_stream_unittest.cc b/net/spdy/spdy_websocket_stream_unittest.cc
index 5941bdf..fd94969 100644
--- a/net/spdy/spdy_websocket_stream_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_unittest.cc
@@ -51,7 +51,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
public:
explicit SpdyWebSocketStreamEventRecorder(const CompletionCallback& callback)
: callback_(callback) {}
- virtual ~SpdyWebSocketStreamEventRecorder() {}
+ ~SpdyWebSocketStreamEventRecorder() override {}
typedef base::Callback<void(SpdyWebSocketStreamEvent*)> StreamEventCallback;
@@ -74,7 +74,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
on_close_ = callback;
}
- virtual void OnCreatedSpdyStream(int result) override {
+ void OnCreatedSpdyStream(int result) override {
events_.push_back(
SpdyWebSocketStreamEvent(SpdyWebSocketStreamEvent::EVENT_CREATED,
SpdyHeaderBlock(),
@@ -83,7 +83,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_created_.is_null())
on_created_.Run(&events_.back());
}
- virtual void OnSentSpdyHeaders() override {
+ void OnSentSpdyHeaders() override {
events_.push_back(
SpdyWebSocketStreamEvent(SpdyWebSocketStreamEvent::EVENT_SENT_HEADERS,
SpdyHeaderBlock(),
@@ -92,7 +92,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnSpdyResponseHeadersUpdated(
+ void OnSpdyResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override {
events_.push_back(
SpdyWebSocketStreamEvent(
@@ -103,7 +103,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_received_header_.is_null())
on_received_header_.Run(&events_.back());
}
- virtual void OnSentSpdyData(size_t bytes_sent) override {
+ void OnSentSpdyData(size_t bytes_sent) override {
events_.push_back(
SpdyWebSocketStreamEvent(
SpdyWebSocketStreamEvent::EVENT_SENT_DATA,
@@ -113,7 +113,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override {
+ void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override {
std::string buffer_data;
size_t buffer_len = 0;
if (buffer) {
@@ -129,7 +129,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_received_data_.is_null())
on_received_data_.Run(&events_.back());
}
- virtual void OnCloseSpdyStream() override {
+ void OnCloseSpdyStream() override {
events_.push_back(
SpdyWebSocketStreamEvent(
SpdyWebSocketStreamEvent::EVENT_CLOSE,
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc
index cb24d12..a2b1435 100644
--- a/net/spdy/spdy_write_queue_unittest.cc
+++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -59,9 +59,7 @@ class RequeingBufferProducer : public SpdyBufferProducer {
base::Bind(RequeingBufferProducer::ConsumeCallback, queue));
}
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override {
- return buffer_.Pass();
- }
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override { return buffer_.Pass(); }
static void ConsumeCallback(SpdyWriteQueue* queue,
size_t size,
diff --git a/net/ssl/channel_id_service_unittest.cc b/net/ssl/channel_id_service_unittest.cc
index 52083e8..b5fc006 100644
--- a/net/ssl/channel_id_service_unittest.cc
+++ b/net/ssl/channel_id_service_unittest.cc
@@ -35,16 +35,16 @@ class FailingTaskRunner : public base::TaskRunner {
public:
FailingTaskRunner() {}
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override {
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override {
return false;
}
- virtual bool RunsTasksOnCurrentThread() const override { return true; }
+ bool RunsTasksOnCurrentThread() const override { return true; }
protected:
- virtual ~FailingTaskRunner() {}
+ ~FailingTaskRunner() override {}
private:
DISALLOW_COPY_AND_ASSIGN(FailingTaskRunner);
@@ -56,21 +56,21 @@ class MockChannelIDStoreWithAsyncGet
MockChannelIDStoreWithAsyncGet()
: DefaultChannelIDStore(NULL), channel_id_count_(0) {}
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override;
-
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override;
+
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {
channel_id_count_ = 1;
}
- virtual int GetChannelIDCount() override { return channel_id_count_; }
+ int GetChannelIDCount() override { return channel_id_count_; }
void CallGetChannelIDCallbackWithResult(int err,
base::Time expiration_time,
diff --git a/net/ssl/client_cert_store_mac.h b/net/ssl/client_cert_store_mac.h
index 5c697db..23e3a2f 100644
--- a/net/ssl/client_cert_store_mac.h
+++ b/net/ssl/client_cert_store_mac.h
@@ -17,12 +17,12 @@ namespace net {
class NET_EXPORT ClientCertStoreMac : public ClientCertStore {
public:
ClientCertStoreMac();
- virtual ~ClientCertStoreMac();
+ ~ClientCertStoreMac() override;
// ClientCertStore:
- virtual void GetClientCerts(const SSLCertRequestInfo& cert_request_info,
- CertificateList* selected_certs,
- const base::Closure& callback) override;
+ void GetClientCerts(const SSLCertRequestInfo& cert_request_info,
+ CertificateList* selected_certs,
+ const base::Closure& callback) override;
private:
friend class ClientCertStoreMacTest;
diff --git a/net/ssl/default_channel_id_store.cc b/net/ssl/default_channel_id_store.cc
index 4f43fbc..b71d7b3 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -41,8 +41,8 @@ class DefaultChannelIDStore::GetChannelIDTask
public:
GetChannelIDTask(const std::string& server_identifier,
const GetChannelIDCallback& callback);
- virtual ~GetChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~GetChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -83,8 +83,8 @@ class DefaultChannelIDStore::SetChannelIDTask
base::Time expiration_time,
const std::string& private_key,
const std::string& cert);
- virtual ~SetChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~SetChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -123,8 +123,8 @@ class DefaultChannelIDStore::DeleteChannelIDTask
public:
DeleteChannelIDTask(const std::string& server_identifier,
const base::Closure& callback);
- virtual ~DeleteChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~DeleteChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -158,8 +158,8 @@ class DefaultChannelIDStore::DeleteAllCreatedBetweenTask
DeleteAllCreatedBetweenTask(base::Time delete_begin,
base::Time delete_end,
const base::Closure& callback);
- virtual ~DeleteAllCreatedBetweenTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~DeleteAllCreatedBetweenTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
base::Time delete_begin_;
@@ -194,8 +194,8 @@ class DefaultChannelIDStore::GetAllChannelIDsTask
: public DefaultChannelIDStore::Task {
public:
explicit GetAllChannelIDsTask(const GetChannelIDListCallback& callback);
- virtual ~GetAllChannelIDsTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~GetAllChannelIDsTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
diff --git a/net/ssl/default_channel_id_store.h b/net/ssl/default_channel_id_store.h
index 3882c1f..9b98637 100644
--- a/net/ssl/default_channel_id_store.h
+++ b/net/ssl/default_channel_id_store.h
@@ -41,33 +41,28 @@ class NET_EXPORT DefaultChannelIDStore : public ChannelIDStore {
// backing store will be updated.
explicit DefaultChannelIDStore(PersistentStore* store);
- virtual ~DefaultChannelIDStore();
+ ~DefaultChannelIDStore() override;
// ChannelIDStore implementation.
- virtual int GetChannelID(
- const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override;
- virtual void SetChannelID(
- const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override;
- virtual void DeleteChannelID(
- const std::string& server_identifier,
- const base::Closure& callback) override;
- virtual void DeleteAllCreatedBetween(
- base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& callback) override;
- virtual void DeleteAll(const base::Closure& callback) override;
- virtual void GetAllChannelIDs(
- const GetChannelIDListCallback& callback) override;
- virtual int GetChannelIDCount() override;
- virtual void SetForceKeepSessionState() override;
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override;
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override;
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& callback) override;
+ void DeleteAllCreatedBetween(base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& callback) override;
+ void DeleteAll(const base::Closure& callback) override;
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override;
+ int GetChannelIDCount() override;
+ void SetForceKeepSessionState() override;
private:
class Task;
diff --git a/net/ssl/default_channel_id_store_unittest.cc b/net/ssl/default_channel_id_store_unittest.cc
index 9429753..ae27a19 100644
--- a/net/ssl/default_channel_id_store_unittest.cc
+++ b/net/ssl/default_channel_id_store_unittest.cc
@@ -69,15 +69,15 @@ class MockPersistentStore
MockPersistentStore();
// DefaultChannelIDStore::PersistentStore implementation.
- virtual void Load(const LoadedCallback& loaded_callback) override;
- virtual void AddChannelID(
+ void Load(const LoadedCallback& loaded_callback) override;
+ void AddChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void DeleteChannelID(
+ void DeleteChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockPersistentStore();
+ ~MockPersistentStore() override;
private:
typedef std::map<std::string, DefaultChannelIDStore::ChannelID>
diff --git a/net/ssl/ssl_client_auth_cache.h b/net/ssl/ssl_client_auth_cache.h
index 4ee47ed..53d5312 100644
--- a/net/ssl/ssl_client_auth_cache.h
+++ b/net/ssl/ssl_client_auth_cache.h
@@ -28,7 +28,7 @@ class X509Certificate;
class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
public:
SSLClientAuthCache();
- virtual ~SSLClientAuthCache();
+ ~SSLClientAuthCache() override;
// Checks for a client certificate preference for SSL server at |server|.
// Returns true if a preference is found, and sets |*certificate| to the
@@ -48,7 +48,7 @@ class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
void Remove(const HostPortPair& server);
// CertDatabase::Observer methods:
- virtual void OnCertAdded(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
private:
typedef HostPortPair AuthCacheKey;
diff --git a/net/ssl/ssl_config_service_defaults.h b/net/ssl/ssl_config_service_defaults.h
index ff58029d..de867da 100644
--- a/net/ssl/ssl_config_service_defaults.h
+++ b/net/ssl/ssl_config_service_defaults.h
@@ -18,10 +18,10 @@ class NET_EXPORT SSLConfigServiceDefaults : public SSLConfigService {
SSLConfigServiceDefaults();
// Store default SSL config settings in |config|.
- virtual void GetSSLConfig(SSLConfig* config) override;
+ void GetSSLConfig(SSLConfig* config) override;
private:
- virtual ~SSLConfigServiceDefaults();
+ ~SSLConfigServiceDefaults() override;
// Default value of prefs.
const SSLConfig default_config_;
diff --git a/net/ssl/ssl_config_service_unittest.cc b/net/ssl/ssl_config_service_unittest.cc
index 0d9659c..7306c68 100644
--- a/net/ssl/ssl_config_service_unittest.cc
+++ b/net/ssl/ssl_config_service_unittest.cc
@@ -19,9 +19,7 @@ class MockSSLConfigService : public SSLConfigService {
explicit MockSSLConfigService(const SSLConfig& config) : config_(config) {}
// SSLConfigService implementation
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = config_; }
// Sets the SSLConfig to be returned by GetSSLConfig and processes any
// updates.
@@ -32,7 +30,7 @@ class MockSSLConfigService : public SSLConfigService {
}
private:
- virtual ~MockSSLConfigService() {}
+ ~MockSSLConfigService() override {}
SSLConfig config_;
};
diff --git a/net/test/embedded_test_server/embedded_test_server.cc b/net/test/embedded_test_server/embedded_test_server.cc
index 98f50b6..63d8024 100644
--- a/net/test/embedded_test_server/embedded_test_server.cc
+++ b/net/test/embedded_test_server/embedded_test_server.cc
@@ -32,7 +32,7 @@ class CustomHttpResponse : public HttpResponse {
: headers_(headers), contents_(contents) {
}
- virtual std::string ToResponseString() const override {
+ std::string ToResponseString() const override {
return headers_ + "\r\n" + contents_;
}
diff --git a/net/test/embedded_test_server/embedded_test_server.h b/net/test/embedded_test_server/embedded_test_server.h
index fc9f554..9123a51 100644
--- a/net/test/embedded_test_server/embedded_test_server.h
+++ b/net/test/embedded_test_server/embedded_test_server.h
@@ -35,7 +35,7 @@ class HttpListenSocket : public TCPListenSocket {
public:
HttpListenSocket(const SocketDescriptor socket_descriptor,
StreamListenSocket::Delegate* delegate);
- virtual ~HttpListenSocket();
+ ~HttpListenSocket() override;
virtual void Listen();
// Listen on the current IO thread. If the IO thread has changed since this
@@ -106,7 +106,7 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
// Creates a http test server. InitializeAndWaitUntilReady() must be called
// to start the server.
EmbeddedTestServer();
- virtual ~EmbeddedTestServer();
+ ~EmbeddedTestServer() override;
// Initializes and waits until the server is ready to accept requests.
bool InitializeAndWaitUntilReady() WARN_UNUSED_RESULT;
@@ -166,12 +166,12 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
scoped_ptr<HttpRequest> request);
// StreamListenSocket::Delegate overrides:
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override;
- virtual void DidRead(StreamListenSocket* connection,
- const char* data,
- int length) override;
- virtual void DidClose(StreamListenSocket* connection) override;
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override;
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int length) override;
+ void DidClose(StreamListenSocket* connection) override;
HttpConnection* FindConnection(StreamListenSocket* socket);
diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc
index 6a1df6e..bbe321b 100644
--- a/net/test/embedded_test_server/embedded_test_server_unittest.cc
+++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc
@@ -66,7 +66,7 @@ class EmbeddedTestServerTest: public testing::Test,
}
// URLFetcherDelegate override.
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
++num_responses_received_;
if (num_responses_received_ == num_responses_expected_)
base::MessageLoop::current()->Quit();
@@ -260,7 +260,7 @@ class EmbeddedTestServerThreadingTestDelegate
message_loop_present_on_shutdown_(message_loop_present_on_shutdown) {}
// base::PlatformThread::Delegate:
- virtual void ThreadMain() override {
+ void ThreadMain() override {
scoped_refptr<base::SingleThreadTaskRunner> io_thread_runner;
base::Thread io_thread("io_thread");
base::Thread::Options thread_options;
@@ -298,7 +298,7 @@ class EmbeddedTestServerThreadingTestDelegate
}
// URLFetcherDelegate override.
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
base::MessageLoop::current()->Quit();
}
diff --git a/net/test/embedded_test_server/http_response.h b/net/test/embedded_test_server/http_response.h
index 2172354..821c027 100644
--- a/net/test/embedded_test_server/http_response.h
+++ b/net/test/embedded_test_server/http_response.h
@@ -32,7 +32,7 @@ class HttpResponse{
class BasicHttpResponse : public HttpResponse {
public:
BasicHttpResponse();
- virtual ~BasicHttpResponse();
+ ~BasicHttpResponse() override;
// The response code.
HttpStatusCode code() const { return code_; }
@@ -54,7 +54,7 @@ class BasicHttpResponse : public HttpResponse {
}
// Generates and returns a http response string.
- virtual std::string ToResponseString() const override;
+ std::string ToResponseString() const override;
private:
HttpStatusCode code_;
diff --git a/net/test/net_test_suite.h b/net/test/net_test_suite.h
index 1a400d4..e0f601e 100644
--- a/net/test/net_test_suite.h
+++ b/net/test/net_test_suite.h
@@ -21,11 +21,11 @@ class NetworkChangeNotifier;
class NetTestSuite : public base::TestSuite {
public:
NetTestSuite(int argc, char** argv);
- virtual ~NetTestSuite();
+ ~NetTestSuite() override;
- virtual void Initialize() override;
+ void Initialize() override;
- virtual void Shutdown() override;
+ void Shutdown() override;
protected:
// This constructor is only accessible to specialized net test
diff --git a/net/test/spawned_test_server/local_test_server.h b/net/test/spawned_test_server/local_test_server.h
index a719598..37b1185 100644
--- a/net/test/spawned_test_server/local_test_server.h
+++ b/net/test/spawned_test_server/local_test_server.h
@@ -38,7 +38,7 @@ class LocalTestServer : public BaseTestServer {
const SSLOptions& ssl_options,
const base::FilePath& document_root);
- virtual ~LocalTestServer();
+ ~LocalTestServer() override;
// Start the test server and block until it's ready. Returns true on success.
bool Start() WARN_UNUSED_RESULT;
diff --git a/net/test/spawned_test_server/local_test_server_posix.cc b/net/test/spawned_test_server/local_test_server_posix.cc
index 64c9b44..0edbedf1 100644
--- a/net/test/spawned_test_server/local_test_server_posix.cc
+++ b/net/test/spawned_test_server/local_test_server_posix.cc
@@ -34,7 +34,7 @@ class OrphanedTestServerFilter : public base::ProcessFilter {
: path_string_(path_string),
port_string_(port_string) {}
- virtual bool Includes(const base::ProcessEntry& entry) const override {
+ bool Includes(const base::ProcessEntry& entry) const override {
if (entry.parent_pid() != 1)
return false;
bool found_path_string = false;
diff --git a/net/test/url_request/url_request_failed_job.h b/net/test/url_request/url_request_failed_job.h
index ea35116..4307f91 100644
--- a/net/test/url_request/url_request_failed_job.h
+++ b/net/test/url_request/url_request_failed_job.h
@@ -22,7 +22,7 @@ class URLRequestFailedJob : public URLRequestJob {
NetworkDelegate* network_delegate,
int net_error);
- virtual void Start() override;
+ void Start() override;
// Adds the testing URLs to the URLRequestFilter.
static void AddUrlHandler();
@@ -42,7 +42,7 @@ class URLRequestFailedJob : public URLRequestJob {
const std::string& hostname);
protected:
- virtual ~URLRequestFailedJob();
+ ~URLRequestFailedJob() override;
private:
static URLRequestJob* Factory(URLRequest* request,
diff --git a/net/test/url_request/url_request_mock_http_job.cc b/net/test/url_request/url_request_mock_http_job.cc
index c611f36..5542ac7 100644
--- a/net/test/url_request/url_request_mock_http_job.cc
+++ b/net/test/url_request/url_request_mock_http_job.cc
@@ -37,10 +37,10 @@ class MockJobInterceptor : public net::URLRequestInterceptor {
: base_path_(base_path),
map_all_requests_to_base_path_(map_all_requests_to_base_path),
worker_pool_(worker_pool) {}
- virtual ~MockJobInterceptor() {}
+ ~MockJobInterceptor() override {}
// net::URLRequestJobFactory::ProtocolHandler implementation
- virtual net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
return new URLRequestMockHTTPJob(
diff --git a/net/test/url_request/url_request_mock_http_job.h b/net/test/url_request/url_request_mock_http_job.h
index eb68a2d..1a01a30 100644
--- a/net/test/url_request/url_request_mock_http_job.h
+++ b/net/test/url_request/url_request_mock_http_job.h
@@ -34,13 +34,12 @@ class URLRequestMockHTTPJob : public URLRequestFileJob {
const base::FilePath& file_path,
const scoped_refptr<base::TaskRunner>& task_runner);
- virtual void Start() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual int GetResponseCode() const override;
- virtual bool GetCharset(std::string* charset) override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
+ void Start() override;
+ bool GetMimeType(std::string* mime_type) const override;
+ int GetResponseCode() const override;
+ bool GetCharset(std::string* charset) override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
// Adds the testing URLs to the URLRequestFilter.
static void AddUrlHandler(
@@ -74,7 +73,7 @@ class URLRequestMockHTTPJob : public URLRequestFileJob {
const scoped_refptr<base::SequencedWorkerPool>& worker_pool);
protected:
- virtual ~URLRequestMockHTTPJob();
+ ~URLRequestMockHTTPJob() override;
private:
void GetResponseInfoConst(HttpResponseInfo* info) const;
diff --git a/net/tools/balsa/balsa_frame.h b/net/tools/balsa/balsa_frame.h
index 73c3dd9..5198dd1 100644
--- a/net/tools/balsa/balsa_frame.h
+++ b/net/tools/balsa/balsa_frame.h
@@ -201,36 +201,35 @@ class BalsaFrame {
private:
class DoNothingBalsaVisitor : public BalsaVisitorInterface {
- virtual void ProcessBodyInput(const char *input, size_t size) override {}
- virtual void ProcessBodyData(const char *input, size_t size) override {}
- virtual void ProcessHeaderInput(const char *input, size_t size) override {}
- virtual void ProcessTrailerInput(const char *input, size_t size) override {}
- virtual void ProcessHeaders(const BalsaHeaders& headers) override {}
- virtual void ProcessRequestFirstLine(const char* line_input,
- size_t line_length,
- const char* method_input,
- size_t method_length,
- const char* request_uri_input,
- size_t request_uri_length,
- const char* version_input,
- size_t version_length) override {}
- virtual void ProcessResponseFirstLine(const char *line_input,
- size_t line_length,
- const char *version_input,
- size_t version_length,
- const char *status_input,
- size_t status_length,
- const char *reason_input,
- size_t reason_length) override {}
- virtual void ProcessChunkLength(size_t chunk_length) override {}
- virtual void ProcessChunkExtensions(const char *input,
- size_t size) override {}
- virtual void HeaderDone() override {}
- virtual void MessageDone() override {}
- virtual void HandleHeaderError(BalsaFrame* framer) override {}
- virtual void HandleHeaderWarning(BalsaFrame* framer) override {}
- virtual void HandleChunkingError(BalsaFrame* framer) override {}
- virtual void HandleBodyError(BalsaFrame* framer) override {}
+ void ProcessBodyInput(const char* input, size_t size) override {}
+ void ProcessBodyData(const char* input, size_t size) override {}
+ void ProcessHeaderInput(const char* input, size_t size) override {}
+ void ProcessTrailerInput(const char* input, size_t size) override {}
+ void ProcessHeaders(const BalsaHeaders& headers) override {}
+ void ProcessRequestFirstLine(const char* line_input,
+ size_t line_length,
+ const char* method_input,
+ size_t method_length,
+ const char* request_uri_input,
+ size_t request_uri_length,
+ const char* version_input,
+ size_t version_length) override {}
+ void ProcessResponseFirstLine(const char* line_input,
+ size_t line_length,
+ const char* version_input,
+ size_t version_length,
+ const char* status_input,
+ size_t status_length,
+ const char* reason_input,
+ size_t reason_length) override {}
+ void ProcessChunkLength(size_t chunk_length) override {}
+ void ProcessChunkExtensions(const char* input, size_t size) override {}
+ void HeaderDone() override {}
+ void MessageDone() override {}
+ void HandleHeaderError(BalsaFrame* framer) override {}
+ void HandleHeaderWarning(BalsaFrame* framer) override {}
+ void HandleChunkingError(BalsaFrame* framer) override {}
+ void HandleBodyError(BalsaFrame* framer) override {}
};
bool last_char_was_slash_r_;
diff --git a/net/tools/balsa/simple_buffer.h b/net/tools/balsa/simple_buffer.h
index d58894e..d914ec5 100644
--- a/net/tools/balsa/simple_buffer.h
+++ b/net/tools/balsa/simple_buffer.h
@@ -16,7 +16,7 @@ class SimpleBuffer : public BufferInterface {
public:
SimpleBuffer();
explicit SimpleBuffer(int size);
- virtual ~SimpleBuffer();
+ ~SimpleBuffer() override;
std::string str() const;
@@ -32,32 +32,32 @@ class SimpleBuffer : public BufferInterface {
// The following functions all override pure virtual functions
// in BufferInterface. See buffer_interface.h for a description
// of what they do.
- virtual int ReadableBytes() const override;
- virtual int BufferSize() const override;
- virtual int BytesFree() const override;
+ int ReadableBytes() const override;
+ int BufferSize() const override;
+ int BytesFree() const override;
- virtual bool Empty() const override;
- virtual bool Full() const override;
+ bool Empty() const override;
+ bool Full() const override;
- virtual int Write(const char* bytes, int size) override;
+ int Write(const char* bytes, int size) override;
- virtual void GetWritablePtr(char **ptr, int* size) const override;
+ void GetWritablePtr(char** ptr, int* size) const override;
- virtual void GetReadablePtr(char **ptr, int* size) const override;
+ void GetReadablePtr(char** ptr, int* size) const override;
- virtual int Read(char* bytes, int size) override;
+ int Read(char* bytes, int size) override;
- virtual void Clear() override;
+ void Clear() override;
// This can be an expensive operation: costing a new/delete, and copying of
// all existing data. Even if the existing buffer does not need to be
// resized, unread data may still need to be non-destructively copied to
// consolidate fragmented free space.
- virtual bool Reserve(int size) override;
+ bool Reserve(int size) override;
- virtual void AdvanceReadablePtr(int amount_to_advance) override;
+ void AdvanceReadablePtr(int amount_to_advance) override;
- virtual void AdvanceWritablePtr(int amount_to_advance) override;
+ void AdvanceWritablePtr(int amount_to_advance) override;
void Swap(SimpleBuffer* other) {
char* tmp = storage_;
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 46c3eec..9b071d7 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -47,13 +47,18 @@ class CacheDumper : public CacheDumpWriter {
public:
explicit CacheDumper(disk_cache::Backend* cache);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
disk_cache::Backend* cache_;
@@ -64,13 +69,18 @@ class DiskDumper : public CacheDumpWriter {
public:
explicit DiskDumper(const base::FilePath& path);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
base::FilePath path_;
diff --git a/net/tools/gdig/file_net_log.h b/net/tools/gdig/file_net_log.h
index 005ea31..62ba221 100644
--- a/net/tools/gdig/file_net_log.h
+++ b/net/tools/gdig/file_net_log.h
@@ -20,10 +20,10 @@ namespace net {
class FileNetLogObserver : public NetLog::ThreadSafeObserver {
public:
explicit FileNetLogObserver(FILE* destination);
- virtual ~FileNetLogObserver();
+ ~FileNetLogObserver() override;
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override;
+ void OnAddEntry(const net::NetLog::Entry& entry) override;
private:
FILE* const destination_;
diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc
index 8ad907d..800bb34 100644
--- a/net/tools/get_server_time/get_server_time.cc
+++ b/net/tools/get_server_time/get_server_time.cc
@@ -72,21 +72,22 @@ class QuitDelegate : public net::URLFetcherDelegate {
public:
QuitDelegate() {}
- virtual ~QuitDelegate() {}
+ ~QuitDelegate() override {}
// net::URLFetcherDelegate implementation.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) override {
+ void OnURLFetchComplete(const net::URLFetcher* source) override {
base::MessageLoop::current()->Quit();
}
- virtual void OnURLFetchDownloadProgress(
- const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchDownloadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
- virtual void OnURLFetchUploadProgress(const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchUploadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
@@ -100,13 +101,13 @@ class PrintingLogObserver : public net::NetLog::ThreadSafeObserver {
public:
PrintingLogObserver() {}
- virtual ~PrintingLogObserver() {
+ ~PrintingLogObserver() override {
// This is guaranteed to be safe as this program is single threaded.
net_log()->RemoveThreadSafeObserver(this);
}
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override {
+ void OnAddEntry(const net::NetLog::Entry& entry) override {
// The log level of the entry is unknown, so just assume it maps
// to VLOG(1).
if (!VLOG_IS_ON(1))
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index e9b3496..b6cf393 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -88,34 +88,30 @@ class NetWatcher :
public:
NetWatcher() {}
- virtual ~NetWatcher() {}
+ ~NetWatcher() override {}
// net::NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
- LOG(INFO) << "OnIPAddressChanged()";
- }
+ void OnIPAddressChanged() override { LOG(INFO) << "OnIPAddressChanged()"; }
// net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnConnectionTypeChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged() override {
- LOG(INFO) << "OnDNSChanged()";
- }
+ void OnDNSChanged() override { LOG(INFO) << "OnDNSChanged()"; }
// net::NetworkChangeNotifier::NetworkChangeObserver implementation.
- virtual void OnNetworkChanged(
+ void OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnNetworkChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::ProxyConfigService::Observer implementation.
- virtual void OnProxyConfigChanged(
+ void OnProxyConfigChanged(
const net::ProxyConfig& config,
net::ProxyConfigService::ConfigAvailability availability) override {
LOG(INFO) << "OnProxyConfigChanged("
diff --git a/net/udp/datagram_client_socket.h b/net/udp/datagram_client_socket.h
index 31fc43f..c2c2cba 100644
--- a/net/udp/datagram_client_socket.h
+++ b/net/udp/datagram_client_socket.h
@@ -15,7 +15,7 @@ class IPEndPoint;
class NET_EXPORT_PRIVATE DatagramClientSocket : public DatagramSocket,
public Socket {
public:
- virtual ~DatagramClientSocket() {}
+ ~DatagramClientSocket() override {}
// Initialize this socket as a client socket to server at |address|.
// Returns a network error code.
diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
index 4c38cc8..d3796c3 100644
--- a/net/udp/datagram_server_socket.h
+++ b/net/udp/datagram_server_socket.h
@@ -17,7 +17,7 @@ class IOBuffer;
// A UDP Socket.
class NET_EXPORT DatagramServerSocket : public DatagramSocket {
public:
- virtual ~DatagramServerSocket() {}
+ ~DatagramServerSocket() override {}
// Initialize this socket as a server socket listening at |address|.
// Returns a network error code.
diff --git a/net/udp/udp_client_socket.h b/net/udp/udp_client_socket.h
index d689640..427db7e 100644
--- a/net/udp/udp_client_socket.h
+++ b/net/udp/udp_client_socket.h
@@ -21,20 +21,22 @@ class NET_EXPORT_PRIVATE UDPClientSocket : public DatagramClientSocket {
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
const net::NetLog::Source& source);
- virtual ~UDPClientSocket();
+ ~UDPClientSocket() override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
- 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 void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual const BoundNetLog& NetLog() const override;
+ int Connect(const IPEndPoint& address) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ const BoundNetLog& NetLog() const override;
private:
UDPSocket socket_;
diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h
index 9801ff8..77ca86d 100644
--- a/net/udp/udp_server_socket.h
+++ b/net/udp/udp_server_socket.h
@@ -19,33 +19,33 @@ class BoundNetLog;
class NET_EXPORT UDPServerSocket : public DatagramServerSocket {
public:
UDPServerSocket(net::NetLog* net_log, const net::NetLog::Source& source);
- virtual ~UDPServerSocket();
+ ~UDPServerSocket() override;
// Implement DatagramServerSocket:
- virtual int Listen(const IPEndPoint& address) override;
- virtual int RecvFrom(IOBuffer* buf,
- int buf_len,
- IPEndPoint* address,
- const CompletionCallback& callback) override;
- virtual int SendTo(IOBuffer* buf,
- int buf_len,
- const IPEndPoint& address,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void AllowAddressReuse() override;
- virtual void AllowBroadcast() override;
- virtual int JoinGroup(const IPAddressNumber& group_address) const override;
- virtual int LeaveGroup(const IPAddressNumber& group_address) const override;
- virtual int SetMulticastInterface(uint32 interface_index) override;
- virtual int SetMulticastTimeToLive(int time_to_live) override;
- virtual int SetMulticastLoopbackMode(bool loopback) override;
- virtual int SetDiffServCodePoint(DiffServCodePoint dscp) override;
- virtual void DetachFromThread() override;
+ int Listen(const IPEndPoint& address) override;
+ int RecvFrom(IOBuffer* buf,
+ int buf_len,
+ IPEndPoint* address,
+ const CompletionCallback& callback) override;
+ int SendTo(IOBuffer* buf,
+ int buf_len,
+ const IPEndPoint& address,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void AllowAddressReuse() override;
+ void AllowBroadcast() override;
+ int JoinGroup(const IPAddressNumber& group_address) const override;
+ int LeaveGroup(const IPAddressNumber& group_address) const override;
+ int SetMulticastInterface(uint32 interface_index) override;
+ int SetMulticastTimeToLive(int time_to_live) override;
+ int SetMulticastLoopbackMode(bool loopback) override;
+ int SetDiffServCodePoint(DiffServCodePoint dscp) override;
+ void DetachFromThread() override;
private:
UDPSocket socket_;
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 292a42f..2ac564d 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -179,9 +179,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// MessageLoopForIO::Watcher methods
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override;
+ void OnFileCanReadWithoutBlocking(int /* fd */) override;
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
private:
UDPSocketLibevent* const socket_;
@@ -195,9 +195,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
// MessageLoopForIO::Watcher methods
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {}
+ void OnFileCanReadWithoutBlocking(int /* fd */) override {}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override;
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override;
private:
UDPSocketLibevent* const socket_;
diff --git a/net/url_request/data_protocol_handler.h b/net/url_request/data_protocol_handler.h
index 3c2c4d4..cc0f7b8 100644
--- a/net/url_request/data_protocol_handler.h
+++ b/net/url_request/data_protocol_handler.h
@@ -18,9 +18,10 @@ class NET_EXPORT DataProtocolHandler
: public URLRequestJobFactory::ProtocolHandler {
public:
DataProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
DISALLOW_COPY_AND_ASSIGN(DataProtocolHandler);
diff --git a/net/url_request/file_protocol_handler.h b/net/url_request/file_protocol_handler.h
index 02b5c9fc..4ac81d3 100644
--- a/net/url_request/file_protocol_handler.h
+++ b/net/url_request/file_protocol_handler.h
@@ -28,10 +28,11 @@ class NET_EXPORT FileProtocolHandler :
public:
explicit FileProtocolHandler(
const scoped_refptr<base::TaskRunner>& file_task_runner);
- virtual ~FileProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ ~FileProtocolHandler() override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
const scoped_refptr<base::TaskRunner> file_task_runner_;
diff --git a/net/url_request/ftp_protocol_handler.h b/net/url_request/ftp_protocol_handler.h
index c3091b9..a951e05 100644
--- a/net/url_request/ftp_protocol_handler.h
+++ b/net/url_request/ftp_protocol_handler.h
@@ -22,9 +22,10 @@ class NET_EXPORT FtpProtocolHandler :
public URLRequestJobFactory::ProtocolHandler {
public:
explicit FtpProtocolHandler(FtpTransactionFactory* ftp_transaction_factory);
- virtual ~FtpProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
+ ~FtpProtocolHandler() override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
private:
friend class FtpTestURLRequestContext;
diff --git a/net/url_request/static_http_user_agent_settings.h b/net/url_request/static_http_user_agent_settings.h
index 4edb948..57bbd07 100644
--- a/net/url_request/static_http_user_agent_settings.h
+++ b/net/url_request/static_http_user_agent_settings.h
@@ -20,11 +20,11 @@ class NET_EXPORT StaticHttpUserAgentSettings : public HttpUserAgentSettings {
public:
StaticHttpUserAgentSettings(const std::string& accept_language,
const std::string& user_agent);
- virtual ~StaticHttpUserAgentSettings();
+ ~StaticHttpUserAgentSettings() override;
// HttpUserAgentSettings implementation
- virtual std::string GetAcceptLanguage() const override;
- virtual std::string GetUserAgent() const override;
+ std::string GetAcceptLanguage() const override;
+ std::string GetUserAgent() const override;
private:
const std::string accept_language_;
diff --git a/net/url_request/test_url_fetcher_factory.h b/net/url_request/test_url_fetcher_factory.h
index c004ce7..078e8cb 100644
--- a/net/url_request/test_url_fetcher_factory.h
+++ b/net/url_request/test_url_fetcher_factory.h
@@ -84,70 +84,66 @@ class TestURLFetcher : public URLFetcher {
TestURLFetcher(int id,
const GURL& url,
URLFetcherDelegate* d);
- virtual ~TestURLFetcher();
+ ~TestURLFetcher() override;
// URLFetcher implementation
- virtual void SetUploadData(const std::string& upload_content_type,
- const std::string& upload_content) override;
- virtual void SetUploadFilePath(
+ void SetUploadData(const std::string& upload_content_type,
+ const std::string& upload_content) override;
+ void SetUploadFilePath(
const std::string& upload_content_type,
const base::FilePath& file_path,
uint64 range_offset,
uint64 range_length,
scoped_refptr<base::TaskRunner> file_task_runner) override;
- virtual void SetChunkedUpload(
- const std::string& upload_content_type) override;
+ void SetChunkedUpload(const std::string& upload_content_type) override;
// Overriden to cache the chunks uploaded. Caller can read back the uploaded
// chunks with the upload_chunks() accessor.
- virtual void AppendChunkToUpload(const std::string& data,
- bool is_last_chunk) override;
- virtual void SetLoadFlags(int load_flags) override;
- virtual int GetLoadFlags() const override;
- virtual void SetReferrer(const std::string& referrer) override;
- virtual void SetReferrerPolicy(
- URLRequest::ReferrerPolicy referrer_policy) override;
- virtual void SetExtraRequestHeaders(
+ void AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) override;
+ void SetLoadFlags(int load_flags) override;
+ int GetLoadFlags() const override;
+ void SetReferrer(const std::string& referrer) override;
+ void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override;
+ void SetExtraRequestHeaders(
const std::string& extra_request_headers) override;
- virtual void AddExtraRequestHeader(const std::string& header_line) override;
- virtual void SetRequestContext(
+ void AddExtraRequestHeader(const std::string& header_line) override;
+ void SetRequestContext(
URLRequestContextGetter* request_context_getter) override;
- virtual void SetFirstPartyForCookies(
- const GURL& first_party_for_cookies) override;
- virtual void SetURLRequestUserData(
+ void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override;
+ void SetURLRequestUserData(
const void* key,
const CreateDataCallback& create_data_callback) override;
- virtual void SetStopOnRedirect(bool stop_on_redirect) override;
- virtual void SetAutomaticallyRetryOn5xx(bool retry) override;
- virtual void SetMaxRetriesOn5xx(int max_retries) override;
- virtual int GetMaxRetriesOn5xx() const override;
- virtual base::TimeDelta GetBackoffDelay() const override;
- virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
- virtual void SaveResponseToFileAtPath(
+ void SetStopOnRedirect(bool stop_on_redirect) override;
+ void SetAutomaticallyRetryOn5xx(bool retry) override;
+ void SetMaxRetriesOn5xx(int max_retries) override;
+ int GetMaxRetriesOn5xx() const override;
+ base::TimeDelta GetBackoffDelay() const override;
+ void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
+ void SaveResponseToFileAtPath(
const base::FilePath& file_path,
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseToTemporaryFile(
+ void SaveResponseToTemporaryFile(
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseWithWriter(
+ void SaveResponseWithWriter(
scoped_ptr<URLFetcherResponseWriter> response_writer) override;
- virtual HttpResponseHeaders* GetResponseHeaders() const override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual bool WasFetchedViaProxy() const override;
- virtual void Start() override;
+ HttpResponseHeaders* GetResponseHeaders() const override;
+ HostPortPair GetSocketAddress() const override;
+ bool WasFetchedViaProxy() const override;
+ void Start() override;
// URL we were created with. Because of how we're using URLFetcher GetURL()
// always returns an empty URL. Chances are you'll want to use
// GetOriginalURL() in your tests.
- virtual const GURL& GetOriginalURL() const override;
- virtual const GURL& GetURL() const override;
- virtual const URLRequestStatus& GetStatus() const override;
- virtual int GetResponseCode() const override;
- virtual const ResponseCookies& GetCookies() const override;
- virtual void ReceivedContentWasMalformed() override;
+ const GURL& GetOriginalURL() const override;
+ const GURL& GetURL() const override;
+ const URLRequestStatus& GetStatus() const override;
+ int GetResponseCode() const override;
+ const ResponseCookies& GetCookies() const override;
+ void ReceivedContentWasMalformed() override;
// Override response access functions to return fake data.
- virtual bool GetResponseAsString(
- std::string* out_response_string) const override;
- virtual bool GetResponseAsFilePath(
- bool take_ownership, base::FilePath* out_response_path) const override;
+ bool GetResponseAsString(std::string* out_response_string) const override;
+ bool GetResponseAsFilePath(bool take_ownership,
+ base::FilePath* out_response_path) const override;
void GetExtraRequestHeaders(HttpRequestHeaders* headers) const;
@@ -241,13 +237,12 @@ class TestURLFetcherFactory : public URLFetcherFactory,
public ScopedURLFetcherFactory {
public:
TestURLFetcherFactory();
- virtual ~TestURLFetcherFactory();
+ ~TestURLFetcherFactory() override;
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
TestURLFetcher* GetFetcherByID(int id) const;
void RemoveFetcherFromMap(int id);
void SetDelegateForTests(TestURLFetcherDelegateForTests* delegate_for_tests);
@@ -299,11 +294,11 @@ class FakeURLFetcher : public TestURLFetcher {
// Start the request. This will call the given delegate asynchronously
// with the pre-baked response as parameter.
- virtual void Start() override;
+ void Start() override;
- virtual const GURL& GetURL() const override;
+ const GURL& GetURL() const override;
- virtual ~FakeURLFetcher();
+ ~FakeURLFetcher() override;
private:
// This is the method which actually calls the delegate that is passed in the
@@ -396,18 +391,17 @@ class FakeURLFetcherFactory : public URLFetcherFactory,
FakeURLFetcherFactory(URLFetcherFactory* default_factory,
const FakeURLFetcherCreator& creator);
- virtual ~FakeURLFetcherFactory();
+ ~FakeURLFetcherFactory() override;
// If no fake response is set for the given URL this method will delegate the
// call to |default_factory_| if it is not NULL, or return NULL if it is
// NULL.
// Otherwise, it will return a URLFetcher object which will respond with the
// pre-baked response that the client has set by calling SetFakeResponse().
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
// Sets the fake response for a given URL. The |response_data| may be empty.
// The |response_code| may be any HttpStatusCode. For instance, HTTP_OK will
@@ -453,14 +447,13 @@ class FakeURLFetcherFactory : public URLFetcherFactory,
class URLFetcherImplFactory : public URLFetcherFactory {
public:
URLFetcherImplFactory();
- virtual ~URLFetcherImplFactory();
+ ~URLFetcherImplFactory() override;
// This method will create a real URLFetcher.
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
};
} // namespace net
diff --git a/net/url_request/test_url_request_interceptor.cc b/net/url_request/test_url_request_interceptor.cc
index ec60e08..b0fd315 100644
--- a/net/url_request/test_url_request_interceptor.cc
+++ b/net/url_request/test_url_request_interceptor.cc
@@ -30,10 +30,10 @@ class TestURLRequestJob : public net::URLRequestFileJob {
file_path,
worker_task_runner) {}
- virtual int GetResponseCode() const override { return 200; }
+ int GetResponseCode() const override { return 200; }
private:
- virtual ~TestURLRequestJob() {}
+ ~TestURLRequestJob() override {}
DISALLOW_COPY_AND_ASSIGN(TestURLRequestJob);
};
@@ -54,7 +54,7 @@ class TestURLRequestInterceptor::Delegate : public net::URLRequestInterceptor {
network_task_runner_(network_task_runner),
worker_task_runner_(worker_task_runner),
hit_count_(0) {}
- virtual ~Delegate() {}
+ ~Delegate() override {}
void Register() {
net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
@@ -91,7 +91,7 @@ class TestURLRequestInterceptor::Delegate : public net::URLRequestInterceptor {
typedef std::map<GURL, base::FilePath> ResponseMap;
// When computing matches, this ignores the query parameters of the url.
- virtual net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index c064a42..6bf449f 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -122,15 +122,13 @@ class URLFetcherCore
base::FilePath* out_response_path);
// Overridden from URLRequest::Delegate:
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override;
- virtual void OnCertificateRequested(
- URLRequest* request,
- SSLCertRequestInfo* cert_request_info) override;
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override;
URLFetcherDelegate* delegate() const { return delegate_; }
static void CancelAll();
@@ -161,7 +159,7 @@ class URLFetcherCore
DISALLOW_COPY_AND_ASSIGN(Registry);
};
- virtual ~URLFetcherCore();
+ ~URLFetcherCore() override;
// Wrapper functions that allow us to ensure actions happen on the right
// thread.
diff --git a/net/url_request/url_fetcher_impl.h b/net/url_request/url_fetcher_impl.h
index e534904..29c8bd5 100644
--- a/net/url_request/url_fetcher_impl.h
+++ b/net/url_request/url_fetcher_impl.h
@@ -34,64 +34,59 @@ class NET_EXPORT_PRIVATE URLFetcherImpl : public URLFetcher {
URLFetcherImpl(const GURL& url,
RequestType request_type,
URLFetcherDelegate* d);
- virtual ~URLFetcherImpl();
+ ~URLFetcherImpl() override;
// URLFetcher implementation:
- virtual void SetUploadData(const std::string& upload_content_type,
- const std::string& upload_content) override;
- virtual void SetUploadFilePath(
+ void SetUploadData(const std::string& upload_content_type,
+ const std::string& upload_content) override;
+ void SetUploadFilePath(
const std::string& upload_content_type,
const base::FilePath& file_path,
uint64 range_offset,
uint64 range_length,
scoped_refptr<base::TaskRunner> file_task_runner) override;
- virtual void SetChunkedUpload(
- const std::string& upload_content_type) override;
- virtual void AppendChunkToUpload(const std::string& data,
- bool is_last_chunk) override;
- virtual void SetLoadFlags(int load_flags) override;
- virtual int GetLoadFlags() const override;
- virtual void SetReferrer(const std::string& referrer) override;
- virtual void SetReferrerPolicy(
- URLRequest::ReferrerPolicy referrer_policy) override;
- virtual void SetExtraRequestHeaders(
+ void SetChunkedUpload(const std::string& upload_content_type) override;
+ void AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) override;
+ void SetLoadFlags(int load_flags) override;
+ int GetLoadFlags() const override;
+ void SetReferrer(const std::string& referrer) override;
+ void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override;
+ void SetExtraRequestHeaders(
const std::string& extra_request_headers) override;
- virtual void AddExtraRequestHeader(const std::string& header_line) override;
- virtual void SetRequestContext(
+ void AddExtraRequestHeader(const std::string& header_line) override;
+ void SetRequestContext(
URLRequestContextGetter* request_context_getter) override;
- virtual void SetFirstPartyForCookies(
- const GURL& first_party_for_cookies) override;
- virtual void SetURLRequestUserData(
+ void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override;
+ void SetURLRequestUserData(
const void* key,
const CreateDataCallback& create_data_callback) override;
- virtual void SetStopOnRedirect(bool stop_on_redirect) override;
- virtual void SetAutomaticallyRetryOn5xx(bool retry) override;
- virtual void SetMaxRetriesOn5xx(int max_retries) override;
- virtual int GetMaxRetriesOn5xx() const override;
- virtual base::TimeDelta GetBackoffDelay() const override;
- virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
- virtual void SaveResponseToFileAtPath(
+ void SetStopOnRedirect(bool stop_on_redirect) override;
+ void SetAutomaticallyRetryOn5xx(bool retry) override;
+ void SetMaxRetriesOn5xx(int max_retries) override;
+ int GetMaxRetriesOn5xx() const override;
+ base::TimeDelta GetBackoffDelay() const override;
+ void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
+ void SaveResponseToFileAtPath(
const base::FilePath& file_path,
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseToTemporaryFile(
+ void SaveResponseToTemporaryFile(
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseWithWriter(
+ void SaveResponseWithWriter(
scoped_ptr<URLFetcherResponseWriter> response_writer) override;
- virtual HttpResponseHeaders* GetResponseHeaders() const override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual bool WasFetchedViaProxy() const override;
- virtual void Start() override;
- virtual const GURL& GetOriginalURL() const override;
- virtual const GURL& GetURL() const override;
- virtual const URLRequestStatus& GetStatus() const override;
- virtual int GetResponseCode() const override;
- virtual const ResponseCookies& GetCookies() const override;
- virtual void ReceivedContentWasMalformed() override;
- virtual bool GetResponseAsString(
- std::string* out_response_string) const override;
- virtual bool GetResponseAsFilePath(
- bool take_ownership,
- base::FilePath* out_response_path) const override;
+ HttpResponseHeaders* GetResponseHeaders() const override;
+ HostPortPair GetSocketAddress() const override;
+ bool WasFetchedViaProxy() const override;
+ void Start() override;
+ const GURL& GetOriginalURL() const override;
+ const GURL& GetURL() const override;
+ const URLRequestStatus& GetStatus() const override;
+ int GetResponseCode() const override;
+ const ResponseCookies& GetCookies() const override;
+ void ReceivedContentWasMalformed() override;
+ bool GetResponseAsString(std::string* out_response_string) const override;
+ bool GetResponseAsFilePath(bool take_ownership,
+ base::FilePath* out_response_path) const override;
static void CancelAll();
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index 5c97366..cf52773 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -67,12 +67,10 @@ class ThrottlingTestURLRequestContextGetter
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
- return context_;
- }
+ TestURLRequestContext* GetURLRequestContext() override { return context_; }
protected:
- virtual ~ThrottlingTestURLRequestContextGetter() {}
+ ~ThrottlingTestURLRequestContextGetter() override {}
TestURLRequestContext* const context_;
};
@@ -95,7 +93,7 @@ class URLFetcherTest : public testing::Test,
// Subclasses that override this should either call this function or
// CleanupAfterFetchComplete() at the end of their processing, depending on
// whether they want to check for a non-empty HTTP 200 response or not.
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
// Deletes |fetcher| and terminates the message loop.
void CleanupAfterFetchComplete();
@@ -146,10 +144,10 @@ class URLFetcherMockDnsTest : public URLFetcherTest {
virtual void SetUp() override;
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
GURL test_url_;
@@ -231,10 +229,10 @@ namespace {
class URLFetcherPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that does a POST of a file using
@@ -249,10 +247,10 @@ class URLFetcherPostFileTest : public URLFetcherTest {
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath path_;
@@ -264,10 +262,10 @@ class URLFetcherPostFileTest : public URLFetcherTest {
class URLFetcherEmptyPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests download progress reports.
@@ -279,12 +277,12 @@ class URLFetcherDownloadProgressTest : public URLFetcherTest {
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
protected:
// Download progress returned by the previous callback.
@@ -298,13 +296,14 @@ class URLFetcherDownloadProgressTest : public URLFetcherTest {
class URLFetcherDownloadProgressCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
bool cancelled_;
};
@@ -313,12 +312,13 @@ class URLFetcherDownloadProgressCancelTest : public URLFetcherTest {
class URLFetcherUploadProgressTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchUploadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchUploadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
int64 previous_progress_;
std::string chunk_;
@@ -329,14 +329,15 @@ class URLFetcherUploadProgressTest : public URLFetcherTest {
class URLFetcherHeadersTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests SocketAddress.
class URLFetcherSocketAddressTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
protected:
std::string expected_host_;
uint16 expected_port_;
@@ -349,10 +350,10 @@ class URLFetcherStopOnRedirectTest : public URLFetcherTest {
virtual ~URLFetcherStopOnRedirectTest();
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
// The URL we should be redirected to.
@@ -365,10 +366,11 @@ class URLFetcherStopOnRedirectTest : public URLFetcherTest {
class URLFetcherProtectTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -378,10 +380,11 @@ class URLFetcherProtectTest : public URLFetcherTest {
class URLFetcherProtectTestPassedThrough : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -392,7 +395,7 @@ class URLFetcherBadHTTPSTest : public URLFetcherTest {
URLFetcherBadHTTPSTest();
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath cert_dir_;
@@ -402,10 +405,10 @@ class URLFetcherBadHTTPSTest : public URLFetcherTest {
class URLFetcherCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
void CancelRequest();
};
@@ -418,7 +421,7 @@ class CancelTestURLRequestContext : public ThrottlingTestURLRequestContext {
}
private:
- virtual ~CancelTestURLRequestContext() {
+ ~CancelTestURLRequestContext() override {
// The d'tor should execute in the IO thread. Post the quit task to the
// current thread.
base::MessageLoop::current()->PostTask(FROM_HERE,
@@ -439,7 +442,7 @@ class CancelTestURLRequestContextGetter
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
+ TestURLRequestContext* GetURLRequestContext() override {
if (!context_.get()) {
context_.reset(new CancelTestURLRequestContext());
DCHECK(context_->throttler_manager());
@@ -474,7 +477,7 @@ class CancelTestURLRequestContextGetter
}
protected:
- virtual ~CancelTestURLRequestContextGetter() {}
+ ~CancelTestURLRequestContextGetter() override {}
private:
scoped_ptr<TestURLRequestContext> context_;
@@ -487,7 +490,8 @@ class CancelTestURLRequestContextGetter
class URLFetcherMultipleAttemptTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
std::string data_;
};
@@ -501,7 +505,7 @@ class URLFetcherFileTest : public URLFetcherTest {
void CreateFetcherForTempFile(const GURL& url);
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
base::FilePath expected_file_;
diff --git a/net/url_request/url_fetcher_response_writer.h b/net/url_request/url_fetcher_response_writer.h
index 3321f5c..fb99522 100644
--- a/net/url_request/url_fetcher_response_writer.h
+++ b/net/url_request/url_fetcher_response_writer.h
@@ -60,17 +60,17 @@ class NET_EXPORT URLFetcherResponseWriter {
class NET_EXPORT URLFetcherStringWriter : public URLFetcherResponseWriter {
public:
URLFetcherStringWriter();
- virtual ~URLFetcherStringWriter();
+ ~URLFetcherStringWriter() override;
const std::string& data() const { return data_; }
// URLFetcherResponseWriter overrides:
- virtual int Initialize(const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buffer,
- int num_bytes,
- const CompletionCallback& callback) override;
- virtual int Finish(const CompletionCallback& callback) override;
- virtual URLFetcherStringWriter* AsStringWriter() override;
+ int Initialize(const CompletionCallback& callback) override;
+ int Write(IOBuffer* buffer,
+ int num_bytes,
+ const CompletionCallback& callback) override;
+ int Finish(const CompletionCallback& callback) override;
+ URLFetcherStringWriter* AsStringWriter() override;
private:
std::string data_;
@@ -86,17 +86,17 @@ class NET_EXPORT URLFetcherFileWriter : public URLFetcherResponseWriter {
URLFetcherFileWriter(
scoped_refptr<base::SequencedTaskRunner> file_task_runner,
const base::FilePath& file_path);
- virtual ~URLFetcherFileWriter();
+ ~URLFetcherFileWriter() override;
const base::FilePath& file_path() const { return file_path_; }
// URLFetcherResponseWriter overrides:
- virtual int Initialize(const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buffer,
- int num_bytes,
- const CompletionCallback& callback) override;
- virtual int Finish(const CompletionCallback& callback) override;
- virtual URLFetcherFileWriter* AsFileWriter() override;
+ int Initialize(const CompletionCallback& callback) override;
+ int Write(IOBuffer* buffer,
+ int num_bytes,
+ const CompletionCallback& callback) override;
+ int Finish(const CompletionCallback& callback) override;
+ URLFetcherFileWriter* AsFileWriter() override;
// Drops ownership of the file at |file_path_|.
// This class will not delete it or write to it again.
diff --git a/net/url_request/url_range_request_job.h b/net/url_request/url_range_request_job.h
index 190389d..38a6802 100644
--- a/net/url_request/url_range_request_job.h
+++ b/net/url_request/url_range_request_job.h
@@ -24,14 +24,13 @@ class NET_EXPORT URLRangeRequestJob : public URLRequestJob {
URLRangeRequestJob(URLRequest* request,
NetworkDelegate* delegate);
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
const std::vector<HttpByteRange>& ranges() const { return ranges_; }
int range_parse_result() const { return range_parse_result_; }
protected:
- virtual ~URLRangeRequestJob();
+ ~URLRangeRequestJob() override;
private:
std::vector<HttpByteRange> ranges_;
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index a0d5789..3db6c68 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -278,7 +278,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// If destroyed after Start() has been called but while IO is pending,
// then the request will be effectively canceled and the delegate
// will not have any more of its methods called.
- virtual ~URLRequest();
+ ~URLRequest() override;
// Changes the default cookie policy from allowing all cookies to blocking all
// cookies. Embedders that want to implement a more flexible policy should
diff --git a/net/url_request/url_request_about_job.h b/net/url_request/url_request_about_job.h
index d4b4867..36778b8 100644
--- a/net/url_request/url_request_about_job.h
+++ b/net/url_request/url_request_about_job.h
@@ -18,11 +18,11 @@ class NET_EXPORT URLRequestAboutJob : public URLRequestJob {
URLRequestAboutJob(URLRequest* request, NetworkDelegate* network_delegate);
// URLRequestJob:
- virtual void Start() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
+ void Start() override;
+ bool GetMimeType(std::string* mime_type) const override;
private:
- virtual ~URLRequestAboutJob();
+ ~URLRequestAboutJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 2e2fcc4..666bd03 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -51,25 +51,25 @@ namespace {
class BasicNetworkDelegate : public NetworkDelegate {
public:
BasicNetworkDelegate() {}
- virtual ~BasicNetworkDelegate() {}
+ ~BasicNetworkDelegate() override {}
private:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -78,22 +78,21 @@ class BasicNetworkDelegate : public NetworkDelegate {
return OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
+ void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {}
+ void OnPACScriptError(int line_number, const base::string16& error) override {
+ }
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -101,31 +100,30 @@ class BasicNetworkDelegate : public NetworkDelegate {
return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
// Returning true will only enable throttling if there's also a
// URLRequestThrottlerManager, which there isn't, by default.
return true;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
@@ -165,9 +163,7 @@ class BasicURLRequestContext : public URLRequestContext {
}
protected:
- virtual ~BasicURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~BasicURLRequestContext() override { AssertNoURLRequests(); }
private:
// Threads should be torn down last.
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index f0f4b82..677023c 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -43,15 +43,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/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
index aa2d64b..17d17bd 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -62,13 +62,13 @@ public:
const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner);
// net::URLRequestContextGetter implementation:
- virtual net::URLRequestContext* GetURLRequestContext() override;
+ net::URLRequestContext* GetURLRequestContext() override;
- virtual scoped_refptr<base::SingleThreadTaskRunner>
- GetNetworkTaskRunner() const override;
+ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+ const override;
private:
- virtual ~TrivialURLRequestContextGetter();
+ ~TrivialURLRequestContextGetter() override;
net::URLRequestContext* context_;
const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
diff --git a/net/url_request/url_request_data_job.h b/net/url_request/url_request_data_job.h
index c39ae8d8..0b3c7fa 100644
--- a/net/url_request/url_request_data_job.h
+++ b/net/url_request/url_request_data_job.h
@@ -30,13 +30,13 @@ class NET_EXPORT URLRequestDataJob : public URLRequestSimpleJob {
URLRequestDataJob(URLRequest* request, NetworkDelegate* network_delegate);
// URLRequestSimpleJob
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override;
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override;
private:
- virtual ~URLRequestDataJob();
+ ~URLRequestDataJob() override;
DISALLOW_COPY_AND_ASSIGN(URLRequestDataJob);
};
diff --git a/net/url_request/url_request_error_job.h b/net/url_request/url_request_error_job.h
index 0bb37ec..059db26 100644
--- a/net/url_request/url_request_error_job.h
+++ b/net/url_request/url_request_error_job.h
@@ -20,10 +20,10 @@ class NET_EXPORT URLRequestErrorJob : public URLRequestJob {
NetworkDelegate* network_delegate,
int error);
- virtual void Start() override;
+ void Start() override;
private:
- virtual ~URLRequestErrorJob();
+ ~URLRequestErrorJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_file_dir_job.h b/net/url_request/url_request_file_dir_job.h
index b353697..dfb2d74 100644
--- a/net/url_request/url_request_file_dir_job.h
+++ b/net/url_request/url_request_file_dir_job.h
@@ -27,21 +27,18 @@ class URLRequestFileDirJob
virtual void StartAsync();
// Overridden from URLRequestJob:
- virtual void Start() override;
- virtual void Kill() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int* bytes_read) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
+ void Start() override;
+ void Kill() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
// Overridden from DirectoryLister::DirectoryListerDelegate:
- virtual void OnListFile(
- const DirectoryLister::DirectoryListerData& data) override;
- virtual void OnListDone(int error) override;
+ void OnListFile(const DirectoryLister::DirectoryListerData& data) override;
+ void OnListDone(int error) override;
private:
- virtual ~URLRequestFileDirJob();
+ ~URLRequestFileDirJob() override;
void CloseLister();
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index 3a5aae7..fe7c6e9 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -36,24 +36,20 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
const scoped_refptr<base::TaskRunner>& file_task_runner);
// URLRequestJob:
- virtual void Start() override;
- virtual void Kill() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int* bytes_read) override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
- virtual Filter* SetupFilter() const override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
+ void Start() override;
+ void Kill() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
+ Filter* SetupFilter() const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
// An interface for subclasses who wish to monitor read operations.
virtual void OnSeekComplete(int64 result);
virtual void OnReadComplete(net::IOBuffer* buf, int result);
protected:
- virtual ~URLRequestFileJob();
+ ~URLRequestFileJob() override;
int64 remaining_bytes() const { return remaining_bytes_; }
diff --git a/net/url_request/url_request_file_job_unittest.cc b/net/url_request/url_request_file_job_unittest.cc
index ba87766..f4d7f7a 100644
--- a/net/url_request/url_request_file_job_unittest.cc
+++ b/net/url_request/url_request_file_job_unittest.cc
@@ -39,14 +39,14 @@ class URLRequestFileJobWithCallbacks : public URLRequestFileJob {
const std::vector<std::string>& data_chunks() { return data_chunks_; }
protected:
- virtual ~URLRequestFileJobWithCallbacks() {}
+ ~URLRequestFileJobWithCallbacks() override {}
- virtual void OnSeekComplete(int64 result) override {
+ void OnSeekComplete(int64 result) override {
ASSERT_EQ(seek_position_, 0);
seek_position_ = result;
}
- virtual void OnReadComplete(IOBuffer* buf, int result) override {
+ void OnReadComplete(IOBuffer* buf, int result) override {
data_chunks_.push_back(std::string(buf->data(), result));
}
@@ -67,9 +67,9 @@ class CallbacksJobFactory : public URLRequestJobFactory {
: path_(path), observer_(observer) {
}
- virtual ~CallbacksJobFactory() {}
+ ~CallbacksJobFactory() override {}
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override {
@@ -82,15 +82,15 @@ class CallbacksJobFactory : public URLRequestJobFactory {
return job;
}
- virtual bool IsHandledProtocol(const std::string& scheme) const override {
+ bool IsHandledProtocol(const std::string& scheme) const override {
return scheme == "file";
}
- virtual bool IsHandledURL(const GURL& url) const override {
+ bool IsHandledURL(const GURL& url) const override {
return IsHandledProtocol(url.scheme());
}
- virtual bool IsSafeRedirectTarget(const GURL& location) const override {
+ bool IsSafeRedirectTarget(const GURL& location) const override {
return false;
}
@@ -116,7 +116,7 @@ bool CreateTempFileWithContent(const std::string& content,
class JobObserverImpl : public CallbacksJobFactory::JobObserver {
public:
- virtual void OnJobCreated(URLRequestFileJobWithCallbacks* job) override {
+ void OnJobCreated(URLRequestFileJobWithCallbacks* job) override {
jobs_.push_back(job);
}
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index 04d61cc..eaa3325 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -18,11 +18,12 @@ class URLRequestFilterInterceptor : public URLRequestInterceptor {
public:
explicit URLRequestFilterInterceptor(URLRequest::ProtocolFactory* factory)
: factory_(factory) {}
- virtual ~URLRequestFilterInterceptor() {}
+ ~URLRequestFilterInterceptor() override {}
// URLRequestInterceptor implementation.
- virtual URLRequestJob* MaybeInterceptRequest(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeInterceptRequest(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return factory_(request, network_delegate, request->url().scheme());
}
diff --git a/net/url_request/url_request_filter.h b/net/url_request/url_request_filter.h
index 3388d92..4366dbd 100644
--- a/net/url_request/url_request_filter.h
+++ b/net/url_request/url_request_filter.h
@@ -67,7 +67,7 @@ class NET_EXPORT URLRequestFilter : public URLRequestInterceptor {
int hit_count() const { return hit_count_; }
// URLRequestInterceptor implementation:
- virtual URLRequestJob* MaybeInterceptRequest(
+ URLRequestJob* MaybeInterceptRequest(
URLRequest* request,
NetworkDelegate* network_delegate) const override;
@@ -79,7 +79,7 @@ class NET_EXPORT URLRequestFilter : public URLRequestInterceptor {
typedef base::hash_map<std::string, URLRequestInterceptor*> URLInterceptorMap;
URLRequestFilter();
- virtual ~URLRequestFilter();
+ ~URLRequestFilter() override;
// Maps hostnames to interceptors. Hostnames take priority over URLs.
HostnameInterceptorMap hostname_interceptor_map_;
diff --git a/net/url_request/url_request_filter_unittest.cc b/net/url_request/url_request_filter_unittest.cc
index bd2a782..3d23b7bf 100644
--- a/net/url_request/url_request_filter_unittest.cc
+++ b/net/url_request/url_request_filter_unittest.cc
@@ -40,10 +40,11 @@ URLRequestTestJob* job_c;
class TestURLRequestInterceptor : public URLRequestInterceptor {
public:
- virtual ~TestURLRequestInterceptor() {}
+ ~TestURLRequestInterceptor() override {}
- virtual URLRequestJob* MaybeInterceptRequest(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeInterceptRequest(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
job_c = new URLRequestTestJob(request, network_delegate);
return job_c;
}
diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h
index 61d4cff..74caf72 100644
--- a/net/url_request/url_request_ftp_job.h
+++ b/net/url_request/url_request_ftp_job.h
@@ -34,16 +34,16 @@ class NET_EXPORT_PRIVATE URLRequestFtpJob : public URLRequestJob {
FtpAuthCache* ftp_auth_cache);
protected:
- virtual ~URLRequestFtpJob();
+ ~URLRequestFtpJob() override;
// Overridden from URLRequestJob:
- virtual bool IsSafeRedirect(const GURL& location) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual void Kill() override;
+ bool IsSafeRedirect(const GURL& location) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ HostPortPair GetSocketAddress() const override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ void Kill() override;
RequestPriority priority() const { return priority_; }
@@ -62,18 +62,16 @@ class NET_EXPORT_PRIVATE URLRequestFtpJob : public URLRequestJob {
void LogFtpServerType(char server_type);
// Overridden from URLRequestJob:
- virtual LoadState GetLoadState() const override;
- virtual bool NeedsAuth() override;
- virtual void GetAuthChallengeInfo(
+ LoadState GetLoadState() const override;
+ bool NeedsAuth() override;
+ void GetAuthChallengeInfo(
scoped_refptr<AuthChallengeInfo>* auth_info) override;
- virtual void SetAuth(const AuthCredentials& credentials) override;
- virtual void CancelAuth() override;
+ void SetAuth(const AuthCredentials& credentials) override;
+ void CancelAuth() override;
// TODO(ibrar): Yet to give another look at this function.
- virtual UploadProgress GetUploadProgress() const override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
+ UploadProgress GetUploadProgress() const override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
void HandleAuthNeededResponse();
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index 629613d..5f41edc 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -67,18 +67,15 @@ class SimpleProxyConfigService : public ProxyConfigService {
config_.proxy_rules().ParseFromString("ftp=localhost");
}
- virtual void AddObserver(Observer* observer) override {
- observer_ = observer;
- }
+ void AddObserver(Observer* observer) override { observer_ = observer; }
- virtual void RemoveObserver(Observer* observer) override {
+ void RemoveObserver(Observer* observer) override {
if (observer_ == observer) {
observer_ = NULL;
}
}
- virtual ConfigAvailability GetLatestProxyConfig(
- ProxyConfig* config) override {
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override {
*config = config_;
return CONFIG_VALID;
}
@@ -108,16 +105,14 @@ class TestURLRequestFtpJob : public URLRequestFtpJob {
using URLRequestFtpJob::priority;
protected:
- virtual ~TestURLRequestFtpJob() {}
+ ~TestURLRequestFtpJob() override {}
};
class MockFtpTransactionFactory : public FtpTransactionFactory {
public:
- virtual FtpTransaction* CreateTransaction() override {
- return NULL;
- }
+ FtpTransaction* CreateTransaction() override { return NULL; }
- virtual void Suspend(bool suspend) override {}
+ void Suspend(bool suspend) override {}
};
// Fixture for priority-related tests. Priority matters when there is
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index fc26e94..a53bbab 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -55,20 +55,20 @@ namespace net {
class URLRequestHttpJob::HttpFilterContext : public FilterContext {
public:
explicit HttpFilterContext(URLRequestHttpJob* job);
- virtual ~HttpFilterContext();
+ ~HttpFilterContext() override;
// FilterContext implementation.
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetURL(GURL* gurl) const override;
- virtual bool GetContentDisposition(std::string* disposition) const override;
- virtual base::Time GetRequestTime() const override;
- virtual bool IsCachedContent() const override;
- virtual bool IsDownload() const override;
- virtual bool SdchResponseExpected() const override;
- virtual int64 GetByteReadCount() const override;
- virtual int GetResponseCode() const override;
- virtual const URLRequestContext* GetURLRequestContext() const override;
- virtual void RecordPacketStats(StatisticSelector statistic) const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetURL(GURL* gurl) const override;
+ bool GetContentDisposition(std::string* disposition) const override;
+ base::Time GetRequestTime() const override;
+ bool IsCachedContent() const override;
+ bool IsDownload() const override;
+ bool SdchResponseExpected() const override;
+ int64 GetByteReadCount() const override;
+ int GetResponseCode() const override;
+ const URLRequestContext* GetURLRequestContext() const override;
+ void RecordPacketStats(StatisticSelector statistic) const override;
// Method to allow us to reset filter context for a response that should have
// been SDCH encoded when there is an update due to an explicit HTTP header.
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index 4b0cc67..f4bea7e 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -45,12 +45,12 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob {
NetworkDelegate* network_delegate,
const HttpUserAgentSettings* http_user_agent_settings);
- virtual ~URLRequestHttpJob();
+ ~URLRequestHttpJob() override;
// Overridden from URLRequestJob:
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual void Kill() override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ void Kill() override;
RequestPriority priority() const {
return priority_;
@@ -99,44 +99,40 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob {
void RestartTransactionWithAuth(const AuthCredentials& credentials);
// Overridden from URLRequestJob:
- virtual void SetUpload(UploadDataStream* upload) override;
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual bool GetResponseCookies(std::vector<std::string>* cookies) override;
- virtual int GetResponseCode() const override;
- virtual Filter* SetupFilter() const override;
- virtual bool CopyFragmentOnRedirect(const GURL& location) const override;
- virtual bool IsSafeRedirect(const GURL& location) override;
- virtual bool NeedsAuth() override;
- virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override;
- virtual void SetAuth(const AuthCredentials& credentials) override;
- virtual void CancelAuth() override;
- virtual void ContinueWithCertificate(X509Certificate* client_cert) override;
- virtual void ContinueDespiteLastError() override;
- virtual void ResumeNetworkStart() override;
- virtual bool ReadRawData(IOBuffer* buf, int buf_size,
- int* bytes_read) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual void DoneReadingRedirectResponse() override;
-
- virtual HostPortPair GetSocketAddress() const override;
- virtual void NotifyURLRequestDestroyed() override;
+ void SetUpload(UploadDataStream* upload) override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ bool GetResponseCookies(std::vector<std::string>* cookies) override;
+ int GetResponseCode() const override;
+ Filter* SetupFilter() const override;
+ bool CopyFragmentOnRedirect(const GURL& location) const override;
+ bool IsSafeRedirect(const GURL& location) override;
+ bool NeedsAuth() override;
+ void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override;
+ void SetAuth(const AuthCredentials& credentials) override;
+ void CancelAuth() override;
+ void ContinueWithCertificate(X509Certificate* client_cert) override;
+ void ContinueDespiteLastError() override;
+ void ResumeNetworkStart() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ void DoneReadingRedirectResponse() override;
+
+ HostPortPair GetSocketAddress() const override;
+ void NotifyURLRequestDestroyed() override;
void RecordTimer();
void ResetTimer();
- virtual void UpdatePacketReadTimes() override;
+ void UpdatePacketReadTimes() override;
void RecordPacketStats(FilterContext::StatisticSelector statistic) const;
void RecordCompressionHistograms();
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index c6848d3..b8892c7 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -43,7 +43,7 @@ class TestURLRequestHttpJob : public URLRequestHttpJob {
using URLRequestHttpJob::priority;
protected:
- virtual ~TestURLRequestHttpJob() {}
+ ~TestURLRequestHttpJob() override {}
};
class URLRequestHttpJobTest : public ::testing::Test {
@@ -253,61 +253,59 @@ class FakeWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {
}
// Fake implementation of 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 {
initialize_stream_was_called_ = true;
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 {}
+ void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override { return false; }
+ bool IsResponseBodyComplete() const override { return false; }
- virtual bool CanFindEndOfResponse() const override { return false; }
+ bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
+ bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
- virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
- override {
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
return false;
}
- 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 { return false; }
+ bool IsSpdyHttpStream() const override { return false; }
- virtual void Drain(HttpNetworkSession* session) override {}
+ void Drain(HttpNetworkSession* session) override {}
- virtual void SetPriority(RequestPriority priority) override {}
+ void SetPriority(RequestPriority priority) override {}
// Fake implementation of WebSocketHandshakeStreamBase method(s)
- virtual scoped_ptr<WebSocketStream> Upgrade() override {
+ scoped_ptr<WebSocketStream> Upgrade() override {
return scoped_ptr<WebSocketStream>();
}
diff --git a/net/url_request/url_request_intercepting_job_factory.h b/net/url_request/url_request_intercepting_job_factory.h
index 909a25c..857dbf4 100644
--- a/net/url_request/url_request_intercepting_job_factory.h
+++ b/net/url_request/url_request_intercepting_job_factory.h
@@ -35,16 +35,16 @@ class NET_EXPORT URLRequestInterceptingJobFactory
URLRequestInterceptingJobFactory(
scoped_ptr<URLRequestJobFactory> job_factory,
scoped_ptr<URLRequestInterceptor> interceptor);
- virtual ~URLRequestInterceptingJobFactory();
+ ~URLRequestInterceptingJobFactory() override;
// URLRequestJobFactory implementation
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override;
- virtual bool IsHandledProtocol(const std::string& scheme) const override;
- virtual bool IsHandledURL(const GURL& url) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ bool IsHandledProtocol(const std::string& scheme) const override;
+ bool IsHandledURL(const GURL& url) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
scoped_ptr<URLRequestJobFactory> job_factory_;
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 5b8760f..e824689 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -219,7 +219,7 @@ class NET_EXPORT URLRequestJob
// base::PowerObserver methods:
// We invoke URLRequestJob::Kill on suspend (crbug.com/4606).
- virtual void OnSuspend() override;
+ void OnSuspend() override;
// Called after a NetworkDelegate has been informed that the URLRequest
// will be destroyed. This is used to track that no pending callbacks
@@ -229,7 +229,7 @@ class NET_EXPORT URLRequestJob
protected:
friend class base::RefCounted<URLRequestJob>;
- virtual ~URLRequestJob();
+ ~URLRequestJob() override;
// Notifies the job that a certificate is requested.
void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info);
diff --git a/net/url_request/url_request_job_factory_impl.h b/net/url_request/url_request_job_factory_impl.h
index 94112c1..695661e 100644
--- a/net/url_request/url_request_job_factory_impl.h
+++ b/net/url_request/url_request_job_factory_impl.h
@@ -20,7 +20,7 @@ class URLRequestInterceptor;
class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory {
public:
URLRequestJobFactoryImpl();
- virtual ~URLRequestJobFactoryImpl();
+ ~URLRequestJobFactoryImpl() override;
// Sets the ProtocolHandler for a scheme. Returns true on success, false on
// failure (a ProtocolHandler already exists for |scheme|). On success,
@@ -29,13 +29,13 @@ class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory {
ProtocolHandler* protocol_handler);
// URLRequestJobFactory implementation
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override;
- virtual bool IsHandledProtocol(const std::string& scheme) const override;
- virtual bool IsHandledURL(const GURL& url) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ bool IsHandledProtocol(const std::string& scheme) const override;
+ bool IsHandledURL(const GURL& url) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
// For testing only.
diff --git a/net/url_request/url_request_job_factory_impl_unittest.cc b/net/url_request/url_request_job_factory_impl_unittest.cc
index 61467f1..2c7b3e2 100644
--- a/net/url_request/url_request_job_factory_impl_unittest.cc
+++ b/net/url_request/url_request_job_factory_impl_unittest.cc
@@ -26,7 +26,7 @@ class MockURLRequestJob : public URLRequestJob {
status_(status),
weak_factory_(this) {}
- virtual void Start() override {
+ void Start() override {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
base::MessageLoop::current()->PostTask(
@@ -35,7 +35,7 @@ class MockURLRequestJob : public URLRequestJob {
}
protected:
- virtual ~MockURLRequestJob() {}
+ ~MockURLRequestJob() override {}
private:
void StartAsync() {
@@ -49,8 +49,9 @@ class MockURLRequestJob : public URLRequestJob {
class DummyProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
public:
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return new MockURLRequestJob(
request,
network_delegate,
diff --git a/net/url_request/url_request_redirect_job.h b/net/url_request/url_request_redirect_job.h
index 54bc3f0..ab08399 100644
--- a/net/url_request/url_request_redirect_job.h
+++ b/net/url_request/url_request_redirect_job.h
@@ -42,15 +42,14 @@ class NET_EXPORT URLRequestRedirectJob : public URLRequestJob {
const std::string& redirect_reason);
// URLRequestJob implementation:
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void Start() override;
- virtual bool CopyFragmentOnRedirect(const GURL& location) const override;
- virtual int GetResponseCode() const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void Start() override;
+ bool CopyFragmentOnRedirect(const GURL& location) const override;
+ int GetResponseCode() const override;
private:
- virtual ~URLRequestRedirectJob();
+ ~URLRequestRedirectJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_simple_job.h b/net/url_request/url_request_simple_job.h
index 01bd319..85d8f7e 100644
--- a/net/url_request/url_request_simple_job.h
+++ b/net/url_request/url_request_simple_job.h
@@ -20,15 +20,13 @@ class NET_EXPORT URLRequestSimpleJob : public URLRangeRequestJob {
public:
URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate);
- virtual void Start() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
+ void Start() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
protected:
- virtual ~URLRequestSimpleJob();
+ ~URLRequestSimpleJob() override;
// Subclasses must override the way response data is determined.
// The return value should be:
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index b75da80..5ee71b5 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -32,10 +32,10 @@ class MockSimpleJob : public URLRequestSimpleJob {
}
protected:
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override {
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override {
mime_type->assign("text/plain");
charset->assign("US-ASCII");
data->assign(kTestData);
@@ -43,7 +43,7 @@ class MockSimpleJob : public URLRequestSimpleJob {
}
private:
- virtual ~MockSimpleJob() {}
+ ~MockSimpleJob() override {}
std::string data_;
@@ -53,7 +53,7 @@ class MockSimpleJob : public URLRequestSimpleJob {
class SimpleJobProtocolHandler :
public URLRequestJobFactory::ProtocolHandler {
public:
- virtual URLRequestJob* MaybeCreateJob(
+ URLRequestJob* MaybeCreateJob(
URLRequest* request,
NetworkDelegate* network_delegate) const override {
return new MockSimpleJob(request, network_delegate);
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index 3806e25..ecf3943 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -27,8 +27,9 @@ base::LazyInstance<URLRequestJobList>::Leaky
class TestJobProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
public:
// URLRequestJobFactory::ProtocolHandler implementation:
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return new URLRequestTestJob(request, network_delegate);
}
};
diff --git a/net/url_request/url_request_test_job.h b/net/url_request/url_request_test_job.h
index f0f26fd..fbdbe0f 100644
--- a/net/url_request/url_request_test_job.h
+++ b/net/url_request/url_request_test_job.h
@@ -108,19 +108,15 @@ class NET_EXPORT_PRIVATE URLRequestTestJob : public URLRequestJob {
static URLRequestJobFactory::ProtocolHandler* CreateProtocolHandler();
// Job functions
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
- virtual void Kill() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual int GetResponseCode() const override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ void Kill() override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ int GetResponseCode() const override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
protected:
// Override to specify whether the next read done from this job will
@@ -133,7 +129,7 @@ class NET_EXPORT_PRIVATE URLRequestTestJob : public URLRequestJob {
// When the stage is DONE, this job will not be put on the queue.
enum Stage { WAITING, DATA_AVAILABLE, ALL_DATA, DONE };
- virtual ~URLRequestTestJob();
+ ~URLRequestTestJob() override;
// Call to process the next opeation, usually sending a notification, and
// advancing the stage if necessary. THIS MAY DELETE THE OBJECT.
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index d301154..5784931 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -58,7 +58,7 @@ class TestURLRequestContext : public URLRequestContext {
// URLRequestContext before it is constructed completely. If
// |delay_initialization| is true, Init() needs be be called manually.
explicit TestURLRequestContext(bool delay_initialization);
- virtual ~TestURLRequestContext();
+ ~TestURLRequestContext() override;
void Init();
@@ -108,12 +108,12 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
scoped_ptr<TestURLRequestContext> context);
// URLRequestContextGetter implementation.
- virtual TestURLRequestContext* GetURLRequestContext() override;
- virtual scoped_refptr<base::SingleThreadTaskRunner>
- GetNetworkTaskRunner() const override;
+ TestURLRequestContext* GetURLRequestContext() override;
+ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+ const override;
protected:
- virtual ~TestURLRequestContextGetter();
+ ~TestURLRequestContextGetter() override;
private:
const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
@@ -125,7 +125,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
class TestDelegate : public URLRequest::Delegate {
public:
TestDelegate();
- virtual ~TestDelegate();
+ ~TestDelegate() override;
void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; }
void set_cancel_in_response_started(bool val) { cancel_in_rs_ = val; }
@@ -169,21 +169,20 @@ class TestDelegate : public URLRequest::Delegate {
void ClearFullRequestHeaders();
// URLRequest::Delegate:
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override;
- virtual void OnBeforeNetworkStart(URLRequest* request, bool* defer) override;
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override;
+ void OnBeforeNetworkStart(URLRequest* request, bool* defer) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
// NOTE: |fatal| causes |certificate_errors_are_fatal_| to be set to true.
// (Unit tests use this as a post-condition.) But for policy, this method
// consults |allow_certificate_errors_|.
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool fatal) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
static const int kBufferSize = 4096;
@@ -229,7 +228,7 @@ class TestNetworkDelegate : public NetworkDelegate {
};
TestNetworkDelegate();
- virtual ~TestNetworkDelegate();
+ ~TestNetworkDelegate() override;
// Writes the LoadTimingInfo during the most recent call to OnBeforeRedirect.
bool GetLoadTimingInfoBeforeRedirect(
@@ -284,51 +283,45 @@ class TestNetworkDelegate : public NetworkDelegate {
protected:
// NetworkDelegate:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override;
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override;
- virtual void OnBeforeSendProxyHeaders(
- net::URLRequest* request,
- const net::ProxyInfo& proxy_info,
- net::HttpRequestHeaders* headers) override;
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override;
- virtual int OnHeadersReceived(
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override;
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override;
+ void OnBeforeSendProxyHeaders(net::URLRequest* request,
+ const net::ProxyInfo& proxy_info,
+ net::HttpRequestHeaders* headers) override;
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override;
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers,
GURL* allowed_unsafe_redirect_url) override;
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override;
- virtual void OnCompleted(URLRequest* request, bool started) override;
- virtual void OnURLRequestDestroyed(URLRequest* request) override;
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override;
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ void OnBeforeRedirect(URLRequest* request, const GURL& new_location) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override;
+ void OnCompleted(URLRequest* request, bool started) override;
+ void OnURLRequestDestroyed(URLRequest* request) override;
+ void OnPACScriptError(int line_number, const base::string16& error) override;
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
AuthCredentials* credentials) override;
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override;
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override;
- virtual bool OnCanAccessFile(const URLRequest& request,
- const base::FilePath& path) const override;
- virtual bool OnCanThrottleRequest(
- const URLRequest& request) const override;
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override;
- virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override;
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override;
+ bool OnCanAccessFile(const URLRequest& request,
+ const base::FilePath& path) const override;
+ bool OnCanThrottleRequest(const URLRequest& request) const override;
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override;
+ bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
const URLRequest& request,
const GURL& target_url,
const GURL& referrer_url) const override;
@@ -406,7 +399,7 @@ class TestJobInterceptor : public URLRequestJobFactory::ProtocolHandler {
public:
TestJobInterceptor();
- virtual URLRequestJob* MaybeCreateJob(
+ URLRequestJob* MaybeCreateJob(
URLRequest* request,
NetworkDelegate* network_delegate) const override;
void set_main_intercept_job(URLRequestJob* job);
diff --git a/net/url_request/url_request_throttler_entry.h b/net/url_request/url_request_throttler_entry.h
index 489eecb..281d0f5 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -93,19 +93,18 @@ class NET_EXPORT URLRequestThrottlerEntry
void DetachManager();
// Implementation of URLRequestThrottlerEntryInterface.
- virtual bool ShouldRejectRequest(
- const URLRequest& request,
- NetworkDelegate* network_delegate) const override;
- virtual int64 ReserveSendingTimeForNextRequest(
+ bool ShouldRejectRequest(const URLRequest& request,
+ NetworkDelegate* network_delegate) const override;
+ int64 ReserveSendingTimeForNextRequest(
const base::TimeTicks& earliest_time) override;
- virtual base::TimeTicks GetExponentialBackoffReleaseTime() const override;
- virtual void UpdateWithResponse(
+ base::TimeTicks GetExponentialBackoffReleaseTime() const override;
+ void UpdateWithResponse(
const std::string& host,
const URLRequestThrottlerHeaderInterface* response) override;
- virtual void ReceivedContentWasMalformed(int response_code) override;
+ void ReceivedContentWasMalformed(int response_code) override;
protected:
- virtual ~URLRequestThrottlerEntry();
+ ~URLRequestThrottlerEntry() override;
void Initialize();
diff --git a/net/url_request/url_request_throttler_header_adapter.h b/net/url_request/url_request_throttler_header_adapter.h
index ddf7865..e5fbcd2 100644
--- a/net/url_request/url_request_throttler_header_adapter.h
+++ b/net/url_request/url_request_throttler_header_adapter.h
@@ -20,11 +20,11 @@ class URLRequestThrottlerHeaderAdapter
: public URLRequestThrottlerHeaderInterface {
public:
explicit URLRequestThrottlerHeaderAdapter(HttpResponseHeaders* headers);
- virtual ~URLRequestThrottlerHeaderAdapter();
+ ~URLRequestThrottlerHeaderAdapter() override;
// Implementation of URLRequestThrottlerHeaderInterface
- virtual std::string GetNormalizedValue(const std::string& key) const override;
- virtual int GetResponseCode() const override;
+ std::string GetNormalizedValue(const std::string& key) const override;
+ int GetResponseCode() const override;
private:
const scoped_refptr<HttpResponseHeaders> response_header_;
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h
index 10c6561..ee2f221 100644
--- a/net/url_request/url_request_throttler_manager.h
+++ b/net/url_request/url_request_throttler_manager.h
@@ -38,7 +38,7 @@ class NET_EXPORT URLRequestThrottlerManager
public NetworkChangeNotifier::ConnectionTypeObserver {
public:
URLRequestThrottlerManager();
- virtual ~URLRequestThrottlerManager();
+ ~URLRequestThrottlerManager() override;
// Must be called for every request, returns the URL request throttler entry
// associated with the URL. The caller must inform this entry of some events.
@@ -78,10 +78,10 @@ class NET_EXPORT URLRequestThrottlerManager
NetLog* net_log() const;
// IPAddressObserver interface.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// ConnectionTypeObserver interface.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType type) override;
// Method that allows us to transform a URL into an ID that can be used in our
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc
index 129a776..cd18659 100644
--- a/net/url_request/url_request_throttler_simulation_unittest.cc
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc
@@ -135,11 +135,11 @@ class Server : public DiscreteTimeSimulation::Actor {
end_downtime_ = start_time + duration;
}
- virtual void AdvanceTime(const TimeTicks& absolute_time) override {
+ void AdvanceTime(const TimeTicks& absolute_time) override {
now_ = absolute_time;
}
- virtual void PerformAction() override {
+ void PerformAction() override {
// We are inserted at the end of the actor's list, so all Requester
// instances have already done their bit.
if (num_current_tick_queries_ > max_experienced_queries_per_tick_)
@@ -306,17 +306,13 @@ class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry {
: URLRequestThrottlerEntry(manager, std::string()),
mock_backoff_entry_(&backoff_policy_) {}
- virtual const BackoffEntry* GetBackoffEntry() const override {
+ const BackoffEntry* GetBackoffEntry() const override {
return &mock_backoff_entry_;
}
- virtual BackoffEntry* GetBackoffEntry() override {
- return &mock_backoff_entry_;
- }
+ BackoffEntry* GetBackoffEntry() override { return &mock_backoff_entry_; }
- virtual TimeTicks ImplGetTimeNow() const override {
- return fake_now_;
- }
+ TimeTicks ImplGetTimeNow() const override { return fake_now_; }
void SetFakeNow(const TimeTicks& fake_time) {
fake_now_ = fake_time;
@@ -328,7 +324,7 @@ class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry {
}
protected:
- virtual ~MockURLRequestThrottlerEntry() {}
+ ~MockURLRequestThrottlerEntry() override {}
private:
TimeTicks fake_now_;
@@ -414,14 +410,14 @@ class Requester : public DiscreteTimeSimulation::Actor {
DCHECK(server_);
}
- virtual void AdvanceTime(const TimeTicks& absolute_time) override {
+ void AdvanceTime(const TimeTicks& absolute_time) override {
if (time_of_last_success_.is_null())
time_of_last_success_ = absolute_time;
throttler_entry_->SetFakeNow(absolute_time);
}
- virtual void PerformAction() override {
+ void PerformAction() override {
TimeDelta effective_delay = time_between_requests_;
TimeDelta current_jitter = TimeDelta::FromMilliseconds(
request_jitter_.InMilliseconds() * base::RandDouble());
diff --git a/net/url_request/url_request_throttler_test_support.h b/net/url_request/url_request_throttler_test_support.h
index 60a63b2..a710333 100644
--- a/net/url_request/url_request_throttler_test_support.h
+++ b/net/url_request/url_request_throttler_test_support.h
@@ -16,10 +16,10 @@ namespace net {
class MockBackoffEntry : public BackoffEntry {
public:
explicit MockBackoffEntry(const BackoffEntry::Policy* const policy);
- virtual ~MockBackoffEntry();
+ ~MockBackoffEntry() override;
// BackoffEntry overrides.
- virtual base::TimeTicks ImplGetTimeNow() const override;
+ base::TimeTicks ImplGetTimeNow() const override;
void set_fake_now(const base::TimeTicks& now);
@@ -42,11 +42,11 @@ class MockURLRequestThrottlerHeaderAdapter
MockURLRequestThrottlerHeaderAdapter(const std::string& retry_value,
const std::string& opt_out_value,
int response_code);
- virtual ~MockURLRequestThrottlerHeaderAdapter();
+ ~MockURLRequestThrottlerHeaderAdapter() override;
// URLRequestThrottlerHeaderInterface overrides.
- virtual std::string GetNormalizedValue(const std::string& key) const override;
- virtual int GetResponseCode() const override;
+ std::string GetNormalizedValue(const std::string& key) const override;
+ int GetResponseCode() const override;
private:
std::string fake_retry_value_;
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc
index 4188b77..5a309b9 100644
--- a/net/url_request/url_request_throttler_unittest.cc
+++ b/net/url_request/url_request_throttler_unittest.cc
@@ -63,13 +63,11 @@ class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry {
backoff_policy_.num_errors_to_ignore = 0;
}
- virtual const BackoffEntry* GetBackoffEntry() const override {
+ const BackoffEntry* GetBackoffEntry() const override {
return &mock_backoff_entry_;
}
- virtual BackoffEntry* GetBackoffEntry() override {
- return &mock_backoff_entry_;
- }
+ BackoffEntry* GetBackoffEntry() override { return &mock_backoff_entry_; }
static bool ExplicitUserRequest(int load_flags) {
return URLRequestThrottlerEntry::ExplicitUserRequest(load_flags);
@@ -85,7 +83,7 @@ class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry {
}
// Overridden for tests.
- virtual TimeTicks ImplGetTimeNow() const override { return fake_time_now_; }
+ TimeTicks ImplGetTimeNow() const override { return fake_time_now_; }
void set_exponential_backoff_release_time(
const base::TimeTicks& release_time) {
@@ -106,7 +104,7 @@ class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry {
MockBackoffEntry mock_backoff_entry_;
protected:
- virtual ~MockURLRequestThrottlerEntry() {}
+ ~MockURLRequestThrottlerEntry() override {}
};
class MockURLRequestThrottlerManager : public URLRequestThrottlerManager {
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 5756801..700b070 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -367,22 +367,22 @@ class BlockingNetworkDelegate : public TestNetworkDelegate {
const AuthCallback& callback);
// TestNetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override;
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override;
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override;
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override;
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers,
GURL* allowed_unsafe_redirect_url) override;
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -596,7 +596,7 @@ class TestURLRequestContextWithProxy : public TestURLRequestContext {
set_network_delegate(delegate);
Init();
}
- virtual ~TestURLRequestContextWithProxy() {}
+ ~TestURLRequestContextWithProxy() override {}
};
} // namespace
@@ -1105,11 +1105,9 @@ class RestartTestJob : public URLRequestTestJob {
RestartTestJob(URLRequest* request, NetworkDelegate* network_delegate)
: URLRequestTestJob(request, network_delegate, true) {}
protected:
- virtual void StartAsync() override {
- this->NotifyRestartRequired();
- }
+ void StartAsync() override { this->NotifyRestartRequired(); }
private:
- virtual ~RestartTestJob() {}
+ ~RestartTestJob() override {}
};
class CancelTestJob : public URLRequestTestJob {
@@ -1117,11 +1115,9 @@ class CancelTestJob : public URLRequestTestJob {
explicit CancelTestJob(URLRequest* request, NetworkDelegate* network_delegate)
: URLRequestTestJob(request, network_delegate, true) {}
protected:
- virtual void StartAsync() override {
- request_->Cancel();
- }
+ void StartAsync() override { request_->Cancel(); }
private:
- virtual ~CancelTestJob() {}
+ ~CancelTestJob() override {}
};
class CancelThenRestartTestJob : public URLRequestTestJob {
@@ -1131,12 +1127,12 @@ class CancelThenRestartTestJob : public URLRequestTestJob {
: URLRequestTestJob(request, network_delegate, true) {
}
protected:
- virtual void StartAsync() override {
+ void StartAsync() override {
request_->Cancel();
this->NotifyRestartRequired();
}
private:
- virtual ~CancelThenRestartTestJob() {}
+ ~CancelThenRestartTestJob() override {}
};
// An Interceptor for use with interceptor tests
@@ -1156,13 +1152,12 @@ class TestInterceptor : URLRequest::Interceptor {
URLRequest::Deprecated::RegisterRequestInterceptor(this);
}
- virtual ~TestInterceptor() {
+ ~TestInterceptor() override {
URLRequest::Deprecated::UnregisterRequestInterceptor(this);
}
- virtual URLRequestJob* MaybeIntercept(
- URLRequest* request,
- NetworkDelegate* network_delegate) override {
+ URLRequestJob* MaybeIntercept(URLRequest* request,
+ NetworkDelegate* network_delegate) override {
if (restart_main_request_) {
restart_main_request_ = false;
did_restart_main_ = true;
@@ -1197,10 +1192,9 @@ class TestInterceptor : URLRequest::Interceptor {
return job;
}
- virtual URLRequestJob* MaybeInterceptRedirect(
- URLRequest* request,
- NetworkDelegate* network_delegate,
- const GURL& location) override {
+ URLRequestJob* MaybeInterceptRedirect(URLRequest* request,
+ NetworkDelegate* network_delegate,
+ const GURL& location) override {
if (cancel_redirect_request_) {
cancel_redirect_request_ = false;
did_cancel_redirect_ = true;
@@ -1217,8 +1211,9 @@ class TestInterceptor : URLRequest::Interceptor {
true);
}
- virtual URLRequestJob* MaybeInterceptResponse(
- URLRequest* request, NetworkDelegate* network_delegate) override {
+ URLRequestJob* MaybeInterceptResponse(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) override {
if (cancel_final_request_) {
cancel_final_request_ = false;
did_cancel_final_ = true;
@@ -2396,10 +2391,10 @@ class FixedDateNetworkDelegate : public TestNetworkDelegate {
public:
explicit FixedDateNetworkDelegate(const std::string& fixed_date)
: fixed_date_(fixed_date) {}
- virtual ~FixedDateNetworkDelegate() {}
+ ~FixedDateNetworkDelegate() override {}
// NetworkDelegate implementation
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -3991,24 +3986,24 @@ class AsyncDelegateLogger : public base::RefCounted<AsyncDelegateLogger> {
class AsyncLoggingNetworkDelegate : public TestNetworkDelegate {
public:
AsyncLoggingNetworkDelegate() {}
- virtual ~AsyncLoggingNetworkDelegate() {}
+ ~AsyncLoggingNetworkDelegate() override {}
// NetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
TestNetworkDelegate::OnBeforeURLRequest(request, callback, new_url);
return RunCallbackAsynchronously(request, callback);
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
TestNetworkDelegate::OnBeforeSendHeaders(request, callback, headers);
return RunCallbackAsynchronously(request, callback);
}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -4022,7 +4017,7 @@ class AsyncLoggingNetworkDelegate : public TestNetworkDelegate {
return RunCallbackAsynchronously(request, callback);
}
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -4083,12 +4078,12 @@ class AsyncLoggingUrlRequestDelegate : public TestDelegate {
else if (cancel_stage == CANCEL_ON_READ_COMPLETED)
set_cancel_in_received_data(true);
}
- virtual ~AsyncLoggingUrlRequestDelegate() {}
+ ~AsyncLoggingUrlRequestDelegate() override {}
// URLRequest::Delegate implementation:
- void virtual OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
*defer_redirect = true;
AsyncDelegateLogger::Run(
request,
@@ -4100,7 +4095,7 @@ class AsyncLoggingUrlRequestDelegate : public TestDelegate {
base::Unretained(this), request, redirect_info));
}
- virtual void OnResponseStarted(URLRequest* request) override {
+ void OnResponseStarted(URLRequest* request) override {
AsyncDelegateLogger::Run(
request,
LOAD_STATE_WAITING_FOR_DELEGATE,
@@ -4111,8 +4106,7 @@ class AsyncLoggingUrlRequestDelegate : public TestDelegate {
base::Unretained(this), request));
}
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override {
+ void OnReadCompleted(URLRequest* request, int bytes_read) override {
AsyncDelegateLogger::Run(
request,
LOAD_STATE_IDLE,
@@ -4578,9 +4572,9 @@ const char kExtraHeader[] = "Allow-Snafu";
const char kExtraValue[] = "fubar";
class RedirectWithAdditionalHeadersDelegate : public TestDelegate {
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
TestDelegate::OnReceivedRedirect(request, redirect_info, defer_redirect);
request->SetExtraRequestHeaderByName(kExtraHeader, kExtraValue, false);
}
@@ -4615,9 +4609,9 @@ namespace {
const char kExtraHeaderToRemove[] = "To-Be-Removed";
class RedirectWithHeaderRemovalDelegate : public TestDelegate {
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
TestDelegate::OnReceivedRedirect(request, redirect_info, defer_redirect);
request->RemoveRequestHeaderByName(kExtraHeaderToRemove);
}
@@ -6811,9 +6805,8 @@ class SSLClientAuthTestDelegate : public TestDelegate {
public:
SSLClientAuthTestDelegate() : on_certificate_requested_count_(0) {
}
- virtual void OnCertificateRequested(
- URLRequest* request,
- SSLCertRequestInfo* cert_request_info) override {
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override {
on_certificate_requested_count_++;
base::MessageLoop::current()->Quit();
}
@@ -7092,7 +7085,7 @@ class TestSSLConfigService : public SSLConfigService {
}
// SSLConfigService:
- virtual void GetSSLConfig(SSLConfig* config) override {
+ void GetSSLConfig(SSLConfig* config) override {
*config = SSLConfig();
config->rev_checking_enabled = online_rev_checking_;
config->verify_ev_cert = ev_enabled_;
@@ -7104,7 +7097,7 @@ class TestSSLConfigService : public SSLConfigService {
}
protected:
- virtual ~TestSSLConfigService() {}
+ ~TestSSLConfigService() override {}
private:
const bool ev_enabled_;
@@ -7664,7 +7657,7 @@ TEST_F(HTTPSOCSPTest, Invalid) {
class HTTPSHardFailTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(false /* check for EV */,
false /* online revocation checking */,
@@ -7702,7 +7695,7 @@ TEST_F(HTTPSHardFailTest, FailsOnOCSPInvalid) {
class HTTPSEVCRLSetTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(true /* check for EV */,
false /* online revocation checking */,
@@ -7887,7 +7880,7 @@ TEST_F(HTTPSEVCRLSetTest, ExpiredCRLSetAndRevokedNonEVCert) {
class HTTPSCRLSetTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(false /* check for EV */,
false /* online revocation checking */,
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index 31ad0ba..097eade 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -21,9 +21,7 @@ class TestURLRequestContext : public URLRequestContext {
public:
TestURLRequestContext();
- virtual ~TestURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~TestURLRequestContext() override { AssertNoURLRequests(); }
// Gets a pointer to the cache backend.
disk_cache::Backend* GetBackend();
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h
index cc8f5bf..98e80a2 100644
--- a/net/websockets/websocket_basic_handshake_stream.h
+++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -36,41 +36,39 @@ class NET_EXPORT_PRIVATE WebSocketBasicHandshakeStream
std::vector<std::string> requested_extensions,
std::string* failure_message);
- virtual ~WebSocketBasicHandshakeStream();
+ ~WebSocketBasicHandshakeStream() override;
// HttpStreamBase methods
- 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;
- virtual void Close(bool not_reusable) override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual 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;
- virtual void SetPriority(RequestPriority priority) 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;
+ void Close(bool not_reusable) override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// This is called from the top level once correct handshake response headers
// have been received. It creates an appropriate subclass of WebSocketStream
// depending on what extensions were negotiated. This object is unusable after
// Upgrade() has been called and should be disposed of as soon as possible.
- virtual scoped_ptr<WebSocketStream> Upgrade() override;
+ scoped_ptr<WebSocketStream> Upgrade() override;
// Set the value used for the next Sec-WebSocket-Key header
// deterministically. The key is only used once, and then discarded.
diff --git a/net/websockets/websocket_basic_stream.h b/net/websockets/websocket_basic_stream.h
index ed2f195..d456d8d 100644
--- a/net/websockets/websocket_basic_stream.h
+++ b/net/websockets/websocket_basic_stream.h
@@ -40,20 +40,20 @@ class NET_EXPORT_PRIVATE WebSocketBasicStream : public WebSocketStream {
// The destructor has to make sure the connection is closed when we finish so
// that it does not get returned to the pool.
- virtual ~WebSocketBasicStream();
+ ~WebSocketBasicStream() override;
// WebSocketStream implementation.
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
- virtual void Close() override;
+ void Close() override;
- virtual std::string GetSubProtocol() const override;
+ std::string GetSubProtocol() const override;
- virtual std::string GetExtensions() const override;
+ std::string GetExtensions() const override;
////////////////////////////////////////////////////////////////////////////
// Methods for testing only.
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc
index a658fcf..92b7d3f 100644
--- a/net/websockets/websocket_basic_stream_test.cc
+++ b/net/websockets/websocket_basic_stream_test.cc
@@ -90,7 +90,7 @@ class StrictStaticSocketDataProvider : public StaticSocketDataProvider {
: StaticSocketDataProvider(reads, reads_count, writes, writes_count),
strict_mode_(strict_mode) {}
- virtual ~StrictStaticSocketDataProvider() {
+ ~StrictStaticSocketDataProvider() override {
if (strict_mode_) {
EXPECT_EQ(read_count(), read_index());
EXPECT_EQ(write_count(), write_index());
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 9585dc2..a6eeb1c 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -153,27 +153,27 @@ class WebSocketChannel::ConnectDelegate
public:
explicit ConnectDelegate(WebSocketChannel* creator) : creator_(creator) {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
creator_->OnConnectSuccess(stream.Pass());
// |this| may have been deleted.
}
- virtual void OnFailure(const std::string& message) override {
+ void OnFailure(const std::string& message) override {
creator_->OnConnectFailure(message);
// |this| has been deleted.
}
- virtual void OnStartOpeningHandshake(
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
creator_->OnStartOpeningHandshake(request.Pass());
}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
creator_->OnFinishOpeningHandshake(response.Pass());
}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index c7bfeb0..15163de 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -192,38 +192,35 @@ class MockWebSocketEventInterface : public WebSocketEventInterface {
// This fake EventInterface is for tests which need a WebSocketEventInterface
// implementation but are not verifying how it is used.
class FakeWebSocketEventInterface : public WebSocketEventInterface {
- virtual ChannelState OnAddChannelResponse(
- bool fail,
- const std::string& selected_protocol,
- const std::string& extensions) override {
+ ChannelState OnAddChannelResponse(bool fail,
+ const std::string& selected_protocol,
+ const std::string& extensions) override {
return fail ? CHANNEL_DELETED : CHANNEL_ALIVE;
}
- virtual ChannelState OnDataFrame(bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) override {
+ ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ const std::vector<char>& data) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnFlowControl(int64 quota) override {
- return CHANNEL_ALIVE;
- }
- virtual ChannelState OnClosingHandshake() override { return CHANNEL_ALIVE; }
- virtual ChannelState OnFailChannel(const std::string& message) override {
+ ChannelState OnFlowControl(int64 quota) override { return CHANNEL_ALIVE; }
+ ChannelState OnClosingHandshake() override { return CHANNEL_ALIVE; }
+ ChannelState OnFailChannel(const std::string& message) override {
return CHANNEL_DELETED;
}
- virtual ChannelState OnDropChannel(bool was_clean,
- uint16 code,
- const std::string& reason) override {
+ ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason) override {
return CHANNEL_DELETED;
}
- virtual ChannelState OnStartOpeningHandshake(
+ ChannelState OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnFinishOpeningHandshake(
+ ChannelState OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnSSLCertificateError(
+ ChannelState OnSSLCertificateError(
scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
const GURL& url,
const SSLInfo& ssl_info,
@@ -245,23 +242,23 @@ class FakeWebSocketStream : public WebSocketStream {
const std::string& extensions)
: protocol_(protocol), extensions_(extensions) {}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual void Close() override {}
+ void Close() override {}
// Returns the string passed to the constructor.
- virtual std::string GetSubProtocol() const override { return protocol_; }
+ std::string GetSubProtocol() const override { return protocol_; }
// Returns the string passed to the constructor.
- virtual std::string GetExtensions() const override { return extensions_; }
+ std::string GetExtensions() const override { return extensions_; }
private:
// The string to return from GetSubProtocol().
@@ -456,7 +453,7 @@ class ReadableFakeWebSocketStream : public FakeWebSocketStream {
ReadableFakeWebSocketStream() : index_(0), read_frames_pending_(false) {}
// Check that all the prepared responses have been consumed.
- virtual ~ReadableFakeWebSocketStream() {
+ ~ReadableFakeWebSocketStream() override {
CHECK(index_ >= responses_.size());
CHECK(!read_frames_pending_);
}
@@ -492,8 +489,8 @@ class ReadableFakeWebSocketStream : public FakeWebSocketStream {
new Response(async, error, ScopedVector<WebSocketFrame>()));
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
CHECK(!read_frames_pending_);
if (index_ >= responses_.size())
return ERR_IO_PENDING;
@@ -549,8 +546,8 @@ class ReadableFakeWebSocketStream : public FakeWebSocketStream {
// synchronously.
class WriteableFakeWebSocketStream : public FakeWebSocketStream {
public:
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return OK;
}
};
@@ -558,8 +555,8 @@ class WriteableFakeWebSocketStream : public FakeWebSocketStream {
// A FakeWebSocketStream where writes always fail.
class UnWriteableFakeWebSocketStream : public FakeWebSocketStream {
public:
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_CONNECTION_RESET;
}
};
@@ -574,8 +571,8 @@ class EchoeyFakeWebSocketStream : public FakeWebSocketStream {
public:
EchoeyFakeWebSocketStream() : read_frames_(NULL), done_(false) {}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
// Users of WebSocketStream will not expect the ReadFrames() callback to be
// called from within WriteFrames(), so post it to the message loop instead.
stored_frames_.insert(stored_frames_.end(), frames->begin(), frames->end());
@@ -584,8 +581,8 @@ class EchoeyFakeWebSocketStream : public FakeWebSocketStream {
return OK;
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
read_callback_ = callback;
read_frames_ = frames;
if (done_)
@@ -647,8 +644,8 @@ class ResetOnWriteFakeWebSocketStream : public FakeWebSocketStream {
public:
ResetOnWriteFakeWebSocketStream() : closed_(false), weak_ptr_factory_(this) {}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ResetOnWriteFakeWebSocketStream::CallCallbackUnlessClosed,
@@ -664,13 +661,13 @@ class ResetOnWriteFakeWebSocketStream : public FakeWebSocketStream {
return ERR_IO_PENDING;
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
read_callback_ = callback;
return ERR_IO_PENDING;
}
- virtual void Close() override { closed_ = true; }
+ void Close() override { closed_ = true; }
private:
void CallCallbackUnlessClosed(const CompletionCallback& callback, int value) {
@@ -736,8 +733,8 @@ std::vector<char> AsVector(const std::string& s) {
class FakeSSLErrorCallbacks
: public WebSocketEventInterface::SSLErrorCallbacks {
public:
- virtual void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {}
- virtual void ContinueSSLRequest() override {}
+ void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {}
+ void ContinueSSLRequest() override {}
};
// Base class for all test fixtures.
@@ -847,7 +844,7 @@ class WebSocketChannelDeletingTest : public WebSocketChannelTest {
EVENT_ON_SSL_CERTIFICATE_ERROR) {}
// Create a ChannelDeletingFakeWebSocketEventInterface. Defined out-of-line to
// avoid circular dependency.
- virtual scoped_ptr<WebSocketEventInterface> CreateEventInterface() override;
+ scoped_ptr<WebSocketEventInterface> CreateEventInterface() override;
// Tests can set deleting_ to a bitmap of EventInterfaceCall members that they
// want to cause Channel deletion. The default is for all calls to cause
@@ -864,46 +861,45 @@ class ChannelDeletingFakeWebSocketEventInterface
WebSocketChannelDeletingTest* fixture)
: fixture_(fixture) {}
- virtual ChannelState OnAddChannelResponse(
- bool fail,
- const std::string& selected_protocol,
- const std::string& extensions) override {
+ ChannelState OnAddChannelResponse(bool fail,
+ const std::string& selected_protocol,
+ const std::string& extensions) override {
return fixture_->DeleteIfDeleting(EVENT_ON_ADD_CHANNEL_RESPONSE);
}
- virtual ChannelState OnDataFrame(bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) override {
+ ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ const std::vector<char>& data) override {
return fixture_->DeleteIfDeleting(EVENT_ON_DATA_FRAME);
}
- virtual ChannelState OnFlowControl(int64 quota) override {
+ ChannelState OnFlowControl(int64 quota) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FLOW_CONTROL);
}
- virtual ChannelState OnClosingHandshake() override {
+ ChannelState OnClosingHandshake() override {
return fixture_->DeleteIfDeleting(EVENT_ON_CLOSING_HANDSHAKE);
}
- virtual ChannelState OnFailChannel(const std::string& message) override {
+ ChannelState OnFailChannel(const std::string& message) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FAIL_CHANNEL);
}
- virtual ChannelState OnDropChannel(bool was_clean,
- uint16 code,
- const std::string& reason) override {
+ ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason) override {
return fixture_->DeleteIfDeleting(EVENT_ON_DROP_CHANNEL);
}
- virtual ChannelState OnStartOpeningHandshake(
+ ChannelState OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
return fixture_->DeleteIfDeleting(EVENT_ON_START_OPENING_HANDSHAKE);
}
- virtual ChannelState OnFinishOpeningHandshake(
+ ChannelState OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FINISH_OPENING_HANDSHAKE);
}
- virtual ChannelState OnSSLCertificateError(
+ ChannelState OnSSLCertificateError(
scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
const GURL& url,
const SSLInfo& ssl_info,
@@ -946,7 +942,7 @@ class WebSocketChannelEventInterfaceTest : public WebSocketChannelTest {
// object before calling CreateChannelAndConnect() or
// CreateChannelAndConnectSuccessfully(). This will only work once per test
// case, but once should be enough.
- virtual scoped_ptr<WebSocketEventInterface> CreateEventInterface() override {
+ scoped_ptr<WebSocketEventInterface> CreateEventInterface() override {
return scoped_ptr<WebSocketEventInterface>(event_interface_.release());
}
@@ -960,7 +956,7 @@ class WebSocketChannelStreamTest : public WebSocketChannelTest {
WebSocketChannelStreamTest()
: mock_stream_(new StrictMock<MockWebSocketStream>) {}
- virtual void CreateChannelAndConnectSuccessfully() override {
+ void CreateChannelAndConnectSuccessfully() override {
set_stream(mock_stream_.Pass());
WebSocketChannelTest::CreateChannelAndConnectSuccessfully();
}
@@ -3314,7 +3310,7 @@ class WebSocketChannelStreamTimeoutTest : public WebSocketChannelStreamTest {
protected:
WebSocketChannelStreamTimeoutTest() {}
- virtual void CreateChannelAndConnectSuccessfully() override {
+ void CreateChannelAndConnectSuccessfully() override {
set_stream(mock_stream_.Pass());
CreateChannelAndConnect();
channel_->SendFlowControl(kPlentyOfQuota);
diff --git a/net/websockets/websocket_deflate_predictor_impl.h b/net/websockets/websocket_deflate_predictor_impl.h
index d6b52c4..680ec56 100644
--- a/net/websockets/websocket_deflate_predictor_impl.h
+++ b/net/websockets/websocket_deflate_predictor_impl.h
@@ -18,12 +18,12 @@ struct WebSocketFrame;
class NET_EXPORT_PRIVATE WebSocketDeflatePredictorImpl
: public WebSocketDeflatePredictor {
public:
- virtual ~WebSocketDeflatePredictorImpl() {}
+ ~WebSocketDeflatePredictorImpl() override {}
- virtual Result Predict(const ScopedVector<WebSocketFrame>& frames,
- size_t frame_index) override;
- virtual void RecordInputDataFrame(const WebSocketFrame* frame) override;
- virtual void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
+ Result Predict(const ScopedVector<WebSocketFrame>& frames,
+ size_t frame_index) override;
+ void RecordInputDataFrame(const WebSocketFrame* frame) override;
+ void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
};
} // namespace net
diff --git a/net/websockets/websocket_deflate_stream.h b/net/websockets/websocket_deflate_stream.h
index 8f939ec1..1426bfc 100644
--- a/net/websockets/websocket_deflate_stream.h
+++ b/net/websockets/websocket_deflate_stream.h
@@ -43,16 +43,16 @@ class NET_EXPORT_PRIVATE WebSocketDeflateStream : public WebSocketStream {
WebSocketDeflater::ContextTakeOverMode mode,
int client_window_bits,
scoped_ptr<WebSocketDeflatePredictor> predictor);
- virtual ~WebSocketDeflateStream();
+ ~WebSocketDeflateStream() override;
// WebSocketStream functions.
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
- virtual void Close() override;
- virtual std::string GetSubProtocol() const override;
- virtual std::string GetExtensions() const override;
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
+ void Close() override;
+ std::string GetSubProtocol() const override;
+ std::string GetExtensions() const override;
private:
enum ReadingState {
diff --git a/net/websockets/websocket_deflate_stream_test.cc b/net/websockets/websocket_deflate_stream_test.cc
index 4f1c418..1b0d123 100644
--- a/net/websockets/websocket_deflate_stream_test.cc
+++ b/net/websockets/websocket_deflate_stream_test.cc
@@ -111,7 +111,7 @@ class MockWebSocketStream : public WebSocketStream {
class WebSocketDeflatePredictorMock : public WebSocketDeflatePredictor {
public:
WebSocketDeflatePredictorMock() : result_(DEFLATE) {}
- virtual ~WebSocketDeflatePredictorMock() {
+ ~WebSocketDeflatePredictorMock() override {
// Verify whether all expectaions are consumed.
if (!frames_to_be_input_.empty()) {
ADD_FAILURE() << "There are missing frames to be input.";
@@ -124,11 +124,11 @@ class WebSocketDeflatePredictorMock : public WebSocketDeflatePredictor {
}
// WebSocketDeflatePredictor functions.
- virtual Result Predict(const ScopedVector<WebSocketFrame>& frames,
- size_t frame_index) override {
+ Result Predict(const ScopedVector<WebSocketFrame>& frames,
+ size_t frame_index) override {
return result_;
}
- virtual void RecordInputDataFrame(const WebSocketFrame* frame) override {
+ void RecordInputDataFrame(const WebSocketFrame* frame) override {
if (!WebSocketFrameHeader::IsKnownDataOpCode(frame->header.opcode)) {
ADD_FAILURE() << "Control frames should not be recorded.";
return;
@@ -147,7 +147,7 @@ class WebSocketDeflatePredictorMock : public WebSocketDeflatePredictor {
}
frames_to_be_input_.pop_front();
}
- virtual void RecordWrittenDataFrame(const WebSocketFrame* frame) override {
+ void RecordWrittenDataFrame(const WebSocketFrame* frame) override {
if (!WebSocketFrameHeader::IsKnownDataOpCode(frame->header.opcode)) {
ADD_FAILURE() << "Control frames should not be recorded.";
return;
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h
index 8208c0e..6ad0f6b 100644
--- a/net/websockets/websocket_handshake_stream_base.h
+++ b/net/websockets/websocket_handshake_stream_base.h
@@ -40,7 +40,7 @@ class NET_EXPORT WebSocketHandshakeStreamBase : public HttpStreamBase {
// URLRequest::SetUserData().
static const void* DataKey() { return kWebSocketHandshakeUserDataKey; }
- virtual ~CreateHelper() {}
+ ~CreateHelper() override {}
// Create a WebSocketBasicHandshakeStream. This is called after the
// underlying connection has been established but before any handshake data
@@ -58,7 +58,7 @@ class NET_EXPORT WebSocketHandshakeStreamBase : public HttpStreamBase {
// This has to have an inline implementation so that the net/url_request/
// tests do not fail on iOS.
- virtual ~WebSocketHandshakeStreamBase() {}
+ ~WebSocketHandshakeStreamBase() override {}
// After the handshake has completed, this method creates a WebSocketStream
// (of the appropriate type) from the WebSocketHandshakeStreamBase object.
diff --git a/net/websockets/websocket_handshake_stream_create_helper.h b/net/websockets/websocket_handshake_stream_create_helper.h
index aad2644..83bb1ac 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.h
+++ b/net/websockets/websocket_handshake_stream_create_helper.h
@@ -31,17 +31,17 @@ class NET_EXPORT_PRIVATE WebSocketHandshakeStreamCreateHelper
WebSocketStream::ConnectDelegate* connect_delegate,
const std::vector<std::string>& requested_subprotocols);
- virtual ~WebSocketHandshakeStreamCreateHelper();
+ ~WebSocketHandshakeStreamCreateHelper() override;
// WebSocketHandshakeStreamBase::CreateHelper methods
// Create a WebSocketBasicHandshakeStream.
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override;
// Unimplemented as of November 2013.
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& session,
bool use_relative_url) override;
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index a776acd..5dff5cf 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -59,15 +59,15 @@ class MockClientSocketHandleFactory {
class TestConnectDelegate : public WebSocketStream::ConnectDelegate {
public:
- virtual ~TestConnectDelegate() {}
+ ~TestConnectDelegate() override {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {}
- virtual void OnFailure(const std::string& failure_message) override {}
- virtual void OnStartOpeningHandshake(
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {}
+ void OnFailure(const std::string& failure_message) override {}
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_inflater.cc b/net/websockets/websocket_inflater.cc
index 6f46822..1d6122b 100644
--- a/net/websockets/websocket_inflater.cc
+++ b/net/websockets/websocket_inflater.cc
@@ -27,7 +27,7 @@ class ShrinkableIOBufferWithSize : public IOBufferWithSize {
}
private:
- virtual ~ShrinkableIOBufferWithSize() {}
+ ~ShrinkableIOBufferWithSize() override {}
};
} // namespace
diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h
index 924fdd0..bad06cf 100644
--- a/net/websockets/websocket_job.h
+++ b/net/websockets/websocket_job.h
@@ -50,42 +50,39 @@ class NET_EXPORT WebSocketJob
static void EnsureInit();
State state() const { return state_; }
- virtual void Connect() override;
- virtual bool SendData(const char* data, int len) override;
- virtual void Close() override;
- virtual void RestartWithAuth(const AuthCredentials& credentials) override;
- virtual void DetachDelegate() override;
+ void Connect() override;
+ bool SendData(const char* data, int len) override;
+ void Close() override;
+ void RestartWithAuth(const AuthCredentials& credentials) override;
+ void DetachDelegate() override;
// SocketStream::Delegate methods.
- virtual int OnStartOpenConnection(
- SocketStream* socket, const CompletionCallback& callback) override;
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override;
- virtual void OnSentData(SocketStream* socket, int amount_sent) override;
- virtual void OnReceivedData(SocketStream* socket,
- const char* data,
- int len) override;
- virtual void OnClose(SocketStream* socket) override;
- virtual void OnAuthRequired(
- SocketStream* socket, AuthChallengeInfo* auth_info) override;
- virtual void OnSSLCertificateError(SocketStream* socket,
- const SSLInfo& ssl_info,
- bool fatal) override;
- virtual void OnError(const SocketStream* socket, int error) override;
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override;
+ void OnConnected(SocketStream* socket, int max_pending_send_allowed) override;
+ void OnSentData(SocketStream* socket, int amount_sent) override;
+ void OnReceivedData(SocketStream* socket, const char* data, int len) override;
+ void OnClose(SocketStream* socket) override;
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override;
+ void OnSSLCertificateError(SocketStream* socket,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
+ void OnError(const SocketStream* socket, int error) override;
// SpdyWebSocketStream::Delegate methods.
- virtual void OnCreatedSpdyStream(int status) override;
- virtual void OnSentSpdyHeaders() override;
- virtual void OnSpdyResponseHeadersUpdated(
+ void OnCreatedSpdyStream(int status) override;
+ void OnSentSpdyHeaders() override;
+ void OnSpdyResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnSentSpdyData(size_t bytes_sent) override;
- virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnCloseSpdyStream() override;
+ void OnSentSpdyData(size_t bytes_sent) override;
+ void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnCloseSpdyStream() override;
private:
friend class WebSocketThrottle;
friend class WebSocketJobTest;
- virtual ~WebSocketJob();
+ ~WebSocketJob() override;
bool SendHandshakeRequest(const char* data, int len);
void AddCookieHeaderAndSend();
diff --git a/net/websockets/websocket_job_test.cc b/net/websockets/websocket_job_test.cc
index 9cf3144..3faf809 100644
--- a/net/websockets/websocket_job_test.cc
+++ b/net/websockets/websocket_job_test.cc
@@ -45,27 +45,23 @@ class MockSocketStream : public SocketStream {
URLRequestContext* context, CookieStore* cookie_store)
: SocketStream(url, delegate, context, cookie_store) {}
- virtual void Connect() override {}
- virtual bool SendData(const char* data, int len) override {
+ void Connect() override {}
+ bool SendData(const char* data, int len) override {
sent_data_ += std::string(data, len);
return true;
}
- virtual void Close() override {}
- virtual void RestartWithAuth(
- const AuthCredentials& credentials) override {
- }
+ void Close() override {}
+ void RestartWithAuth(const AuthCredentials& credentials) override {}
- virtual void DetachDelegate() override {
- delegate_ = NULL;
- }
+ void DetachDelegate() override { delegate_ = NULL; }
const std::string& sent_data() const {
return sent_data_;
}
protected:
- virtual ~MockSocketStream() {}
+ ~MockSocketStream() override {}
private:
std::string sent_data_;
@@ -78,7 +74,7 @@ class MockSocketStreamDelegate : public SocketStream::Delegate {
void set_allow_all_cookies(bool allow_all_cookies) {
allow_all_cookies_ = allow_all_cookies;
}
- virtual ~MockSocketStreamDelegate() {}
+ ~MockSocketStreamDelegate() override {}
void SetOnStartOpenConnection(const base::Closure& callback) {
on_start_open_connection_ = callback;
@@ -96,42 +92,40 @@ class MockSocketStreamDelegate : public SocketStream::Delegate {
on_close_ = callback;
}
- virtual int OnStartOpenConnection(
- SocketStream* socket,
- const CompletionCallback& callback) override {
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override {
if (!on_start_open_connection_.is_null())
on_start_open_connection_.Run();
return OK;
}
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
if (!on_connected_.is_null())
on_connected_.Run();
}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
amount_sent_ += amount_sent;
if (!on_sent_data_.is_null())
on_sent_data_.Run();
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
received_data_ += std::string(data, len);
if (!on_received_data_.is_null())
on_received_data_.Run();
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
if (!on_close_.is_null())
on_close_.Run();
}
- virtual bool CanGetCookies(SocketStream* socket,
- const GURL& url) override {
+ bool CanGetCookies(SocketStream* socket, const GURL& url) override {
return allow_all_cookies_;
}
- virtual bool CanSetCookie(SocketStream* request,
- const GURL& url,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool CanSetCookie(SocketStream* request,
+ const GURL& url,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return allow_all_cookies_;
}
@@ -186,44 +180,41 @@ class MockCookieStore : public CookieStore {
}
// CookieStore:
- virtual void SetCookieWithOptionsAsync(
- const GURL& url,
- const std::string& cookie_line,
- const CookieOptions& options,
- const SetCookiesCallback& callback) override {
+ void SetCookieWithOptionsAsync(const GURL& url,
+ const std::string& cookie_line,
+ const CookieOptions& options,
+ const SetCookiesCallback& callback) override {
bool result = SetCookieWithOptions(url, cookie_line, options);
if (!callback.is_null())
callback.Run(result);
}
- virtual void GetCookiesWithOptionsAsync(
- const GURL& url,
- const CookieOptions& options,
- const GetCookiesCallback& callback) override {
+ void GetCookiesWithOptionsAsync(const GURL& url,
+ const CookieOptions& options,
+ const GetCookiesCallback& callback) override {
if (!callback.is_null())
callback.Run(GetCookiesWithOptions(url, options));
}
- virtual void GetAllCookiesForURLAsync(
+ void GetAllCookiesForURLAsync(
const GURL& url,
const GetCookieListCallback& callback) override {
ADD_FAILURE();
}
- virtual void DeleteCookieAsync(const GURL& url,
- const std::string& cookie_name,
- const base::Closure& callback) override {
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override {
ADD_FAILURE();
}
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override {
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override {
ADD_FAILURE();
}
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
@@ -231,27 +222,27 @@ class MockCookieStore : public CookieStore {
ADD_FAILURE();
}
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override {
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override {
ADD_FAILURE();
}
- virtual CookieMonster* GetCookieMonster() override { return NULL; }
+ CookieMonster* GetCookieMonster() override { return NULL; }
const std::vector<Entry>& entries() const { return entries_; }
private:
friend class base::RefCountedThreadSafe<MockCookieStore>;
- virtual ~MockCookieStore() {}
+ ~MockCookieStore() override {}
std::vector<Entry> entries_;
};
class MockSSLConfigService : public SSLConfigService {
public:
- virtual void GetSSLConfig(SSLConfig* config) override {}
+ void GetSSLConfig(SSLConfig* config) override {}
protected:
- virtual ~MockSSLConfigService() {}
+ ~MockSSLConfigService() override {}
};
class MockURLRequestContext : public URLRequestContext {
@@ -266,9 +257,7 @@ class MockURLRequestContext : public URLRequestContext {
include_subdomains);
}
- virtual ~MockURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~MockURLRequestContext() override { AssertNoURLRequests(); }
private:
TransportSecurityState transport_security_state_;
@@ -296,21 +285,18 @@ class MockHttpTransactionFactory : public HttpTransactionFactory {
http_session_, spdy_session_key_, BoundNetLog());
}
- virtual int CreateTransaction(
- RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override {
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override {
NOTREACHED();
return ERR_UNEXPECTED;
}
- virtual HttpCache* GetCache() override {
+ HttpCache* GetCache() override {
NOTREACHED();
return NULL;
}
- virtual HttpNetworkSession* GetSession() override {
- return http_session_.get();
- }
+ HttpNetworkSession* GetSession() override { return http_session_.get(); }
private:
OrderedSocketData* data_;
@@ -349,35 +335,35 @@ class DeletingSocketStreamDelegate : public SocketStream::Delegate {
// OnStartOpenConnection() is not implemented by SocketStreamDispatcherHost
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
DeleteJobMaybe();
}
- virtual void OnSentData(SocketStream* socket, int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
DeleteJobMaybe();
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data,
- int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
DeleteJobMaybe();
}
- virtual void OnClose(SocketStream* socket) override { DeleteJobMaybe(); }
+ void OnClose(SocketStream* socket) override { DeleteJobMaybe(); }
- virtual void OnAuthRequired(SocketStream* socket,
- AuthChallengeInfo* auth_info) override {
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override {
DeleteJobMaybe();
}
- virtual void OnSSLCertificateError(SocketStream* socket,
- const SSLInfo& ssl_info,
- bool fatal) override {
+ void OnSSLCertificateError(SocketStream* socket,
+ const SSLInfo& ssl_info,
+ bool fatal) override {
DeleteJobMaybe();
}
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
DeleteJobMaybe();
}
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index 04beb26..005b6c5 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -48,15 +48,15 @@ class Delegate : public URLRequest::Delegate {
explicit Delegate(StreamRequestImpl* owner)
: owner_(owner), result_(INCOMPLETE) {}
- virtual ~Delegate() {
+ ~Delegate() override {
UMA_HISTOGRAM_ENUMERATION(
"Net.WebSocket.HandshakeResult", result_, NUM_HANDSHAKE_RESULT_TYPES);
}
// Implementation of URLRequest::Delegate methods.
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
// HTTP status codes returned by HttpStreamParser are filtered by
// WebSocketBasicHandshakeStream, and only 101, 401 and 407 are permitted
// back up the stack to HttpNetworkTransaction. In particular, redirect
@@ -65,20 +65,19 @@ class Delegate : public URLRequest::Delegate {
NOTREACHED();
}
- virtual void OnResponseStarted(URLRequest* request) override;
+ void OnResponseStarted(URLRequest* request) override;
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
- virtual void OnCertificateRequested(URLRequest* request,
- SSLCertRequestInfo* cert_request_info)
- override;
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override;
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool fatal) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
- virtual void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
StreamRequestImpl* owner_;
@@ -118,7 +117,7 @@ class StreamRequestImpl : public WebSocketStreamRequest {
// Destroying this object destroys the URLRequest, which cancels the request
// and so terminates the handshake if it is incomplete.
- virtual ~StreamRequestImpl() {}
+ ~StreamRequestImpl() override {}
void Start(scoped_ptr<base::Timer> timer) {
DCHECK(timer);
@@ -206,7 +205,7 @@ class SSLErrorCallbacks : public WebSocketEventInterface::SSLErrorCallbacks {
explicit SSLErrorCallbacks(URLRequest* url_request)
: url_request_(url_request) {}
- virtual void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {
+ void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {
if (ssl_info) {
url_request_->CancelWithSSLError(error, *ssl_info);
} else {
@@ -214,7 +213,7 @@ class SSLErrorCallbacks : public WebSocketEventInterface::SSLErrorCallbacks {
}
}
- virtual void ContinueSSLRequest() override {
+ void ContinueSSLRequest() override {
url_request_->ContinueDespiteLastError();
}
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 2fd9891..5ce3331 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -99,7 +99,7 @@ class DeterministicKeyWebSocketHandshakeStreamCreateHelper
: WebSocketHandshakeStreamCreateHelper(connect_delegate,
requested_subprotocols) {}
- virtual void OnStreamCreated(WebSocketBasicHandshakeStream* stream) override {
+ void OnStreamCreated(WebSocketBasicHandshakeStream* stream) override {
stream->SetWebSocketKeyForTesting("dGhlIHNhbXBsZSBub25jZQ==");
}
};
@@ -201,28 +201,28 @@ class WebSocketStreamCreateTest : public ::testing::Test {
explicit TestConnectDelegate(WebSocketStreamCreateTest* owner)
: owner_(owner) {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
stream.swap(owner_->stream_);
}
- virtual void OnFailure(const std::string& message) override {
+ void OnFailure(const std::string& message) override {
owner_->has_failed_ = true;
owner_->failure_message_ = message;
}
- virtual void OnStartOpeningHandshake(
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
// Can be called multiple times (in the case of HTTP auth). Last call
// wins.
owner_->request_info_ = request.Pass();
}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
if (owner_->response_info_)
ADD_FAILURE();
owner_->response_info_ = response.Pass();
}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_throttle_test.cc b/net/websockets/websocket_throttle_test.cc
index a743e93..4e27c83 100644
--- a/net/websockets/websocket_throttle_test.cc
+++ b/net/websockets/websocket_throttle_test.cc
@@ -23,14 +23,14 @@ namespace {
class DummySocketStreamDelegate : public SocketStream::Delegate {
public:
DummySocketStreamDelegate() {}
- virtual ~DummySocketStreamDelegate() {}
- virtual void OnConnected(
- SocketStream* socket, int max_pending_send_allowed) override {}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {}
- virtual void OnClose(SocketStream* socket) override {}
+ ~DummySocketStreamDelegate() override {}
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {}
+ void OnSentData(SocketStream* socket, int amount_sent) override {}
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {}
+ void OnClose(SocketStream* socket) override {}
};
class WebSocketThrottleTestContext : public TestURLRequestContext {