summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
commitf1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch)
tree6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2
parentd1666539b57bf8552e203d355fd09909d36f9732 (diff)
downloadchromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2
Begin CompletionCallback switchover.
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browsing_data_appcache_helper.cc2
-rw-r--r--chrome/browser/browsing_data_appcache_helper.h2
-rw-r--r--chrome/browser/browsing_data_remover.h2
-rw-r--r--chrome/browser/chrome_benchmarking_message_filter.cc4
-rw-r--r--chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc2
-rw-r--r--chrome/browser/extensions/extension_webrequest_api.cc8
-rw-r--r--chrome/browser/extensions/extension_webrequest_api.h4
-rw-r--r--chrome/browser/net/chrome_network_delegate.cc4
-rw-r--r--chrome/browser/net/chrome_network_delegate.h4
-rw-r--r--chrome/browser/net/network_stats.cc6
-rw-r--r--chrome/browser/net/network_stats.h14
-rw-r--r--chrome/browser/net/network_stats_unittest.cc4
-rw-r--r--chrome/browser/net/predictor.cc2
-rw-r--r--chrome/browser/net/view_http_cache_job_factory.cc2
-rw-r--r--chrome/browser/renderer_host/offline_resource_handler.cc2
-rw-r--r--chrome/browser/renderer_host/offline_resource_handler.h2
-rw-r--r--chrome/browser/safe_browsing/malware_details_unittest.cc8
-rw-r--r--content/browser/renderer_host/p2p/socket_dispatcher_host.cc2
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp.h6
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp_server.h2
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc6
-rw-r--r--content/browser/renderer_host/p2p/socket_host_test_utils.h16
-rw-r--r--content/browser/renderer_host/p2p/socket_host_udp.h4
-rw-r--r--content/browser/renderer_host/p2p/socket_host_udp_unittest.cc8
-rw-r--r--content/browser/renderer_host/pepper_message_filter.cc16
-rw-r--r--content/browser/renderer_host/redirect_to_file_resource_handler.h2
-rw-r--r--content/browser/resolve_proxy_msg_helper.h2
-rw-r--r--content/renderer/p2p/p2p_transport_impl.h2
-rw-r--r--content/renderer/p2p/p2p_transport_impl_unittest.cc8
-rw-r--r--jingle/glue/channel_socket_adapter.cc12
-rw-r--r--jingle/glue/channel_socket_adapter.h8
-rw-r--r--jingle/glue/channel_socket_adapter_unittest.cc2
-rw-r--r--jingle/glue/pseudotcp_adapter.cc40
-rw-r--r--jingle/glue/pseudotcp_adapter.h6
-rw-r--r--jingle/glue/pseudotcp_adapter_unittest.cc24
-rw-r--r--jingle/notifier/base/chrome_async_socket.h8
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket.cc8
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket.h14
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket_unittest.cc12
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.cc8
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.h12
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket_unittest.cc4
-rw-r--r--jingle/notifier/communicator/xmpp_connection_generator.h2
-rw-r--r--net/base/cert_verifier.cc10
-rw-r--r--net/base/cert_verifier.h8
-rw-r--r--net/base/cert_verifier_unittest.cc14
-rw-r--r--net/base/completion_callback.h24
-rw-r--r--net/base/dnsrr_resolver.cc6
-rw-r--r--net/base/dnsrr_resolver.h2
-rw-r--r--net/base/dnsrr_resolver_unittest.cc8
-rw-r--r--net/base/file_stream.h4
-rw-r--r--net/base/file_stream_posix.cc24
-rw-r--r--net/base/file_stream_unittest.cc38
-rw-r--r--net/base/file_stream_win.cc14
-rw-r--r--net/base/host_resolver.h2
-rw-r--r--net/base/host_resolver_impl.cc8
-rw-r--r--net/base/host_resolver_impl.h2
-rw-r--r--net/base/host_resolver_impl_unittest.cc44
-rw-r--r--net/base/mapped_host_resolver.cc2
-rw-r--r--net/base/mapped_host_resolver.h2
-rw-r--r--net/base/mapped_host_resolver_unittest.cc6
-rw-r--r--net/base/mock_file_stream.cc4
-rw-r--r--net/base/mock_file_stream.h4
-rw-r--r--net/base/mock_host_resolver.cc4
-rw-r--r--net/base/mock_host_resolver.h2
-rw-r--r--net/base/network_delegate.cc4
-rw-r--r--net/base/network_delegate.h8
-rw-r--r--net/base/origin_bound_cert_service.cc6
-rw-r--r--net/base/origin_bound_cert_service.h2
-rw-r--r--net/base/origin_bound_cert_service_unittest.cc12
-rw-r--r--net/base/single_request_host_resolver.cc6
-rw-r--r--net/base/single_request_host_resolver.h6
-rw-r--r--net/base/single_request_host_resolver_unittest.cc6
-rw-r--r--net/base/test_completion_callback.cc10
-rw-r--r--net/base/test_completion_callback.h6
-rw-r--r--net/base/test_completion_callback_unittest.cc16
-rw-r--r--net/curvecp/client_packetizer.cc6
-rw-r--r--net/curvecp/client_packetizer.h8
-rw-r--r--net/curvecp/curvecp_client_socket.cc6
-rw-r--r--net/curvecp/curvecp_client_socket.h6
-rw-r--r--net/curvecp/curvecp_server_socket.cc4
-rw-r--r--net/curvecp/curvecp_server_socket.h4
-rw-r--r--net/curvecp/curvecp_transfer_unittest.cc2
-rw-r--r--net/curvecp/messenger.cc8
-rw-r--r--net/curvecp/messenger.h10
-rw-r--r--net/curvecp/packetizer.h2
-rw-r--r--net/curvecp/server_packetizer.cc2
-rw-r--r--net/curvecp/server_packetizer.h6
-rw-r--r--net/curvecp/test_client.cc4
-rw-r--r--net/curvecp/test_client.h10
-rw-r--r--net/curvecp/test_server.h8
-rw-r--r--net/disk_cache/backend_impl.cc32
-rw-r--r--net/disk_cache/backend_impl.h24
-rw-r--r--net/disk_cache/backend_unittest.cc12
-rw-r--r--net/disk_cache/disk_cache.h30
-rw-r--r--net/disk_cache/disk_cache_perftest.cc6
-rw-r--r--net/disk_cache/disk_cache_test_base.cc32
-rw-r--r--net/disk_cache/entry_impl.cc30
-rw-r--r--net/disk_cache/entry_impl.h26
-rw-r--r--net/disk_cache/entry_unittest.cc28
-rw-r--r--net/disk_cache/in_flight_backend_io.cc36
-rw-r--r--net/disk_cache/in_flight_backend_io.h42
-rw-r--r--net/disk_cache/mem_backend_impl.cc14
-rw-r--r--net/disk_cache/mem_backend_impl.h14
-rw-r--r--net/disk_cache/mem_entry_impl.cc12
-rw-r--r--net/disk_cache/mem_entry_impl.h12
-rw-r--r--net/disk_cache/sparse_control.cc10
-rw-r--r--net/disk_cache/sparse_control.h10
-rw-r--r--net/disk_cache/stress_cache.cc2
-rw-r--r--net/dns/async_host_resolver.cc10
-rw-r--r--net/dns/async_host_resolver.h4
-rw-r--r--net/dns/async_host_resolver_unittest.cc4
-rw-r--r--net/dns/dns_transaction.h2
-rw-r--r--net/ftp/ftp_network_transaction.cc10
-rw-r--r--net/ftp/ftp_network_transaction.h12
-rw-r--r--net/ftp/ftp_network_transaction_unittest.cc2
-rw-r--r--net/ftp/ftp_transaction.h12
-rw-r--r--net/http/disk_cache_based_ssl_host_info.cc4
-rw-r--r--net/http/disk_cache_based_ssl_host_info.h4
-rw-r--r--net/http/http_auth_cache_unittest.cc2
-rw-r--r--net/http/http_auth_controller.cc4
-rw-r--r--net/http/http_auth_controller.h6
-rw-r--r--net/http/http_auth_controller_unittest.cc4
-rw-r--r--net/http/http_auth_handler.cc4
-rw-r--r--net/http/http_auth_handler.h8
-rw-r--r--net/http/http_auth_handler_basic.cc2
-rw-r--r--net/http/http_auth_handler_basic.h2
-rw-r--r--net/http/http_auth_handler_digest.cc2
-rw-r--r--net/http/http_auth_handler_digest.h2
-rw-r--r--net/http/http_auth_handler_digest_unittest.cc4
-rw-r--r--net/http/http_auth_handler_mock.cc8
-rw-r--r--net/http/http_auth_handler_mock.h6
-rw-r--r--net/http/http_auth_handler_negotiate.cc4
-rw-r--r--net/http/http_auth_handler_negotiate.h6
-rw-r--r--net/http/http_auth_handler_negotiate_unittest.cc14
-rw-r--r--net/http/http_auth_handler_ntlm.cc2
-rw-r--r--net/http/http_auth_handler_ntlm.h2
-rw-r--r--net/http/http_auth_handler_unittest.cc2
-rw-r--r--net/http/http_basic_stream.cc8
-rw-r--r--net/http/http_basic_stream.h8
-rw-r--r--net/http/http_cache.cc16
-rw-r--r--net/http/http_cache.h8
-rw-r--r--net/http/http_cache_transaction.cc22
-rw-r--r--net/http/http_cache_transaction.h26
-rw-r--r--net/http/http_cache_unittest.cc118
-rw-r--r--net/http/http_network_layer_unittest.cc2
-rw-r--r--net/http/http_network_transaction.cc12
-rw-r--r--net/http/http_network_transaction.h14
-rw-r--r--net/http/http_network_transaction_unittest.cc300
-rw-r--r--net/http/http_proxy_client_socket.cc10
-rw-r--r--net/http/http_proxy_client_socket.h12
-rw-r--r--net/http/http_proxy_client_socket_pool.cc2
-rw-r--r--net/http/http_proxy_client_socket_pool.h4
-rw-r--r--net/http/http_proxy_client_socket_pool_unittest.cc2
-rw-r--r--net/http/http_response_body_drainer.h4
-rw-r--r--net/http/http_response_body_drainer_unittest.cc16
-rw-r--r--net/http/http_stream.h8
-rw-r--r--net/http/http_stream_factory_impl_job.h2
-rw-r--r--net/http/http_stream_factory_impl_unittest.cc4
-rw-r--r--net/http/http_stream_parser.cc8
-rw-r--r--net/http/http_stream_parser.h12
-rw-r--r--net/http/http_transaction.h16
-rw-r--r--net/http/http_transaction_unittest.cc16
-rw-r--r--net/http/http_transaction_unittest.h14
-rw-r--r--net/http/partial_data.cc10
-rw-r--r--net/http/partial_data.h8
-rw-r--r--net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc4
-rw-r--r--net/proxy/dhcp_proxy_script_adapter_fetcher_win.h6
-rw-r--r--net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc2
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher.cc2
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher.h4
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_win.cc4
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_win.h6
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc8
-rw-r--r--net/proxy/init_proxy_resolver.cc2
-rw-r--r--net/proxy/init_proxy_resolver.h6
-rw-r--r--net/proxy/init_proxy_resolver_unittest.cc42
-rw-r--r--net/proxy/mock_proxy_resolver.cc12
-rw-r--r--net/proxy/mock_proxy_resolver.h14
-rw-r--r--net/proxy/mock_proxy_script_fetcher.cc4
-rw-r--r--net/proxy/mock_proxy_script_fetcher.h4
-rw-r--r--net/proxy/multi_threaded_proxy_resolver.cc14
-rw-r--r--net/proxy/multi_threaded_proxy_resolver.h4
-rw-r--r--net/proxy/multi_threaded_proxy_resolver_unittest.cc62
-rw-r--r--net/proxy/network_delegate_error_observer_unittest.cc4
-rw-r--r--net/proxy/proxy_resolver.h4
-rw-r--r--net/proxy/proxy_resolver_mac.cc4
-rw-r--r--net/proxy/proxy_resolver_mac.h4
-rw-r--r--net/proxy/proxy_resolver_v8.cc4
-rw-r--r--net/proxy/proxy_resolver_v8.h4
-rw-r--r--net/proxy/proxy_resolver_winhttp.cc4
-rw-r--r--net/proxy/proxy_resolver_winhttp.h4
-rw-r--r--net/proxy/proxy_script_fetcher.h2
-rw-r--r--net/proxy/proxy_script_fetcher_impl.cc4
-rw-r--r--net/proxy/proxy_script_fetcher_impl.h4
-rw-r--r--net/proxy/proxy_script_fetcher_impl_unittest.cc36
-rw-r--r--net/proxy/proxy_service.cc20
-rw-r--r--net/proxy/proxy_service.h8
-rw-r--r--net/proxy/proxy_service_unittest.cc152
-rw-r--r--net/proxy/sync_host_resolver_bridge.cc2
-rw-r--r--net/proxy/sync_host_resolver_bridge_unittest.cc10
-rw-r--r--net/socket/client_socket_handle.cc2
-rw-r--r--net/socket/client_socket_handle.h8
-rw-r--r--net/socket/client_socket_pool.h4
-rw-r--r--net/socket/client_socket_pool_base.cc6
-rw-r--r--net/socket/client_socket_pool_base.h16
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc148
-rw-r--r--net/socket/client_socket_pool_manager.cc6
-rw-r--r--net/socket/client_socket_pool_manager.h4
-rw-r--r--net/socket/deterministic_socket_data_unittest.cc4
-rw-r--r--net/socket/dns_cert_provenance_checker.cc2
-rw-r--r--net/socket/server_socket.h2
-rw-r--r--net/socket/socket.h4
-rw-r--r--net/socket/socket_test_util.cc54
-rw-r--r--net/socket/socket_test_util.h60
-rw-r--r--net/socket/socks5_client_socket.cc8
-rw-r--r--net/socket/socks5_client_socket.h10
-rw-r--r--net/socket/socks5_client_socket_unittest.cc8
-rw-r--r--net/socket/socks_client_socket.cc8
-rw-r--r--net/socket/socks_client_socket.h10
-rw-r--r--net/socket/socks_client_socket_pool.cc2
-rw-r--r--net/socket/socks_client_socket_pool.h4
-rw-r--r--net/socket/socks_client_socket_pool_unittest.cc6
-rw-r--r--net/socket/socks_client_socket_unittest.cc6
-rw-r--r--net/socket/ssl_client_socket.h2
-rw-r--r--net/socket/ssl_client_socket_mac.cc12
-rw-r--r--net/socket/ssl_client_socket_mac.h18
-rw-r--r--net/socket/ssl_client_socket_nss.cc12
-rw-r--r--net/socket/ssl_client_socket_nss.h18
-rw-r--r--net/socket/ssl_client_socket_openssl.cc12
-rw-r--r--net/socket/ssl_client_socket_openssl.h18
-rw-r--r--net/socket/ssl_client_socket_pool.cc2
-rw-r--r--net/socket/ssl_client_socket_pool.h4
-rw-r--r--net/socket/ssl_client_socket_pool_unittest.cc38
-rw-r--r--net/socket/ssl_client_socket_unittest.cc28
-rw-r--r--net/socket/ssl_client_socket_win.cc14
-rw-r--r--net/socket/ssl_client_socket_win.h18
-rw-r--r--net/socket/ssl_host_info.cc6
-rw-r--r--net/socket/ssl_host_info.h10
-rw-r--r--net/socket/ssl_server_socket.h2
-rw-r--r--net/socket/ssl_server_socket_nss.cc14
-rw-r--r--net/socket/ssl_server_socket_nss.h18
-rw-r--r--net/socket/ssl_server_socket_unittest.cc32
-rw-r--r--net/socket/stream_socket.h2
-rw-r--r--net/socket/tcp_client_socket_libevent.cc10
-rw-r--r--net/socket/tcp_client_socket_libevent.h10
-rw-r--r--net/socket/tcp_client_socket_unittest.cc8
-rw-r--r--net/socket/tcp_client_socket_win.cc10
-rw-r--r--net/socket/tcp_client_socket_win.h10
-rw-r--r--net/socket/tcp_server_socket_libevent.cc4
-rw-r--r--net/socket/tcp_server_socket_libevent.h4
-rw-r--r--net/socket/tcp_server_socket_unittest.cc20
-rw-r--r--net/socket/tcp_server_socket_win.cc4
-rw-r--r--net/socket/tcp_server_socket_win.h4
-rw-r--r--net/socket/transport_client_socket_pool.cc2
-rw-r--r--net/socket/transport_client_socket_pool.h6
-rw-r--r--net/socket/transport_client_socket_pool_unittest.cc56
-rw-r--r--net/socket/transport_client_socket_unittest.cc26
-rw-r--r--net/socket/web_socket_server_socket.cc20
-rw-r--r--net/socket/web_socket_server_socket.h2
-rw-r--r--net/socket/web_socket_server_socket_unittest.cc18
-rw-r--r--net/socket_stream/socket_stream.h8
-rw-r--r--net/socket_stream/socket_stream_unittest.cc26
-rw-r--r--net/spdy/spdy_http_stream.cc10
-rw-r--r--net/spdy/spdy_http_stream.h10
-rw-r--r--net/spdy/spdy_http_stream_unittest.cc8
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc118
-rw-r--r--net/spdy/spdy_proxy_client_socket.cc16
-rw-r--r--net/spdy/spdy_proxy_client_socket.h12
-rw-r--r--net/spdy/spdy_proxy_client_socket_unittest.cc4
-rw-r--r--net/spdy/spdy_session.cc4
-rw-r--r--net/spdy/spdy_session.h14
-rw-r--r--net/spdy/spdy_session_unittest.cc12
-rw-r--r--net/spdy/spdy_stream_unittest.cc8
-rw-r--r--net/spdy/spdy_websocket_stream.h2
-rw-r--r--net/spdy/spdy_websocket_stream_unittest.cc10
-rw-r--r--net/test/test_server.cc2
-rw-r--r--net/tools/crash_cache/crash_cache.cc10
-rw-r--r--net/tools/dump_cache/cache_dumper.cc8
-rw-r--r--net/tools/dump_cache/cache_dumper.h12
-rw-r--r--net/tools/dump_cache/upgrade.cc12
-rw-r--r--net/tools/fetch/fetch_client.cc4
-rw-r--r--net/udp/datagram_server_socket.h4
-rw-r--r--net/udp/udp_client_socket.cc4
-rw-r--r--net/udp/udp_client_socket.h4
-rw-r--r--net/udp/udp_server_socket.cc4
-rw-r--r--net/udp/udp_server_socket.h4
-rw-r--r--net/udp/udp_socket_libevent.cc14
-rw-r--r--net/udp/udp_socket_libevent.h14
-rw-r--r--net/udp/udp_socket_unittest.cc10
-rw-r--r--net/udp/udp_socket_win.cc14
-rw-r--r--net/udp/udp_socket_win.h14
-rw-r--r--net/url_request/url_request.h2
-rw-r--r--net/url_request/url_request_file_job.h2
-rw-r--r--net/url_request/url_request_ftp_job.h4
-rw-r--r--net/url_request/url_request_http_job.h6
-rw-r--r--net/url_request/url_request_test_util.cc4
-rw-r--r--net/url_request/url_request_test_util.h4
-rw-r--r--net/url_request/url_request_unittest.cc4
-rw-r--r--net/url_request/view_cache_helper.cc10
-rw-r--r--net/url_request/view_cache_helper.h12
-rw-r--r--net/url_request/view_cache_helper_unittest.cc18
-rw-r--r--net/websockets/websocket_job.cc4
-rw-r--r--net/websockets/websocket_job.h4
-rw-r--r--net/websockets/websocket_job_unittest.cc4
-rw-r--r--net/websockets/websocket_throttle_unittest.cc14
-rw-r--r--remoting/jingle_glue/ssl_socket_adapter.cc10
-rw-r--r--remoting/jingle_glue/ssl_socket_adapter.h16
-rw-r--r--remoting/protocol/buffered_socket_writer.h2
-rw-r--r--remoting/protocol/channel_authenticator.h4
-rw-r--r--remoting/protocol/fake_session.cc10
-rw-r--r--remoting/protocol/fake_session.h14
-rw-r--r--remoting/protocol/jingle_session_unittest.cc8
-rw-r--r--remoting/protocol/jingle_stream_connector.h4
-rw-r--r--remoting/protocol/message_reader.h2
-rw-r--r--remoting/protocol/pepper_stream_channel.h4
-rw-r--r--remoting/protocol/pepper_transport_socket_adapter.cc12
-rw-r--r--remoting/protocol/pepper_transport_socket_adapter.h12
-rw-r--r--remoting/protocol/protocol_test_client.cc4
-rw-r--r--remoting/protocol/secure_p2p_socket.cc10
-rw-r--r--remoting/protocol/secure_p2p_socket.h12
-rw-r--r--remoting/protocol/secure_p2p_socket_unittest.cc4
-rw-r--r--remoting/protocol/socket_reader_base.h2
-rw-r--r--webkit/appcache/appcache_disk_cache.cc28
-rw-r--r--webkit/appcache/appcache_disk_cache.h22
-rw-r--r--webkit/appcache/appcache_quota_client.cc2
-rw-r--r--webkit/appcache/appcache_quota_client.h2
-rw-r--r--webkit/appcache/appcache_response.cc36
-rw-r--r--webkit/appcache/appcache_response.h30
-rw-r--r--webkit/appcache/appcache_response_unittest.cc8
-rw-r--r--webkit/appcache/appcache_service.cc26
-rw-r--r--webkit/appcache/appcache_service.h8
-rw-r--r--webkit/appcache/appcache_service_unittest.cc8
-rw-r--r--webkit/appcache/appcache_storage.h2
-rw-r--r--webkit/appcache/appcache_storage_impl.h4
-rw-r--r--webkit/appcache/appcache_test_helper.h2
-rw-r--r--webkit/appcache/appcache_update_job.h8
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc16
-rw-r--r--webkit/appcache/appcache_url_request_job.h2
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc8
-rw-r--r--webkit/appcache/mock_appcache_service.cc4
-rw-r--r--webkit/appcache/mock_appcache_service.h2
-rw-r--r--webkit/appcache/view_appcache_internals_job.cc10
-rw-r--r--webkit/blob/blob_url_request_job.h2
-rw-r--r--webkit/database/database_quota_client.cc10
-rw-r--r--webkit/database/database_quota_client_unittest.cc4
-rw-r--r--webkit/database/database_tracker.cc14
-rw-r--r--webkit/database/database_tracker.h10
-rw-r--r--webkit/database/database_tracker_unittest.cc2
-rw-r--r--webkit/fileapi/file_system_url_request_job.h2
-rw-r--r--webkit/fileapi/file_writer_delegate.h2
-rw-r--r--webkit/fileapi/webfilewriter_base_unittest.cc2
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc8
-rw-r--r--webkit/glue/media/buffered_resource_loader.cc4
-rw-r--r--webkit/glue/media/buffered_resource_loader.h8
-rw-r--r--webkit/plugins/ppapi/ppb_transport_impl.h4
356 files changed, 2086 insertions, 2086 deletions
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc
index 512e666..f7e7ae5 100644
--- a/chrome/browser/browsing_data_appcache_helper.cc
+++ b/chrome/browser/browsing_data_appcache_helper.cc
@@ -32,7 +32,7 @@ void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
appcache_info_callback_ =
- new net::CancelableCompletionCallback<BrowsingDataAppCacheHelper>(
+ new net::CancelableOldCompletionCallback<BrowsingDataAppCacheHelper>(
this, &BrowsingDataAppCacheHelper::OnFetchComplete);
appcache_service_->GetAllAppCacheInfo(info_collection_,
appcache_info_callback_);
diff --git a/chrome/browser/browsing_data_appcache_helper.h b/chrome/browser/browsing_data_appcache_helper.h
index c40ff48..2a501e9 100644
--- a/chrome/browser/browsing_data_appcache_helper.h
+++ b/chrome/browser/browsing_data_appcache_helper.h
@@ -41,7 +41,7 @@ class BrowsingDataAppCacheHelper
bool is_fetching_;
scoped_refptr<ChromeAppCacheService> appcache_service_;
- scoped_refptr<net::CancelableCompletionCallback<BrowsingDataAppCacheHelper> >
+ scoped_refptr<net::CancelableOldCompletionCallback<BrowsingDataAppCacheHelper> >
appcache_info_callback_;
DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper);
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index 2a955fc..7c66f3a 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -228,7 +228,7 @@ class BrowsingDataRemover : public NotificationObserver,
static bool removing_;
// Used to delete data from the HTTP caches.
- net::CompletionCallbackImpl<BrowsingDataRemover> cache_callback_;
+ net::OldCompletionCallbackImpl<BrowsingDataRemover> cache_callback_;
CacheState next_cache_state_;
disk_cache::Backend* cache_;
diff --git a/chrome/browser/chrome_benchmarking_message_filter.cc b/chrome/browser/chrome_benchmarking_message_filter.cc
index c1fb93e..ff5bed7 100644
--- a/chrome/browser/chrome_benchmarking_message_filter.cc
+++ b/chrome/browser/chrome_benchmarking_message_filter.cc
@@ -18,7 +18,7 @@
namespace {
-class ClearCacheCompletion : public net::CompletionCallback {
+class ClearCacheCompletion : public net::OldCompletionCallback {
public:
ClearCacheCompletion(ChromeBenchmarkingMessageFilter* filter,
IPC::Message* reply_msg)
@@ -82,7 +82,7 @@ class DoomEntriesHelper {
disk_cache::Backend* backend_;
disk_cache::Entry* entry_;
void* iter_;
- net::CompletionCallbackImpl<DoomEntriesHelper> callback_;
+ net::OldCompletionCallbackImpl<DoomEntriesHelper> callback_;
ClearCacheCompletion* user_callback_;
};
diff --git a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
index 3d2fa4f..3e950a8 100644
--- a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
+++ b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
@@ -46,7 +46,7 @@ class ProxyResolverImpl : public ProxyResolverInterface {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, notify_task_);
}
- net::CompletionCallbackImpl<Request> completion_callback_;
+ net::OldCompletionCallbackImpl<Request> completion_callback_;
std::string source_url_; // URL being resolved.
int result_; // Result of proxy resolution.
diff --git a/chrome/browser/extensions/extension_webrequest_api.cc b/chrome/browser/extensions/extension_webrequest_api.cc
index a6add39..7e7bea0 100644
--- a/chrome/browser/extensions/extension_webrequest_api.cc
+++ b/chrome/browser/extensions/extension_webrequest_api.cc
@@ -318,7 +318,7 @@ struct ExtensionWebRequestEventRouter::BlockedRequest {
const net::BoundNetLog* net_log;
// The callback to call when we get a response from all event handlers.
- net::CompletionCallback* callback;
+ net::OldCompletionCallback* callback;
// If non-empty, this contains the new URL that the request will redirect to.
// Only valid for OnBeforeRequest.
@@ -464,7 +464,7 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
void* profile,
ExtensionInfoMap* extension_info_map,
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url) {
// TODO(jochen): Figure out what to do with events from the system context.
if (!profile)
@@ -506,7 +506,7 @@ int ExtensionWebRequestEventRouter::OnBeforeSendHeaders(
void* profile,
ExtensionInfoMap* extension_info_map,
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers) {
// TODO(jochen): Figure out what to do with events from the system context.
if (!profile)
@@ -1282,7 +1282,7 @@ void ExtensionWebRequestEventRouter::DecrementBlockCount(
// distinguished from a regular failure.
if (blocked_request.callback) {
int rv = canceled ? net::ERR_EMPTY_RESPONSE : net::OK;
- net::CompletionCallback* callback = blocked_request.callback;
+ net::OldCompletionCallback* callback = blocked_request.callback;
// Ensure that request is removed before callback because the callback
// might trigger the next event.
blocked_requests_.erase(request_id);
diff --git a/chrome/browser/extensions/extension_webrequest_api.h b/chrome/browser/extensions/extension_webrequest_api.h
index 8bc3429..72c6016 100644
--- a/chrome/browser/extensions/extension_webrequest_api.h
+++ b/chrome/browser/extensions/extension_webrequest_api.h
@@ -149,7 +149,7 @@ class ExtensionWebRequestEventRouter {
int OnBeforeRequest(void* profile,
ExtensionInfoMap* extension_info_map,
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url);
// Dispatches the onBeforeSendHeaders event. This is fired for HTTP(s)
@@ -159,7 +159,7 @@ class ExtensionWebRequestEventRouter {
int OnBeforeSendHeaders(void* profile,
ExtensionInfoMap* extension_info_map,
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers);
// Dispatches the onSendHeaders event. This is fired for HTTP(s) requests
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 681799a..721ff38 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -73,7 +73,7 @@ void ChromeNetworkDelegate::InitializeReferrersEnabled(
int ChromeNetworkDelegate::OnBeforeURLRequest(
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url) {
#if defined(ENABLE_CONFIGURATION_POLICY)
// TODO(joaodasilva): This prevents extensions from seeing URLs that are
@@ -98,7 +98,7 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
int ChromeNetworkDelegate::OnBeforeSendHeaders(
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers) {
return ExtensionWebRequestEventRouter::GetInstance()->OnBeforeSendHeaders(
profile_, extension_info_map_.get(), request, callback, headers);
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index f36df17..1a76935 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -47,10 +47,10 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
private:
// NetworkDelegate methods:
virtual int OnBeforeURLRequest(net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url) OVERRIDE;
virtual int OnBeforeSendHeaders(net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers) OVERRIDE;
virtual void OnSendHeaders(net::URLRequest* request,
const net::HttpRequestHeaders& headers) OVERRIDE;
diff --git a/chrome/browser/net/network_stats.cc b/chrome/browser/net/network_stats.cc
index 6b600b2..036b3708 100644
--- a/chrome/browser/net/network_stats.cc
+++ b/chrome/browser/net/network_stats.cc
@@ -97,7 +97,7 @@ NetworkStats::~NetworkStats() {
bool NetworkStats::Start(net::HostResolver* host_resolver,
const net::HostPortPair& server_host_port_pair,
uint32 bytes_to_send,
- net::CompletionCallback* finished_callback) {
+ net::OldCompletionCallback* finished_callback) {
DCHECK(bytes_to_send); // We should have data to send.
Initialize(bytes_to_send, finished_callback);
@@ -114,7 +114,7 @@ bool NetworkStats::Start(net::HostResolver* host_resolver,
}
void NetworkStats::Initialize(uint32 bytes_to_send,
- net::CompletionCallback* finished_callback) {
+ net::OldCompletionCallback* finished_callback) {
DCHECK(bytes_to_send); // We should have data to send.
load_size_ = bytes_to_send;
@@ -156,7 +156,7 @@ bool NetworkStats::ConnectComplete(int result) {
void NetworkStats::DoFinishCallback(int result) {
if (finished_callback_ != NULL) {
- net::CompletionCallback* callback = finished_callback_;
+ net::OldCompletionCallback* callback = finished_callback_;
finished_callback_ = NULL;
callback->Run(result);
}
diff --git a/chrome/browser/net/network_stats.h b/chrome/browser/net/network_stats.h
index 59106d2..65742b6 100644
--- a/chrome/browser/net/network_stats.h
+++ b/chrome/browser/net/network_stats.h
@@ -74,7 +74,7 @@ class NetworkStats {
bool Start(net::HostResolver* host_resolver,
const net::HostPortPair& server,
uint32 bytes_to_send,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
protected:
// Constructs an NetworkStats object that collects metrics for network
@@ -86,7 +86,7 @@ class NetworkStats {
// server. |finished_callback| is called when we are done with the test.
// |finished_callback| is mainly useful for unittests.
void Initialize(uint32 bytes_to_send,
- net::CompletionCallback* finished_callback);
+ net::OldCompletionCallback* finished_callback);
// Called after host is resolved. UDPStatsClient and TCPStatsClient implement
// this method. They create the socket and connect to the server.
@@ -177,18 +177,18 @@ class NetworkStats {
net::AddressList addresses_;
// Callback to call when host resolution is completed.
- net::CompletionCallbackImpl<NetworkStats> resolve_callback_;
+ net::OldCompletionCallbackImpl<NetworkStats> resolve_callback_;
// Callback to call when data is read from the server.
- net::CompletionCallbackImpl<NetworkStats> read_callback_;
+ net::OldCompletionCallbackImpl<NetworkStats> read_callback_;
// Callback to call when data is sent to the server.
- net::CompletionCallbackImpl<NetworkStats> write_callback_;
+ net::OldCompletionCallbackImpl<NetworkStats> write_callback_;
// Callback to call when echo protocol is successefully finished or whenever
// there is an error (this allows unittests to wait until echo protocol's
// round trip is finished).
- net::CompletionCallback* finished_callback_;
+ net::OldCompletionCallback* finished_callback_;
// The time when the session was started.
base::TimeTicks start_time_;
@@ -252,7 +252,7 @@ class TCPStatsClient : public NetworkStats {
void OnConnectComplete(int result);
// Callback to call when connect is completed.
- net::CompletionCallbackImpl<TCPStatsClient> connect_callback_;
+ net::OldCompletionCallbackImpl<TCPStatsClient> connect_callback_;
};
// This collects the network connectivity stats for UDP and TCP for small
diff --git a/chrome/browser/net/network_stats_unittest.cc b/chrome/browser/net/network_stats_unittest.cc
index 260e24a..a956d08 100644
--- a/chrome/browser/net/network_stats_unittest.cc
+++ b/chrome/browser/net/network_stats_unittest.cc
@@ -34,7 +34,7 @@ class NetworkStatsTestUDP : public NetworkStatsTest {
protected:
void RunUDPEchoTest(int bytes) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
scoped_ptr<net::MockHostResolver> host_resolver(
new net::MockHostResolver());
@@ -61,7 +61,7 @@ class NetworkStatsTestTCP : public NetworkStatsTest {
protected:
void RunTCPEchoTest(int bytes) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
scoped_ptr<net::MockHostResolver> host_resolver(
new net::MockHostResolver());
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index ed4aa4b..20fa822 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -110,7 +110,7 @@ class Predictor::LookupRequest {
}
// HostResolver will call us using this callback when resolution is complete.
- net::CompletionCallbackImpl<LookupRequest> net_callback_;
+ net::OldCompletionCallbackImpl<LookupRequest> net_callback_;
Predictor* predictor_; // The predictor which started us.
diff --git a/chrome/browser/net/view_http_cache_job_factory.cc b/chrome/browser/net/view_http_cache_job_factory.cc
index 1c4437b..1441dd7 100644
--- a/chrome/browser/net/view_http_cache_job_factory.cc
+++ b/chrome/browser/net/view_http_cache_job_factory.cc
@@ -71,7 +71,7 @@ class ViewHttpCacheJob : public net::URLRequestJob {
std::string data_;
int data_offset_;
net::ViewCacheHelper cache_helper_;
- net::CompletionCallbackImpl<Core> callback_;
+ net::OldCompletionCallbackImpl<Core> callback_;
Callback0::Type* user_callback_;
DISALLOW_COPY_AND_ASSIGN(Core);
diff --git a/chrome/browser/renderer_host/offline_resource_handler.cc b/chrome/browser/renderer_host/offline_resource_handler.cc
index 0e32ba8..f722446 100644
--- a/chrome/browser/renderer_host/offline_resource_handler.cc
+++ b/chrome/browser/renderer_host/offline_resource_handler.cc
@@ -109,7 +109,7 @@ bool OfflineResourceHandler::OnWillStart(int request_id,
AddRef(); // Balanced with OnCanHandleOfflineComplete
DCHECK(!appcache_completion_callback_);
appcache_completion_callback_ =
- new net::CancelableCompletionCallback<OfflineResourceHandler>(
+ new net::CancelableOldCompletionCallback<OfflineResourceHandler>(
this, &OfflineResourceHandler::OnCanHandleOfflineComplete);
appcache_service_->CanHandleMainResourceOffline(
url, request_->first_party_for_cookies(),
diff --git a/chrome/browser/renderer_host/offline_resource_handler.h b/chrome/browser/renderer_host/offline_resource_handler.h
index 7877536..8f5aba0 100644
--- a/chrome/browser/renderer_host/offline_resource_handler.h
+++ b/chrome/browser/renderer_host/offline_resource_handler.h
@@ -79,7 +79,7 @@ class OfflineResourceHandler : public ResourceHandler,
int deferred_request_id_;
GURL deferred_url_;
- scoped_refptr<net::CancelableCompletionCallback<OfflineResourceHandler> >
+ scoped_refptr<net::CancelableOldCompletionCallback<OfflineResourceHandler> >
appcache_completion_callback_;
DISALLOW_COPY_AND_ASSIGN(OfflineResourceHandler);
diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc
index 8050a14..71e0453 100644
--- a/chrome/browser/safe_browsing/malware_details_unittest.cc
+++ b/chrome/browser/safe_browsing/malware_details_unittest.cc
@@ -69,7 +69,7 @@ void WriteHeaders(disk_cache::Entry* entry, const std::string headers) {
reinterpret_cast<const char*>(pickle.data())));
int len = static_cast<int>(pickle.size());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(0, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -82,14 +82,14 @@ void WriteData(disk_cache::Entry* entry, const std::string data) {
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(len));
memcpy(buf->data(), data.data(), data.length());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(1, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
void WriteToEntry(disk_cache::Backend* cache, const std::string key,
const std::string headers, const std::string data) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Entry* entry;
int rv = cache->CreateEntry(key, &entry, &cb);
rv = cb.GetResult(rv);
@@ -104,7 +104,7 @@ void WriteToEntry(disk_cache::Backend* cache, const std::string key,
}
void FillCache(net::URLRequestContextGetter* context_getter) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv =
context_getter->GetURLRequestContext()->http_transaction_factory()->
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
index 5fa011f..2141aec 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
@@ -95,7 +95,7 @@ class P2PSocketDispatcherHost::DnsRequest {
DoneCallback done_callback_;
- net::CompletionCallbackImpl<DnsRequest> completion_callback_;
+ net::OldCompletionCallbackImpl<DnsRequest> completion_callback_;
};
P2PSocketDispatcherHost::P2PSocketDispatcherHost(
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.h b/content/browser/renderer_host/p2p/socket_host_tcp.h
index e92b0f0..3c50f82 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.h
@@ -66,9 +66,9 @@ class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHost {
bool connected_;
- net::CompletionCallbackImpl<P2PSocketHostTcp> connect_callback_;
- net::CompletionCallbackImpl<P2PSocketHostTcp> read_callback_;
- net::CompletionCallbackImpl<P2PSocketHostTcp> write_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostTcp> connect_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostTcp> read_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostTcp> write_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp);
};
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.h b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
index f964774..0560d32 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
@@ -55,7 +55,7 @@ class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost {
scoped_ptr<net::StreamSocket> accept_socket_;
AcceptedSocketsMap accepted_sockets_;
- net::CompletionCallbackImpl<P2PSocketHostTcpServer> accept_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostTcpServer> accept_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer);
};
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc b/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
index 5634a608..ba625bc 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
@@ -33,7 +33,7 @@ class FakeServerSocket : public net::ServerSocket {
DCHECK(incoming_sockets_.empty());
accept_socket_->reset(socket);
accept_socket_ = NULL;
- net::CompletionCallback* cb = accept_callback_;
+ net::OldCompletionCallback* cb = accept_callback_;
accept_callback_ = NULL;
cb->Run(net::OK);
} else {
@@ -54,7 +54,7 @@ class FakeServerSocket : public net::ServerSocket {
}
virtual int Accept(scoped_ptr<net::StreamSocket>* socket,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
DCHECK(socket);
if (!incoming_sockets_.empty()) {
socket->reset(incoming_sockets_.front());
@@ -73,7 +73,7 @@ class FakeServerSocket : public net::ServerSocket {
net::IPEndPoint local_address_;
scoped_ptr<net::StreamSocket>* accept_socket_;
- net::CompletionCallback* accept_callback_;
+ net::OldCompletionCallback* accept_callback_;
std::list<net::StreamSocket*> incoming_sockets_;
};
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.h b/content/browser/renderer_host/p2p/socket_host_test_utils.h
index d4b491b..e7002f4 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.h
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.h
@@ -57,12 +57,12 @@ class FakeSocket : public net::StreamSocket {
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
virtual bool SetSendBufferSize(int32 size) OVERRIDE;
- virtual int Connect(net::CompletionCallback* callback) OVERRIDE;
+ virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
@@ -80,7 +80,7 @@ class FakeSocket : public net::StreamSocket {
bool read_pending_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
std::string* written_data_;
std::string input_data_;
@@ -111,7 +111,7 @@ void FakeSocket::AppendInputData(const char* data, int data_size) {
memcpy(read_buffer_->data(), &input_data_[0] + input_pos_, result);
input_pos_ += result;
read_buffer_ = NULL;
- net::CompletionCallback* cb = read_callback_;
+ net::OldCompletionCallback* cb = read_callback_;
read_callback_ = NULL;
cb->Run(result);
}
@@ -126,7 +126,7 @@ void FakeSocket::SetLocalAddress(const net::IPEndPoint& local_address) {
}
int FakeSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
if (input_pos_ < static_cast<int>(input_data_.size())){
int result = std::min(buf_len,
@@ -144,7 +144,7 @@ int FakeSocket::Read(net::IOBuffer* buf, int buf_len,
}
int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
if (written_data_) {
written_data_->insert(written_data_->end(),
@@ -163,7 +163,7 @@ bool FakeSocket::SetSendBufferSize(int32 size) {
return false;
}
-int FakeSocket::Connect(net::CompletionCallback* callback) {
+int FakeSocket::Connect(net::OldCompletionCallback* callback) {
return 0;
}
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.h b/content/browser/renderer_host/p2p/socket_host_udp.h
index 83be566..b52aa19 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.h
+++ b/content/browser/renderer_host/p2p/socket_host_udp.h
@@ -56,8 +56,8 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
// response or relay allocation request or response.
ConnectedPeerSet connected_peers_;
- net::CompletionCallbackImpl<P2PSocketHostUdp> recv_callback_;
- net::CompletionCallbackImpl<P2PSocketHostUdp> send_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostUdp> recv_callback_;
+ net::OldCompletionCallbackImpl<P2PSocketHostUdp> send_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp);
};
diff --git a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
index d4c19b5..bcc6716 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
@@ -53,7 +53,7 @@ class FakeDatagramServerSocket : public net::DatagramServerSocket {
virtual int RecvFrom(net::IOBuffer* buf, int buf_len,
net::IPEndPoint* address,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
CHECK(!recv_callback_);
if (incoming_packets_.size() > 0) {
scoped_refptr<net::IOBuffer> buffer(buf);
@@ -74,7 +74,7 @@ class FakeDatagramServerSocket : public net::DatagramServerSocket {
virtual int SendTo(net::IOBuffer* buf, int buf_len,
const net::IPEndPoint& address,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
scoped_refptr<net::IOBuffer> buffer(buf);
std::vector<char> data_vector(buffer->data(), buffer->data() + buf_len);
sent_packets_->push_back(UDPPacket(address, data_vector));
@@ -86,7 +86,7 @@ class FakeDatagramServerSocket : public net::DatagramServerSocket {
int size = std::min(recv_size_, static_cast<int>(data.size()));
memcpy(recv_buffer_->data(), &*data.begin(), size);
*recv_address_ = address;
- net::CompletionCallback* cb = recv_callback_;
+ net::OldCompletionCallback* cb = recv_callback_;
recv_callback_ = NULL;
recv_buffer_ = NULL;
cb->Run(size);
@@ -108,7 +108,7 @@ class FakeDatagramServerSocket : public net::DatagramServerSocket {
scoped_refptr<net::IOBuffer> recv_buffer_;
net::IPEndPoint* recv_address_;
int recv_size_;
- net::CompletionCallback* recv_callback_;
+ net::OldCompletionCallback* recv_callback_;
};
} // namespace
diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc
index 86a218e..103af33 100644
--- a/content/browser/renderer_host/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper_message_filter.cc
@@ -191,11 +191,11 @@ class PepperMessageFilter::FlashTCPSocket {
ConnectionState connection_state_;
bool end_of_file_reached_;
- net::CompletionCallbackImpl<FlashTCPSocket> resolve_callback_;
- net::CompletionCallbackImpl<FlashTCPSocket> connect_callback_;
- net::CompletionCallbackImpl<FlashTCPSocket> ssl_handshake_callback_;
- net::CompletionCallbackImpl<FlashTCPSocket> read_callback_;
- net::CompletionCallbackImpl<FlashTCPSocket> write_callback_;
+ net::OldCompletionCallbackImpl<FlashTCPSocket> resolve_callback_;
+ net::OldCompletionCallbackImpl<FlashTCPSocket> connect_callback_;
+ net::OldCompletionCallbackImpl<FlashTCPSocket> ssl_handshake_callback_;
+ net::OldCompletionCallbackImpl<FlashTCPSocket> read_callback_;
+ net::OldCompletionCallbackImpl<FlashTCPSocket> write_callback_;
scoped_ptr<net::SingleRequestHostResolver> resolver_;
net::AddressList address_list_;
@@ -582,8 +582,8 @@ class PepperMessageFilter::FlashUDPSocket {
uint32 plugin_dispatcher_id_;
uint32 socket_id_;
- net::CompletionCallbackImpl<FlashUDPSocket> recvfrom_callback_;
- net::CompletionCallbackImpl<FlashUDPSocket> sendto_callback_;
+ net::OldCompletionCallbackImpl<FlashUDPSocket> recvfrom_callback_;
+ net::OldCompletionCallbackImpl<FlashUDPSocket> sendto_callback_;
scoped_ptr<net::UDPServerSocket> socket_;
@@ -1064,7 +1064,7 @@ class PepperMessageFilter::LookupRequest {
}
// HostResolver will call us using this callback when resolution is complete.
- net::CompletionCallbackImpl<LookupRequest> net_callback_;
+ net::OldCompletionCallbackImpl<LookupRequest> net_callback_;
PepperMessageFilter* pepper_message_filter_;
net::SingleRequestHostResolver resolver_;
diff --git a/content/browser/renderer_host/redirect_to_file_resource_handler.h b/content/browser/renderer_host/redirect_to_file_resource_handler.h
index 587c9eb..638ea50 100644
--- a/content/browser/renderer_host/redirect_to_file_resource_handler.h
+++ b/content/browser/renderer_host/redirect_to_file_resource_handler.h
@@ -77,7 +77,7 @@ class RedirectToFileResourceHandler : public ResourceHandler {
int write_cursor_;
scoped_ptr<net::FileStream> file_stream_;
- net::CompletionCallbackImpl<RedirectToFileResourceHandler> write_callback_;
+ net::OldCompletionCallbackImpl<RedirectToFileResourceHandler> write_callback_;
bool write_callback_pending_;
// We create a DeletableFileReference for the temp file created as
diff --git a/content/browser/resolve_proxy_msg_helper.h b/content/browser/resolve_proxy_msg_helper.h
index 10289a3..d89e1be 100644
--- a/content/browser/resolve_proxy_msg_helper.h
+++ b/content/browser/resolve_proxy_msg_helper.h
@@ -70,7 +70,7 @@ class CONTENT_EXPORT ResolveProxyMsgHelper : public BrowserMessageFilter {
};
// Members for the current outstanding proxy request.
- net::CompletionCallbackImpl<ResolveProxyMsgHelper> callback_;
+ net::OldCompletionCallbackImpl<ResolveProxyMsgHelper> callback_;
net::ProxyInfo proxy_info_;
// FIFO queue of pending requests. The first entry is always the current one.
diff --git a/content/renderer/p2p/p2p_transport_impl.h b/content/renderer/p2p/p2p_transport_impl.h
index d4d1baa..b807e44 100644
--- a/content/renderer/p2p/p2p_transport_impl.h
+++ b/content/renderer/p2p/p2p_transport_impl.h
@@ -89,7 +89,7 @@ class CONTENT_EXPORT P2PTransportImpl
scoped_ptr<jingle_glue::TransportChannelSocketAdapter> channel_adapter_;
scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_;
- net::CompletionCallbackImpl<P2PTransportImpl> connect_callback_;
+ net::OldCompletionCallbackImpl<P2PTransportImpl> connect_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl);
};
diff --git a/content/renderer/p2p/p2p_transport_impl_unittest.cc b/content/renderer/p2p/p2p_transport_impl_unittest.cc
index 83c23e5..00798de 100644
--- a/content/renderer/p2p/p2p_transport_impl_unittest.cc
+++ b/content/renderer/p2p/p2p_transport_impl_unittest.cc
@@ -178,8 +178,8 @@ class UdpChannelTester : public base::RefCountedThreadSafe<UdpChannelTester> {
scoped_refptr<net::IOBuffer> sent_packets_[kMessages];
scoped_refptr<net::IOBuffer> read_buffer_;
- net::CompletionCallbackImpl<UdpChannelTester> write_cb_;
- net::CompletionCallbackImpl<UdpChannelTester> read_cb_;
+ net::OldCompletionCallbackImpl<UdpChannelTester> write_cb_;
+ net::OldCompletionCallbackImpl<UdpChannelTester> read_cb_;
int write_errors_;
int read_errors_;
int packets_sent_;
@@ -314,8 +314,8 @@ class TcpChannelTester : public base::RefCountedThreadSafe<TcpChannelTester> {
std::vector<char> sent_data_;
std::vector<char> received_data_;
- net::CompletionCallbackImpl<TcpChannelTester> write_cb_;
- net::CompletionCallbackImpl<TcpChannelTester> read_cb_;
+ net::OldCompletionCallbackImpl<TcpChannelTester> write_cb_;
+ net::OldCompletionCallbackImpl<TcpChannelTester> read_cb_;
int write_errors_;
int read_errors_;
};
diff --git a/jingle/glue/channel_socket_adapter.cc b/jingle/glue/channel_socket_adapter.cc
index ca13af1..64cfa7f 100644
--- a/jingle/glue/channel_socket_adapter.cc
+++ b/jingle/glue/channel_socket_adapter.cc
@@ -35,7 +35,7 @@ TransportChannelSocketAdapter::~TransportChannelSocketAdapter() {
}
int TransportChannelSocketAdapter::Read(
- net::IOBuffer* buf, int buffer_size, net::CompletionCallback* callback) {
+ net::IOBuffer* buf, int buffer_size, net::OldCompletionCallback* callback) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
DCHECK(buf);
DCHECK(callback);
@@ -54,7 +54,7 @@ int TransportChannelSocketAdapter::Read(
}
int TransportChannelSocketAdapter::Write(
- net::IOBuffer* buffer, int buffer_size, net::CompletionCallback* callback) {
+ net::IOBuffer* buffer, int buffer_size, net::OldCompletionCallback* callback) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
DCHECK(buffer);
DCHECK(callback);
@@ -111,14 +111,14 @@ void TransportChannelSocketAdapter::Close(int error_code) {
channel_ = NULL;
if (read_callback_) {
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
read_buffer_ = NULL;
callback->Run(error_code);
}
if (write_callback_) {
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
write_callback_ = NULL;
write_buffer_ = NULL;
callback->Run(error_code);
@@ -141,7 +141,7 @@ void TransportChannelSocketAdapter::OnNewPacket(
memcpy(read_buffer_->data(), data, data_size);
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
read_buffer_ = NULL;
@@ -163,7 +163,7 @@ void TransportChannelSocketAdapter::OnWritableState(
result = net::MapSystemError(channel_->GetError());
if (result != net::ERR_IO_PENDING) {
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
write_callback_ = NULL;
write_buffer_ = NULL;
callback->Run(result);
diff --git a/jingle/glue/channel_socket_adapter.h b/jingle/glue/channel_socket_adapter.h
index 8c63fd9..4a3eafb 100644
--- a/jingle/glue/channel_socket_adapter.h
+++ b/jingle/glue/channel_socket_adapter.h
@@ -34,9 +34,9 @@ class TransportChannelSocketAdapter : public net::Socket,
// Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -51,11 +51,11 @@ class TransportChannelSocketAdapter : public net::Socket,
cricket::TransportChannel* channel_;
- net::CompletionCallback* read_callback_; // Not owned.
+ net::OldCompletionCallback* read_callback_; // Not owned.
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
- net::CompletionCallback* write_callback_; // Not owned.
+ net::OldCompletionCallback* write_callback_; // Not owned.
scoped_refptr<net::IOBuffer> write_buffer_;
int write_buffer_size_;
diff --git a/jingle/glue/channel_socket_adapter_unittest.cc b/jingle/glue/channel_socket_adapter_unittest.cc
index 8eb4d23..e8b34b5 100644
--- a/jingle/glue/channel_socket_adapter_unittest.cc
+++ b/jingle/glue/channel_socket_adapter_unittest.cc
@@ -59,7 +59,7 @@ class TransportChannelSocketAdapterTest : public testing::Test {
MockTransportChannel channel_;
scoped_ptr<TransportChannelSocketAdapter> target_;
- net::CompletionCallbackImpl<TransportChannelSocketAdapterTest> callback_;
+ net::OldCompletionCallbackImpl<TransportChannelSocketAdapterTest> callback_;
int callback_result_;
MessageLoopForIO message_loop_;
};
diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc
index 94c81aa..d800d99 100644
--- a/jingle/glue/pseudotcp_adapter.cc
+++ b/jingle/glue/pseudotcp_adapter.cc
@@ -29,10 +29,10 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
// Functions used to implement net::StreamSocket.
int Read(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
int Write(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback);
- int Connect(net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
+ int Connect(net::OldCompletionCallback* callback);
void Disconnect();
bool IsConnected() const;
@@ -67,9 +67,9 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
// This re-sets |timer| without triggering callbacks.
void AdjustClock();
- net::CompletionCallback* connect_callback_;
- net::CompletionCallback* read_callback_;
- net::CompletionCallback* write_callback_;
+ net::OldCompletionCallback* connect_callback_;
+ net::OldCompletionCallback* read_callback_;
+ net::OldCompletionCallback* write_callback_;
cricket::PseudoTcp pseudo_tcp_;
scoped_ptr<net::Socket> socket_;
@@ -82,8 +82,8 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
bool socket_write_pending_;
scoped_refptr<net::IOBuffer> socket_read_buffer_;
- net::CompletionCallbackImpl<Core> socket_read_callback_;
- net::CompletionCallbackImpl<Core> socket_write_callback_;
+ net::OldCompletionCallbackImpl<Core> socket_read_callback_;
+ net::OldCompletionCallbackImpl<Core> socket_write_callback_;
base::OneShotTimer<Core> timer_;
@@ -110,7 +110,7 @@ PseudoTcpAdapter::Core::~Core() {
}
int PseudoTcpAdapter::Core::Read(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!read_callback_);
// Reference the Core in case a callback deletes the adapter.
@@ -134,7 +134,7 @@ int PseudoTcpAdapter::Core::Read(net::IOBuffer* buffer, int buffer_size,
}
int PseudoTcpAdapter::Core::Write(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!write_callback_);
// Reference the Core in case a callback deletes the adapter.
@@ -157,7 +157,7 @@ int PseudoTcpAdapter::Core::Write(net::IOBuffer* buffer, int buffer_size,
return result;
}
-int PseudoTcpAdapter::Core::Connect(net::CompletionCallback* callback) {
+int PseudoTcpAdapter::Core::Connect(net::OldCompletionCallback* callback) {
DCHECK_EQ(pseudo_tcp_.State(), cricket::PseudoTcp::TCP_LISTEN);
// Reference the Core in case a callback deletes the adapter.
@@ -202,7 +202,7 @@ void PseudoTcpAdapter::Core::OnTcpOpen(PseudoTcp* tcp) {
DCHECK(tcp == &pseudo_tcp_);
if (connect_callback_) {
- net::CompletionCallback* callback = connect_callback_;
+ net::OldCompletionCallback* callback = connect_callback_;
connect_callback_ = NULL;
callback->Run(net::OK);
}
@@ -226,7 +226,7 @@ void PseudoTcpAdapter::Core::OnTcpReadable(PseudoTcp* tcp) {
AdjustClock();
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
read_buffer_ = NULL;
callback->Run(result);
@@ -247,7 +247,7 @@ void PseudoTcpAdapter::Core::OnTcpWriteable(PseudoTcp* tcp) {
AdjustClock();
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
write_callback_ = NULL;
write_buffer_ = NULL;
callback->Run(result);
@@ -257,19 +257,19 @@ void PseudoTcpAdapter::Core::OnTcpClosed(PseudoTcp* tcp, uint32 error) {
DCHECK_EQ(tcp, &pseudo_tcp_);
if (connect_callback_) {
- net::CompletionCallback* callback = connect_callback_;
+ net::OldCompletionCallback* callback = connect_callback_;
connect_callback_ = NULL;
callback->Run(net::MapSystemError(error));
}
if (read_callback_) {
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
callback->Run(net::MapSystemError(error));
}
if (write_callback_) {
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
write_callback_ = NULL;
callback->Run(net::MapSystemError(error));
}
@@ -394,13 +394,13 @@ PseudoTcpAdapter::~PseudoTcpAdapter() {
}
int PseudoTcpAdapter::Read(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
return core_->Read(buffer, buffer_size, callback);
}
int PseudoTcpAdapter::Write(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
return core_->Write(buffer, buffer_size, callback);
}
@@ -419,7 +419,7 @@ bool PseudoTcpAdapter::SetSendBufferSize(int32 size) {
return false;
}
-int PseudoTcpAdapter::Connect(net::CompletionCallback* callback) {
+int PseudoTcpAdapter::Connect(net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
// net::StreamSocket requires that Connect return OK if already connected.
diff --git a/jingle/glue/pseudotcp_adapter.h b/jingle/glue/pseudotcp_adapter.h
index a764182..5edb3e0 100644
--- a/jingle/glue/pseudotcp_adapter.h
+++ b/jingle/glue/pseudotcp_adapter.h
@@ -31,14 +31,14 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe {
// net::Socket implementation.
virtual int Read(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int Write(net::IOBuffer* buffer, int buffer_size,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
virtual bool SetSendBufferSize(int32 size) OVERRIDE;
// net::StreamSocket implementation.
- virtual int Connect(net::CompletionCallback* callback) OVERRIDE;
+ virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
diff --git a/jingle/glue/pseudotcp_adapter_unittest.cc b/jingle/glue/pseudotcp_adapter_unittest.cc
index 12a6dbe..d418826 100644
--- a/jingle/glue/pseudotcp_adapter_unittest.cc
+++ b/jingle/glue/pseudotcp_adapter_unittest.cc
@@ -92,7 +92,7 @@ class FakeSocket : public net::Socket {
if (read_callback_) {
int size = std::min(read_buffer_size_, static_cast<int>(data.size()));
memcpy(read_buffer_->data(), &data[0], data.size());
- net::CompletionCallback* cb = read_callback_;
+ net::OldCompletionCallback* cb = read_callback_;
read_callback_ = NULL;
read_buffer_ = NULL;
cb->Run(size);
@@ -113,7 +113,7 @@ class FakeSocket : public net::Socket {
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
CHECK(!read_callback_);
CHECK(buf);
@@ -133,7 +133,7 @@ class FakeSocket : public net::Socket {
}
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
DCHECK(buf);
if (peer_socket_) {
MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod(
@@ -156,7 +156,7 @@ class FakeSocket : public net::Socket {
private:
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
std::deque<std::vector<char> > incoming_packets_;
@@ -292,8 +292,8 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> {
scoped_refptr<net::DrainableIOBuffer> output_buffer_;
scoped_refptr<net::GrowableIOBuffer> input_buffer_;
- net::CompletionCallbackImpl<TCPChannelTester> write_cb_;
- net::CompletionCallbackImpl<TCPChannelTester> read_cb_;
+ net::OldCompletionCallbackImpl<TCPChannelTester> write_cb_;
+ net::OldCompletionCallbackImpl<TCPChannelTester> read_cb_;
int write_errors_;
int read_errors_;
};
@@ -322,8 +322,8 @@ class PseudoTcpAdapterTest : public testing::Test {
};
TEST_F(PseudoTcpAdapterTest, DataTransfer) {
- TestCompletionCallback host_connect_cb;
- TestCompletionCallback client_connect_cb;
+ TestOldCompletionCallback host_connect_cb;
+ TestOldCompletionCallback client_connect_cb;
int rv1 = host_pseudotcp_->Connect(&host_connect_cb);
int rv2 = client_pseudotcp_->Connect(&client_connect_cb);
@@ -357,8 +357,8 @@ TEST_F(PseudoTcpAdapterTest, LimitedChannel) {
host_socket_->set_latency(kLatencyMs);
client_socket_->set_rate_limiter(&client_limiter);
- TestCompletionCallback host_connect_cb;
- TestCompletionCallback client_connect_cb;
+ TestOldCompletionCallback host_connect_cb;
+ TestOldCompletionCallback client_connect_cb;
int rv1 = host_pseudotcp_->Connect(&host_connect_cb);
int rv2 = client_pseudotcp_->Connect(&client_connect_cb);
@@ -396,9 +396,9 @@ TEST_F(PseudoTcpAdapterTest, DeleteOnConnected) {
// This test verifies that deleting the adapter mid-callback doesn't lead
// to deleted structures being touched as the stack unrolls, so the failure
// mode is a crash rather than a normal test failure.
- TestCompletionCallback client_connect_cb;
+ TestOldCompletionCallback client_connect_cb;
DeleteOnConnected host_delete(&message_loop_, &host_pseudotcp_);
- net::CompletionCallbackImpl<DeleteOnConnected>
+ net::OldCompletionCallbackImpl<DeleteOnConnected>
host_connect_cb(&host_delete, &DeleteOnConnected::OnConnected);
host_pseudotcp_->Connect(&host_connect_cb);
diff --git a/jingle/notifier/base/chrome_async_socket.h b/jingle/notifier/base/chrome_async_socket.h
index 5cf1ca6..2960b6d 100644
--- a/jingle/notifier/base/chrome_async_socket.h
+++ b/jingle/notifier/base/chrome_async_socket.h
@@ -176,10 +176,10 @@ class ChromeAsyncSocket : public buzz::AsyncSocket {
void DoClose();
// Callbacks passed to |transport_socket_|.
- net::CompletionCallbackImpl<ChromeAsyncSocket> connect_callback_;
- net::CompletionCallbackImpl<ChromeAsyncSocket> read_callback_;
- net::CompletionCallbackImpl<ChromeAsyncSocket> write_callback_;
- net::CompletionCallbackImpl<ChromeAsyncSocket> ssl_connect_callback_;
+ net::OldCompletionCallbackImpl<ChromeAsyncSocket> connect_callback_;
+ net::OldCompletionCallbackImpl<ChromeAsyncSocket> read_callback_;
+ net::OldCompletionCallbackImpl<ChromeAsyncSocket> write_callback_;
+ net::OldCompletionCallbackImpl<ChromeAsyncSocket> ssl_connect_callback_;
scoped_ptr<ResolvingClientSocketFactory> client_socket_factory_;
diff --git a/jingle/notifier/base/fake_ssl_client_socket.cc b/jingle/notifier/base/fake_ssl_client_socket.cc
index 20a3f39..2ab7ef5 100644
--- a/jingle/notifier/base/fake_ssl_client_socket.cc
+++ b/jingle/notifier/base/fake_ssl_client_socket.cc
@@ -99,14 +99,14 @@ FakeSSLClientSocket::FakeSSLClientSocket(
FakeSSLClientSocket::~FakeSSLClientSocket() {}
int FakeSSLClientSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK_EQ(next_handshake_state_, STATE_NONE);
DCHECK(handshake_completed_);
return transport_socket_->Read(buf, buf_len, callback);
}
int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK_EQ(next_handshake_state_, STATE_NONE);
DCHECK(handshake_completed_);
return transport_socket_->Write(buf, buf_len, callback);
@@ -120,7 +120,7 @@ bool FakeSSLClientSocket::SetSendBufferSize(int32 size) {
return transport_socket_->SetSendBufferSize(size);
}
-int FakeSSLClientSocket::Connect(net::CompletionCallback* callback) {
+int FakeSSLClientSocket::Connect(net::OldCompletionCallback* callback) {
// We don't support synchronous operation, even if
// |transport_socket_| does.
DCHECK(callback);
@@ -167,7 +167,7 @@ int FakeSSLClientSocket::DoHandshakeLoop() {
void FakeSSLClientSocket::RunUserConnectCallback(int status) {
DCHECK_LE(status, net::OK);
next_handshake_state_ = STATE_NONE;
- net::CompletionCallback* user_connect_callback = user_connect_callback_;
+ net::OldCompletionCallback* user_connect_callback = user_connect_callback_;
user_connect_callback_ = NULL;
user_connect_callback->Run(status);
}
diff --git a/jingle/notifier/base/fake_ssl_client_socket.h b/jingle/notifier/base/fake_ssl_client_socket.h
index 1688b70..d358173 100644
--- a/jingle/notifier/base/fake_ssl_client_socket.h
+++ b/jingle/notifier/base/fake_ssl_client_socket.h
@@ -46,12 +46,12 @@ class FakeSSLClientSocket : public net::StreamSocket {
// net::StreamSocket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
- virtual int Connect(net::CompletionCallback* callback);
+ virtual int Connect(net::OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -90,10 +90,10 @@ class FakeSSLClientSocket : public net::StreamSocket {
net::Error ProcessVerifyServerHelloDone(size_t read);
// Callbacks passed to |transport_socket_|.
- net::CompletionCallbackImpl<FakeSSLClientSocket> connect_callback_;
- net::CompletionCallbackImpl<FakeSSLClientSocket>
+ net::OldCompletionCallbackImpl<FakeSSLClientSocket> connect_callback_;
+ net::OldCompletionCallbackImpl<FakeSSLClientSocket>
send_client_hello_callback_;
- net::CompletionCallbackImpl<FakeSSLClientSocket>
+ net::OldCompletionCallbackImpl<FakeSSLClientSocket>
verify_server_hello_callback_;
scoped_ptr<net::StreamSocket> transport_socket_;
@@ -106,7 +106,7 @@ class FakeSSLClientSocket : public net::StreamSocket {
bool handshake_completed_;
// The callback passed to Connect().
- net::CompletionCallback* user_connect_callback_;
+ net::OldCompletionCallback* user_connect_callback_;
scoped_refptr<net::DrainableIOBuffer> write_buf_;
scoped_refptr<net::DrainableIOBuffer> read_buf_;
diff --git a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
index 2fe21b4..86f5fb1 100644
--- a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
+++ b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
@@ -47,11 +47,11 @@ class MockClientSocket : public net::StreamSocket {
public:
virtual ~MockClientSocket() {}
- MOCK_METHOD3(Read, int(net::IOBuffer*, int, net::CompletionCallback*));
- MOCK_METHOD3(Write, int(net::IOBuffer*, int, net::CompletionCallback*));
+ MOCK_METHOD3(Read, int(net::IOBuffer*, int, net::OldCompletionCallback*));
+ MOCK_METHOD3(Write, int(net::IOBuffer*, int, net::OldCompletionCallback*));
MOCK_METHOD1(SetReceiveBufferSize, bool(int32));
MOCK_METHOD1(SetSendBufferSize, bool(int32));
- MOCK_METHOD1(Connect, int(net::CompletionCallback*));
+ MOCK_METHOD1(Connect, int(net::OldCompletionCallback*));
MOCK_METHOD0(Disconnect, void());
MOCK_CONST_METHOD0(IsConnected, bool());
MOCK_CONST_METHOD0(IsConnectedAndIdle, bool());
@@ -108,7 +108,7 @@ class FakeSSLClientSocketTest : public testing::Test {
void ExpectStatus(
bool async, int expected_status, int immediate_status,
- TestCompletionCallback* test_completion_callback) {
+ TestOldCompletionCallback* test_completion_callback) {
if (async) {
EXPECT_EQ(net::ERR_IO_PENDING, immediate_status);
int status = test_completion_callback->WaitForResult();
@@ -149,7 +149,7 @@ class FakeSSLClientSocketTest : public testing::Test {
for (int i = 0; i < num_resets + 1; ++i) {
SCOPED_TRACE(i);
- TestCompletionCallback test_completion_callback;
+ TestOldCompletionCallback test_completion_callback;
int status = fake_ssl_client_socket.Connect(&test_completion_callback);
if (async) {
EXPECT_FALSE(fake_ssl_client_socket.IsConnected());
@@ -242,7 +242,7 @@ class FakeSSLClientSocketTest : public testing::Test {
(error == ERR_MALFORMED_SERVER_HELLO)) ?
net::ERR_UNEXPECTED : error;
- TestCompletionCallback test_completion_callback;
+ TestOldCompletionCallback test_completion_callback;
int status = fake_ssl_client_socket.Connect(&test_completion_callback);
EXPECT_FALSE(fake_ssl_client_socket.IsConnected());
ExpectStatus(async, expected_status, status, &test_completion_callback);
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.cc b/jingle/notifier/base/proxy_resolving_client_socket.cc
index 445b3f5..d922a44 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket.cc
@@ -65,7 +65,7 @@ ProxyResolvingClientSocket::~ProxyResolvingClientSocket() {
}
int ProxyResolvingClientSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (transport_.get() && transport_->socket())
return transport_->socket()->Read(buf, buf_len, callback);
NOTREACHED();
@@ -73,7 +73,7 @@ int ProxyResolvingClientSocket::Read(net::IOBuffer* buf, int buf_len,
}
int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (transport_.get() && transport_->socket())
return transport_->socket()->Write(buf, buf_len, callback);
NOTREACHED();
@@ -94,7 +94,7 @@ bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) {
return false;
}
-int ProxyResolvingClientSocket::Connect(net::CompletionCallback* callback) {
+int ProxyResolvingClientSocket::Connect(net::OldCompletionCallback* callback) {
DCHECK(!user_connect_callback_);
tried_direct_connect_fallback_ = false;
@@ -124,7 +124,7 @@ int ProxyResolvingClientSocket::Connect(net::CompletionCallback* callback) {
void ProxyResolvingClientSocket::RunUserConnectCallback(int status) {
DCHECK_LE(status, net::OK);
- net::CompletionCallback* user_connect_callback = user_connect_callback_;
+ net::OldCompletionCallback* user_connect_callback = user_connect_callback_;
user_connect_callback_ = NULL;
user_connect_callback->Run(status);
}
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.h b/jingle/notifier/base/proxy_resolving_client_socket.h
index 850bf9b..0cdd533 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.h
+++ b/jingle/notifier/base/proxy_resolving_client_socket.h
@@ -45,12 +45,12 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
// net::StreamSocket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
virtual bool SetSendBufferSize(int32 size) OVERRIDE;
- virtual int Connect(net::CompletionCallback* callback) OVERRIDE;
+ virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
@@ -75,9 +75,9 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
void ReportSuccessfulProxyConnection();
// Callbacks passed to net APIs.
- net::CompletionCallbackImpl<ProxyResolvingClientSocket>
+ net::OldCompletionCallbackImpl<ProxyResolvingClientSocket>
proxy_resolve_callback_;
- net::CompletionCallbackImpl<ProxyResolvingClientSocket> connect_callback_;
+ net::OldCompletionCallbackImpl<ProxyResolvingClientSocket> connect_callback_;
scoped_refptr<net::HttpNetworkSession> network_session_;
@@ -94,7 +94,7 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
scoped_runnable_method_factory_;
// The callback passed to Connect().
- net::CompletionCallback* user_connect_callback_;
+ net::OldCompletionCallback* user_connect_callback_;
};
} // namespace notifier
diff --git a/jingle/notifier/base/proxy_resolving_client_socket_unittest.cc b/jingle/notifier/base/proxy_resolving_client_socket_unittest.cc
index 48807a6..acbac4a 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket_unittest.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket_unittest.cc
@@ -74,7 +74,7 @@ TEST_F(ProxyResolvingClientSocketTest, DISABLED_ConnectError) {
url_request_context_getter_,
net::SSLConfig(),
dest);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int status = proxy_resolving_socket.Connect(&callback);
// Connect always returns ERR_IO_PENDING because it is always asynchronous.
EXPECT_EQ(net::ERR_IO_PENDING, status);
@@ -112,7 +112,7 @@ TEST_F(ProxyResolvingClientSocketTest, ReportsBadProxies) {
net::SSLConfig(),
dest);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int status = proxy_resolving_socket.Connect(&callback);
EXPECT_EQ(net::ERR_IO_PENDING, status);
status = callback.WaitForResult();
diff --git a/jingle/notifier/communicator/xmpp_connection_generator.h b/jingle/notifier/communicator/xmpp_connection_generator.h
index e37e1f8..34f5ace 100644
--- a/jingle/notifier/communicator/xmpp_connection_generator.h
+++ b/jingle/notifier/communicator/xmpp_connection_generator.h
@@ -70,7 +70,7 @@ class XmppConnectionGenerator {
Delegate* delegate_;
net::SingleRequestHostResolver host_resolver_;
- scoped_ptr<net::CompletionCallback> resolve_callback_;
+ scoped_ptr<net::OldCompletionCallback> resolve_callback_;
net::AddressList address_list_;
net::BoundNetLog bound_net_log_;
scoped_ptr<ConnectionSettingsList> settings_list_;
diff --git a/net/base/cert_verifier.cc b/net/base/cert_verifier.cc
index db630dd..ea90ea9 100644
--- a/net/base/cert_verifier.cc
+++ b/net/base/cert_verifier.cc
@@ -87,7 +87,7 @@ bool CachedCertVerifyResult::HasExpired(const base::Time current_time) const {
// Represents the output and result callback of a request.
class CertVerifierRequest {
public:
- CertVerifierRequest(CompletionCallback* callback,
+ CertVerifierRequest(OldCompletionCallback* callback,
CertVerifyResult* verify_result)
: callback_(callback),
verify_result_(verify_result) {
@@ -112,7 +112,7 @@ class CertVerifierRequest {
bool canceled() const { return !callback_; }
private:
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
CertVerifyResult* verify_result_;
};
@@ -309,7 +309,7 @@ int CertVerifier::Verify(X509Certificate* cert,
const std::string& hostname,
int flags,
CertVerifyResult* verify_result,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req) {
DCHECK(CalledOnValidThread());
@@ -466,7 +466,7 @@ int SingleRequestCertVerifier::Verify(X509Certificate* cert,
const std::string& hostname,
int flags,
CertVerifyResult* verify_result,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// Should not be already in use.
DCHECK(!cur_request_ && !cur_request_callback_);
@@ -493,7 +493,7 @@ int SingleRequestCertVerifier::Verify(X509Certificate* cert,
void SingleRequestCertVerifier::OnVerifyCompletion(int result) {
DCHECK(cur_request_ && cur_request_callback_);
- CompletionCallback* callback = cur_request_callback_;
+ OldCompletionCallback* callback = cur_request_callback_;
// Clear the outstanding request information.
cur_request_ = NULL;
diff --git a/net/base/cert_verifier.h b/net/base/cert_verifier.h
index feeb459..9f97573 100644
--- a/net/base/cert_verifier.h
+++ b/net/base/cert_verifier.h
@@ -102,7 +102,7 @@ class NET_EXPORT CertVerifier : NON_EXPORTED_BASE(public base::NonThreadSafe),
const std::string& hostname,
int flags,
CertVerifyResult* verify_result,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req);
// Cancels the specified request. |req| is the handle returned by Verify().
@@ -201,7 +201,7 @@ class SingleRequestCertVerifier {
const std::string& hostname,
int flags,
CertVerifyResult* verify_result,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
private:
// Callback for when the request to |cert_verifier_| completes, so we
@@ -213,10 +213,10 @@ class SingleRequestCertVerifier {
// The current request (if any).
CertVerifier::RequestHandle cur_request_;
- CompletionCallback* cur_request_callback_;
+ OldCompletionCallback* cur_request_callback_;
// Completion callback for when request to |cert_verifier_| completes.
- CompletionCallbackImpl<SingleRequestCertVerifier> callback_;
+ OldCompletionCallbackImpl<SingleRequestCertVerifier> callback_;
DISALLOW_COPY_AND_ASSIGN(SingleRequestCertVerifier);
};
diff --git a/net/base/cert_verifier_unittest.cc b/net/base/cert_verifier_unittest.cc
index 1e15bd7..3787749 100644
--- a/net/base/cert_verifier_unittest.cc
+++ b/net/base/cert_verifier_unittest.cc
@@ -50,7 +50,7 @@ TEST_F(CertVerifierTest, CacheHit) {
int error;
CertVerifyResult verify_result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CertVerifier::RequestHandle request_handle;
error = verifier.Verify(test_cert, "www.example.com", 0, &verify_result,
@@ -88,10 +88,10 @@ TEST_F(CertVerifierTest, InflightJoin) {
int error;
CertVerifyResult verify_result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CertVerifier::RequestHandle request_handle;
CertVerifyResult verify_result2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
CertVerifier::RequestHandle request_handle2;
error = verifier.Verify(test_cert, "www.example.com", 0, &verify_result,
@@ -125,7 +125,7 @@ TEST_F(CertVerifierTest, ExpiredCacheEntry) {
int error;
CertVerifyResult verify_result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CertVerifier::RequestHandle request_handle;
error = verifier.Verify(test_cert, "www.example.com", 0, &verify_result,
@@ -184,7 +184,7 @@ TEST_F(CertVerifierTest, FullCache) {
int error;
CertVerifyResult verify_result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CertVerifier::RequestHandle request_handle;
error = verifier.Verify(test_cert, "www.example.com", 0, &verify_result,
@@ -249,7 +249,7 @@ TEST_F(CertVerifierTest, CancelRequest) {
// Issue a few more requests to the worker pool and wait for their
// completion, so that the task of the canceled request (which runs on a
// worker thread) is likely to complete by the end of this test.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
for (int i = 0; i < 5; ++i) {
error = verifier.Verify(test_cert, "www2.example.com", 0, &verify_result,
&callback, &request_handle);
@@ -271,7 +271,7 @@ TEST_F(CertVerifierTest, CancelRequestThenQuit) {
int error;
CertVerifyResult verify_result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CertVerifier::RequestHandle request_handle;
error = verifier.Verify(test_cert, "www.example.com", 0, &verify_result,
diff --git a/net/base/completion_callback.h b/net/base/completion_callback.h
index 23d0166..1d3e551 100644
--- a/net/base/completion_callback.h
+++ b/net/base/completion_callback.h
@@ -12,31 +12,31 @@ namespace net {
// A callback specialization that takes a single int parameter. Usually this
// is used to report a byte count or network error code.
-typedef Callback1<int>::Type CompletionCallback;
+typedef Callback1<int>::Type OldCompletionCallback;
-// Used to implement a CompletionCallback.
+// Used to implement a OldCompletionCallback.
template <class T>
-class CompletionCallbackImpl :
+class OldCompletionCallbackImpl :
public CallbackImpl< T, void (T::*)(int), Tuple1<int> > {
public:
- CompletionCallbackImpl(T* obj, void (T::* meth)(int))
+ OldCompletionCallbackImpl(T* obj, void (T::* meth)(int))
: CallbackImpl< T, void (T::*)(int),
Tuple1<int> >::CallbackImpl(obj, meth) {
}
};
-// CancelableCompletionCallback is used for completion callbacks
+// CancelableOldCompletionCallback is used for completion callbacks
// which may outlive the target for the method dispatch. In such a case, the
// provider of the callback calls Cancel() to mark the callback as
// "canceled". When the canceled callback is eventually run it does nothing
// other than to decrement the refcount to 0 and free the memory.
template <class T>
-class CancelableCompletionCallback :
- public CompletionCallbackImpl<T>,
- public base::RefCounted<CancelableCompletionCallback<T> > {
+class CancelableOldCompletionCallback :
+ public OldCompletionCallbackImpl<T>,
+ public base::RefCounted<CancelableOldCompletionCallback<T> > {
public:
- CancelableCompletionCallback(T* obj, void (T::* meth)(int))
- : CompletionCallbackImpl<T>(obj, meth), is_canceled_(false) {
+ CancelableOldCompletionCallback(T* obj, void (T::* meth)(int))
+ : OldCompletionCallbackImpl<T>(obj, meth), is_canceled_(false) {
}
void Cancel() {
@@ -45,9 +45,9 @@ class CancelableCompletionCallback :
virtual void RunWithParams(const Tuple1<int>& params) {
if (is_canceled_) {
- base::RefCounted<CancelableCompletionCallback<T> >::Release();
+ base::RefCounted<CancelableOldCompletionCallback<T> >::Release();
} else {
- CompletionCallbackImpl<T>::RunWithParams(params);
+ OldCompletionCallbackImpl<T>::RunWithParams(params);
}
}
diff --git a/net/base/dnsrr_resolver.cc b/net/base/dnsrr_resolver.cc
index a38ce40..d74a92b 100644
--- a/net/base/dnsrr_resolver.cc
+++ b/net/base/dnsrr_resolver.cc
@@ -113,7 +113,7 @@ RRResponse::~RRResponse() {}
class RRResolverHandle {
public:
- RRResolverHandle(CompletionCallback* callback, RRResponse* response)
+ RRResolverHandle(OldCompletionCallback* callback, RRResponse* response)
: callback_(callback),
response_(response) {
}
@@ -136,7 +136,7 @@ class RRResolverHandle {
}
private:
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
RRResponse* response_;
};
@@ -541,7 +541,7 @@ DnsRRResolver::~DnsRRResolver() {
}
intptr_t DnsRRResolver::Resolve(const std::string& name, uint16 rrtype,
- uint16 flags, CompletionCallback* callback,
+ uint16 flags, OldCompletionCallback* callback,
RRResponse* response,
int priority /* ignored */,
const BoundNetLog& netlog /* ignored */) {
diff --git a/net/base/dnsrr_resolver.h b/net/base/dnsrr_resolver.h
index 06d7c8c..781a047 100644
--- a/net/base/dnsrr_resolver.h
+++ b/net/base/dnsrr_resolver.h
@@ -99,7 +99,7 @@ class NET_EXPORT DnsRRResolver
// this function returns kInvalidHandle then the resolution failed
// immediately because it was improperly formed.
Handle Resolve(const std::string& name, uint16 rrtype,
- uint16 flags, CompletionCallback* callback,
+ uint16 flags, OldCompletionCallback* callback,
RRResponse* response, int priority,
const BoundNetLog& netlog);
diff --git a/net/base/dnsrr_resolver_unittest.cc b/net/base/dnsrr_resolver_unittest.cc
index 560052a..4cf7da7 100644
--- a/net/base/dnsrr_resolver_unittest.cc
+++ b/net/base/dnsrr_resolver_unittest.cc
@@ -28,7 +28,7 @@ class ExplodingCallback : public CallbackRunner<Tuple1<int> > {
// pass. However, they may be useful when chaging the code.
TEST_F(DnsRRResolverTest, DISABLED_ResolveReal) {
RRResponse response;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
DnsRRResolver resolver;
DnsRRResolver::Handle handle;
@@ -43,7 +43,7 @@ TEST_F(DnsRRResolverTest, DISABLED_ResolveReal) {
TEST_F(DnsRRResolverTest, DISABLED_ResolveReal2) {
RRResponse response;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
DnsRRResolver resolver;
DnsRRResolver::Handle handle;
@@ -59,7 +59,7 @@ TEST_F(DnsRRResolverTest, DISABLED_ResolveReal2) {
TEST_F(DnsRRResolverTest, Resolve) {
RRResponse response;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
DnsRRResolver resolver;
DnsRRResolver::Handle handle;
@@ -108,7 +108,7 @@ TEST_F(DnsRRResolverTest, Resolve) {
// Test an inflight join. (Note that this depends on the cache being flushed
// by OnIPAddressChanged.)
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
DnsRRResolver::Handle handle2;
handle = resolver.Resolve("nx.testing.notatld", kDNS_TESTING, 0,
&callback, &response, 0, BoundNetLog());
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 0a800b4..4c92955 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -85,7 +85,7 @@ class NET_EXPORT FileStream {
// This method should not be called if the stream was opened WRITE_ONLY.
//
// You can pass NULL as the callback for synchronous I/O.
- virtual int Read(char* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(char* buf, int buf_len, OldCompletionCallback* callback);
// Performs the same as Read, but ensures that exactly buf_len bytes
// are copied into buf. A partial read may occur, but only as a result of
@@ -113,7 +113,7 @@ class NET_EXPORT FileStream {
// This method should not be called if the stream was opened READ_ONLY.
//
// You can pass NULL as the callback for synchronous I/O.
- virtual int Write(const char* buf, int buf_len, CompletionCallback* callback);
+ virtual int Write(const char* buf, int buf_len, OldCompletionCallback* callback);
// Truncates the file to be |bytes| length. This is only valid for writable
// files. After truncation the file stream is positioned at |bytes|. The new
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index 7a7cbf3..f1c118b 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -70,7 +70,7 @@ void ReadFileTask(base::PlatformFile file,
char* buf,
int buf_len,
bool record_uma,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
callback->Run(ReadFile(file, buf, buf_len, record_uma));
}
@@ -89,7 +89,7 @@ int WriteFile(base::PlatformFile file, const char* buf, int buf_len,
void WriteFileTask(base::PlatformFile file,
const char* buf,
int buf_len, bool record_uma,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
callback->Run(WriteFile(file, buf, buf_len, record_uma));
}
@@ -137,12 +137,12 @@ class FileStream::AsyncContext {
// These methods post synchronous read() and write() calls to a WorkerThread.
void InitiateAsyncRead(
base::PlatformFile file, char* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
void InitiateAsyncWrite(
base::PlatformFile file, const char* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
- CompletionCallback* callback() const { return callback_; }
+ OldCompletionCallback* callback() const { return callback_; }
// Called by the WorkerPool thread executing the IO after the IO completes.
// This method queues RunAsynchronousCallback() on the MessageLoop and signals
@@ -163,11 +163,11 @@ class FileStream::AsyncContext {
// The MessageLoopForIO that this AsyncContext is running on.
MessageLoopForIO* const message_loop_;
- CompletionCallback* callback_; // The user provided callback.
+ OldCompletionCallback* callback_; // The user provided callback.
// A callback wrapper around OnBackgroundIOCompleted(). Run by the WorkerPool
// thread doing the background IO on our behalf.
- CompletionCallbackImpl<AsyncContext> background_io_completed_callback_;
+ OldCompletionCallbackImpl<AsyncContext> background_io_completed_callback_;
// This is used to synchronize between the AsyncContext destructor (which runs
// on the IO thread and OnBackgroundIOCompleted() which runs on the WorkerPool
@@ -213,7 +213,7 @@ FileStream::AsyncContext::~AsyncContext() {
void FileStream::AsyncContext::InitiateAsyncRead(
base::PlatformFile file, char* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!callback_);
callback_ = callback;
@@ -228,7 +228,7 @@ void FileStream::AsyncContext::InitiateAsyncRead(
void FileStream::AsyncContext::InitiateAsyncWrite(
base::PlatformFile file, const char* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!callback_);
callback_ = callback;
@@ -266,7 +266,7 @@ void FileStream::AsyncContext::RunAsynchronousCallback() {
}
DCHECK(callback_);
- CompletionCallback* temp = NULL;
+ OldCompletionCallback* temp = NULL;
std::swap(temp, callback_);
background_io_completed_.Reset();
temp->Run(result_);
@@ -370,7 +370,7 @@ int64 FileStream::Available() {
}
int FileStream::Read(
- char* buf, int buf_len, CompletionCallback* callback) {
+ char* buf, int buf_len, OldCompletionCallback* callback) {
if (!IsOpen())
return ERR_UNEXPECTED;
@@ -413,7 +413,7 @@ int FileStream::ReadUntilComplete(char *buf, int buf_len) {
}
int FileStream::Write(
- const char* buf, int buf_len, CompletionCallback* callback) {
+ const char* buf, int buf_len, OldCompletionCallback* callback) {
// write(..., 0) will return 0, which indicates end-of-file.
DCHECK_GT(buf_len, 0);
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index a8cdfcc..895bb65 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -145,7 +145,7 @@ TEST_F(FileStreamTest, AsyncRead) {
int64 total_bytes_avail = stream.Available();
EXPECT_EQ(file_size, total_bytes_avail);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_read = 0;
@@ -180,7 +180,7 @@ TEST_F(FileStreamTest, AsyncRead_EarlyClose) {
int64 total_bytes_avail = stream.Available();
EXPECT_EQ(file_size, total_bytes_avail);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
char buf[4];
rv = stream.Read(buf, arraysize(buf), &callback);
@@ -249,7 +249,7 @@ TEST_F(FileStreamTest, AsyncRead_FromOffset) {
int64 total_bytes_avail = stream.Available();
EXPECT_EQ(file_size - kOffset, total_bytes_avail);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_read = 0;
@@ -326,7 +326,7 @@ TEST_F(FileStreamTest, AsyncWrite) {
EXPECT_TRUE(ok);
EXPECT_EQ(0, file_size);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_written = 0;
while (total_bytes_written != kTestDataSize) {
@@ -358,7 +358,7 @@ TEST_F(FileStreamTest, AsyncWrite_EarlyClose) {
EXPECT_TRUE(ok);
EXPECT_EQ(0, file_size);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_written = 0;
rv = stream.Write(kTestData + total_bytes_written,
@@ -418,7 +418,7 @@ TEST_F(FileStreamTest, AsyncWrite_FromOffset) {
int64 new_offset = stream.Seek(FROM_END, kOffset);
EXPECT_EQ(kTestDataSize, new_offset);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_written = 0;
while (total_bytes_written != kTestDataSize) {
@@ -540,7 +540,7 @@ TEST_F(FileStreamTest, BasicAsyncReadWrite) {
int64 total_bytes_avail = stream.Available();
EXPECT_EQ(file_size, total_bytes_avail);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int64 total_bytes_read = 0;
std::string data_read;
@@ -598,7 +598,7 @@ TEST_F(FileStreamTest, BasicAsyncWriteRead) {
int64 offset = stream.Seek(FROM_END, 0);
EXPECT_EQ(offset, file_size);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int total_bytes_written = 0;
while (total_bytes_written != kTestDataSize) {
@@ -644,9 +644,9 @@ TEST_F(FileStreamTest, BasicAsyncWriteRead) {
EXPECT_EQ(kExpectedFileData, data_read);
}
-class TestWriteReadCompletionCallback : public Callback1<int>::Type {
+class TestWriteReadOldCompletionCallback : public Callback1<int>::Type {
public:
- TestWriteReadCompletionCallback(
+ TestWriteReadOldCompletionCallback(
FileStream* stream,
int* total_bytes_written,
int* total_bytes_read,
@@ -681,7 +681,7 @@ class TestWriteReadCompletionCallback : public Callback1<int>::Type {
// Recurse to finish writing all data.
int total_bytes_written = 0, total_bytes_read = 0;
std::string data_read;
- TestWriteReadCompletionCallback callback(
+ TestWriteReadOldCompletionCallback callback(
stream_, &total_bytes_written, &total_bytes_read, &data_read);
rv = stream_->Write(kTestData + *total_bytes_written_,
kTestDataSize - *total_bytes_written_,
@@ -694,7 +694,7 @@ class TestWriteReadCompletionCallback : public Callback1<int>::Type {
} else { // We're done writing all data. Start reading the data.
stream_->Seek(FROM_BEGIN, 0);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
for (;;) {
char buf[4];
rv = stream_->Read(buf, arraysize(buf), &callback);
@@ -726,7 +726,7 @@ class TestWriteReadCompletionCallback : public Callback1<int>::Type {
int* total_bytes_read_;
std::string* data_read_;
- DISALLOW_COPY_AND_ASSIGN(TestWriteReadCompletionCallback);
+ DISALLOW_COPY_AND_ASSIGN(TestWriteReadOldCompletionCallback);
};
TEST_F(FileStreamTest, AsyncWriteRead) {
@@ -751,7 +751,7 @@ TEST_F(FileStreamTest, AsyncWriteRead) {
int total_bytes_written = 0;
int total_bytes_read = 0;
std::string data_read;
- TestWriteReadCompletionCallback callback(&stream, &total_bytes_written,
+ TestWriteReadOldCompletionCallback callback(&stream, &total_bytes_written,
&total_bytes_read, &data_read);
rv = stream.Write(kTestData + total_bytes_written,
@@ -774,9 +774,9 @@ TEST_F(FileStreamTest, AsyncWriteRead) {
EXPECT_EQ(kExpectedFileData, data_read);
}
-class TestWriteCloseCompletionCallback : public Callback1<int>::Type {
+class TestWriteCloseOldCompletionCallback : public Callback1<int>::Type {
public:
- TestWriteCloseCompletionCallback(FileStream* stream, int* total_bytes_written)
+ TestWriteCloseOldCompletionCallback(FileStream* stream, int* total_bytes_written)
: result_(0),
have_result_(false),
waiting_for_result_(false),
@@ -804,7 +804,7 @@ class TestWriteCloseCompletionCallback : public Callback1<int>::Type {
if (*total_bytes_written_ != kTestDataSize) {
// Recurse to finish writing all data.
int total_bytes_written = 0;
- TestWriteCloseCompletionCallback callback(stream_, &total_bytes_written);
+ TestWriteCloseOldCompletionCallback callback(stream_, &total_bytes_written);
rv = stream_->Write(kTestData + *total_bytes_written_,
kTestDataSize - *total_bytes_written_,
&callback);
@@ -827,7 +827,7 @@ class TestWriteCloseCompletionCallback : public Callback1<int>::Type {
FileStream* stream_;
int* total_bytes_written_;
- DISALLOW_COPY_AND_ASSIGN(TestWriteCloseCompletionCallback);
+ DISALLOW_COPY_AND_ASSIGN(TestWriteCloseOldCompletionCallback);
};
TEST_F(FileStreamTest, AsyncWriteClose) {
@@ -850,7 +850,7 @@ TEST_F(FileStreamTest, AsyncWriteClose) {
EXPECT_EQ(offset, file_size);
int total_bytes_written = 0;
- TestWriteCloseCompletionCallback callback(&stream, &total_bytes_written);
+ TestWriteCloseOldCompletionCallback callback(&stream, &total_bytes_written);
rv = stream.Write(kTestData, kTestDataSize, &callback);
if (rv == ERR_IO_PENDING)
diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc
index 4e3e66c..86ee202 100644
--- a/net/base/file_stream_win.cc
+++ b/net/base/file_stream_win.cc
@@ -54,10 +54,10 @@ class FileStream::AsyncContext : public MessageLoopForIO::IOHandler {
}
~AsyncContext();
- void IOCompletionIsPending(CompletionCallback* callback);
+ void IOCompletionIsPending(OldCompletionCallback* callback);
OVERLAPPED* overlapped() { return &context_.overlapped; }
- CompletionCallback* callback() const { return callback_; }
+ OldCompletionCallback* callback() const { return callback_; }
void set_error_source(FileErrorSource source) { error_source_ = source; }
@@ -71,7 +71,7 @@ class FileStream::AsyncContext : public MessageLoopForIO::IOHandler {
FileStream* owner_;
MessageLoopForIO::IOContext context_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
bool is_closing_;
bool record_uma_;
FileErrorSource error_source_;
@@ -93,7 +93,7 @@ FileStream::AsyncContext::~AsyncContext() {
}
void FileStream::AsyncContext::IOCompletionIsPending(
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!callback_);
callback_ = callback;
}
@@ -115,7 +115,7 @@ void FileStream::AsyncContext::OnIOCompleted(
if (bytes_read)
IncrementOffset(&context->overlapped, bytes_read);
- CompletionCallback* temp = NULL;
+ OldCompletionCallback* temp = NULL;
std::swap(temp, callback_);
temp->Run(result);
}
@@ -230,7 +230,7 @@ int64 FileStream::Available() {
}
int FileStream::Read(
- char* buf, int buf_len, CompletionCallback* callback) {
+ char* buf, int buf_len, OldCompletionCallback* callback) {
if (!IsOpen())
return ERR_UNEXPECTED;
@@ -292,7 +292,7 @@ int FileStream::ReadUntilComplete(char *buf, int buf_len) {
}
int FileStream::Write(
- const char* buf, int buf_len, CompletionCallback* callback) {
+ const char* buf, int buf_len, OldCompletionCallback* callback) {
if (!IsOpen())
return ERR_UNEXPECTED;
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index 6831c8d..ea0f891 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -157,7 +157,7 @@ class NET_EXPORT HostResolver {
// Profiling information for the request is saved to |net_log| if non-NULL.
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) = 0;
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 7d6e3e2..6cfd788 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -263,7 +263,7 @@ class HostResolverImpl::Request {
const BoundNetLog& request_net_log,
int id,
const RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses)
: source_net_log_(source_net_log),
request_net_log_(request_net_log),
@@ -294,7 +294,7 @@ class HostResolverImpl::Request {
void OnComplete(int error, const AddressList& addrlist) {
if (error == OK)
*addresses_ = CreateAddressListUsingPort(addrlist, port());
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
MarkAsCancelled();
callback->Run(error);
}
@@ -337,7 +337,7 @@ class HostResolverImpl::Request {
Job* job_;
// The user's callback to invoke when the request completes.
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
// The address list to save result into.
AddressList* addresses_;
@@ -1138,7 +1138,7 @@ void HostResolverImpl::SetPoolConstraints(JobPoolIndex pool_index,
int HostResolverImpl::Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) {
DCHECK(addresses);
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index 4c4581e..36f6fc54 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -136,7 +136,7 @@ class NET_EXPORT HostResolverImpl
// HostResolver methods:
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) OVERRIDE;
virtual int ResolveFromCache(const RequestInfo& info,
diff --git a/net/base/host_resolver_impl_unittest.cc b/net/base/host_resolver_impl_unittest.cc
index 0123adb..df38919 100644
--- a/net/base/host_resolver_impl_unittest.cc
+++ b/net/base/host_resolver_impl_unittest.cc
@@ -330,7 +330,7 @@ class ResolveRequest {
HostResolver* resolver_;
Delegate* delegate_;
- CompletionCallbackImpl<ResolveRequest> callback_;
+ OldCompletionCallbackImpl<ResolveRequest> callback_;
DISALLOW_COPY_AND_ASSIGN(ResolveRequest);
};
@@ -346,7 +346,7 @@ class HostResolverImplTest : public testing::Test {
protected:
bool callback_called_;
int callback_result_;
- CompletionCallbackImpl<HostResolverImplTest> callback_;
+ OldCompletionCallbackImpl<HostResolverImplTest> callback_;
private:
void OnLookupFinished(int result) {
@@ -479,7 +479,7 @@ TEST_F(HostResolverImplTest, NumericIPv4Address) {
CreateHostResolverImpl(resolver_proc));
AddressList addrlist;
const int kPortnum = 5555;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo info(HostPortPair("127.1.2.3", kPortnum));
int err = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -506,7 +506,7 @@ TEST_F(HostResolverImplTest, NumericIPv6Address) {
CreateHostResolverImpl(resolver_proc));
AddressList addrlist;
const int kPortnum = 5555;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo info(HostPortPair("2001:db8::1", kPortnum));
int err = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -538,7 +538,7 @@ TEST_F(HostResolverImplTest, EmptyHost) {
CreateHostResolverImpl(resolver_proc));
AddressList addrlist;
const int kPortnum = 5555;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo info(HostPortPair("", kPortnum));
int err = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -555,7 +555,7 @@ TEST_F(HostResolverImplTest, LongHost) {
AddressList addrlist;
const int kPortnum = 5555;
std::string hostname(4097, 'a');
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo info(HostPortPair(hostname, kPortnum));
int err = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -905,8 +905,8 @@ class BypassCacheVerifier : public ResolveRequest::Delegate {
// Note that |junk_callback| shouldn't be used since we are going to
// complete synchronously. We can't specify NULL though since that would
// mean synchronous mode so we give it a value of 1.
- CompletionCallback* junk_callback =
- reinterpret_cast<CompletionCallback*> (1);
+ OldCompletionCallback* junk_callback =
+ reinterpret_cast<OldCompletionCallback*> (1);
AddressList addrlist;
HostResolver::RequestInfo info(HostPortPair("a", 70));
@@ -963,7 +963,7 @@ TEST_F(HostResolverImplTest, Observers) {
// Resolve "host1".
HostResolver::RequestInfo info1(HostPortPair("host1", 70));
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = host_resolver->Resolve(info1, &addrlist, &callback, NULL,
log.bound());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1041,7 +1041,7 @@ TEST_F(HostResolverImplTest, CancellationObserver) {
CreateHostResolverImpl(NULL));
host_resolver->AddObserver(&observer);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(0U, observer.start_log.size());
EXPECT_EQ(0U, observer.finish_log.size());
@@ -1113,7 +1113,7 @@ TEST_F(HostResolverImplTest, FlushCacheOnIPAddressChange) {
// Resolve "host1".
HostResolver::RequestInfo info1(HostPortPair("host1", 70));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = host_resolver->Resolve(info1, &addrlist, &callback, NULL,
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1146,7 +1146,7 @@ TEST_F(HostResolverImplTest, AbortOnIPAddressChanged) {
// Resolve "host1".
HostResolver::RequestInfo info(HostPortPair("host1", 70));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
AddressList addrlist;
int rv = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -1176,7 +1176,7 @@ TEST_F(HostResolverImplTest, ObeyPoolConstraintsAfterIPAddressChange) {
// Resolve "host1".
HostResolver::RequestInfo info(HostPortPair("host1", 70));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
AddressList addrlist;
int rv = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
@@ -1230,8 +1230,8 @@ class ResolveWithinCallback : public CallbackRunner< Tuple1<int> > {
MockHostResolver* const host_resolver_;
const HostResolver::RequestInfo info_;
AddressList addrlist_;
- TestCompletionCallback callback_;
- TestCompletionCallback nested_callback_;
+ TestOldCompletionCallback callback_;
+ TestOldCompletionCallback nested_callback_;
};
TEST_F(HostResolverImplTest, OnlyAbortExistingRequestsOnIPAddressChange) {
@@ -1287,7 +1287,7 @@ TEST_F(HostResolverImplTest, HigherPriorityRequestsStartedFirst) {
CreateResolverRequest("req5", HIGHEST),
};
- TestCompletionCallback callback[arraysize(req)];
+ TestOldCompletionCallback callback[arraysize(req)];
AddressList addrlist[arraysize(req)];
// Start all of the requests.
@@ -1369,7 +1369,7 @@ TEST_F(HostResolverImplTest, CancelPendingRequest) {
CreateResolverRequest("req6", MEDIUM),
};
- TestCompletionCallback callback[arraysize(req)];
+ TestOldCompletionCallback callback[arraysize(req)];
AddressList addrlist[arraysize(req)];
HostResolver::RequestHandle handle[arraysize(req)];
@@ -1445,7 +1445,7 @@ TEST_F(HostResolverImplTest, QueueOverflow) {
CreateResolverRequest("req7", MEDIUM), // Evicts req2.
};
- TestCompletionCallback callback[arraysize(req)];
+ TestOldCompletionCallback callback[arraysize(req)];
AddressList addrlist[arraysize(req)];
HostResolver::RequestHandle handle[arraysize(req)];
@@ -1512,7 +1512,7 @@ TEST_F(HostResolverImplTest, SetDefaultAddressFamily_IPv4) {
CreateResolverRequestForAddressFamily("h1", MEDIUM, ADDRESS_FAMILY_IPV6),
};
- TestCompletionCallback callback[arraysize(req)];
+ TestOldCompletionCallback callback[arraysize(req)];
AddressList addrlist[arraysize(req)];
HostResolver::RequestHandle handle[arraysize(req)];
@@ -1582,7 +1582,7 @@ TEST_F(HostResolverImplTest, SetDefaultAddressFamily_IPv6) {
CreateResolverRequestForAddressFamily("h1", MEDIUM, ADDRESS_FAMILY_IPV4),
};
- TestCompletionCallback callback[arraysize(req)];
+ TestOldCompletionCallback callback[arraysize(req)];
AddressList addrlist[arraysize(req)];
HostResolver::RequestHandle handle[arraysize(req)];
@@ -1644,7 +1644,7 @@ TEST_F(HostResolverImplTest, DisallowNonCachedResponses) {
EXPECT_EQ(ERR_DNS_CACHE_MISS, err);
// This time, we fetch normally.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
err = host_resolver->Resolve(info, &addrlist, &callback, NULL, log.bound());
EXPECT_EQ(ERR_IO_PENDING, err);
err = callback.WaitForResult();
@@ -1689,7 +1689,7 @@ TEST_F(HostResolverImplTest, MultipleAttempts) {
// Resolve "host1".
HostResolver::RequestInfo info(HostPortPair("host1", 70));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
AddressList addrlist;
int rv = host_resolver->Resolve(info, &addrlist, &callback, NULL,
BoundNetLog());
diff --git a/net/base/mapped_host_resolver.cc b/net/base/mapped_host_resolver.cc
index 86912ff..7364f9e 100644
--- a/net/base/mapped_host_resolver.cc
+++ b/net/base/mapped_host_resolver.cc
@@ -21,7 +21,7 @@ MappedHostResolver::~MappedHostResolver() {
int MappedHostResolver::Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) {
DCHECK(addresses);
diff --git a/net/base/mapped_host_resolver.h b/net/base/mapped_host_resolver.h
index d49e45f..26459e9 100644
--- a/net/base/mapped_host_resolver.h
+++ b/net/base/mapped_host_resolver.h
@@ -46,7 +46,7 @@ class NET_EXPORT MappedHostResolver : public HostResolver {
// HostResolver methods:
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE;
virtual int ResolveFromCache(const RequestInfo& info,
diff --git a/net/base/mapped_host_resolver_unittest.cc b/net/base/mapped_host_resolver_unittest.cc
index 2a03287..8144b5c 100644
--- a/net/base/mapped_host_resolver_unittest.cc
+++ b/net/base/mapped_host_resolver_unittest.cc
@@ -32,7 +32,7 @@ TEST(MappedHostResolverTest, Inclusion) {
// Try resolving "www.google.com:80". There are no mappings yet, so this
// hits |resolver_impl| and fails.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
rv = resolver->Resolve(HostResolver::RequestInfo(
HostPortPair("www.google.com", 80)),
&address_list, &callback, NULL, BoundNetLog());
@@ -90,7 +90,7 @@ TEST(MappedHostResolverTest, Exclusion) {
int rv;
AddressList address_list;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// Remap "*.com" to "baz".
EXPECT_TRUE(resolver->AddRuleFromString("map *.com baz"));
@@ -131,7 +131,7 @@ TEST(MappedHostResolverTest, SetRulesFromString) {
int rv;
AddressList address_list;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// Remap "*.com" to "baz", and *.net to "bar:60".
resolver->SetRulesFromString("map *.com baz , map *.net bar:60");
diff --git a/net/base/mock_file_stream.cc b/net/base/mock_file_stream.cc
index 1a8f1b8..19a027f 100644
--- a/net/base/mock_file_stream.cc
+++ b/net/base/mock_file_stream.cc
@@ -23,7 +23,7 @@ int64 MockFileStream::Available() {
int MockFileStream::Read(char* buf,
int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return ReturnError(net::FileStream::Read(buf, buf_len, callback));
}
@@ -33,7 +33,7 @@ int MockFileStream::ReadUntilComplete(char *buf, int buf_len) {
int MockFileStream::Write(const char* buf,
int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return ReturnError(net::FileStream::Write(buf, buf_len, callback));
}
diff --git a/net/base/mock_file_stream.h b/net/base/mock_file_stream.h
index 67f417e..569937e 100644
--- a/net/base/mock_file_stream.h
+++ b/net/base/mock_file_stream.h
@@ -31,11 +31,11 @@ class MockFileStream : public net::FileStream {
virtual int64 Available() OVERRIDE;
virtual int Read(char* buf,
int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int ReadUntilComplete(char *buf, int buf_len) OVERRIDE;
virtual int Write(const char* buf,
int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int64 Truncate(int64 bytes) OVERRIDE;
virtual int Flush() OVERRIDE;
diff --git a/net/base/mock_host_resolver.cc b/net/base/mock_host_resolver.cc
index 6b2aa4c5..2e38dd9 100644
--- a/net/base/mock_host_resolver.cc
+++ b/net/base/mock_host_resolver.cc
@@ -97,11 +97,11 @@ void MockHostResolverBase::Reset(HostResolverProc* interceptor) {
int MockHostResolverBase::Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) {
if (synchronous_mode_) {
- TestCompletionCallback sync_callback;
+ TestOldCompletionCallback sync_callback;
int rv = impl_->Resolve(info, addresses, &sync_callback, out_req, net_log);
if (rv == ERR_IO_PENDING) {
MessageLoop::ScopedNestableTaskAllower nestable(MessageLoop::current());
diff --git a/net/base/mock_host_resolver.h b/net/base/mock_host_resolver.h
index 2fcf892..27360b0 100644
--- a/net/base/mock_host_resolver.h
+++ b/net/base/mock_host_resolver.h
@@ -61,7 +61,7 @@ class MockHostResolverBase : public HostResolver {
// HostResolver methods:
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE;
virtual int ResolveFromCache(const RequestInfo& info,
diff --git a/net/base/network_delegate.cc b/net/base/network_delegate.cc
index 28d0b31..cb9c06d 100644
--- a/net/base/network_delegate.cc
+++ b/net/base/network_delegate.cc
@@ -9,7 +9,7 @@
namespace net {
int NetworkDelegate::NotifyBeforeURLRequest(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
GURL* new_url) {
DCHECK(CalledOnValidThread());
DCHECK(request);
@@ -18,7 +18,7 @@ int NetworkDelegate::NotifyBeforeURLRequest(URLRequest* request,
}
int NetworkDelegate::NotifyBeforeSendHeaders(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
HttpRequestHeaders* headers) {
DCHECK(CalledOnValidThread());
DCHECK(headers);
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 2506788..3478cb1 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -39,10 +39,10 @@ class NetworkDelegate : public base::NonThreadSafe {
// checking on parameters. See the corresponding virtuals for explanations of
// the methods and their arguments.
int NotifyBeforeURLRequest(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
GURL* new_url);
int NotifyBeforeSendHeaders(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
HttpRequestHeaders* headers);
void NotifySendHeaders(URLRequest* request,
const HttpRequestHeaders& headers);
@@ -67,7 +67,7 @@ class NetworkDelegate : public base::NonThreadSafe {
// status code, generally either OK to continue with the request or
// ERR_IO_PENDING if the result is not ready yet.
virtual int OnBeforeURLRequest(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
GURL* new_url) = 0;
// Called right before the HTTP headers are sent. Allows the delegate to
@@ -75,7 +75,7 @@ class NetworkDelegate : public base::NonThreadSafe {
// valid only until OnHttpTransactionDestroyed is called for this request.
// Returns a net status code.
virtual int OnBeforeSendHeaders(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
HttpRequestHeaders* headers) = 0;
// Called right before the HTTP request(s) are being sent to the network.
diff --git a/net/base/origin_bound_cert_service.cc b/net/base/origin_bound_cert_service.cc
index 8f7c4cb..cd89519 100644
--- a/net/base/origin_bound_cert_service.cc
+++ b/net/base/origin_bound_cert_service.cc
@@ -36,7 +36,7 @@ const int kValidityPeriodInDays = 365;
// Represents the output and result callback of a request.
class OriginBoundCertServiceRequest {
public:
- OriginBoundCertServiceRequest(CompletionCallback* callback,
+ OriginBoundCertServiceRequest(OldCompletionCallback* callback,
std::string* private_key,
std::string* cert)
: callback_(callback),
@@ -67,7 +67,7 @@ class OriginBoundCertServiceRequest {
bool canceled() const { return !callback_; }
private:
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
std::string* private_key_;
std::string* cert_;
};
@@ -259,7 +259,7 @@ OriginBoundCertService::~OriginBoundCertService() {
int OriginBoundCertService::GetOriginBoundCert(const std::string& origin,
std::string* private_key,
std::string* cert,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req) {
DCHECK(CalledOnValidThread());
diff --git a/net/base/origin_bound_cert_service.h b/net/base/origin_bound_cert_service.h
index a194633..0b5e54c 100644
--- a/net/base/origin_bound_cert_service.h
+++ b/net/base/origin_bound_cert_service.h
@@ -55,7 +55,7 @@ class NET_EXPORT OriginBoundCertService
int GetOriginBoundCert(const std::string& origin,
std::string* private_key,
std::string* cert,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req);
// Cancels the specified request. |req| is the handle returned by
diff --git a/net/base/origin_bound_cert_service_unittest.cc b/net/base/origin_bound_cert_service_unittest.cc
index 171e1b9..edc347f 100644
--- a/net/base/origin_bound_cert_service_unittest.cc
+++ b/net/base/origin_bound_cert_service_unittest.cc
@@ -36,7 +36,7 @@ TEST_F(OriginBoundCertServiceTest, CacheHit) {
std::string origin("https://encrypted.google.com:443");
int error;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
OriginBoundCertService::RequestHandle request_handle;
// Asynchronous completion.
@@ -72,7 +72,7 @@ TEST_F(OriginBoundCertServiceTest, StoreCerts) {
scoped_ptr<OriginBoundCertService> service(
new OriginBoundCertService(new DefaultOriginBoundCertStore(NULL)));
int error;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
OriginBoundCertService::RequestHandle request_handle;
std::string origin1("https://encrypted.google.com:443");
@@ -122,11 +122,11 @@ TEST_F(OriginBoundCertServiceTest, InflightJoin) {
int error;
std::string private_key_info1, der_cert1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
OriginBoundCertService::RequestHandle request_handle1;
std::string private_key_info2, der_cert2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
OriginBoundCertService::RequestHandle request_handle2;
error = service->GetOriginBoundCert(
@@ -154,7 +154,7 @@ TEST_F(OriginBoundCertServiceTest, ExtractValuesFromBytes) {
std::string origin("https://encrypted.google.com:443");
std::string private_key_info, der_cert;
int error;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
OriginBoundCertService::RequestHandle request_handle;
error = service->GetOriginBoundCert(
@@ -198,7 +198,7 @@ TEST_F(OriginBoundCertServiceTest, CancelRequest) {
// Issue a few more requests to the worker pool and wait for their
// completion, so that the task of the canceled request (which runs on a
// worker thread) is likely to complete by the end of this test.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
for (int i = 0; i < 5; ++i) {
error = service->GetOriginBoundCert(
"https://encrypted.google.com:" + std::string(1, (char) ('1' + i)),
diff --git a/net/base/single_request_host_resolver.cc b/net/base/single_request_host_resolver.cc
index ced4801..5af3dd5 100644
--- a/net/base/single_request_host_resolver.cc
+++ b/net/base/single_request_host_resolver.cc
@@ -25,7 +25,7 @@ SingleRequestHostResolver::~SingleRequestHostResolver() {
int SingleRequestHostResolver::Resolve(const HostResolver::RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
DCHECK(addresses);
DCHECK(callback);
@@ -35,7 +35,7 @@ int SingleRequestHostResolver::Resolve(const HostResolver::RequestInfo& info,
// We need to be notified of completion before |callback| is called, so that
// we can clear out |cur_request_*|.
- CompletionCallback* transient_callback = callback ? &callback_ : NULL;
+ OldCompletionCallback* transient_callback = callback ? &callback_ : NULL;
int rv = resolver_->Resolve(
info, addresses, transient_callback, &request, net_log);
@@ -61,7 +61,7 @@ void SingleRequestHostResolver::Cancel() {
void SingleRequestHostResolver::OnResolveCompletion(int result) {
DCHECK(cur_request_ && cur_request_callback_);
- CompletionCallback* callback = cur_request_callback_;
+ OldCompletionCallback* callback = cur_request_callback_;
// Clear the outstanding request information.
cur_request_ = NULL;
diff --git a/net/base/single_request_host_resolver.h b/net/base/single_request_host_resolver.h
index 63f1a33..fb5c91e 100644
--- a/net/base/single_request_host_resolver.h
+++ b/net/base/single_request_host_resolver.h
@@ -27,7 +27,7 @@ class NET_EXPORT SingleRequestHostResolver {
// |addresses| object upon success. See HostResolver::Resolve() for details.
int Resolve(const HostResolver::RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
// Cancels the in-progress request, if any. This prevents the callback
@@ -44,10 +44,10 @@ class NET_EXPORT SingleRequestHostResolver {
// The current request (if any).
HostResolver::RequestHandle cur_request_;
- CompletionCallback* cur_request_callback_;
+ OldCompletionCallback* cur_request_callback_;
// Completion callback for when request to |resolver_| completes.
- CompletionCallbackImpl<SingleRequestHostResolver> callback_;
+ OldCompletionCallbackImpl<SingleRequestHostResolver> callback_;
DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver);
};
diff --git a/net/base/single_request_host_resolver_unittest.cc b/net/base/single_request_host_resolver_unittest.cc
index abf8348..2fb781f 100644
--- a/net/base/single_request_host_resolver_unittest.cc
+++ b/net/base/single_request_host_resolver_unittest.cc
@@ -30,7 +30,7 @@ class HangingHostResolver : public HostResolver {
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE {
EXPECT_FALSE(has_outstanding_request());
@@ -80,7 +80,7 @@ TEST(SingleRequestHostResolverTest, NormalResolve) {
// Resolve "watsup:90" using our SingleRequestHostResolver.
AddressList addrlist;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo request(HostPortPair("watsup", 90));
int rv = single_request_resolver.Resolve(
request, &addrlist, &callback, BoundNetLog());
@@ -100,7 +100,7 @@ TEST(SingleRequestHostResolverTest, Cancel) {
// Resolve "watsup:90" using our SingleRequestHostResolver.
AddressList addrlist;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HostResolver::RequestInfo request(HostPortPair("watsup", 90));
int rv = single_request_resolver.Resolve(
request, &addrlist, &callback, BoundNetLog());
diff --git a/net/base/test_completion_callback.cc b/net/base/test_completion_callback.cc
index 999a71e..b994bc3 100644
--- a/net/base/test_completion_callback.cc
+++ b/net/base/test_completion_callback.cc
@@ -7,15 +7,15 @@
#include "base/message_loop.h"
#include "net/base/net_errors.h"
-TestCompletionCallback::TestCompletionCallback()
+TestOldCompletionCallback::TestOldCompletionCallback()
: result_(0),
have_result_(false),
waiting_for_result_(false) {
}
-TestCompletionCallback::~TestCompletionCallback() {}
+TestOldCompletionCallback::~TestOldCompletionCallback() {}
-int TestCompletionCallback::WaitForResult() {
+int TestOldCompletionCallback::WaitForResult() {
DCHECK(!waiting_for_result_);
while (!have_result_) {
waiting_for_result_ = true;
@@ -26,13 +26,13 @@ int TestCompletionCallback::WaitForResult() {
return result_;
}
-int TestCompletionCallback::GetResult(int result) {
+int TestOldCompletionCallback::GetResult(int result) {
if (net::ERR_IO_PENDING != result)
return result;
return WaitForResult();
}
-void TestCompletionCallback::RunWithParams(const Tuple1<int>& params) {
+void TestOldCompletionCallback::RunWithParams(const Tuple1<int>& params) {
result_ = params.a;
have_result_ = true;
if (waiting_for_result_)
diff --git a/net/base/test_completion_callback.h b/net/base/test_completion_callback.h
index fe38e92..520c5b6 100644
--- a/net/base/test_completion_callback.h
+++ b/net/base/test_completion_callback.h
@@ -20,10 +20,10 @@
// there could be other side-effects resulting from WaitForResult. For this
// reason, this class is probably not ideal for a general application.
//
-class TestCompletionCallback : public CallbackRunner< Tuple1<int> > {
+class TestOldCompletionCallback : public CallbackRunner< Tuple1<int> > {
public:
- TestCompletionCallback();
- virtual ~TestCompletionCallback();
+ TestOldCompletionCallback();
+ virtual ~TestOldCompletionCallback();
int WaitForResult();
diff --git a/net/base/test_completion_callback_unittest.cc b/net/base/test_completion_callback_unittest.cc
index 1b9d71d..20ca596 100644
--- a/net/base/test_completion_callback_unittest.cc
+++ b/net/base/test_completion_callback_unittest.cc
@@ -13,9 +13,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-typedef PlatformTest TestCompletionCallbackTest;
+typedef PlatformTest TestOldCompletionCallbackTest;
-using net::CompletionCallback;
+using net::OldCompletionCallback;
const int kMagicResult = 8888;
@@ -30,7 +30,7 @@ class ExampleEmployer {
// Do some imaginary work on a worker thread;
// when done, worker posts callback on the original thread.
// Returns true on success
- bool DoSomething(CompletionCallback* callback);
+ bool DoSomething(OldCompletionCallback* callback);
private:
class ExampleWorker;
@@ -43,7 +43,7 @@ class ExampleEmployer {
class ExampleEmployer::ExampleWorker
: public base::RefCountedThreadSafe<ExampleWorker> {
public:
- ExampleWorker(ExampleEmployer* employer, CompletionCallback* callback)
+ ExampleWorker(ExampleEmployer* employer, OldCompletionCallback* callback)
: employer_(employer), callback_(callback),
origin_loop_(MessageLoop::current()) {
}
@@ -56,7 +56,7 @@ class ExampleEmployer::ExampleWorker
// Only used on the origin thread (where DoSomething was called).
ExampleEmployer* employer_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
// Used to post ourselves onto the origin thread.
base::Lock origin_loop_lock_;
MessageLoop* origin_loop_;
@@ -99,7 +99,7 @@ ExampleEmployer::ExampleEmployer() {
ExampleEmployer::~ExampleEmployer() {
}
-bool ExampleEmployer::DoSomething(CompletionCallback* callback) {
+bool ExampleEmployer::DoSomething(OldCompletionCallback* callback) {
DCHECK(!request_) << "already in use";
request_ = new ExampleWorker(this, callback);
@@ -115,9 +115,9 @@ bool ExampleEmployer::DoSomething(CompletionCallback* callback) {
return true;
}
-TEST_F(TestCompletionCallbackTest, Simple) {
+TEST_F(TestOldCompletionCallbackTest, Simple) {
ExampleEmployer boss;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
bool queued = boss.DoSomething(&callback);
EXPECT_EQ(queued, true);
int result = callback.WaitForResult();
diff --git a/net/curvecp/client_packetizer.cc b/net/curvecp/client_packetizer.cc
index c609e96..2d96b1f 100644
--- a/net/curvecp/client_packetizer.cc
+++ b/net/curvecp/client_packetizer.cc
@@ -50,7 +50,7 @@ ClientPacketizer::~ClientPacketizer() {
int ClientPacketizer::Connect(const AddressList& server,
Packetizer::Listener* listener,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!user_callback_);
DCHECK(!socket_.get());
DCHECK(!listener_);
@@ -68,7 +68,7 @@ int ClientPacketizer::Connect(const AddressList& server,
int ClientPacketizer::SendMessage(ConnectionKey key,
const char* data,
size_t length,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// We can't send messages smaller than 16 bytes.
if (length < 16)
return ERR_UNEXPECTED;
@@ -280,7 +280,7 @@ void ClientPacketizer::DoCallback(int result) {
DCHECK_NE(result, ERR_IO_PENDING);
DCHECK(user_callback_);
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
callback->Run(result);
}
diff --git a/net/curvecp/client_packetizer.h b/net/curvecp/client_packetizer.h
index ff2a400..4946ce8 100644
--- a/net/curvecp/client_packetizer.h
+++ b/net/curvecp/client_packetizer.h
@@ -27,13 +27,13 @@ class ClientPacketizer : public Packetizer {
int Connect(const AddressList& server,
Packetizer::Listener* listener,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Packetizer methods
virtual int SendMessage(ConnectionKey key,
const char* data,
size_t length,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual void Close(ConnectionKey key);
virtual int GetPeerAddress(IPEndPoint* endpoint) const;
virtual int max_message_payload() const;
@@ -81,7 +81,7 @@ class ClientPacketizer : public Packetizer {
StateType next_state_;
scoped_ptr<UDPClientSocket> socket_;
Packetizer::Listener* listener_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
AddressList addresses_;
const struct addrinfo* current_address_;
int hello_attempts_; // Number of attempts to send a Hello Packet.
@@ -91,7 +91,7 @@ class ClientPacketizer : public Packetizer {
uchar shortterm_public_key_[32];
- CompletionCallbackImpl<ClientPacketizer> io_callback_;
+ OldCompletionCallbackImpl<ClientPacketizer> io_callback_;
ScopedRunnableMethodFactory<ClientPacketizer> timers_factory_;
DISALLOW_COPY_AND_ASSIGN(ClientPacketizer);
diff --git a/net/curvecp/curvecp_client_socket.cc b/net/curvecp/curvecp_client_socket.cc
index 95b36f6..cba3d0e 100644
--- a/net/curvecp/curvecp_client_socket.cc
+++ b/net/curvecp/curvecp_client_socket.cc
@@ -21,7 +21,7 @@ CurveCPClientSocket::CurveCPClientSocket(const AddressList& addresses,
CurveCPClientSocket::~CurveCPClientSocket() {
}
-int CurveCPClientSocket::Connect(CompletionCallback* callback) {
+int CurveCPClientSocket::Connect(OldCompletionCallback* callback) {
return packetizer_.Connect(addresses_, &messenger_, callback);
}
@@ -98,13 +98,13 @@ base::TimeDelta CurveCPClientSocket::GetConnectTimeMicros() const {
int CurveCPClientSocket::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return messenger_.Read(buf, buf_len, callback);
}
int CurveCPClientSocket::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return messenger_.Write(buf, buf_len, callback);
}
diff --git a/net/curvecp/curvecp_client_socket.h b/net/curvecp/curvecp_client_socket.h
index c9faa63..e758359 100644
--- a/net/curvecp/curvecp_client_socket.h
+++ b/net/curvecp/curvecp_client_socket.h
@@ -25,7 +25,7 @@ class CurveCPClientSocket : public StreamSocket {
virtual ~CurveCPClientSocket();
// ClientSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -40,8 +40,8 @@ class CurveCPClientSocket : public StreamSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
diff --git a/net/curvecp/curvecp_server_socket.cc b/net/curvecp/curvecp_server_socket.cc
index 32d3786..15185ff 100644
--- a/net/curvecp/curvecp_server_socket.cc
+++ b/net/curvecp/curvecp_server_socket.cc
@@ -49,13 +49,13 @@ void CurveCPServerSocket::Close() {
int CurveCPServerSocket::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return messenger_.Read(buf, buf_len, callback);
}
int CurveCPServerSocket::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return messenger_.Write(buf, buf_len, callback);
}
diff --git a/net/curvecp/curvecp_server_socket.h b/net/curvecp/curvecp_server_socket.h
index 672a574..32be5a4 100644
--- a/net/curvecp/curvecp_server_socket.h
+++ b/net/curvecp/curvecp_server_socket.h
@@ -33,8 +33,8 @@ class CurveCPServerSocket : public Socket,
void Close();
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
diff --git a/net/curvecp/curvecp_transfer_unittest.cc b/net/curvecp/curvecp_transfer_unittest.cc
index e433118..1c092f3 100644
--- a/net/curvecp/curvecp_transfer_unittest.cc
+++ b/net/curvecp/curvecp_transfer_unittest.cc
@@ -30,7 +30,7 @@ void RunEchoTest(int bytes) {
EXPECT_TRUE(server.Start(1234));
HostPortPair server_address("localhost", 1234);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
EXPECT_TRUE(client.Start(server_address, bytes, &cb));
int rv = cb.WaitForResult();
diff --git a/net/curvecp/messenger.cc b/net/curvecp/messenger.cc
index ad6ed31..07f7d82 100644
--- a/net/curvecp/messenger.cc
+++ b/net/curvecp/messenger.cc
@@ -70,7 +70,7 @@ Messenger::Messenger(Packetizer* packetizer)
Messenger::~Messenger() {
}
-int Messenger::Read(IOBuffer* buf, int buf_len, CompletionCallback* callback) {
+int Messenger::Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(!receive_complete_callback_);
@@ -86,7 +86,7 @@ int Messenger::Read(IOBuffer* buf, int buf_len, CompletionCallback* callback) {
return bytes_read;
}
-int Messenger::Write(IOBuffer* buf, int buf_len, CompletionCallback* callback) {
+int Messenger::Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(!pending_send_.get()); // Already a write pending!
DCHECK(!send_complete_callback_);
@@ -156,7 +156,7 @@ IOBufferWithSize* Messenger::CreateBufferFromSendQueue() {
int len = send_buffer_.write(pending_send_->data(), pending_send_length_);
if (len) {
pending_send_ = NULL;
- CompletionCallback* callback = send_complete_callback_;
+ OldCompletionCallback* callback = send_complete_callback_;
send_complete_callback_ = NULL;
callback->Run(len);
}
@@ -341,7 +341,7 @@ void Messenger::RecvMessage() {
if (received_list_.bytes_available() && receive_complete_callback_) {
// Pass the data up to the caller.
int bytes_read = InternalRead(pending_receive_, pending_receive_length_);
- CompletionCallback* callback = receive_complete_callback_;
+ OldCompletionCallback* callback = receive_complete_callback_;
receive_complete_callback_ = NULL;
callback->Run(bytes_read);
}
diff --git a/net/curvecp/messenger.h b/net/curvecp/messenger.h
index 7bd1bb8..8377358 100644
--- a/net/curvecp/messenger.h
+++ b/net/curvecp/messenger.h
@@ -34,8 +34,8 @@ class Messenger : public base::NonThreadSafe,
explicit Messenger(Packetizer* packetizer);
virtual ~Messenger();
- int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// Packetizer::Listener methods:
virtual void OnConnection(ConnectionKey key);
@@ -71,13 +71,13 @@ class Messenger : public base::NonThreadSafe,
// The send_buffer is a list of pending data to pack into messages and send
// to the remote.
CircularBuffer send_buffer_;
- CompletionCallback* send_complete_callback_;
+ OldCompletionCallback* send_complete_callback_;
scoped_refptr<IOBuffer> pending_send_;
int pending_send_length_;
// The read_buffer is a list of pending data which has been unpacked from
// messages and is awaiting delivery to the application.
- CompletionCallback* receive_complete_callback_;
+ OldCompletionCallback* receive_complete_callback_;
scoped_refptr<IOBuffer> pending_receive_;
int pending_receive_length_;
@@ -93,7 +93,7 @@ class Messenger : public base::NonThreadSafe,
// A timer to fire when we can send data.
base::OneShotTimer<Messenger> send_timer_;
- CompletionCallbackImpl<Messenger> send_message_callback_;
+ OldCompletionCallbackImpl<Messenger> send_message_callback_;
ScopedRunnableMethodFactory<Messenger> factory_;
DISALLOW_COPY_AND_ASSIGN(Messenger);
diff --git a/net/curvecp/packetizer.h b/net/curvecp/packetizer.h
index cca680b..14b526a 100644
--- a/net/curvecp/packetizer.h
+++ b/net/curvecp/packetizer.h
@@ -34,7 +34,7 @@ class Packetizer {
virtual int SendMessage(ConnectionKey key,
const char* data,
size_t length,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Close an existing connection.
virtual void Close(ConnectionKey key) = 0;
diff --git a/net/curvecp/server_packetizer.cc b/net/curvecp/server_packetizer.cc
index 4715a3b..d5d9d67 100644
--- a/net/curvecp/server_packetizer.cc
+++ b/net/curvecp/server_packetizer.cc
@@ -46,7 +46,7 @@ bool ServerPacketizer::Open(ConnectionKey key, Packetizer::Listener* listener) {
int ServerPacketizer::SendMessage(ConnectionKey key,
const char* data,
size_t length,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(socket_.get());
DCHECK_LT(0u, length);
DCHECK_GT(kMaxPacketLength - sizeof(ServerMessagePacket), length);
diff --git a/net/curvecp/server_packetizer.h b/net/curvecp/server_packetizer.h
index 2fa60c7..68a91c0 100644
--- a/net/curvecp/server_packetizer.h
+++ b/net/curvecp/server_packetizer.h
@@ -37,7 +37,7 @@ class ServerPacketizer : public base::RefCounted<ServerPacketizer>,
virtual int SendMessage(ConnectionKey key,
const char* data,
size_t length,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual void Close(ConnectionKey key);
virtual int GetPeerAddress(IPEndPoint* endpoint) const;
virtual int max_message_payload() const;
@@ -86,8 +86,8 @@ class ServerPacketizer : public base::RefCounted<ServerPacketizer>,
// The listener map tracks active message listeners known to the packetizer.
ListenerMap listener_map_;
- CompletionCallbackImpl<ServerPacketizer> read_callback_;
- CompletionCallbackImpl<ServerPacketizer> write_callback_;
+ OldCompletionCallbackImpl<ServerPacketizer> read_callback_;
+ OldCompletionCallbackImpl<ServerPacketizer> write_callback_;
DISALLOW_COPY_AND_ASSIGN(ServerPacketizer);
};
diff --git a/net/curvecp/test_client.cc b/net/curvecp/test_client.cc
index 9eced0d..abf5957 100644
--- a/net/curvecp/test_client.cc
+++ b/net/curvecp/test_client.cc
@@ -45,7 +45,7 @@ TestClient::~TestClient() {
bool TestClient::Start(const HostPortPair& server_host_port_pair,
int bytes_to_send,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!socket_);
DCHECK(!finished_callback_);
@@ -171,7 +171,7 @@ void TestClient::Finish(int result) {
DCHECK(finished_callback_);
LOG(ERROR) << "TestClient Done!";
- CompletionCallback* callback = finished_callback_;
+ OldCompletionCallback* callback = finished_callback_;
finished_callback_ = NULL;
callback->Run(result);
}
diff --git a/net/curvecp/test_client.h b/net/curvecp/test_client.h
index e992ce8..59a3d59 100644
--- a/net/curvecp/test_client.h
+++ b/net/curvecp/test_client.h
@@ -35,7 +35,7 @@ class TestClient {
// Returns true if successful in starting the client.
bool Start(const HostPortPair& server,
int bytes_to_send,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Returns the number of errors this server encountered.
int error_count() { return errors_; }
@@ -59,10 +59,10 @@ class TestClient {
int bytes_to_send_;
TestDataStream sent_stream_;
TestDataStream received_stream_;
- CompletionCallbackImpl<TestClient> connect_callback_;
- CompletionCallbackImpl<TestClient> read_callback_;
- CompletionCallbackImpl<TestClient> write_callback_;
- CompletionCallback* finished_callback_;
+ OldCompletionCallbackImpl<TestClient> connect_callback_;
+ OldCompletionCallbackImpl<TestClient> read_callback_;
+ OldCompletionCallbackImpl<TestClient> write_callback_;
+ OldCompletionCallback* finished_callback_;
};
} // namespace net
diff --git a/net/curvecp/test_server.h b/net/curvecp/test_server.h
index a941401..3ece594 100644
--- a/net/curvecp/test_server.h
+++ b/net/curvecp/test_server.h
@@ -19,7 +19,7 @@ class IOBuffer;
// TestServer is the server which processes the listen socket.
// It will create an EchoServer instance to handle each connection.
-class TestServer : public CompletionCallback,
+class TestServer : public OldCompletionCallback,
public CurveCPServerSocket::Acceptor {
public:
TestServer();
@@ -27,7 +27,7 @@ class TestServer : public CompletionCallback,
bool Start(int port);
- // CompletionCallback methods:
+ // OldCompletionCallback methods:
virtual void RunWithParams(const Tuple1<int>& params);
// CurveCPServerSocket::Acceptor methods:
@@ -65,8 +65,8 @@ class EchoServer {
scoped_refptr<DrainableIOBuffer> write_buffer_;
TestDataStream received_stream_;
int bytes_received_;
- CompletionCallbackImpl<EchoServer> read_callback_;
- CompletionCallbackImpl<EchoServer> write_callback_;
+ OldCompletionCallbackImpl<EchoServer> read_callback_;
+ OldCompletionCallbackImpl<EchoServer> write_callback_;
};
} // namespace net
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 1a63d16..3903a58 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -216,7 +216,7 @@ class CacheCreator {
net::CacheType type, uint32 flags,
base::MessageLoopProxy* thread, net::NetLog* net_log,
disk_cache::Backend** backend,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: path_(path), force_(force), retry_(false), max_bytes_(max_bytes),
type_(type), flags_(flags), thread_(thread), backend_(backend),
callback_(callback), cache_(NULL), net_log_(net_log),
@@ -242,10 +242,10 @@ class CacheCreator {
uint32 flags_;
scoped_refptr<base::MessageLoopProxy> thread_;
disk_cache::Backend** backend_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
disk_cache::BackendImpl* cache_;
net::NetLog* net_log_;
- net::CompletionCallbackImpl<CacheCreator> my_callback_;
+ net::OldCompletionCallbackImpl<CacheCreator> my_callback_;
DISALLOW_COPY_AND_ASSIGN(CacheCreator);
};
@@ -318,7 +318,7 @@ namespace disk_cache {
int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes,
bool force, base::MessageLoopProxy* thread,
net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
if (type == net::MEMORY_CACHE) {
*backend = MemBackendImpl::CreateBackend(max_bytes, net_log);
@@ -439,7 +439,7 @@ int BackendImpl::CreateBackend(const FilePath& full_path, bool force,
int max_bytes, net::CacheType type,
uint32 flags, base::MessageLoopProxy* thread,
net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
CacheCreator* creator = new CacheCreator(full_path, force, max_bytes, type,
flags, thread, net_log, backend,
@@ -448,7 +448,7 @@ int BackendImpl::CreateBackend(const FilePath& full_path, bool force,
return creator->Run();
}
-int BackendImpl::Init(CompletionCallback* callback) {
+int BackendImpl::Init(OldCompletionCallback* callback) {
background_queue_.Init(callback);
return net::ERR_IO_PENDING;
}
@@ -560,7 +560,7 @@ void BackendImpl::CleanupCache() {
// ------------------------------------------------------------------------
int BackendImpl::OpenPrevEntry(void** iter, Entry** prev_entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.OpenPrevEntry(iter, prev_entry, callback);
return net::ERR_IO_PENDING;
@@ -1257,12 +1257,12 @@ void BackendImpl::ClearRefCountForTest() {
num_refs_ = 0;
}
-int BackendImpl::FlushQueueForTest(CompletionCallback* callback) {
+int BackendImpl::FlushQueueForTest(OldCompletionCallback* callback) {
background_queue_.FlushQueue(callback);
return net::ERR_IO_PENDING;
}
-int BackendImpl::RunTaskForTest(Task* task, CompletionCallback* callback) {
+int BackendImpl::RunTaskForTest(Task* task, OldCompletionCallback* callback) {
background_queue_.RunTask(task, callback);
return net::ERR_IO_PENDING;
}
@@ -1315,27 +1315,27 @@ int32 BackendImpl::GetEntryCount() const {
}
int BackendImpl::OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.OpenEntry(key, entry, callback);
return net::ERR_IO_PENDING;
}
int BackendImpl::CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.CreateEntry(key, entry, callback);
return net::ERR_IO_PENDING;
}
int BackendImpl::DoomEntry(const std::string& key,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.DoomEntry(key, callback);
return net::ERR_IO_PENDING;
}
-int BackendImpl::DoomAllEntries(CompletionCallback* callback) {
+int BackendImpl::DoomAllEntries(OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.DoomAllEntries(callback);
return net::ERR_IO_PENDING;
@@ -1343,21 +1343,21 @@ int BackendImpl::DoomAllEntries(CompletionCallback* callback) {
int BackendImpl::DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.DoomEntriesBetween(initial_time, end_time, callback);
return net::ERR_IO_PENDING;
}
int BackendImpl::DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.DoomEntriesSince(initial_time, callback);
return net::ERR_IO_PENDING;
}
int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
background_queue_.OpenNextEntry(iter, next_entry, callback);
return net::ERR_IO_PENDING;
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h
index eddae3a..8bd793c 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/backend_impl.h
@@ -55,10 +55,10 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
int max_bytes, net::CacheType type,
uint32 flags, base::MessageLoopProxy* thread,
net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Performs general initialization for this current instance of the cache.
- int Init(CompletionCallback* callback);
+ int Init(OldCompletionCallback* callback);
// Performs the actual initialization and final cleanup on destruction.
int SyncInit();
@@ -66,7 +66,7 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
// Same bahavior as OpenNextEntry but walks the list from back to front.
int OpenPrevEntry(void** iter, Entry** prev_entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Synchronous implementation of the asynchronous interface.
int SyncOpenEntry(const std::string& key, Entry** entry);
@@ -229,11 +229,11 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
void ClearRefCountForTest();
// Sends a dummy operation through the operation queue, for unit tests.
- int FlushQueueForTest(CompletionCallback* callback);
+ int FlushQueueForTest(OldCompletionCallback* callback);
// Runs the provided task on the cache thread. The task will be automatically
// deleted after it runs.
- int RunTaskForTest(Task* task, CompletionCallback* callback);
+ int RunTaskForTest(Task* task, OldCompletionCallback* callback);
// Trims an entry (all if |empty| is true) from the list of deleted
// entries. This method should be called directly on the cache thread.
@@ -250,18 +250,18 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
// Backend interface.
virtual int32 GetEntryCount() const;
virtual int OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
- virtual int DoomEntry(const std::string& key, CompletionCallback* callback);
- virtual int DoomAllEntries(CompletionCallback* callback);
+ OldCompletionCallback* callback);
+ virtual int DoomEntry(const std::string& key, OldCompletionCallback* callback);
+ virtual int DoomAllEntries(OldCompletionCallback* callback);
virtual int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual void EndEnumeration(void** iter);
virtual void GetStats(StatsItems* stats);
virtual void OnExternalCacheHit(const std::string& key);
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 7843768..bae4649 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -195,7 +195,7 @@ TEST_F(DiskCacheBackendTest, AppCacheKeying) {
}
TEST_F(DiskCacheTest, CreateBackend) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
{
FilePath path = GetCacheFilePath();
@@ -261,7 +261,7 @@ TEST_F(DiskCacheBackendTest, ExternalFiles) {
// Tests that we deal with file-level pending operations at destruction time.
TEST_F(DiskCacheTest, ShutdownWithPendingIO) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
{
FilePath path = GetCacheFilePath();
@@ -313,7 +313,7 @@ TEST_F(DiskCacheTest, ShutdownWithPendingIO) {
// Tests that we deal with background-thread pending operations.
TEST_F(DiskCacheTest, ShutdownWithPendingIO2) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
{
FilePath path = GetCacheFilePath();
@@ -357,7 +357,7 @@ TEST_F(DiskCacheTest, TruncatedIndex) {
base::Thread cache_thread("CacheThread");
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0)));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* backend = NULL;
int rv = disk_cache::BackendImpl::CreateBackend(
@@ -1342,7 +1342,7 @@ TEST_F(DiskCacheTest, DeleteOld) {
base::Thread cache_thread("CacheThread");
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0)));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv = disk_cache::BackendImpl::CreateBackend(
@@ -2269,7 +2269,7 @@ TEST_F(DiskCacheTest, MultipleInstances) {
base::Thread cache_thread("CacheThread");
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0)));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
const int kNumberOfCaches = 2;
disk_cache::Backend* cache[kNumberOfCaches];
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index 516edb5..3e0efa6 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -33,7 +33,7 @@ namespace disk_cache {
class Entry;
class Backend;
-typedef net::CompletionCallback CompletionCallback;
+typedef net::OldCompletionCallback OldCompletionCallback;
// Returns an instance of a Backend of the given |type|. |path| points to a
// folder where the cached data will be stored (if appropriate). This cache
@@ -54,7 +54,7 @@ NET_EXPORT int CreateCacheBackend(net::CacheType type, const FilePath& path,
int max_bytes, bool force,
base::MessageLoopProxy* thread,
net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// The root interface for a disk cache instance.
class NET_EXPORT Backend {
@@ -77,7 +77,7 @@ class NET_EXPORT Backend {
// will be invoked when the entry is available. The pointer to receive the
// |entry| must remain valid until the operation completes.
virtual int OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Creates a new entry. Upon success, the out param holds a pointer to an
// Entry object representing the newly created disk cache entry. When the
@@ -86,18 +86,18 @@ class NET_EXPORT Backend {
// the |callback| will be invoked when the entry is available. The pointer to
// receive the |entry| must remain valid until the operation completes.
virtual int CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Marks the entry, specified by the given key, for deletion. The return value
// is a net error code. If this method returns ERR_IO_PENDING, the |callback|
// will be invoked after the entry is doomed.
virtual int DoomEntry(const std::string& key,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Marks all entries for deletion. The return value is a net error code. If
// this method returns ERR_IO_PENDING, the |callback| will be invoked when the
// operation completes.
- virtual int DoomAllEntries(CompletionCallback* callback) = 0;
+ virtual int DoomAllEntries(OldCompletionCallback* callback) = 0;
// Marks a range of entries for deletion. This supports unbounded deletes in
// either direction by using null Time values for either argument. The return
@@ -105,13 +105,13 @@ class NET_EXPORT Backend {
// |callback| will be invoked when the operation completes.
virtual int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Marks all entries accessed since |initial_time| for deletion. The return
// value is a net error code. If this method returns ERR_IO_PENDING, the
// |callback| will be invoked when the operation completes.
virtual int DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Enumerates the cache. Initialize |iter| to NULL before calling this method
// the first time. That will cause the enumeration to start at the head of
@@ -126,7 +126,7 @@ class NET_EXPORT Backend {
// NOTE: This method does not modify the last_used field of the entry, and
// therefore it does not impact the eviction ranking of the entry.
virtual int OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Releases iter without returning the next entry. Whenever OpenNextEntry()
// returns true, but the caller is not interested in continuing the
@@ -178,7 +178,7 @@ class NET_EXPORT Entry {
// having to wait for all the callbacks, and still rely on the cleanup
// performed from the callback code.
virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* completion_callback) = 0;
+ OldCompletionCallback* completion_callback) = 0;
// Copies cache data from the given buffer of length |buf_len|. If
// completion_callback is null, then this call blocks until the write
@@ -194,7 +194,7 @@ class NET_EXPORT Entry {
// If truncate is true, this call will truncate the stored data at the end of
// what we are writing here.
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* completion_callback,
+ OldCompletionCallback* completion_callback,
bool truncate) = 0;
// Sparse entries support:
@@ -242,7 +242,7 @@ class NET_EXPORT Entry {
// Behaves like ReadData() except that this method is used to access sparse
// entries.
virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* completion_callback) = 0;
+ OldCompletionCallback* completion_callback) = 0;
// Behaves like WriteData() except that this method is used to access sparse
// entries. |truncate| is not part of this interface because a sparse entry
@@ -251,7 +251,7 @@ class NET_EXPORT Entry {
// that the content has changed), the whole entry should be doomed and
// re-created.
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* completion_callback) = 0;
+ OldCompletionCallback* completion_callback) = 0;
// Returns information about the currently stored portion of a sparse entry.
// |offset| and |len| describe a particular range that should be scanned to
@@ -263,7 +263,7 @@ class NET_EXPORT Entry {
// this method returns ERR_IO_PENDING, the |callback| will be invoked when the
// operation completes, and |start| must remain valid until that point.
virtual int GetAvailableRange(int64 offset, int len, int64* start,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Returns true if this entry could be a sparse entry or false otherwise. This
// is a quick test that may return true even if the entry is not really
@@ -293,7 +293,7 @@ class NET_EXPORT Entry {
// Note that CancelSparseIO may have been called on another instance of this
// object that refers to the same physical disk entry.
// Note: This method is deprecated.
- virtual int ReadyForSparseIO(CompletionCallback* completion_callback) = 0;
+ virtual int ReadyForSparseIO(OldCompletionCallback* completion_callback) = 0;
protected:
virtual ~Entry() {}
diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/disk_cache_perftest.cc
index 2adc29b..4bf46f7 100644
--- a/net/disk_cache/disk_cache_perftest.cc
+++ b/net/disk_cache/disk_cache_perftest.cc
@@ -61,7 +61,7 @@ bool TimeWrite(int num_entries, disk_cache::Backend* cache,
entries->push_back(entry);
disk_cache::Entry* cache_entry;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache->CreateEntry(entry.key, &cache_entry, &cb);
if (net::OK != cb.GetResult(rv))
break;
@@ -107,7 +107,7 @@ bool TimeRead(int num_entries, disk_cache::Backend* cache,
for (int i = 0; i < num_entries; i++) {
disk_cache::Entry* cache_entry;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache->OpenEntry(entries[i].key, &cache_entry, &cb);
if (net::OK != cb.GetResult(rv))
break;
@@ -158,7 +158,7 @@ TEST_F(DiskCacheTest, CacheBackendPerformance) {
base::Thread::Options(MessageLoop::TYPE_IO, 0)));
ScopedTestCache test_cache;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv = disk_cache::CreateCacheBackend(
net::DISK_CACHE, test_cache.path(), 0, false,
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index b9e1d10..c200328 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -51,7 +51,7 @@ void DiskCacheTestWithCache::InitCache() {
// We are expected to leak memory when simulating crashes.
void DiskCacheTestWithCache::SimulateCrash() {
ASSERT_TRUE(implementation_ && !memory_only_);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_impl_->FlushQueueForTest(&cb);
ASSERT_EQ(net::OK, cb.GetResult(rv));
cache_impl_->ClearRefCountForTest();
@@ -79,46 +79,46 @@ void DiskCacheTestWithCache::SetMaxSize(int size) {
int DiskCacheTestWithCache::OpenEntry(const std::string& key,
disk_cache::Entry** entry) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->OpenEntry(key, entry, &cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::CreateEntry(const std::string& key,
disk_cache::Entry** entry) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->CreateEntry(key, entry, &cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::DoomEntry(const std::string& key) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->DoomEntry(key, &cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::DoomAllEntries() {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->DoomAllEntries(&cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->DoomEntriesBetween(initial_time, end_time, &cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::DoomEntriesSince(const base::Time initial_time) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->DoomEntriesSince(initial_time, &cb);
return cb.GetResult(rv);
}
int DiskCacheTestWithCache::OpenNextEntry(void** iter,
disk_cache::Entry** next_entry) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_->OpenNextEntry(iter, next_entry, &cb);
return cb.GetResult(rv);
}
@@ -127,7 +127,7 @@ void DiskCacheTestWithCache::FlushQueueForTest() {
if (memory_only_ || !cache_impl_)
return;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_impl_->FlushQueueForTest(&cb);
EXPECT_EQ(net::OK, cb.GetResult(rv));
}
@@ -139,14 +139,14 @@ void DiskCacheTestWithCache::RunTaskForTest(Task* task) {
return;
}
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_impl_->RunTaskForTest(task, &cb);
EXPECT_EQ(net::OK, cb.GetResult(rv));
}
int DiskCacheTestWithCache::ReadData(disk_cache::Entry* entry, int index,
int offset, net::IOBuffer* buf, int len) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->ReadData(index, offset, buf, len, &cb);
return cb.GetResult(rv);
}
@@ -155,7 +155,7 @@ int DiskCacheTestWithCache::ReadData(disk_cache::Entry* entry, int index,
int DiskCacheTestWithCache::WriteData(disk_cache::Entry* entry, int index,
int offset, net::IOBuffer* buf, int len,
bool truncate) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(index, offset, buf, len, &cb, truncate);
return cb.GetResult(rv);
}
@@ -163,7 +163,7 @@ int DiskCacheTestWithCache::WriteData(disk_cache::Entry* entry, int index,
int DiskCacheTestWithCache::ReadSparseData(disk_cache::Entry* entry,
int64 offset, net::IOBuffer* buf,
int len) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->ReadSparseData(offset, buf, len, &cb);
return cb.GetResult(rv);
}
@@ -171,7 +171,7 @@ int DiskCacheTestWithCache::ReadSparseData(disk_cache::Entry* entry,
int DiskCacheTestWithCache::WriteSparseData(disk_cache::Entry* entry,
int64 offset,
net::IOBuffer* buf, int len) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteSparseData(offset, buf, len, &cb);
return cb.GetResult(rv);
}
@@ -253,7 +253,7 @@ void DiskCacheTestWithCache::InitDiskCache() {
use_current_thread_ ? base::MessageLoopProxy::current() :
cache_thread_.message_loop_proxy();
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = disk_cache::BackendImpl::CreateBackend(
path, force_creation_, size_, type_,
disk_cache::kNoRandom, thread, NULL, &cache_, &cb);
@@ -280,7 +280,7 @@ void DiskCacheTestWithCache::InitDiskCacheImpl(const FilePath& path) {
cache_impl_->SetType(type_);
cache_impl_->SetFlags(disk_cache::kNoRandom);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache_impl_->Init(&cb);
ASSERT_EQ(net::OK, cb.GetResult(rv));
}
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
index 873a194..7bcccf4 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/entry_impl.cc
@@ -33,7 +33,7 @@ class SyncCallback: public disk_cache::FileIOCallback {
// |end_event_type| is the event type to log on completion. Logs nothing on
// discard, or when the NetLog is not set to log all events.
SyncCallback(disk_cache::EntryImpl* entry, net::IOBuffer* buffer,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::NetLog::EventType end_event_type)
: entry_(entry), callback_(callback), buf_(buffer),
start_(TimeTicks::Now()), end_event_type_(end_event_type) {
@@ -47,7 +47,7 @@ class SyncCallback: public disk_cache::FileIOCallback {
private:
disk_cache::EntryImpl* entry_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
scoped_refptr<net::IOBuffer> buf_;
TimeTicks start_;
const net::NetLog::EventType end_event_type_;
@@ -309,7 +309,7 @@ void EntryImpl::DoomImpl() {
}
int EntryImpl::ReadDataImpl(int index, int offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback) {
+ int buf_len, OldCompletionCallback* callback) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
@@ -328,7 +328,7 @@ int EntryImpl::ReadDataImpl(int index, int offset, net::IOBuffer* buf,
}
int EntryImpl::WriteDataImpl(int index, int offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback,
+ int buf_len, OldCompletionCallback* callback,
bool truncate) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
@@ -349,7 +349,7 @@ int EntryImpl::WriteDataImpl(int index, int offset, net::IOBuffer* buf,
}
int EntryImpl::ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(node_.Data()->dirty || read_only_);
int result = InitSparseData();
if (net::OK != result)
@@ -363,7 +363,7 @@ int EntryImpl::ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
}
int EntryImpl::WriteSparseDataImpl(int64 offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback) {
+ int buf_len, OldCompletionCallback* callback) {
DCHECK(node_.Data()->dirty || read_only_);
int result = InitSparseData();
if (net::OK != result)
@@ -391,7 +391,7 @@ void EntryImpl::CancelSparseIOImpl() {
sparse_->CancelIO();
}
-int EntryImpl::ReadyForSparseIOImpl(CompletionCallback* callback) {
+int EntryImpl::ReadyForSparseIOImpl(OldCompletionCallback* callback) {
DCHECK(sparse_.get());
return sparse_->ReadyToUse(callback);
}
@@ -791,7 +791,7 @@ int32 EntryImpl::GetDataSize(int index) const {
}
int EntryImpl::ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!callback)
return ReadDataImpl(index, offset, buf, buf_len, callback);
@@ -812,7 +812,7 @@ int EntryImpl::ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
}
int EntryImpl::WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback, bool truncate) {
+ OldCompletionCallback* callback, bool truncate) {
if (!callback)
return WriteDataImpl(index, offset, buf, buf_len, callback, truncate);
@@ -829,7 +829,7 @@ int EntryImpl::WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
}
int EntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!callback)
return ReadSparseDataImpl(offset, buf, buf_len, callback);
@@ -839,7 +839,7 @@ int EntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
}
int EntryImpl::WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!callback)
return WriteSparseDataImpl(offset, buf, buf_len, callback);
@@ -849,7 +849,7 @@ int EntryImpl::WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
}
int EntryImpl::GetAvailableRange(int64 offset, int len, int64* start,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
backend_->background_queue()->GetAvailableRange(this, offset, len, start,
callback);
return net::ERR_IO_PENDING;
@@ -868,7 +868,7 @@ void EntryImpl::CancelSparseIO() {
backend_->background_queue()->CancelSparseIO(this);
}
-int EntryImpl::ReadyForSparseIO(net::CompletionCallback* callback) {
+int EntryImpl::ReadyForSparseIO(net::OldCompletionCallback* callback) {
if (!sparse_.get())
return net::OK;
@@ -929,7 +929,7 @@ EntryImpl::~EntryImpl() {
// ------------------------------------------------------------------------
int EntryImpl::InternalReadData(int index, int offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback) {
+ int buf_len, OldCompletionCallback* callback) {
DCHECK(node_.Data()->dirty || read_only_);
DVLOG(2) << "Read from " << index << " at " << offset << " : " << buf_len;
if (index < 0 || index >= kNumStreams)
@@ -999,7 +999,7 @@ int EntryImpl::InternalReadData(int index, int offset, net::IOBuffer* buf,
}
int EntryImpl::InternalWriteData(int index, int offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback,
+ int buf_len, OldCompletionCallback* callback,
bool truncate) {
DCHECK(node_.Data()->dirty || read_only_);
DVLOG(2) << "Write to " << index << " at " << offset << " : " << buf_len;
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index c0fb5e1..16657af 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -38,16 +38,16 @@ class NET_EXPORT_PRIVATE EntryImpl
// Background implementation of the Entry interface.
void DoomImpl();
int ReadDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
int WriteDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback, bool truncate);
+ OldCompletionCallback* callback, bool truncate);
int ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
int WriteSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
int GetAvailableRangeImpl(int64 offset, int len, int64* start);
void CancelSparseIOImpl();
- int ReadyForSparseIOImpl(CompletionCallback* callback);
+ int ReadyForSparseIOImpl(OldCompletionCallback* callback);
inline CacheEntryBlock* entry() {
return &entry_;
@@ -145,19 +145,19 @@ class NET_EXPORT_PRIVATE EntryImpl
virtual base::Time GetLastModified() const;
virtual int32 GetDataSize(int index) const;
virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback,
+ net::OldCompletionCallback* completion_callback,
bool truncate);
virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int GetAvailableRange(int64 offset, int len, int64* start,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual bool CouldBeSparse() const;
virtual void CancelSparseIO();
- virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback);
+ virtual int ReadyForSparseIO(net::OldCompletionCallback* completion_callback);
private:
enum {
@@ -170,9 +170,9 @@ class NET_EXPORT_PRIVATE EntryImpl
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
int InternalReadData(int index, int offset, net::IOBuffer* buf,
- int buf_len, CompletionCallback* callback);
+ int buf_len, OldCompletionCallback* callback);
int InternalWriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback, bool truncate);
+ OldCompletionCallback* callback, bool truncate);
// Initializes the storage for an internal or external data block.
bool CreateDataBlock(int index, int size);
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 25cd66c..1374101 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -1141,7 +1141,7 @@ TEST_F(DiskCacheEntryTest, ReadWriteDestroyBuffer) {
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(kSize));
CacheTestFillBuffer(buffer->data(), kSize, false);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
EXPECT_EQ(net::ERR_IO_PENDING,
entry->WriteData(0, 0, buffer, kSize, &cb, false));
@@ -1276,7 +1276,7 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyEnumerationWithSparseEntries) {
// Writes |buf_1| to offset and reads it back as |buf_2|.
void VerifySparseIO(disk_cache::Entry* entry, int64 offset,
net::IOBuffer* buf_1, int size, net::IOBuffer* buf_2) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
memset(buf_2->data(), 0, size);
int ret = entry->ReadSparseData(offset, buf_2, size, &cb);
@@ -1295,7 +1295,7 @@ void VerifySparseIO(disk_cache::Entry* entry, int64 offset,
// same as the content of the provided |buffer|.
void VerifyContentSparseIO(disk_cache::Entry* entry, int64 offset, char* buffer,
int size) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
scoped_refptr<net::IOBuffer> buf_1(new net::IOBuffer(size));
memset(buf_1->data(), 0, size);
@@ -1392,7 +1392,7 @@ void DiskCacheEntryTest::GetAvailableRange() {
// We stop at the first empty block.
int64 start;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->GetAvailableRange(0x20F0000, kSize * 2, &start, &cb);
EXPECT_EQ(kSize, cb.GetResult(rv));
EXPECT_EQ(0x20F0000, start);
@@ -1538,7 +1538,7 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyMisalignedGetAvailableRange) {
EXPECT_EQ(8192, entry->WriteSparseData(50000, buf, 8192, NULL));
int64 start;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
// Test that we stop at a discontinuous child at the second block.
int rv = entry->GetAvailableRange(0, 10000, &start, &cb);
EXPECT_EQ(1024, cb.GetResult(rv));
@@ -1685,22 +1685,22 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyDoomSparseEntry) {
DoomSparseEntry();
}
-// A CompletionCallback that deletes the cache from within the callback. The way
-// a TestCompletionCallback works means that all tasks (even new ones) are
+// A OldCompletionCallback that deletes the cache from within the callback. The way
+// a TestOldCompletionCallback works means that all tasks (even new ones) are
// executed by the message loop before returning to the caller so the only way
// to simulate a race is to execute what we want on the callback.
-class SparseTestCompletionCallback : public TestCompletionCallback {
+class SparseTestOldCompletionCallback : public TestOldCompletionCallback {
public:
- explicit SparseTestCompletionCallback(disk_cache::Backend* cache)
+ explicit SparseTestOldCompletionCallback(disk_cache::Backend* cache)
: cache_(cache) {}
virtual void RunWithParams(const Tuple1<int>& params) {
delete cache_;
- TestCompletionCallback::RunWithParams(params);
+ TestOldCompletionCallback::RunWithParams(params);
}
private:
disk_cache::Backend* cache_;
- DISALLOW_COPY_AND_ASSIGN(SparseTestCompletionCallback);
+ DISALLOW_COPY_AND_ASSIGN(SparseTestOldCompletionCallback);
};
// Tests that we don't crash when the backend is deleted while we are working
@@ -1726,7 +1726,7 @@ TEST_F(DiskCacheEntryTest, DoomSparseEntry2) {
EXPECT_EQ(9, cache_->GetEntryCount());
entry->Close();
- SparseTestCompletionCallback cb(cache_);
+ SparseTestOldCompletionCallback cb(cache_);
int rv = cache_->DoomEntry(key, &cb);
EXPECT_EQ(net::ERR_IO_PENDING, rv);
EXPECT_EQ(net::OK, cb.WaitForResult());
@@ -1771,7 +1771,7 @@ void DiskCacheEntryTest::PartialSparseEntry() {
int rv;
int64 start;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
if (memory_only_) {
rv = entry->GetAvailableRange(0, 600, &start, &cb);
EXPECT_EQ(100, cb.GetResult(rv));
@@ -1893,7 +1893,7 @@ TEST_F(DiskCacheEntryTest, CancelSparseIO) {
CacheTestFillBuffer(buf->data(), kSize, false);
// This will open and write two "real" entries.
- TestCompletionCallback cb1, cb2, cb3, cb4, cb5;
+ TestOldCompletionCallback cb1, cb2, cb3, cb4, cb5;
int rv = entry->WriteSparseData(1024 * 1024 - 4096, buf, kSize, &cb1);
EXPECT_EQ(net::ERR_IO_PENDING, rv);
diff --git a/net/disk_cache/in_flight_backend_io.cc b/net/disk_cache/in_flight_backend_io.cc
index 259d888..ea84561 100644
--- a/net/disk_cache/in_flight_backend_io.cc
+++ b/net/disk_cache/in_flight_backend_io.cc
@@ -14,7 +14,7 @@
namespace disk_cache {
BackendIO::BackendIO(InFlightIO* controller, BackendImpl* backend,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: BackgroundIO(controller), backend_(backend), callback_(callback),
operation_(OP_NONE),
ALLOW_THIS_IN_INITIALIZER_LIST(
@@ -299,34 +299,34 @@ InFlightBackendIO::InFlightBackendIO(BackendImpl* backend,
InFlightBackendIO::~InFlightBackendIO() {
}
-void InFlightBackendIO::Init(CompletionCallback* callback) {
+void InFlightBackendIO::Init(OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->Init();
PostOperation(operation);
}
void InFlightBackendIO::OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->OpenEntry(key, entry);
PostOperation(operation);
}
void InFlightBackendIO::CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->CreateEntry(key, entry);
PostOperation(operation);
}
void InFlightBackendIO::DoomEntry(const std::string& key,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntry(key);
PostOperation(operation);
}
-void InFlightBackendIO::DoomAllEntries(CompletionCallback* callback) {
+void InFlightBackendIO::DoomAllEntries(OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomAllEntries();
PostOperation(operation);
@@ -334,28 +334,28 @@ void InFlightBackendIO::DoomAllEntries(CompletionCallback* callback) {
void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntriesBetween(initial_time, end_time);
PostOperation(operation);
}
void InFlightBackendIO::DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntriesSince(initial_time);
PostOperation(operation);
}
void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->OpenNextEntry(iter, next_entry);
PostOperation(operation);
}
void InFlightBackendIO::OpenPrevEntry(void** iter, Entry** prev_entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->OpenPrevEntry(iter, prev_entry);
PostOperation(operation);
@@ -385,13 +385,13 @@ void InFlightBackendIO::DoomEntryImpl(EntryImpl* entry) {
PostOperation(operation);
}
-void InFlightBackendIO::FlushQueue(net::CompletionCallback* callback) {
+void InFlightBackendIO::FlushQueue(net::OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->FlushQueue();
PostOperation(operation);
}
-void InFlightBackendIO::RunTask(Task* task, net::CompletionCallback* callback) {
+void InFlightBackendIO::RunTask(Task* task, net::OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->RunTask(task);
PostOperation(operation);
@@ -399,7 +399,7 @@ void InFlightBackendIO::RunTask(Task* task, net::CompletionCallback* callback) {
void InFlightBackendIO::ReadData(EntryImpl* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadData(entry, index, offset, buf, buf_len);
PostOperation(operation);
@@ -408,7 +408,7 @@ void InFlightBackendIO::ReadData(EntryImpl* entry, int index, int offset,
void InFlightBackendIO::WriteData(EntryImpl* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
bool truncate,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->WriteData(entry, index, offset, buf, buf_len, truncate);
PostOperation(operation);
@@ -416,7 +416,7 @@ void InFlightBackendIO::WriteData(EntryImpl* entry, int index, int offset,
void InFlightBackendIO::ReadSparseData(EntryImpl* entry, int64 offset,
net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadSparseData(entry, offset, buf, buf_len);
PostOperation(operation);
@@ -424,7 +424,7 @@ void InFlightBackendIO::ReadSparseData(EntryImpl* entry, int64 offset,
void InFlightBackendIO::WriteSparseData(EntryImpl* entry, int64 offset,
net::IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->WriteSparseData(entry, offset, buf, buf_len);
PostOperation(operation);
@@ -432,7 +432,7 @@ void InFlightBackendIO::WriteSparseData(EntryImpl* entry, int64 offset,
void InFlightBackendIO::GetAvailableRange(EntryImpl* entry, int64 offset,
int len, int64* start,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->GetAvailableRange(entry, offset, len, start);
PostOperation(operation);
@@ -445,7 +445,7 @@ void InFlightBackendIO::CancelSparseIO(EntryImpl* entry) {
}
void InFlightBackendIO::ReadyForSparseIO(EntryImpl* entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadyForSparseIO(entry);
PostOperation(operation);
diff --git a/net/disk_cache/in_flight_backend_io.h b/net/disk_cache/in_flight_backend_io.h
index f90c286..71ffa38 100644
--- a/net/disk_cache/in_flight_backend_io.h
+++ b/net/disk_cache/in_flight_backend_io.h
@@ -26,7 +26,7 @@ class EntryImpl;
class BackendIO : public BackgroundIO {
public:
BackendIO(InFlightIO* controller, BackendImpl* backend,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Runs the actual operation on the background thread.
void ExecuteOperation();
@@ -37,7 +37,7 @@ class BackendIO : public BackgroundIO {
// Returns true if this operation is directed to an entry (vs. the backend).
bool IsEntryOperation();
- net::CompletionCallback* callback() { return callback_; }
+ net::OldCompletionCallback* callback() { return callback_; }
// Grabs an extra reference of entry_.
void ReferenceEntry();
@@ -113,9 +113,9 @@ class BackendIO : public BackgroundIO {
void ExecuteEntryOperation();
BackendImpl* backend_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
Operation operation_;
- net::CompletionCallbackImpl<BackendIO> my_callback_;
+ net::OldCompletionCallbackImpl<BackendIO> my_callback_;
// The arguments of all the operations we proxy:
std::string key_;
@@ -146,40 +146,40 @@ class InFlightBackendIO : public InFlightIO {
virtual ~InFlightBackendIO();
// The operations we proxy:
- void Init(net::CompletionCallback* callback);
+ void Init(net::OldCompletionCallback* callback);
void OpenEntry(const std::string& key, Entry** entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void CreateEntry(const std::string& key, Entry** entry,
- net::CompletionCallback* callback);
- void DoomEntry(const std::string& key, net::CompletionCallback* callback);
- void DoomAllEntries(net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
+ void DoomEntry(const std::string& key, net::OldCompletionCallback* callback);
+ void DoomAllEntries(net::OldCompletionCallback* callback);
void DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void DoomEntriesSince(const base::Time initial_time,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void OpenNextEntry(void** iter, Entry** next_entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void OpenPrevEntry(void** iter, Entry** prev_entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void EndEnumeration(void* iterator);
void OnExternalCacheHit(const std::string& key);
void CloseEntryImpl(EntryImpl* entry);
void DoomEntryImpl(EntryImpl* entry);
- void FlushQueue(net::CompletionCallback* callback);
- void RunTask(Task* task, net::CompletionCallback* callback);
+ void FlushQueue(net::OldCompletionCallback* callback);
+ void RunTask(Task* task, net::OldCompletionCallback* callback);
void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* callback);
+ int buf_len, net::OldCompletionCallback* callback);
void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
- int buf_len, bool truncate, net::CompletionCallback* callback);
+ int buf_len, bool truncate, net::OldCompletionCallback* callback);
void ReadSparseData(EntryImpl* entry, int64 offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* callback);
+ int buf_len, net::OldCompletionCallback* callback);
void WriteSparseData(EntryImpl* entry, int64 offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* callback);
+ int buf_len, net::OldCompletionCallback* callback);
void GetAvailableRange(EntryImpl* entry, int64 offset, int len, int64* start,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void CancelSparseIO(EntryImpl* entry);
- void ReadyForSparseIO(EntryImpl* entry, net::CompletionCallback* callback);
+ void ReadyForSparseIO(EntryImpl* entry, net::OldCompletionCallback* callback);
// Blocks until all operations are cancelled or completed.
void WaitForPendingIO();
diff --git a/net/disk_cache/mem_backend_impl.cc b/net/disk_cache/mem_backend_impl.cc
index 2f7713b..f08b316 100644
--- a/net/disk_cache/mem_backend_impl.cc
+++ b/net/disk_cache/mem_backend_impl.cc
@@ -129,7 +129,7 @@ int32 MemBackendImpl::GetEntryCount() const {
}
int MemBackendImpl::OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (OpenEntry(key, entry))
return net::OK;
@@ -137,7 +137,7 @@ int MemBackendImpl::OpenEntry(const std::string& key, Entry** entry,
}
int MemBackendImpl::CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (CreateEntry(key, entry))
return net::OK;
@@ -145,14 +145,14 @@ int MemBackendImpl::CreateEntry(const std::string& key, Entry** entry,
}
int MemBackendImpl::DoomEntry(const std::string& key,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (DoomEntry(key))
return net::OK;
return net::ERR_FAILED;
}
-int MemBackendImpl::DoomAllEntries(CompletionCallback* callback) {
+int MemBackendImpl::DoomAllEntries(OldCompletionCallback* callback) {
if (DoomAllEntries())
return net::OK;
@@ -161,7 +161,7 @@ int MemBackendImpl::DoomAllEntries(CompletionCallback* callback) {
int MemBackendImpl::DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (DoomEntriesBetween(initial_time, end_time))
return net::OK;
@@ -169,7 +169,7 @@ int MemBackendImpl::DoomEntriesBetween(const base::Time initial_time,
}
int MemBackendImpl::DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (DoomEntriesSince(initial_time))
return net::OK;
@@ -177,7 +177,7 @@ int MemBackendImpl::DoomEntriesSince(const base::Time initial_time,
}
int MemBackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (OpenNextEntry(iter, next_entry))
return net::OK;
diff --git a/net/disk_cache/mem_backend_impl.h b/net/disk_cache/mem_backend_impl.h
index 68e4508..239d7e0 100644
--- a/net/disk_cache/mem_backend_impl.h
+++ b/net/disk_cache/mem_backend_impl.h
@@ -65,18 +65,18 @@ class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
// Backend interface.
virtual int32 GetEntryCount() const;
virtual int OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
- virtual int DoomEntry(const std::string& key, CompletionCallback* callback);
- virtual int DoomAllEntries(CompletionCallback* callback);
+ OldCompletionCallback* callback);
+ virtual int DoomEntry(const std::string& key, OldCompletionCallback* callback);
+ virtual int DoomAllEntries(OldCompletionCallback* callback);
virtual int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual void EndEnumeration(void** iter);
virtual void GetStats(
std::vector<std::pair<std::string, std::string> >* stats) {}
diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/mem_entry_impl.cc
index f1267ce..677cd6a 100644
--- a/net/disk_cache/mem_entry_impl.cc
+++ b/net/disk_cache/mem_entry_impl.cc
@@ -167,7 +167,7 @@ int32 MemEntryImpl::GetDataSize(int index) const {
}
int MemEntryImpl::ReadData(int index, int offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* completion_callback) {
+ int buf_len, net::OldCompletionCallback* completion_callback) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_READ_DATA,
@@ -186,7 +186,7 @@ int MemEntryImpl::ReadData(int index, int offset, net::IOBuffer* buf,
}
int MemEntryImpl::WriteData(int index, int offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* completion_callback, bool truncate) {
+ int buf_len, net::OldCompletionCallback* completion_callback, bool truncate) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_ENTRY_WRITE_DATA,
@@ -205,7 +205,7 @@ int MemEntryImpl::WriteData(int index, int offset, net::IOBuffer* buf,
}
int MemEntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_SPARSE_READ,
@@ -219,7 +219,7 @@ int MemEntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
}
int MemEntryImpl::WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(net::NetLog::TYPE_SPARSE_WRITE,
make_scoped_refptr(
@@ -232,7 +232,7 @@ int MemEntryImpl::WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
}
int MemEntryImpl::GetAvailableRange(int64 offset, int len, int64* start,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (net_log_.IsLoggingAllEvents()) {
net_log_.BeginEvent(
net::NetLog::TYPE_SPARSE_GET_RANGE,
@@ -255,7 +255,7 @@ bool MemEntryImpl::CouldBeSparse() const {
}
int MemEntryImpl::ReadyForSparseIO(
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
return net::OK;
}
diff --git a/net/disk_cache/mem_entry_impl.h b/net/disk_cache/mem_entry_impl.h
index db46c4d..7c4efc4 100644
--- a/net/disk_cache/mem_entry_impl.h
+++ b/net/disk_cache/mem_entry_impl.h
@@ -99,19 +99,19 @@ class MemEntryImpl : public Entry {
virtual base::Time GetLastModified() const;
virtual int32 GetDataSize(int index) const;
virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback,
+ net::OldCompletionCallback* completion_callback,
bool truncate);
virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback);
+ net::OldCompletionCallback* completion_callback);
virtual int GetAvailableRange(int64 offset, int len, int64* start,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual bool CouldBeSparse() const;
virtual void CancelSparseIO() {}
- virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback);
+ virtual int ReadyForSparseIO(net::OldCompletionCallback* completion_callback);
private:
typedef base::hash_map<int, MemEntryImpl*> EntryMap;
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc
index 3043d2b..af94f98 100644
--- a/net/disk_cache/sparse_control.cc
+++ b/net/disk_cache/sparse_control.cc
@@ -233,7 +233,7 @@ bool SparseControl::CouldBeSparse() const {
}
int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* callback) {
+ int buf_len, net::OldCompletionCallback* callback) {
DCHECK(init_);
// We don't support simultaneous IO for sparse data.
if (operation_ != kNoOperation)
@@ -308,7 +308,7 @@ void SparseControl::CancelIO() {
abort_ = true;
}
-int SparseControl::ReadyToUse(net::CompletionCallback* completion_callback) {
+int SparseControl::ReadyToUse(net::OldCompletionCallback* completion_callback) {
if (!abort_)
return net::OK;
@@ -690,7 +690,7 @@ bool SparseControl::DoChildIO() {
// We have more work to do. Let's not trigger a callback to the caller.
finished_ = false;
- net::CompletionCallback* callback = user_callback_ ? &child_callback_ : NULL;
+ net::OldCompletionCallback* callback = user_callback_ ? &child_callback_ : NULL;
int rv = 0;
switch (operation_) {
@@ -836,7 +836,7 @@ void SparseControl::OnChildIOCompleted(int result) {
void SparseControl::DoUserCallback() {
DCHECK(user_callback_);
- net::CompletionCallback* c = user_callback_;
+ net::OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
user_buf_ = NULL;
pending_ = false;
@@ -850,7 +850,7 @@ void SparseControl::DoAbortCallbacks() {
for (size_t i = 0; i < abort_callbacks_.size(); i++) {
// Releasing all references to entry_ may result in the destruction of this
// object so we should not be touching it after the last Release().
- net::CompletionCallback* c = abort_callbacks_[i];
+ net::OldCompletionCallback* c = abort_callbacks_[i];
if (i == abort_callbacks_.size() - 1)
abort_callbacks_.clear();
diff --git a/net/disk_cache/sparse_control.h b/net/disk_cache/sparse_control.h
index 15704df..98829bd 100644
--- a/net/disk_cache/sparse_control.h
+++ b/net/disk_cache/sparse_control.h
@@ -59,7 +59,7 @@ class SparseControl {
// WriteSparseData for details about the arguments. The return value is the
// number of bytes read or written, or a net error code.
int StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* callback);
+ int buf_len, net::OldCompletionCallback* callback);
// Implements Entry::GetAvailableRange().
int GetAvailableRange(int64 offset, int len, int64* start);
@@ -70,7 +70,7 @@ class SparseControl {
// Returns OK if the entry can be used for new IO or ERR_IO_PENDING if we are
// busy. If the entry is busy, we'll invoke the callback when we are ready
// again. See disk_cache::Entry::ReadyToUse() for more info.
- int ReadyToUse(net::CompletionCallback* completion_callback);
+ int ReadyToUse(net::OldCompletionCallback* completion_callback);
// Deletes the children entries of |entry|.
static void DeleteChildren(EntryImpl* entry);
@@ -159,9 +159,9 @@ class SparseControl {
SparseData child_data_; // Parent and allocation map of child_.
Bitmap child_map_; // The allocation map as a bitmap.
- net::CompletionCallbackImpl<SparseControl> child_callback_;
- net::CompletionCallback* user_callback_;
- std::vector<net::CompletionCallback*> abort_callbacks_;
+ net::OldCompletionCallbackImpl<SparseControl> child_callback_;
+ net::OldCompletionCallback* user_callback_;
+ std::vector<net::OldCompletionCallback*> abort_callbacks_;
int64 offset_; // Current sparse offset.
scoped_refptr<net::DrainableIOBuffer> user_buf_;
int buf_len_; // Bytes to read or write.
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
index 0cd8f43..7fad2ef 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/stress_cache.cc
@@ -99,7 +99,7 @@ void StressTheCache(int iteration) {
base::Thread::Options(MessageLoop::TYPE_IO, 0)))
return;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv = disk_cache::BackendImpl::CreateBackend(
path, false, cache_size, net::DISK_CACHE,
diff --git a/net/dns/async_host_resolver.cc b/net/dns/async_host_resolver.cc
index 27d307e..ed0d70f 100644
--- a/net/dns/async_host_resolver.cc
+++ b/net/dns/async_host_resolver.cc
@@ -86,7 +86,7 @@ class AsyncHostResolver::Request {
const BoundNetLog& request_net_log,
int id,
const HostResolver::RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses)
: resolver_(resolver),
source_net_log_(source_net_log),
@@ -173,7 +173,7 @@ class AsyncHostResolver::Request {
if (result == OK)
*addresses_ = CreateAddressListUsingPort(addresses, info_.port());
DCHECK(callback_);
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
callback_ = NULL;
resolver_->OnFinish(this, result);
callback->Run(result);
@@ -191,7 +191,7 @@ class AsyncHostResolver::Request {
const int id_;
const HostResolver::RequestInfo info_;
Key key_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
AddressList* addresses_;
int result_;
};
@@ -230,7 +230,7 @@ AsyncHostResolver::~AsyncHostResolver() {
int AsyncHostResolver::Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) {
DCHECK(addresses);
@@ -410,7 +410,7 @@ void AsyncHostResolver::OnTransactionComplete(
AsyncHostResolver::Request* AsyncHostResolver::CreateNewRequest(
const RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses,
const BoundNetLog& source_net_log) {
BoundNetLog request_net_log = BoundNetLog::Make(net_log_,
diff --git a/net/dns/async_host_resolver.h b/net/dns/async_host_resolver.h
index aecc403..9906720 100644
--- a/net/dns/async_host_resolver.h
+++ b/net/dns/async_host_resolver.h
@@ -41,7 +41,7 @@ class NET_EXPORT AsyncHostResolver
// HostResolver interface
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) OVERRIDE;
virtual int ResolveFromCache(const RequestInfo& info,
@@ -79,7 +79,7 @@ class NET_EXPORT AsyncHostResolver
// Create a new request for the incoming Resolve() call.
Request* CreateNewRequest(const RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses,
const BoundNetLog& source_net_log);
diff --git a/net/dns/async_host_resolver_unittest.cc b/net/dns/async_host_resolver_unittest.cc
index 95e6e38..7da3bc7 100644
--- a/net/dns/async_host_resolver_unittest.cc
+++ b/net/dns/async_host_resolver_unittest.cc
@@ -148,7 +148,7 @@ class AsyncHostResolverTest : public testing::Test {
TestPrng test_prng_;
RandIntCallback rand_int_cb_;
scoped_ptr<HostResolver> resolver_;
- TestCompletionCallback callback0_, callback1_, callback2_, callback3_;
+ TestOldCompletionCallback callback0_, callback1_, callback2_, callback3_;
};
TEST_F(AsyncHostResolverTest, EmptyHostLookup) {
@@ -455,7 +455,7 @@ TEST_F(AsyncHostResolverTest, OverflowQueueWithHighPriorityLookup) {
HostResolver::RequestInfo info(HostPortPair("cnn.com", 80));
info.set_address_family(ADDRESS_FAMILY_IPV4);
AddressList addrlist_fail;
- TestCompletionCallback callback_fail;
+ TestOldCompletionCallback callback_fail;
int rv_fail = resolver_->Resolve(info, &addrlist_fail, &callback_fail, NULL,
BoundNetLog());
EXPECT_EQ(1u,
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
index 9a33ae4..27da32a 100644
--- a/net/dns/dns_transaction.h
+++ b/net/dns/dns_transaction.h
@@ -135,7 +135,7 @@ class NET_EXPORT_PRIVATE DnsTransaction :
State next_state_;
ClientSocketFactory* socket_factory_;
base::OneShotTimer<DnsTransaction> timer_;
- CompletionCallbackImpl<DnsTransaction> io_callback_;
+ OldCompletionCallbackImpl<DnsTransaction> io_callback_;
BoundNetLog net_log_;
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 4a3a413..56dd311 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -237,12 +237,12 @@ int FtpNetworkTransaction::Stop(int error) {
}
int FtpNetworkTransaction::RestartIgnoringLastError(
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_NOT_IMPLEMENTED;
}
int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
net_log_ = net_log;
request_ = request_info;
@@ -265,7 +265,7 @@ int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info,
int FtpNetworkTransaction::RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
ResetStateForRestart();
username_ = username;
@@ -280,7 +280,7 @@ int FtpNetworkTransaction::RestartWithAuth(const string16& username,
int FtpNetworkTransaction::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
@@ -347,7 +347,7 @@ void FtpNetworkTransaction::DoCallback(int rv) {
DCHECK(user_callback_);
// Since Run may result in Read being called, clear callback_ up front.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index a1637c2..cce5adb 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -34,16 +34,16 @@ class NET_EXPORT_PRIVATE FtpNetworkTransaction : public FtpTransaction {
virtual ~FtpNetworkTransaction();
virtual int Stop(int error);
- virtual int RestartIgnoringLastError(CompletionCallback* callback);
+ virtual int RestartIgnoringLastError(OldCompletionCallback* callback);
// FtpTransaction methods:
virtual int Start(const FtpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) OVERRIDE;
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback) OVERRIDE;
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback)
+ OldCompletionCallback* callback) OVERRIDE;
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
OVERRIDE;
virtual const FtpResponseInfo* GetResponseInfo() const OVERRIDE;
virtual LoadState GetLoadState() const OVERRIDE;
@@ -190,8 +190,8 @@ class NET_EXPORT_PRIVATE FtpNetworkTransaction : public FtpTransaction {
Command command_sent_;
- CompletionCallbackImpl<FtpNetworkTransaction> io_callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<FtpNetworkTransaction> io_callback_;
+ OldCompletionCallback* user_callback_;
scoped_refptr<FtpNetworkSession> session_;
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index f92561d..6739847 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -820,7 +820,7 @@ class FtpNetworkTransactionTest : public PlatformTest {
scoped_refptr<FtpNetworkSession> session_;
MockClientSocketFactory mock_socket_factory_;
FtpNetworkTransaction transaction_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
TEST_F(FtpNetworkTransactionTest, FailedLookup) {
diff --git a/net/ftp/ftp_transaction.h b/net/ftp/ftp_transaction.h
index 2d1c5d8..300468b 100644
--- a/net/ftp/ftp_transaction.h
+++ b/net/ftp/ftp_transaction.h
@@ -29,7 +29,7 @@ class NET_EXPORT_PRIVATE FtpTransaction {
// Returns OK if the transaction could be started synchronously, which means
// that the request was served from the cache (only supported for directory
// listings). ERR_IO_PENDING is returned to indicate that the
- // CompletionCallback will be notified once response info is available or if
+ // OldCompletionCallback will be notified once response info is available or if
// an IO error occurs. Any other return value indicates that the transaction
// could not be started.
//
@@ -40,22 +40,22 @@ class NET_EXPORT_PRIVATE FtpTransaction {
//
// Profiling information for the request is saved to |net_log| if non-NULL.
virtual int Start(const FtpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) = 0;
// Restarts the FTP transaction with authentication credentials.
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Once response info is available for the transaction, response data may be
// read by calling this method.
//
// Response data is copied into the given buffer and the number of bytes
// copied is returned. ERR_IO_PENDING is returned if response data is not
- // yet available. The CompletionCallback is notified when the data copy
+ // yet available. The OldCompletionCallback is notified when the data copy
// completes, and it is passed the number of bytes that were successfully
- // copied. Or, if a read error occurs, the CompletionCallback is notified of
+ // copied. Or, if a read error occurs, the OldCompletionCallback is notified of
// the error. Any other negative return value indicates that the transaction
// could not be read.
//
@@ -63,7 +63,7 @@ class NET_EXPORT_PRIVATE FtpTransaction {
//
virtual int Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Returns the response info for this transaction or NULL if the response
// info is not available.
diff --git a/net/http/disk_cache_based_ssl_host_info.cc b/net/http/disk_cache_based_ssl_host_info.cc
index 55f471d5..0b6d3ae 100644
--- a/net/http/disk_cache_based_ssl_host_info.cc
+++ b/net/http/disk_cache_based_ssl_host_info.cc
@@ -57,7 +57,7 @@ void DiskCacheBasedSSLHostInfo::Start() {
DoLoop(OK);
}
-int DiskCacheBasedSSLHostInfo::WaitForDataReady(CompletionCallback* callback) {
+int DiskCacheBasedSSLHostInfo::WaitForDataReady(OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(state_ != GET_BACKEND);
@@ -101,7 +101,7 @@ std::string DiskCacheBasedSSLHostInfo::key() const {
void DiskCacheBasedSSLHostInfo::OnIOComplete(int rv) {
rv = DoLoop(rv);
if (rv != ERR_IO_PENDING) {
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
if (callback)
callback->Run(rv);
diff --git a/net/http/disk_cache_based_ssl_host_info.h b/net/http/disk_cache_based_ssl_host_info.h
index 56a1f5bb..7adce48 100644
--- a/net/http/disk_cache_based_ssl_host_info.h
+++ b/net/http/disk_cache_based_ssl_host_info.h
@@ -34,7 +34,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedSSLHostInfo
// Implementation of SSLHostInfo
virtual void Start();
- virtual int WaitForDataReady(CompletionCallback* callback);
+ virtual int WaitForDataReady(OldCompletionCallback* callback);
virtual void Persist();
private:
@@ -114,7 +114,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedSSLHostInfo
HttpCache* const http_cache_;
disk_cache::Backend* backend_;
disk_cache::Entry* entry_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
scoped_refptr<IOBuffer> read_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
std::string data_;
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc
index d988f3c..b8eb479 100644
--- a/net/http/http_auth_cache_unittest.cc
+++ b/net/http/http_auth_cache_unittest.cc
@@ -43,7 +43,7 @@ class MockAuthHandler : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16*,
const string16*,
const HttpRequestInfo*,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
*auth_token = "mock-credentials";
return OK;
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 4899a0c..d0ff551 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -173,7 +173,7 @@ HttpAuthController::~HttpAuthController() {
}
int HttpAuthController::MaybeGenerateAuthToken(const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
DCHECK(CalledOnValidThread());
bool needs_auth = HaveAuth() || SelectPreemptiveAuth(net_log);
@@ -552,7 +552,7 @@ void HttpAuthController::OnIOComplete(int result) {
if (DisableOnAuthHandlerResult(result))
result = OK;
if (user_callback_) {
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(result);
}
diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h
index 8dc9886..45a1339 100644
--- a/net/http/http_auth_controller.h
+++ b/net/http/http_auth_controller.h
@@ -45,7 +45,7 @@ class NET_EXPORT_PRIVATE HttpAuthController
// a token is correctly generated synchronously, as well as when no tokens
// were necessary.
virtual int MaybeGenerateAuthToken(const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
// Adds either the proxy auth header, or the origin server auth header,
@@ -164,8 +164,8 @@ class NET_EXPORT_PRIVATE HttpAuthController
std::set<HttpAuth::Scheme> disabled_schemes_;
- CompletionCallbackImpl<HttpAuthController> io_callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<HttpAuthController> io_callback_;
+ OldCompletionCallback* user_callback_;
};
} // namespace net
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index f93b698..d1c82dc 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -77,7 +77,7 @@ void RunSingleRoundAuthTest(HandlerRunMode run_mode,
controller->ResetAuth(string16(), string16());
EXPECT_TRUE(controller->HaveAuth());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ((run_mode == RUN_HANDLER_ASYNC)? ERR_IO_PENDING:
expected_controller_rv,
controller->MaybeGenerateAuthToken(&request, &callback,
@@ -145,7 +145,7 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) OVERRIDE {
int result =
HttpAuthHandlerMock::GenerateAuthTokenImpl(username, password,
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index d123c21..3ba4109 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -65,7 +65,7 @@ NetLog::EventType EventTypeFromAuthTarget(HttpAuth::Target target) {
int HttpAuthHandler::GenerateAuthToken(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
// TODO(cbentzel): Enforce non-NULL callback after cleaning up SocketStream.
DCHECK(request);
@@ -95,7 +95,7 @@ bool HttpAuthHandler::AllowsExplicitCredentials() {
}
void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) {
- CompletionCallback* callback = original_callback_;
+ OldCompletionCallback* callback = original_callback_;
FinishGenerateAuthToken();
if (callback)
callback->Run(rv);
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index 00f45f2..a78ae0c 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -73,7 +73,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
int GenerateAuthToken(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
// The authentication scheme as an enumerated value.
@@ -160,7 +160,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) = 0;
// The auth-scheme as an enumerated value.
@@ -192,8 +192,8 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
void OnGenerateAuthTokenComplete(int rv);
void FinishGenerateAuthToken();
- CompletionCallback* original_callback_;
- CompletionCallbackImpl<HttpAuthHandler> wrapper_callback_;
+ OldCompletionCallback* original_callback_;
+ OldCompletionCallbackImpl<HttpAuthHandler> wrapper_callback_;
};
} // namespace net
diff --git a/net/http/http_auth_handler_basic.cc b/net/http/http_auth_handler_basic.cc
index a618651..5303ac3 100644
--- a/net/http/http_auth_handler_basic.cc
+++ b/net/http/http_auth_handler_basic.cc
@@ -89,7 +89,7 @@ int HttpAuthHandlerBasic::GenerateAuthTokenImpl(
const string16* username,
const string16* password,
const HttpRequestInfo*,
- CompletionCallback*,
+ OldCompletionCallback*,
std::string* auth_token) {
// TODO(eroman): is this the right encoding of username/password?
std::string base64_username_password;
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index 1df5367..ab1d397 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -41,7 +41,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerBasic : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
private:
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index fe93479..58c3c32 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -140,7 +140,7 @@ int HttpAuthHandlerDigest::GenerateAuthTokenImpl(
const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
// Generate a random client nonce.
std::string cnonce = nonce_generator_->GenerateNonce();
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index c1c5a21..1358a4a 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -87,7 +87,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerDigest : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
private:
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc
index 302eaa1..1f154ca 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -63,8 +63,8 @@ bool RespondToChallenge(HttpAuth::Target target,
// Create a token in response to the challenge.
// NOTE: HttpAuthHandlerDigest's implementation of GenerateAuthToken always
// completes synchronously. That's why this test can get away with a
- // TestCompletionCallback without an IO thread.
- TestCompletionCallback callback;
+ // TestOldCompletionCallback without an IO thread.
+ TestOldCompletionCallback callback;
scoped_ptr<HttpRequestInfo> request(new HttpRequestInfo());
request->url = GURL(request_url);
const string16 kFoo = ASCIIToUTF16("foo");
diff --git a/net/http/http_auth_handler_mock.cc b/net/http/http_auth_handler_mock.cc
index 9331ae7..c7c70a8 100644
--- a/net/http/http_auth_handler_mock.cc
+++ b/net/http/http_auth_handler_mock.cc
@@ -46,7 +46,7 @@ bool HttpAuthHandlerMock::NeedsCanonicalName() {
}
int HttpAuthHandlerMock::ResolveCanonicalName(HostResolver* host_resolver,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
EXPECT_NE(RESOLVE_TESTED, resolve_);
int rv = OK;
switch (resolve_) {
@@ -106,7 +106,7 @@ bool HttpAuthHandlerMock::Init(HttpAuth::ChallengeTokenizer* challenge) {
int HttpAuthHandlerMock::GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
first_round_ = false;
request_url_ = request->url;
@@ -130,7 +130,7 @@ void HttpAuthHandlerMock::OnResolveCanonicalName() {
EXPECT_EQ(RESOLVE_ASYNC, resolve_);
EXPECT_TRUE(user_callback_ != NULL);
resolve_ = RESOLVE_TESTED;
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
callback->Run(OK);
}
@@ -141,7 +141,7 @@ void HttpAuthHandlerMock::OnGenerateAuthToken() {
if (generate_rv_ == OK)
*auth_token_ = "auth_token";
auth_token_ = NULL;
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
callback->Run(generate_rv_);
}
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index 1406239..7d7a2cb 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -66,7 +66,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
virtual bool NeedsCanonicalName();
virtual int ResolveCanonicalName(HostResolver* host_resolver,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
void SetGenerateExpectation(bool async, int rv);
@@ -100,7 +100,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
private:
@@ -109,7 +109,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
void OnGenerateAuthToken();
Resolve resolve_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
ScopedRunnableMethodFactory<HttpAuthHandlerMock> method_factory_;
bool generate_async_;
int generate_rv_;
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index d5d0f80..b499c5b 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -215,7 +215,7 @@ int HttpAuthHandlerNegotiate::GenerateAuthTokenImpl(
const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
DCHECK(user_callback_ == NULL);
DCHECK((username == NULL) == (password == NULL));
@@ -250,7 +250,7 @@ void HttpAuthHandlerNegotiate::OnIOComplete(int result) {
void HttpAuthHandlerNegotiate::DoCallback(int rv) {
DCHECK(rv != ERR_IO_PENDING);
DCHECK(user_callback_);
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
callback->Run(rv);
}
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index 2397bdb..4b04f7b 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -119,7 +119,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
private:
@@ -144,7 +144,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
AuthSystem auth_system_;
bool disable_cname_lookup_;
bool use_port_;
- CompletionCallbackImpl<HttpAuthHandlerNegotiate> io_callback_;
+ OldCompletionCallbackImpl<HttpAuthHandlerNegotiate> io_callback_;
HostResolver* const resolver_;
// Members which are needed for DNS lookup + SPN.
@@ -159,7 +159,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
std::wstring spn_;
// Things which vary each round.
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
std::string* auth_token_;
State next_state_;
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index 63eab92..e43d994 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -220,7 +220,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCname) {
true, false, true, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(NULL, NULL,
@@ -239,7 +239,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
EXPECT_EQ(OK, CreateHandler(
true, true, true, "http://alias:80", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(NULL, NULL,
@@ -258,7 +258,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
EXPECT_EQ(OK, CreateHandler(
true, true, true, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(NULL, NULL,
@@ -277,7 +277,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, CnameSync) {
EXPECT_EQ(OK, CreateHandler(
false, false, true, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(NULL, NULL,
@@ -296,7 +296,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, CnameAsync) {
EXPECT_EQ(OK, CreateHandler(
false, false, false, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(ERR_IO_PENDING, auth_handler->GenerateAuthToken(
@@ -319,7 +319,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, ServerNotInKerberosDatabase) {
EXPECT_EQ(OK, CreateHandler(
false, false, false, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(ERR_IO_PENDING, auth_handler->GenerateAuthToken(
@@ -335,7 +335,7 @@ TEST_F(HttpAuthHandlerNegotiateTest, NoKerberosCredentials) {
EXPECT_EQ(OK, CreateHandler(
false, false, false, "http://alias:500", &auth_handler));
ASSERT_TRUE(auth_handler.get() != NULL);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
std::string token;
EXPECT_EQ(ERR_IO_PENDING, auth_handler->GenerateAuthToken(
diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc
index 5090918..91fff61 100644
--- a/net/http/http_auth_handler_ntlm.cc
+++ b/net/http/http_auth_handler_ntlm.cc
@@ -32,7 +32,7 @@ int HttpAuthHandlerNTLM::GenerateAuthTokenImpl(
const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token) {
#if defined(NTLM_SSPI)
return auth_sspi_.GenerateAuthToken(
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index d0285dc..d3820f8 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -121,7 +121,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
virtual int GenerateAuthTokenImpl(const string16* username,
const string16* password,
const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
std::string* auth_token);
private:
diff --git a/net/http/http_auth_handler_unittest.cc b/net/http/http_auth_handler_unittest.cc
index c3d0114..9b3de57 100644
--- a/net/http/http_auth_handler_unittest.cc
+++ b/net/http/http_auth_handler_unittest.cc
@@ -30,7 +30,7 @@ TEST(HttpAuthHandlerTest, NetLog) {
for (int j = 0; j < 2; ++j) {
int rv = (j == 0) ? OK : ERR_UNEXPECTED;
for (int k = 0; k < 2; ++k) {
- TestCompletionCallback test_callback;
+ TestOldCompletionCallback test_callback;
HttpAuth::Target target =
(k == 0) ? HttpAuth::AUTH_PROXY : HttpAuth::AUTH_SERVER;
NetLog::EventType event_type =
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
index 7c79d40..eb5ecc2 100644
--- a/net/http/http_basic_stream.cc
+++ b/net/http/http_basic_stream.cc
@@ -34,7 +34,7 @@ HttpBasicStream::~HttpBasicStream() {}
int HttpBasicStream::InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& net_log,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!parser_.get());
request_info_ = request_info;
parser_.reset(new HttpStreamParser(connection_.get(), request_info,
@@ -47,7 +47,7 @@ int HttpBasicStream::InitializeStream(const HttpRequestInfo* request_info,
int HttpBasicStream::SendRequest(const HttpRequestHeaders& headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(parser_.get());
DCHECK(request_info_);
const std::string path = using_proxy_ ?
@@ -65,7 +65,7 @@ uint64 HttpBasicStream::GetUploadProgress() const {
return parser_->GetUploadProgress();
}
-int HttpBasicStream::ReadResponseHeaders(CompletionCallback* callback) {
+int HttpBasicStream::ReadResponseHeaders(OldCompletionCallback* callback) {
return parser_->ReadResponseHeaders(callback);
}
@@ -74,7 +74,7 @@ const HttpResponseInfo* HttpBasicStream::GetResponseInfo() const {
}
int HttpBasicStream::ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return parser_->ReadResponseBody(buf, buf_len, callback);
}
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h
index 303d68f..3b38b93 100644
--- a/net/http/http_basic_stream.h
+++ b/net/http/http_basic_stream.h
@@ -42,21 +42,21 @@ class HttpBasicStream : public HttpStream {
// HttpStream methods:
virtual int InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& net_log,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual int SendRequest(const HttpRequestHeaders& headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual uint64 GetUploadProgress() const OVERRIDE;
- virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE;
+ virtual int ReadResponseHeaders(OldCompletionCallback* callback) OVERRIDE;
virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE;
virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Close(bool not_reusable) OVERRIDE;
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 91ba1f3..9a23aab 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -88,7 +88,7 @@ HttpCache::BackendFactory* HttpCache::DefaultBackend::InMemory(int max_bytes) {
int HttpCache::DefaultBackend::CreateBackend(NetLog* net_log,
disk_cache::Backend** backend,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK_GE(max_bytes_, 0);
return disk_cache::CreateCacheBackend(type_, path_, max_bytes_, true,
thread_, net_log, backend, callback);
@@ -121,7 +121,7 @@ struct HttpCache::PendingOp {
disk_cache::Entry* disk_entry;
disk_cache::Backend* backend;
WorkItem* writer;
- CompletionCallback* callback; // BackendCallback.
+ OldCompletionCallback* callback; // BackendCallback.
WorkItemList pending_queue;
};
@@ -143,7 +143,7 @@ class HttpCache::WorkItem {
: operation_(operation), trans_(trans), entry_(entry), callback_(NULL),
backend_(NULL) {}
WorkItem(WorkItemOperation operation, Transaction* trans,
- CompletionCallback* cb, disk_cache::Backend** backend)
+ OldCompletionCallback* cb, disk_cache::Backend** backend)
: operation_(operation), trans_(trans), entry_(NULL), callback_(cb),
backend_(backend) {}
~WorkItem() {}
@@ -180,13 +180,13 @@ class HttpCache::WorkItem {
WorkItemOperation operation_;
Transaction* trans_;
ActiveEntry** entry_;
- CompletionCallback* callback_; // User callback.
+ OldCompletionCallback* callback_; // User callback.
disk_cache::Backend** backend_;
};
//-----------------------------------------------------------------------------
-// This class is a specialized type of CompletionCallback that allows us to
+// This class is a specialized type of OldCompletionCallback that allows us to
// pass multiple arguments to the completion routine.
class HttpCache::BackendCallback : public CallbackRunner<Tuple1<int> > {
public:
@@ -241,7 +241,7 @@ class HttpCache::MetadataWriter {
scoped_refptr<IOBuffer> buf_;
int buf_len_;
base::Time expected_response_time_;
- CompletionCallbackImpl<MetadataWriter> callback_;
+ OldCompletionCallbackImpl<MetadataWriter> callback_;
HttpRequestInfo request_info_;
DISALLOW_COPY_AND_ASSIGN(MetadataWriter);
};
@@ -420,7 +420,7 @@ HttpCache::~HttpCache() {
}
int HttpCache::GetBackend(disk_cache::Backend** backend,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback != NULL);
if (disk_cache_.get()) {
@@ -510,7 +510,7 @@ HttpNetworkSession* HttpCache::GetSession() {
//-----------------------------------------------------------------------------
int HttpCache::CreateBackend(disk_cache::Backend** backend,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (!backend_factory_.get())
return ERR_FAILED;
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index c756185..f6b7ffe 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -90,7 +90,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// |callback| because the object can be deleted from within the callback.
virtual int CreateBackend(NetLog* net_log,
disk_cache::Backend** backend,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
};
// A default backend factory for the common use cases.
@@ -109,7 +109,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// BackendFactory implementation.
virtual int CreateBackend(NetLog* net_log,
disk_cache::Backend** backend,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
private:
CacheType type_;
@@ -156,7 +156,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// a network error code, and it could be ERR_IO_PENDING, in which case the
// |callback| will be notified when the operation completes. The pointer that
// receives the |backend| must remain valid until the operation completes.
- int GetBackend(disk_cache::Backend** backend, CompletionCallback* callback);
+ int GetBackend(disk_cache::Backend** backend, OldCompletionCallback* callback);
// Returns the current backend (can be NULL).
disk_cache::Backend* GetCurrentBackend() const;
@@ -242,7 +242,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// Creates the |backend| object and notifies the |callback| when the operation
// completes. Returns an error code.
int CreateBackend(disk_cache::Backend** backend,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Makes sure that the backend creation is complete before allowing the
// provided transaction to use the object. Returns an error code. |trans|
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 9b3b6e8..675564f 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -124,10 +124,10 @@ HttpCache::Transaction::Transaction(HttpCache* cache)
ALLOW_THIS_IN_INITIALIZER_LIST(
io_callback_(this, &Transaction::OnIOComplete)),
ALLOW_THIS_IN_INITIALIZER_LIST(
- cache_callback_(new CancelableCompletionCallback<Transaction>(
+ cache_callback_(new CancelableOldCompletionCallback<Transaction>(
this, &Transaction::OnIOComplete))),
ALLOW_THIS_IN_INITIALIZER_LIST(
- write_headers_callback_(new CancelableCompletionCallback<Transaction>(
+ write_headers_callback_(new CancelableOldCompletionCallback<Transaction>(
this, &Transaction::OnIOComplete))) {
COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders ==
arraysize(kValidationHeaders),
@@ -167,7 +167,7 @@ HttpCache::Transaction::~Transaction() {
}
int HttpCache::Transaction::WriteMetadata(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
DCHECK(callback);
@@ -216,7 +216,7 @@ const BoundNetLog& HttpCache::Transaction::net_log() const {
}
int HttpCache::Transaction::Start(const HttpRequestInfo* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
DCHECK(request);
DCHECK(callback);
@@ -245,7 +245,7 @@ int HttpCache::Transaction::Start(const HttpRequestInfo* request,
}
int HttpCache::Transaction::RestartIgnoringLastError(
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
// Ensure that we only have one asynchronous call at a time.
@@ -264,7 +264,7 @@ int HttpCache::Transaction::RestartIgnoringLastError(
int HttpCache::Transaction::RestartWithCertificate(
X509Certificate* client_cert,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(callback);
// Ensure that we only have one asynchronous call at a time.
@@ -284,7 +284,7 @@ int HttpCache::Transaction::RestartWithCertificate(
int HttpCache::Transaction::RestartWithAuth(
const string16& username,
const string16& password,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(auth_response_.headers);
DCHECK(callback);
@@ -312,7 +312,7 @@ bool HttpCache::Transaction::IsReadyToRestartForAuth() {
}
int HttpCache::Transaction::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
DCHECK(callback);
@@ -406,7 +406,7 @@ void HttpCache::Transaction::DoCallback(int rv) {
DCHECK(callback_);
// Since Run may result in Read being called, clear callback_ up front.
- CompletionCallback* c = callback_;
+ OldCompletionCallback* c = callback_;
callback_ = NULL;
c->Run(rv);
}
@@ -1923,7 +1923,7 @@ int HttpCache::Transaction::ReadFromEntry(IOBuffer* data, int data_len) {
int HttpCache::Transaction::WriteToEntry(int index, int offset,
IOBuffer* data, int data_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (!entry_)
return data_len;
@@ -1979,7 +1979,7 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
}
int HttpCache::Transaction::AppendResponseDataToEntry(
- IOBuffer* data, int data_len, CompletionCallback* callback) {
+ IOBuffer* data, int data_len, OldCompletionCallback* callback) {
if (!entry_ || !data_len)
return data_len;
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index ce6e79e..665f92f 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -80,7 +80,7 @@ class HttpCache::Transaction : public HttpTransaction {
// response (or response info) must be evaluated by the caller, for instance
// to make sure that the response_time is as expected, before calling this
// method.
- int WriteMetadata(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int WriteMetadata(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// This transaction is being deleted and we are not done writing to the cache.
// We need to indicate that the response data was truncated. Returns true on
@@ -93,21 +93,21 @@ class HttpCache::Transaction : public HttpTransaction {
// to the cache entry.
LoadState GetWriterLoadState() const;
- CompletionCallback* io_callback() { return &io_callback_; }
+ OldCompletionCallback* io_callback() { return &io_callback_; }
const BoundNetLog& net_log() const;
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo*, CompletionCallback*,
+ virtual int Start(const HttpRequestInfo*, OldCompletionCallback*,
const BoundNetLog&);
- virtual int RestartIgnoringLastError(CompletionCallback* callback);
+ virtual int RestartIgnoringLastError(OldCompletionCallback* callback);
virtual int RestartWithCertificate(X509Certificate* client_cert,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual bool IsReadyToRestartForAuth();
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual void StopCaching();
virtual void DoneReading();
virtual const HttpResponseInfo* GetResponseInfo() const;
@@ -290,7 +290,7 @@ class HttpCache::Transaction : public HttpTransaction {
// cache entry is destroyed. Future calls to this function will just do
// nothing without side-effect. Returns a network error code.
int WriteToEntry(int index, int offset, IOBuffer* data, int data_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Called to write response_ to the cache entry. |truncated| indicates if the
// entry should be marked as incomplete.
@@ -299,7 +299,7 @@ class HttpCache::Transaction : public HttpTransaction {
// Called to append response data to the cache entry. Returns a network error
// code.
int AppendResponseDataToEntry(IOBuffer* data, int data_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Called when we are done writing to the cache entry.
void DoneWritingToEntry(bool success);
@@ -337,7 +337,7 @@ class HttpCache::Transaction : public HttpTransaction {
base::TimeTicks entry_lock_waiting_since_;
HttpCache::ActiveEntry* new_entry_;
scoped_ptr<HttpTransaction> network_trans_;
- CompletionCallback* callback_; // Consumer's callback.
+ OldCompletionCallback* callback_; // Consumer's callback.
HttpResponseInfo response_;
HttpResponseInfo auth_response_;
const HttpResponseInfo* new_response_;
@@ -359,9 +359,9 @@ class HttpCache::Transaction : public HttpTransaction {
int write_len_;
scoped_ptr<PartialData> partial_; // We are dealing with range requests.
uint64 final_upload_progress_;
- CompletionCallbackImpl<Transaction> io_callback_;
- scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_;
- scoped_refptr<CancelableCompletionCallback<Transaction> >
+ OldCompletionCallbackImpl<Transaction> io_callback_;
+ scoped_refptr<CancelableOldCompletionCallback<Transaction> > cache_callback_;
+ scoped_refptr<CancelableOldCompletionCallback<Transaction> >
write_headers_callback_;
};
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 970b3b6..f912dd5 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -114,7 +114,7 @@ class MockDiskEntry : public disk_cache::Entry,
}
virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(index >= 0 && index < kNumCacheEntryDataIndices);
DCHECK(callback);
@@ -137,7 +137,7 @@ class MockDiskEntry : public disk_cache::Entry,
}
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback, bool truncate) {
+ net::OldCompletionCallback* callback, bool truncate) {
DCHECK(index >= 0 && index < kNumCacheEntryDataIndices);
DCHECK(callback);
DCHECK(truncate);
@@ -162,7 +162,7 @@ class MockDiskEntry : public disk_cache::Entry,
}
virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (!sparse_ || busy_)
return net::ERR_CACHE_OPERATION_NOT_SUPPORTED;
@@ -191,7 +191,7 @@ class MockDiskEntry : public disk_cache::Entry,
}
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (busy_)
return net::ERR_CACHE_OPERATION_NOT_SUPPORTED;
@@ -223,7 +223,7 @@ class MockDiskEntry : public disk_cache::Entry,
}
virtual int GetAvailableRange(int64 offset, int len, int64* start,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (!sparse_ || busy_)
return net::ERR_CACHE_OPERATION_NOT_SUPPORTED;
@@ -266,7 +266,7 @@ class MockDiskEntry : public disk_cache::Entry,
virtual void CancelSparseIO() { cancel_ = true; }
- virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback) {
+ virtual int ReadyForSparseIO(net::OldCompletionCallback* completion_callback) {
if (!cancel_)
return net::OK;
@@ -300,7 +300,7 @@ class MockDiskEntry : public disk_cache::Entry,
struct CallbackInfo {
scoped_refptr<MockDiskEntry> entry;
- net::CompletionCallback* callback;
+ net::OldCompletionCallback* callback;
int result;
};
@@ -309,13 +309,13 @@ class MockDiskEntry : public disk_cache::Entry,
// Unlike the callbacks for MockHttpTransaction, we want this one to run even
// if the consumer called Close on the MockDiskEntry. We achieve that by
// leveraging the fact that this class is reference counted.
- void CallbackLater(net::CompletionCallback* callback, int result) {
+ void CallbackLater(net::OldCompletionCallback* callback, int result) {
if (ignore_callbacks_)
return StoreAndDeliverCallbacks(true, this, callback, result);
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
this, &MockDiskEntry::RunCallback, callback, result));
}
- void RunCallback(net::CompletionCallback* callback, int result) {
+ void RunCallback(net::OldCompletionCallback* callback, int result) {
if (busy_) {
// This is kind of hacky, but controlling the behavior of just this entry
// from a test is sort of complicated. What we really want to do is
@@ -337,7 +337,7 @@ class MockDiskEntry : public disk_cache::Entry,
// When |store| is true, stores the callback to be delivered later; otherwise
// delivers any callback previously stored.
static void StoreAndDeliverCallbacks(bool store, MockDiskEntry* entry,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
int result) {
static std::vector<CallbackInfo> callback_list;
if (store) {
@@ -384,7 +384,7 @@ class MockDiskCache : public disk_cache::Backend {
}
virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (fail_requests_)
return net::ERR_CACHE_OPEN_FAILURE;
@@ -415,7 +415,7 @@ class MockDiskCache : public disk_cache::Backend {
}
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (fail_requests_)
return net::ERR_CACHE_CREATE_FAILURE;
@@ -448,7 +448,7 @@ class MockDiskCache : public disk_cache::Backend {
}
virtual int DoomEntry(const std::string& key,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
EntryMap::iterator it = entries_.find(key);
if (it != entries_.end()) {
@@ -463,23 +463,23 @@ class MockDiskCache : public disk_cache::Backend {
return net::ERR_IO_PENDING;
}
- virtual int DoomAllEntries(net::CompletionCallback* callback) {
+ virtual int DoomAllEntries(net::OldCompletionCallback* callback) {
return net::ERR_NOT_IMPLEMENTED;
}
virtual int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_NOT_IMPLEMENTED;
}
virtual int DoomEntriesSince(const base::Time initial_time,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_NOT_IMPLEMENTED;
}
virtual int OpenNextEntry(void** iter, disk_cache::Entry** next_entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_NOT_IMPLEMENTED;
}
@@ -515,19 +515,19 @@ class MockDiskCache : public disk_cache::Backend {
class CallbackRunner : public Task {
public:
- CallbackRunner(net::CompletionCallback* callback, int result)
+ CallbackRunner(net::OldCompletionCallback* callback, int result)
: callback_(callback), result_(result) {}
virtual void Run() {
callback_->Run(result_);
}
private:
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
int result_;
DISALLOW_COPY_AND_ASSIGN(CallbackRunner);
};
- void CallbackLater(net::CompletionCallback* callback, int result) {
+ void CallbackLater(net::OldCompletionCallback* callback, int result) {
MessageLoop::current()->PostTask(FROM_HERE,
new CallbackRunner(callback, result));
}
@@ -543,7 +543,7 @@ class MockBackendFactory : public net::HttpCache::BackendFactory {
public:
virtual int CreateBackend(net::NetLog* /* net_log */,
disk_cache::Backend** backend,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
*backend = new MockDiskCache();
return net::OK;
}
@@ -565,7 +565,7 @@ class MockHttpCache {
return static_cast<MockNetworkLayer*>(http_cache_.network_layer());
}
MockDiskCache* disk_cache() {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* backend;
int rv = http_cache_.GetBackend(&backend, &cb);
rv = cb.GetResult(rv);
@@ -578,7 +578,7 @@ class MockHttpCache {
bool* response_truncated) {
int size = disk_entry->GetDataSize(0);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(size));
int rv = disk_entry->ReadData(0, 0, buffer, size, &cb);
rv = cb.GetResult(rv);
@@ -598,7 +598,7 @@ class MockHttpCache {
response_info->Persist(
&pickle, skip_transient_headers, response_truncated);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
scoped_refptr<net::WrappedIOBuffer> data(new net::WrappedIOBuffer(
reinterpret_cast<const char*>(pickle.data())));
int len = static_cast<int>(pickle.size());
@@ -610,7 +610,7 @@ class MockHttpCache {
// Helper function to synchronously open a backend entry.
bool OpenBackendEntry(const std::string& key, disk_cache::Entry** entry) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = disk_cache()->OpenEntry(key, entry, &cb);
return (cb.GetResult(rv) == net::OK);
}
@@ -618,7 +618,7 @@ class MockHttpCache {
// Helper function to synchronously create a backend entry.
bool CreateBackendEntry(const std::string& key, disk_cache::Entry** entry,
net::NetLog* /* net_log */) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = disk_cache()->CreateEntry(key, entry, &cb);
return (cb.GetResult(rv) == net::OK);
}
@@ -630,7 +630,7 @@ 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,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_IO_PENDING;
}
};
@@ -639,7 +639,7 @@ class MockBackendNoCbFactory : public net::HttpCache::BackendFactory {
public:
virtual int CreateBackend(net::NetLog* /* net_log */,
disk_cache::Backend** backend,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
*backend = new MockDiskCacheNoCB();
return net::OK;
}
@@ -653,7 +653,7 @@ class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
virtual int CreateBackend(net::NetLog* /* net_log */,
disk_cache::Backend** backend,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!block_) {
if (!fail_)
*backend = new MockDiskCache();
@@ -672,7 +672,7 @@ class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
if (callback_) {
if (!fail_)
*backend_ = new MockDiskCache();
- net::CompletionCallback* cb = callback_;
+ net::OldCompletionCallback* cb = callback_;
callback_ = NULL;
cb->Run(Result()); // This object can be deleted here.
}
@@ -681,25 +681,25 @@ class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
disk_cache::Backend** backend() { return backend_; }
void set_fail(bool fail) { fail_ = fail; }
- net::CompletionCallback* callback() { return callback_; }
+ net::OldCompletionCallback* callback() { return callback_; }
private:
int Result() { return fail_ ? net::ERR_FAILED : net::OK; }
disk_cache::Backend** backend_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
bool block_;
bool fail_;
};
-class DeleteCacheCompletionCallback : public TestCompletionCallback {
+class DeleteCacheOldCompletionCallback : public TestOldCompletionCallback {
public:
- explicit DeleteCacheCompletionCallback(MockHttpCache* cache)
+ explicit DeleteCacheOldCompletionCallback(MockHttpCache* cache)
: cache_(cache) {}
virtual void RunWithParams(const Tuple1<int>& params) {
delete cache_;
- TestCompletionCallback::RunWithParams(params);
+ TestOldCompletionCallback::RunWithParams(params);
}
private:
@@ -724,7 +724,7 @@ void RunTransactionTestWithRequestAndLog(net::HttpCache* cache,
const MockHttpRequest& request,
net::HttpResponseInfo* response_info,
const net::BoundNetLog& net_log) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// write to the cache
@@ -1004,7 +1004,7 @@ void CreateTruncatedEntry(std::string raw_headers, MockHttpCache* cache) {
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(100));
int len = static_cast<int>(base::strlcpy(buf->data(),
"rg: 00-09 rg: 10-19 ", 100));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(1, 0, buf, len, &cb, true);
EXPECT_EQ(len, cb.GetResult(rv));
entry->Close();
@@ -1032,7 +1032,7 @@ struct Context {
Context() : result(net::ERR_IO_PENDING) {}
int result;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
};
@@ -1055,7 +1055,7 @@ TEST(HttpCache, GetBackend) {
MockHttpCache cache(net::HttpCache::DefaultBackend::InMemory(0));
disk_cache::Backend* backend;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
// This will lazily initialize the backend.
int rv = cache.http_cache()->GetBackend(&backend, &cb);
EXPECT_EQ(net::OK, cb.GetResult(rv));
@@ -1279,7 +1279,7 @@ TEST(HttpCache, SimpleGET_LoadOnlyFromCache_Miss) {
transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE;
MockHttpRequest request(transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
int rv = cache.http_cache()->CreateTransaction(&trans);
@@ -1928,7 +1928,7 @@ TEST(HttpCache, SimpleGET_AbandonedCacheRead) {
RunTransactionTest(cache.http_cache(), kSimpleGET_Transaction);
MockHttpRequest request(kSimpleGET_Transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
int rv = cache.http_cache()->CreateTransaction(&trans);
@@ -2109,7 +2109,7 @@ TEST(HttpCache, DeleteCacheWaitingForBackend) {
// We cannot call FinishCreation because the factory itself will go away with
// the cache, so grab the callback and attempt to use it.
- net::CompletionCallback* callback = factory->callback();
+ net::OldCompletionCallback* callback = factory->callback();
disk_cache::Backend** backend = factory->backend();
cache.reset();
@@ -2125,7 +2125,7 @@ TEST(HttpCache, DeleteCacheWaitingForBackend2) {
MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
MockHttpCache* cache = new MockHttpCache(factory);
- DeleteCacheCompletionCallback cb(cache);
+ DeleteCacheOldCompletionCallback cb(cache);
disk_cache::Backend* backend;
int rv = cache->http_cache()->GetBackend(&backend, &cb);
EXPECT_EQ(net::ERR_IO_PENDING, rv);
@@ -2140,7 +2140,7 @@ TEST(HttpCache, DeleteCacheWaitingForBackend2) {
c->trans->Start(&request, &c->callback, net::BoundNetLog());
// And another direct backend request.
- TestCompletionCallback cb2;
+ TestOldCompletionCallback cb2;
rv = cache->http_cache()->GetBackend(&backend, &cb2);
EXPECT_EQ(net::ERR_IO_PENDING, rv);
@@ -2822,7 +2822,7 @@ TEST(HttpCache, SimplePOST_LoadOnlyFromCache_Miss) {
transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE;
MockHttpRequest request(transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
int rv = cache.http_cache()->CreateTransaction(&trans);
@@ -3474,7 +3474,7 @@ TEST(HttpCache, GET_Previous206_NotSparse) {
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(500));
int len = static_cast<int>(base::strlcpy(buf->data(),
kRangeGET_TransactionOK.data, 500));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(1, 0, buf, len, &cb, true);
EXPECT_EQ(len, cb.GetResult(rv));
entry->Close();
@@ -3518,7 +3518,7 @@ TEST(HttpCache, RangeGET_Previous206_NotSparse_2) {
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(500));
int len = static_cast<int>(base::strlcpy(buf->data(),
kRangeGET_TransactionOK.data, 500));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(1, 0, buf, len, &cb, true);
EXPECT_EQ(len, cb.GetResult(rv));
entry->Close();
@@ -3560,7 +3560,7 @@ TEST(HttpCache, GET_Previous206_NotValidation) {
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(500));
int len = static_cast<int>(base::strlcpy(buf->data(),
kRangeGET_TransactionOK.data, 500));
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(1, 0, buf, len, &cb, true);
EXPECT_EQ(len, cb.GetResult(rv));
entry->Close();
@@ -3958,7 +3958,7 @@ TEST(HttpCache, RangeGET_InvalidResponse3) {
ASSERT_TRUE(cache.OpenBackendEntry(kRangeGET_TransactionOK.url, &en));
int64 cached_start = 0;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = en->GetAvailableRange(40, 20, &cached_start, &cb);
EXPECT_EQ(10, cb.GetResult(rv));
EXPECT_EQ(50, cached_start);
@@ -4120,7 +4120,7 @@ TEST(HttpCache, RangeGET_OK_LoadOnlyFromCache) {
transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE;
MockHttpRequest request(transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
int rv = cache.http_cache()->CreateTransaction(&trans);
@@ -4701,7 +4701,7 @@ TEST(HttpCache, CachedRedirect) {
kTestTransaction.response_headers = "Location: http://www.bar.com/\n";
MockHttpRequest request(kTestTransaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// write to the cache
{
@@ -4856,7 +4856,7 @@ TEST(HttpCache, SimpleGET_SSLError) {
transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE;
MockHttpRequest request(transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<net::HttpTransaction> trans;
int rv = cache.http_cache()->CreateTransaction(&trans);
@@ -5108,7 +5108,7 @@ TEST(HttpCache, ReadMetadata) {
// of the stream.
TEST(HttpCache, FilterCompletion) {
MockHttpCache cache;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
{
scoped_ptr<net::HttpTransaction> trans;
@@ -5142,7 +5142,7 @@ TEST(HttpCache, FilterCompletion) {
// a Content-Length header.
TEST(HttpCache, TruncatedByContentLength) {
MockHttpCache cache;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
MockTransaction transaction(kSimpleGET_Transaction);
AddMockTransaction(&transaction);
@@ -5163,7 +5163,7 @@ TEST(HttpCache, TruncatedByContentLength) {
// from the net.
TEST(HttpCache, TruncatedByContentLength2) {
MockHttpCache cache;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
MockTransaction transaction(kSimpleGET_Transaction);
AddMockTransaction(&transaction);
@@ -5186,14 +5186,14 @@ TEST(HttpCache, TruncatedByContentLength2) {
//-----------------------------------------------------------------------------
// DiskCacheBasedSSLHostInfo tests
-class DeleteSSLHostInfoCompletionCallback : public TestCompletionCallback {
+class DeleteSSLHostInfoOldCompletionCallback : public TestOldCompletionCallback {
public:
- explicit DeleteSSLHostInfoCompletionCallback(net::SSLHostInfo* ssl_host_info)
+ explicit DeleteSSLHostInfoOldCompletionCallback(net::SSLHostInfo* ssl_host_info)
: ssl_host_info_(ssl_host_info) {}
virtual void RunWithParams(const Tuple1<int>& params) {
delete ssl_host_info_;
- TestCompletionCallback::RunWithParams(params);
+ TestOldCompletionCallback::RunWithParams(params);
}
private:
@@ -5213,7 +5213,7 @@ TEST(DiskCacheBasedSSLHostInfo, DeleteInCallback) {
new net::DiskCacheBasedSSLHostInfo("https://www.verisign.com", ssl_config,
&cert_verifier, cache.http_cache());
ssl_host_info->Start();
- DeleteSSLHostInfoCompletionCallback callback(ssl_host_info);
+ DeleteSSLHostInfoOldCompletionCallback callback(ssl_host_info);
int rv = ssl_host_info->WaitForDataReady(&callback);
EXPECT_EQ(net::ERR_IO_PENDING, rv);
// Now complete the backend creation and let the callback run.
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc
index 3c356e8..118ed20 100644
--- a/net/http/http_network_layer_unittest.cc
+++ b/net/http/http_network_layer_unittest.cc
@@ -86,7 +86,7 @@ TEST_F(HttpNetworkLayerTest, GET) {
data_writes, arraysize(data_writes));
mock_socket_factory_.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request_info;
request_info.url = GURL("http://www.google.com/");
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index d1e7ec5..e88f254 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -150,7 +150,7 @@ HttpNetworkTransaction::~HttpNetworkTransaction() {
}
int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
SIMPLE_STATS_COUNTER("HttpNetworkTransaction.Count");
@@ -169,7 +169,7 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info,
}
int HttpNetworkTransaction::RestartIgnoringLastError(
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!stream_.get());
DCHECK(!stream_request_.get());
DCHECK_EQ(STATE_NONE, next_state_);
@@ -184,7 +184,7 @@ int HttpNetworkTransaction::RestartIgnoringLastError(
int HttpNetworkTransaction::RestartWithCertificate(
X509Certificate* client_cert,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// In HandleCertificateRequest(), we always tear down existing stream
// requests to force a new connection. So we shouldn't have one here.
DCHECK(!stream_request_.get());
@@ -210,7 +210,7 @@ int HttpNetworkTransaction::RestartWithCertificate(
int HttpNetworkTransaction::RestartWithAuth(
const string16& username,
const string16& password,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
HttpAuth::Target target = pending_auth_target_;
if (target == HttpAuth::AUTH_NONE) {
NOTREACHED();
@@ -303,7 +303,7 @@ bool HttpNetworkTransaction::IsReadyToRestartForAuth() {
}
int HttpNetworkTransaction::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_LT(0, buf_len);
@@ -476,7 +476,7 @@ void HttpNetworkTransaction::DoCallback(int rv) {
DCHECK(user_callback_);
// Since Run may result in Read being called, clear user_callback_ up front.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index c450bcb..770c6ba 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -42,17 +42,17 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// HttpTransaction methods:
virtual int Start(const HttpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
- virtual int RestartIgnoringLastError(CompletionCallback* callback);
+ virtual int RestartIgnoringLastError(OldCompletionCallback* callback);
virtual int RestartWithCertificate(X509Certificate* client_cert,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual bool IsReadyToRestartForAuth();
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual void StopCaching() {}
virtual void DoneReading() {}
virtual const HttpResponseInfo* GetResponseInfo() const;
@@ -224,8 +224,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// cleared by RestartWithAuth().
HttpAuth::Target pending_auth_target_;
- CompletionCallbackImpl<HttpNetworkTransaction> io_callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<HttpNetworkTransaction> io_callback_;
+ OldCompletionCallback* user_callback_;
scoped_ptr<UploadDataStream> request_body_;
scoped_refptr<HttpNetworkSession> session_;
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index b49b9e7..9817709 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -159,7 +159,7 @@ class HttpNetworkTransactionTest : public PlatformTest {
StaticSocketDataProvider data(data_reads, reads_count, NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
EXPECT_TRUE(log.bound().IsLoggingAllEvents());
@@ -270,7 +270,7 @@ class CaptureGroupNameSocketPool : public ParentPool {
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
last_group_name_ = group_name;
return ERR_IO_PENDING;
@@ -642,7 +642,7 @@ TEST_F(HttpNetworkTransactionTest, Head) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -699,7 +699,7 @@ TEST_F(HttpNetworkTransactionTest, ReuseConnection) {
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -741,7 +741,7 @@ TEST_F(HttpNetworkTransactionTest, Ignores100) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -783,7 +783,7 @@ TEST_F(HttpNetworkTransactionTest, Ignores1xx) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -820,7 +820,7 @@ TEST_F(HttpNetworkTransactionTest, Incomplete100ThenEOF) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -850,7 +850,7 @@ TEST_F(HttpNetworkTransactionTest, EmptyResponse) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -892,7 +892,7 @@ void HttpNetworkTransactionTest::KeepAliveConnectionResendRequestTest(
};
for (int i = 0; i < 2; ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -944,7 +944,7 @@ TEST_F(HttpNetworkTransactionTest, NonKeepAliveConnectionReset) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1021,7 +1021,7 @@ TEST_F(HttpNetworkTransactionTest, KeepAliveAfterUnreadBody) {
std::string response_lines[kNumUnreadBodies];
for (size_t i = 0; i < arraysize(data1_reads) - 2; ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -1056,7 +1056,7 @@ TEST_F(HttpNetworkTransactionTest, KeepAliveAfterUnreadBody) {
for (int i = 0; i < kNumUnreadBodies; ++i)
EXPECT_EQ(kStatusLines[i], response_lines[i]);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1127,7 +1127,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuth) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1139,7 +1139,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuth) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1181,7 +1181,7 @@ TEST_F(HttpNetworkTransactionTest, DoNotSendAuth) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads),
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1245,7 +1245,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAlive) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
int rv = trans->Start(&request, &callback1, BoundNetLog());
@@ -1258,7 +1258,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAlive) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1320,7 +1320,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
int rv = trans->Start(&request, &callback1, BoundNetLog());
@@ -1333,7 +1333,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1403,7 +1403,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
int rv = trans->Start(&request, &callback1, BoundNetLog());
@@ -1416,7 +1416,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1488,7 +1488,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveImpatientServer) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
int rv = trans->Start(&request, &callback1, BoundNetLog());
@@ -1501,7 +1501,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveImpatientServer) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1570,7 +1570,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAlive) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -1596,7 +1596,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAlive) {
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion());
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1672,7 +1672,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAlive) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, log.bound());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1698,7 +1698,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAlive) {
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion());
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
// Wrong password (should be "bar").
rv = trans->RestartWithAuth(kFoo, kBaz, &callback2);
@@ -1755,7 +1755,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyCancelTunnel) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1810,7 +1810,7 @@ TEST_F(HttpNetworkTransactionTest, UnexpectedProxyAuth) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1862,7 +1862,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsServerRequestsProxyAuthThroughProxy) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -1914,7 +1914,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxyGet) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -1975,7 +1975,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGet) {
ssl.was_npn_negotiated = true;
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -2061,7 +2061,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGetWithProxyAuth) {
ssl.was_npn_negotiated = true;
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -2079,7 +2079,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGetWithProxyAuth) {
EXPECT_TRUE(response->was_fetched_via_spdy);
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2156,7 +2156,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttps) {
ssl2.was_npn_negotiated = false;
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, log.bound());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2230,7 +2230,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectSpdy) {
ssl2.was_npn_negotiated = true;
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, log.bound());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2296,7 +2296,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectFailure) {
ssl2.was_npn_negotiated = true;
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, log.bound());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2359,7 +2359,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxyAuthRetry) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -2376,7 +2376,7 @@ TEST_F(HttpNetworkTransactionTest, HttpsProxyAuthRetry) {
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion());
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2426,7 +2426,7 @@ void HttpNetworkTransactionTest::ConnectStatusHelperWithExpectedStatus(
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -2690,7 +2690,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyThenServer) {
session_deps.socket_factory.AddSocketDataProvider(&data2);
session_deps.socket_factory.AddSocketDataProvider(&data3);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2702,7 +2702,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyThenServer) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2714,7 +2714,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthProxyThenServer) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(kFoo2, kBar2, &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2819,7 +2819,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth1) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -2835,7 +2835,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth1) {
ASSERT_FALSE(response == NULL);
EXPECT_TRUE(CheckNTLMServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kTestingNTLM, kTestingNTLM, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2849,7 +2849,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth1) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(response->auth_challenge.get() == NULL);
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(string16(), string16(), &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2998,7 +2998,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
session_deps.socket_factory.AddSocketDataProvider(&data2);
session_deps.socket_factory.AddSocketDataProvider(&data3);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -3014,7 +3014,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckNTLMServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
// Enter the wrong password.
rv = trans->RestartWithAuth(kTestingNTLM, kWrongPassword, &callback2);
@@ -3024,7 +3024,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(string16(), string16(), &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback3.WaitForResult();
@@ -3035,7 +3035,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
ASSERT_FALSE(response == NULL);
EXPECT_TRUE(CheckNTLMServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
// Now enter the right password.
rv = trans->RestartWithAuth(kTestingNTLM, kTestingNTLM, &callback4);
@@ -3046,7 +3046,7 @@ TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback5;
+ TestOldCompletionCallback callback5;
// One more roundtrip
rv = trans->RestartWithAuth(string16(), string16(), &callback5);
@@ -3087,7 +3087,7 @@ TEST_F(HttpNetworkTransactionTest, LargeHeadersNoBody) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3135,7 +3135,7 @@ TEST_F(HttpNetworkTransactionTest, DontRecycleTransportSocketForSSLTunnel) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3184,7 +3184,7 @@ TEST_F(HttpNetworkTransactionTest, RecycleSocket) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3243,7 +3243,7 @@ TEST_F(HttpNetworkTransactionTest, RecycleSSLSocket) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -3311,7 +3311,7 @@ TEST_F(HttpNetworkTransactionTest, RecycleDeadSSLSocket) {
session_deps.socket_factory.AddSocketDataProvider(&data);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -3395,7 +3395,7 @@ TEST_F(HttpNetworkTransactionTest, RecycleSocketAfterZeroContentLength) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3491,7 +3491,7 @@ TEST_F(HttpNetworkTransactionTest, ResendRequestOnWriteBodyError) {
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request[i], &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3566,7 +3566,7 @@ TEST_F(HttpNetworkTransactionTest, AuthIdentityInURL) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3575,7 +3575,7 @@ TEST_F(HttpNetworkTransactionTest, AuthIdentityInURL) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(string16(), string16(), &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback2.WaitForResult();
@@ -3664,7 +3664,7 @@ TEST_F(HttpNetworkTransactionTest, WrongAuthIdentityInURL) {
session_deps.socket_factory.AddSocketDataProvider(&data2);
session_deps.socket_factory.AddSocketDataProvider(&data3);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3673,7 +3673,7 @@ TEST_F(HttpNetworkTransactionTest, WrongAuthIdentityInURL) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(string16(), string16(), &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback2.WaitForResult();
@@ -3684,7 +3684,7 @@ TEST_F(HttpNetworkTransactionTest, WrongAuthIdentityInURL) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(kFoo, kBar, &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback3.WaitForResult();
@@ -3752,7 +3752,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3764,7 +3764,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3830,7 +3830,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3847,7 +3847,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
EXPECT_EQ("MyRealm2", response->auth_challenge->realm);
EXPECT_EQ("basic", response->auth_challenge->scheme);
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo2, kBar2, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3893,7 +3893,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3955,7 +3955,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3964,7 +3964,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(string16(), string16(), &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback2.WaitForResult();
@@ -4044,7 +4044,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
session_deps.socket_factory.AddSocketDataProvider(&data2);
session_deps.socket_factory.AddSocketDataProvider(&data3);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4053,7 +4053,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(trans->IsReadyToRestartForAuth());
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(string16(), string16(), &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback2.WaitForResult();
@@ -4064,7 +4064,7 @@ TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(kFoo3, kBar3, &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4137,7 +4137,7 @@ TEST_F(HttpNetworkTransactionTest, DigestPreAuthNonceCount) {
session_deps.socket_factory.AddSocketDataProvider(&data1);
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4149,7 +4149,7 @@ TEST_F(HttpNetworkTransactionTest, DigestPreAuthNonceCount) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckDigestServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4198,7 +4198,7 @@ TEST_F(HttpNetworkTransactionTest, DigestPreAuthNonceCount) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4290,7 +4290,7 @@ TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificate) {
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl_bad);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4361,7 +4361,7 @@ TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) {
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl_bad);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
for (int i = 0; i < 2; i++) {
session_deps.socket_factory.ResetNextMockIndexes();
@@ -4424,7 +4424,7 @@ TEST_F(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) {
session_deps.socket_factory.AddSSLSocketDataProvider(&proxy_ssl);
session_deps.socket_factory.AddSSLSocketDataProvider(&tunnel_ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4474,7 +4474,7 @@ TEST_F(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) {
session_deps.socket_factory.AddSocketDataProvider(&data);
session_deps.socket_factory.AddSSLSocketDataProvider(&proxy_ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4535,7 +4535,7 @@ TEST_F(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) {
session_deps.socket_factory.AddSocketDataProvider(data.get());
session_deps.socket_factory.AddSSLSocketDataProvider(&proxy_ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4585,7 +4585,7 @@ TEST_F(HttpNetworkTransactionTest, ErrorResponseTofHttpsConnectViaHttpsProxy) {
session_deps.socket_factory.AddSocketDataProvider(&data);
session_deps.socket_factory.AddSSLSocketDataProvider(&proxy_ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4654,7 +4654,7 @@ TEST_F(HttpNetworkTransactionTest, ErrorResponseTofHttpsConnectViaSpdyProxy) {
session_deps.socket_factory.AddSocketDataProvider(data.get());
session_deps.socket_factory.AddSSLSocketDataProvider(&proxy_ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4734,7 +4734,7 @@ TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificateViaHttpsProxy) {
session_deps.socket_factory.AddSocketDataProvider(&data);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -4787,7 +4787,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_UserAgent) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4825,7 +4825,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_UserAgentOverTunnel) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4865,7 +4865,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_Referer) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4902,7 +4902,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_PostContentLengthZero) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4939,7 +4939,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_PutContentLengthZero) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4976,7 +4976,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_HeadContentLengthZero) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5015,7 +5015,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_CacheControlNoCache) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5054,7 +5054,7 @@ TEST_F(HttpNetworkTransactionTest,
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5092,7 +5092,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeaders) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5134,7 +5134,7 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeadersStripped) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5177,7 +5177,7 @@ TEST_F(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5233,7 +5233,7 @@ TEST_F(HttpNetworkTransactionTest, SOCKS4_SSL_GET) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5298,7 +5298,7 @@ TEST_F(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5368,7 +5368,7 @@ TEST_F(HttpNetworkTransactionTest, SOCKS5_SSL_GET) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5417,7 +5417,7 @@ int GroupNameTransactionHelper(
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// We do not complete this request, the dtor will clean the transaction up.
return trans->Start(&request, &callback, BoundNetLog());
@@ -5629,7 +5629,7 @@ TEST_F(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) {
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5707,7 +5707,7 @@ TEST_F(HttpNetworkTransactionTest, ResolveMadeWithReferrer) {
session_deps.socket_factory.AddSocketDataProvider(&data);
// Run the request until it fails reading from the socket.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -5736,7 +5736,7 @@ void BypassHostCacheOnRefreshHelper(int load_flags) {
// Warm up the host cache so it has an entry for "www.google.com".
AddressList addrlist;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = session_deps.host_resolver->Resolve(
HostResolver::RequestInfo(HostPortPair("www.google.com", 80)), &addrlist,
&callback, NULL, BoundNetLog());
@@ -5803,7 +5803,7 @@ TEST_F(HttpNetworkTransactionTest, RequestWriteError) {
write_failure, arraysize(write_failure));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -5833,7 +5833,7 @@ TEST_F(HttpNetworkTransactionTest, ConnectionClosedAfterStartOfHeaders) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -5907,7 +5907,7 @@ TEST_F(HttpNetworkTransactionTest, DrainResetOK) {
data_writes2, arraysize(data_writes2));
session_deps.socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -5921,7 +5921,7 @@ TEST_F(HttpNetworkTransactionTest, DrainResetOK) {
ASSERT_TRUE(response != NULL);
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get()));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -5955,7 +5955,7 @@ TEST_F(HttpNetworkTransactionTest, HTTPSViaProxyWithExtraData) {
session_deps.socket_factory.AddSocketDataProvider(&data);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
session_deps.socket_factory.ResetNextMockIndexes();
@@ -5987,7 +5987,7 @@ TEST_F(HttpNetworkTransactionTest, LargeContentLengthThenClose) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6036,7 +6036,7 @@ TEST_F(HttpNetworkTransactionTest, UploadFileSmallerThanLength) {
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6099,7 +6099,7 @@ TEST_F(HttpNetworkTransactionTest, UploadUnreadableFile) {
arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6167,7 +6167,7 @@ TEST_F(HttpNetworkTransactionTest, UnreadableUploadFileAfterAuthRestart) {
arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = trans->Start(&request, &callback1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6184,7 +6184,7 @@ TEST_F(HttpNetworkTransactionTest, UnreadableUploadFileAfterAuthRestart) {
// Now make the file unreadable and try again.
ASSERT_TRUE(file_util::MakeFileUnreadable(temp_file));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFoo, kBar, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6284,7 +6284,7 @@ TEST_F(HttpNetworkTransactionTest, ChangeAuthRealms) {
session_deps.socket_factory.AddSocketDataProvider(&data3);
session_deps.socket_factory.AddSocketDataProvider(&data4);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(CreateSession(&session_deps)));
@@ -6308,7 +6308,7 @@ TEST_F(HttpNetworkTransactionTest, ChangeAuthRealms) {
// Issue the second request with an incorrect password. There should be a
// password prompt for second_realm waiting to be filled in after the
// transaction completes.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = trans->RestartWithAuth(kFirst, kBaz, &callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback2.WaitForResult();
@@ -6326,7 +6326,7 @@ TEST_F(HttpNetworkTransactionTest, ChangeAuthRealms) {
// a password prompt for first_realm waiting to be filled in. If the password
// prompt is not present, it indicates that the HttpAuthCacheEntry for
// first_realm was not correctly removed.
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = trans->RestartWithAuth(kSecond, kFou, &callback3);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback3.WaitForResult();
@@ -6341,7 +6341,7 @@ TEST_F(HttpNetworkTransactionTest, ChangeAuthRealms) {
EXPECT_EQ("basic", challenge->scheme);
// Issue the fourth request with the correct password and username.
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = trans->RestartWithAuth(kFirst, kBar, &callback4);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback4.WaitForResult();
@@ -6373,7 +6373,7 @@ TEST_F(HttpNetworkTransactionTest, HonorAlternateProtocolHeader) {
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -6435,7 +6435,7 @@ TEST_F(HttpNetworkTransactionTest, MarkBrokenAlternateProtocolAndFallback) {
data_reads, arraysize(data_reads), NULL, 0);
session_deps.socket_factory.AddSocketDataProvider(&second_data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
@@ -6522,7 +6522,7 @@ TEST_F(HttpNetworkTransactionTest, UseAlternateProtocolForNpnSpdy) {
session_deps.socket_factory.AddSocketDataProvider(
&hanging_non_alternate_protocol_socket);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
@@ -6627,7 +6627,7 @@ TEST_F(HttpNetworkTransactionTest, AlternateProtocolWithSpdyLateBinding) {
session_deps.socket_factory.AddSocketDataProvider(&hanging_socket);
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
HttpNetworkTransaction trans1(session);
int rv = trans1.Start(&request, &callback1, BoundNetLog());
@@ -6643,12 +6643,12 @@ TEST_F(HttpNetworkTransactionTest, AlternateProtocolWithSpdyLateBinding) {
ASSERT_EQ(OK, ReadTransaction(&trans1, &response_data));
EXPECT_EQ("hello world", response_data);
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
HttpNetworkTransaction trans2(session);
rv = trans2.Start(&request, &callback2, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
HttpNetworkTransaction trans3(session);
rv = trans3.Start(&request, &callback3, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6716,7 +6716,7 @@ TEST_F(HttpNetworkTransactionTest, StallAlternateProtocolForNpnSpdy) {
// 2nd request is just a copy of the first one, over HTTP again.
session_deps.socket_factory.AddSocketDataProvider(&first_transaction);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
@@ -6761,7 +6761,7 @@ class CapturingProxyResolver : public ProxyResolver {
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) {
ProxyServer proxy_server(ProxyServer::SCHEME_HTTP,
@@ -6780,7 +6780,7 @@ class CapturingProxyResolver : public ProxyResolver {
}
virtual int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&,
- CompletionCallback* /*callback*/) {
+ OldCompletionCallback* /*callback*/) {
return OK;
}
@@ -6861,7 +6861,7 @@ TEST_F(HttpNetworkTransactionTest, UseAlternateProtocolForTunneledNpnSpdy) {
session_deps.socket_factory.AddSocketDataProvider(
&hanging_non_alternate_protocol_socket);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
@@ -6954,7 +6954,7 @@ TEST_F(HttpNetworkTransactionTest,
spdy_writes, arraysize(spdy_writes)));
session_deps.socket_factory.AddSocketDataProvider(spdy_data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
@@ -7409,7 +7409,7 @@ TEST_F(HttpNetworkTransactionTest, GenerateAuthToken) {
&ssl_socket_data_provider);
// Start or restart the transaction.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv;
if (round == 0) {
rv = trans.Start(&request, &callback, BoundNetLog());
@@ -7482,7 +7482,7 @@ TEST_F(HttpNetworkTransactionTest, MultiRoundAuth) {
session_peer.SetTransportSocketPool(transport_pool);
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
const MockWrite kGet(
"GET / HTTP/1.1\r\n"
@@ -7552,7 +7552,7 @@ TEST_F(HttpNetworkTransactionTest, MultiRoundAuth) {
// claimed.
scoped_ptr<HttpTransaction> trans_compete(
new HttpNetworkTransaction(session));
- TestCompletionCallback callback_compete;
+ TestOldCompletionCallback callback_compete;
rv = trans_compete->Start(&request, &callback_compete, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
// callback_compete.WaitForResult at this point would stall forever,
@@ -7675,7 +7675,7 @@ TEST_F(HttpNetworkTransactionTest, RestartAfterTLSDecompressionFailure) {
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -7717,7 +7717,7 @@ TEST_F(HttpNetworkTransactionTest,
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -7767,7 +7767,7 @@ TEST_F(HttpNetworkTransactionTest, NpnWithHttpOverSSL) {
data_writes, arraysize(data_writes));
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -7826,7 +7826,7 @@ TEST_F(HttpNetworkTransactionTest, SpdyPostNPNServerHangup) {
spdy_writes, arraysize(spdy_writes)));
session_deps.socket_factory.AddSocketDataProvider(spdy_data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
@@ -7957,14 +7957,14 @@ TEST_F(HttpNetworkTransactionTest, SpdyAlternateProtocolThroughProxy) {
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
// First round should work and provide the Alternate-Protocol state.
- TestCompletionCallback callback_1;
+ TestOldCompletionCallback callback_1;
scoped_ptr<HttpTransaction> trans_1(new HttpNetworkTransaction(session));
int rv = trans_1->Start(&request, &callback_1, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(OK, callback_1.WaitForResult());
// Second round should attempt a tunnel connect and get an auth challenge.
- TestCompletionCallback callback_2;
+ TestOldCompletionCallback callback_2;
scoped_ptr<HttpTransaction> trans_2(new HttpNetworkTransaction(session));
rv = trans_2->Start(&request, &callback_2, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -7974,7 +7974,7 @@ TEST_F(HttpNetworkTransactionTest, SpdyAlternateProtocolThroughProxy) {
ASSERT_FALSE(response->auth_challenge.get() == NULL);
// Restart with auth. Tunnel should work and response received.
- TestCompletionCallback callback_3;
+ TestOldCompletionCallback callback_3;
rv = trans_2->RestartWithAuth(kFoo, kBar, &callback_3);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(OK, callback_3.WaitForResult());
@@ -8018,7 +8018,7 @@ TEST_F(HttpNetworkTransactionTest, SimpleCancel) {
data.set_connect_data(mock_connect);
session_deps.socket_factory.AddSocketDataProvider(&data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
int rv = trans->Start(&request, &callback, log.bound());
@@ -8056,7 +8056,7 @@ TEST_F(HttpNetworkTransactionTest, ProxyGet) {
data_writes1, arraysize(data_writes1));
session_deps.socket_factory.AddSocketDataProvider(&data1);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -8113,7 +8113,7 @@ TEST_F(HttpNetworkTransactionTest, ProxyTunnelGet) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -8177,7 +8177,7 @@ TEST_F(HttpNetworkTransactionTest, ProxyTunnelGetHangup) {
SSLSocketDataProvider ssl(true, OK);
session_deps.socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session));
@@ -8235,7 +8235,7 @@ TEST_F(HttpNetworkTransactionTest, PreconnectWithExistingSpdySession) {
session->spdy_session_pool()->Get(pair, BoundNetLog());
scoped_refptr<TransportSocketParams> transport_params(
new TransportSocketParams(host_port_pair, MEDIUM, GURL(), false, false));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
EXPECT_EQ(ERR_IO_PENDING,
@@ -8282,7 +8282,7 @@ static void CheckErrorIsPassedBack(int error, bool async) {
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request_info, &callback, net::BoundNetLog());
if (rv == net::ERR_IO_PENDING)
rv = callback.WaitForResult();
@@ -8360,7 +8360,7 @@ TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_NoFalseStart) {
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
// Begin the SSL handshake with the peer. This consumes ssl_data1.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request_info, &callback, net::BoundNetLog());
ASSERT_EQ(net::ERR_IO_PENDING, rv);
@@ -8465,7 +8465,7 @@ TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_FalseStart) {
scoped_ptr<HttpNetworkTransaction> trans(new HttpNetworkTransaction(session));
// Begin the initial SSL handshake.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request_info, &callback, net::BoundNetLog());
ASSERT_EQ(net::ERR_IO_PENDING, rv);
@@ -8559,7 +8559,7 @@ TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Proxy_Fail) {
new HttpNetworkTransaction(session));
// Begin the SSL handshake with the proxy.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&requests[i], &callback, net::BoundNetLog());
ASSERT_EQ(net::ERR_IO_PENDING, rv);
@@ -8618,7 +8618,7 @@ void IPPoolingAddAlias(MockCachingHostResolver* host_resolver,
// Resolve the host and port.
AddressList addresses;
HostResolver::RequestInfo info(host_port_pair);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = host_resolver->Resolve(info, &addresses, &callback, NULL,
BoundNetLog());
if (rv == ERR_IO_PENDING)
@@ -8686,7 +8686,7 @@ TEST_F(HttpNetworkTransactionTest, UseIPConnectionPooling) {
spdy_writes, arraysize(spdy_writes)));
session_deps.socket_factory.AddSocketDataProvider(spdy_data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request1;
request1.method = "GET";
request1.url = GURL("https://www.google.com/");
@@ -8756,7 +8756,7 @@ class OneTimeCachingHostResolver : public net::HostResolver {
// HostResolver methods:
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE {
return host_resolver_.Resolve(
@@ -8846,7 +8846,7 @@ TEST_F(HttpNetworkTransactionTest,
spdy_writes, arraysize(spdy_writes)));
session_deps.socket_factory.AddSocketDataProvider(spdy_data);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request1;
request1.method = "GET";
request1.url = GURL("https://www.google.com/");
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index 1466796..32ccb1b 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -63,7 +63,7 @@ HttpProxyClientSocket::~HttpProxyClientSocket() {
Disconnect();
}
-int HttpProxyClientSocket::RestartWithAuth(CompletionCallback* callback) {
+int HttpProxyClientSocket::RestartWithAuth(OldCompletionCallback* callback) {
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
@@ -87,7 +87,7 @@ HttpStream* HttpProxyClientSocket::CreateConnectResponseStream() {
}
-int HttpProxyClientSocket::Connect(CompletionCallback* callback) {
+int HttpProxyClientSocket::Connect(OldCompletionCallback* callback) {
DCHECK(transport_.get());
DCHECK(transport_->socket());
DCHECK(!user_callback_);
@@ -183,7 +183,7 @@ base::TimeDelta HttpProxyClientSocket::GetConnectTimeMicros() const {
}
int HttpProxyClientSocket::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!user_callback_);
if (next_state_ != STATE_DONE) {
// We're trying to read the body of the response but we're still trying
@@ -203,7 +203,7 @@ int HttpProxyClientSocket::Read(IOBuffer* buf, int buf_len,
}
int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK_EQ(STATE_DONE, next_state_);
DCHECK(!user_callback_);
@@ -290,7 +290,7 @@ void HttpProxyClientSocket::DoCallback(int result) {
// Since Run() may result in Read being called,
// clear user_callback_ up front.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(result);
}
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index b1f32a6..816a5cb 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -54,7 +54,7 @@ class HttpProxyClientSocket : public ProxyClientSocket {
// If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then
// credentials should be added to the HttpAuthController before calling
// RestartWithAuth.
- int RestartWithAuth(CompletionCallback* callback);
+ int RestartWithAuth(OldCompletionCallback* callback);
const scoped_refptr<HttpAuthController>& auth_controller() {
return auth_;
@@ -69,7 +69,7 @@ class HttpProxyClientSocket : public ProxyClientSocket {
virtual HttpStream* CreateConnectResponseStream();
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -82,8 +82,8 @@ class HttpProxyClientSocket : public ProxyClientSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
virtual int GetPeerAddress(AddressList* address) const;
@@ -132,11 +132,11 @@ class HttpProxyClientSocket : public ProxyClientSocket {
int DoTCPRestart();
int DoTCPRestartComplete(int result);
- CompletionCallbackImpl<HttpProxyClientSocket> io_callback_;
+ OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_;
State next_state_;
// Stores the callback to the layer above, called on completing Connect().
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
HttpRequestInfo request_;
HttpResponseInfo response_;
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 69af61f..b433f26 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -400,7 +400,7 @@ int HttpProxyClientSocketPool::RequestSocket(const std::string& group_name,
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
const scoped_refptr<HttpProxySocketParams>* casted_socket_params =
static_cast<const scoped_refptr<HttpProxySocketParams>*>(socket_params);
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 07f67b0..66897d2 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -155,7 +155,7 @@ class HttpProxyConnectJob : public ConnectJob {
HostResolver* const resolver_;
State next_state_;
- CompletionCallbackImpl<HttpProxyConnectJob> callback_;
+ OldCompletionCallbackImpl<HttpProxyConnectJob> callback_;
scoped_ptr<ClientSocketHandle> transport_socket_handle_;
scoped_ptr<ProxyClientSocket> transport_socket_;
bool using_spdy_;
@@ -185,7 +185,7 @@ class NET_EXPORT_PRIVATE HttpProxyClientSocketPool : public ClientSocketPool {
const void* connect_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void RequestSockets(const std::string& group_name,
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 0a1a2d5..b43b8fc 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -213,7 +213,7 @@ class HttpProxyClientSocketPoolTest : public TestWithHttpParam {
scoped_refptr<DeterministicSocketData> data_;
HttpProxyClientSocketPool pool_;
ClientSocketHandle handle_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
//-----------------------------------------------------------------------------
diff --git a/net/http/http_response_body_drainer.h b/net/http/http_response_body_drainer.h
index 57cfc5c..cdcd65c 100644
--- a/net/http/http_response_body_drainer.h
+++ b/net/http/http_response_body_drainer.h
@@ -56,8 +56,8 @@ class NET_EXPORT_PRIVATE HttpResponseBodyDrainer {
const scoped_ptr<HttpStream> stream_;
State next_state_;
int total_read_;
- CompletionCallbackImpl<HttpResponseBodyDrainer> io_callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<HttpResponseBodyDrainer> io_callback_;
+ OldCompletionCallback* user_callback_;
base::OneShotTimer<HttpResponseBodyDrainer> timer_;
HttpNetworkSession* session_;
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 47602e9..fc3db49 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -74,17 +74,17 @@ class MockHttpStream : public HttpStream {
// HttpStream implementation:
virtual int InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& net_log,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
return ERR_UNEXPECTED;
}
virtual int SendRequest(const HttpRequestHeaders& request_headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
return ERR_UNEXPECTED;
}
virtual uint64 GetUploadProgress() const OVERRIDE { return 0; }
- virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE {
+ virtual int ReadResponseHeaders(OldCompletionCallback* callback) OVERRIDE {
return ERR_UNEXPECTED;
}
virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE {
@@ -102,7 +102,7 @@ class MockHttpStream : public HttpStream {
// Mocked API
virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Close(bool not_reusable) OVERRIDE {
DCHECK(!closed_);
closed_ = true;
@@ -131,7 +131,7 @@ class MockHttpStream : public HttpStream {
CloseResultWaiter* const result_waiter_;
scoped_refptr<IOBuffer> user_buf_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
bool closed_;
bool stall_reads_forever_;
int num_chunks_;
@@ -140,7 +140,7 @@ class MockHttpStream : public HttpStream {
};
int MockHttpStream::ReadResponseBody(
- IOBuffer* buf, int buf_len, CompletionCallback* callback) {
+ IOBuffer* buf, int buf_len, OldCompletionCallback* callback) {
DCHECK(callback);
DCHECK(!user_callback_);
DCHECK(buf);
@@ -168,7 +168,7 @@ int MockHttpStream::ReadResponseBody(
}
void MockHttpStream::CompleteRead() {
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
std::memset(user_buf_->data(), 1, kMagicChunkSize);
user_buf_ = NULL;
user_callback_ = NULL;
@@ -238,7 +238,7 @@ TEST_F(HttpResponseBodyDrainerTest, CancelledBySession) {
}
TEST_F(HttpResponseBodyDrainerTest, DrainBodyTooLarge) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int too_many_chunks =
HttpResponseBodyDrainer::kDrainBodyBufferSize / kMagicChunkSize;
too_many_chunks += 1; // Now it's too large.
diff --git a/net/http/http_stream.h b/net/http/http_stream.h
index 45dc46c..7460fb7 100644
--- a/net/http/http_stream.h
+++ b/net/http/http_stream.h
@@ -40,7 +40,7 @@ class NET_EXPORT_PRIVATE HttpStream {
// Returns a net error code, possibly ERR_IO_PENDING.
virtual int InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& net_log,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Writes the headers and uploads body data to the underlying socket.
// ERR_IO_PENDING is returned if the operation could not be completed
@@ -50,7 +50,7 @@ class NET_EXPORT_PRIVATE HttpStream {
virtual int SendRequest(const HttpRequestHeaders& request_headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Queries the UploadDataStream for its progress (bytes sent).
virtual uint64 GetUploadProgress() const = 0;
@@ -60,7 +60,7 @@ class NET_EXPORT_PRIVATE HttpStream {
// not be completed synchronously, in which case the result will be passed
// to the callback when available. Returns OK on success. The response
// headers are available in the HttpResponseInfo returned by GetResponseInfo
- virtual int ReadResponseHeaders(CompletionCallback* callback) = 0;
+ virtual int ReadResponseHeaders(OldCompletionCallback* callback) = 0;
// Provides access to HttpResponseInfo (owned by HttpStream).
virtual const HttpResponseInfo* GetResponseInfo() const = 0;
@@ -76,7 +76,7 @@ class NET_EXPORT_PRIVATE HttpStream {
// the socket acquires a reference to the provided buffer until the callback
// is invoked or the socket is destroyed.
virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Closes the stream.
// |not_reusable| indicates if the stream can be used for further requests.
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h
index 48ef2a2..e553ddb 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -211,7 +211,7 @@ class HttpStreamFactoryImpl::Job {
SSLConfig proxy_ssl_config_;
const BoundNetLog net_log_;
- CompletionCallbackImpl<Job> io_callback_;
+ OldCompletionCallbackImpl<Job> io_callback_;
scoped_ptr<ClientSocketHandle> connection_;
HttpNetworkSession* const session_;
HttpStreamFactoryImpl* const stream_factory_;
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 2d2c24a..153b42e 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -173,7 +173,7 @@ void PreconnectHelper(const TestCase& test,
request.load_flags = 0;
ProxyInfo proxy_info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
session->http_stream_factory()->PreconnectStreams(
test.num_streams, request, ssl_config, ssl_config, BoundNetLog());
@@ -194,7 +194,7 @@ class CapturePreconnectsSocketPool : public ParentPool {
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
ADD_FAILURE();
return ERR_UNEXPECTED;
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 31ce76b..b356517 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -75,7 +75,7 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
const HttpRequestHeaders& headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK_EQ(STATE_NONE, io_state_);
DCHECK(!user_callback_);
DCHECK(callback);
@@ -119,7 +119,7 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
return result > 0 ? OK : result;
}
-int HttpStreamParser::ReadResponseHeaders(CompletionCallback* callback) {
+int HttpStreamParser::ReadResponseHeaders(OldCompletionCallback* callback) {
DCHECK(io_state_ == STATE_REQUEST_SENT || io_state_ == STATE_DONE);
DCHECK(!user_callback_);
DCHECK(callback);
@@ -154,7 +154,7 @@ void HttpStreamParser::Close(bool not_reusable) {
}
int HttpStreamParser::ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(io_state_ == STATE_BODY_PENDING || io_state_ == STATE_DONE);
DCHECK(!user_callback_);
DCHECK(callback);
@@ -180,7 +180,7 @@ void HttpStreamParser::OnIOComplete(int result) {
// The client callback can do anything, including destroying this class,
// so any pending callback must be issued after everything else is done.
if (result != ERR_IO_PENDING && user_callback_) {
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(result);
}
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index 8853728..824a238 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -44,12 +44,12 @@ class HttpStreamParser : public ChunkCallback {
int SendRequest(const std::string& request_line,
const HttpRequestHeaders& headers,
UploadDataStream* request_body,
- HttpResponseInfo* response, CompletionCallback* callback);
+ HttpResponseInfo* response, OldCompletionCallback* callback);
- int ReadResponseHeaders(CompletionCallback* callback);
+ int ReadResponseHeaders(OldCompletionCallback* callback);
int ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
void Close(bool not_reusable);
@@ -175,13 +175,13 @@ class HttpStreamParser : public ChunkCallback {
// The callback to notify a user that their request or response is
// complete or there was an error
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
// In the client callback, the client can do anything, including
// destroying this class, so any pending callback must be issued
// after everything else is done. When it is time to issue the client
// callback, move it from |user_callback_| to |scheduled_callback_|.
- CompletionCallback* scheduled_callback_;
+ OldCompletionCallback* scheduled_callback_;
// The underlying socket.
ClientSocketHandle* const connection_;
@@ -189,7 +189,7 @@ class HttpStreamParser : public ChunkCallback {
BoundNetLog net_log_;
// Callback to be used when doing IO.
- CompletionCallbackImpl<HttpStreamParser> io_callback_;
+ OldCompletionCallbackImpl<HttpStreamParser> io_callback_;
// Stores an encoded chunk for chunked uploads.
// Note: This should perhaps be improved to not create copies of the data.
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h
index 3e702ea..3478da2 100644
--- a/net/http/http_transaction.h
+++ b/net/http/http_transaction.h
@@ -32,7 +32,7 @@ class NET_EXPORT_PRIVATE HttpTransaction {
//
// Returns OK if the transaction could be started synchronously, which means
// that the request was served from the cache. ERR_IO_PENDING is returned to
- // indicate that the CompletionCallback will be notified once response info
+ // indicate that the OldCompletionCallback will be notified once response info
// is available or if an IO error occurs. Any other return value indicates
// that the transaction could not be started.
//
@@ -43,7 +43,7 @@ class NET_EXPORT_PRIVATE HttpTransaction {
//
// Profiling information for the request is saved to |net_log| if non-NULL.
virtual int Start(const HttpRequestInfo* request_info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) = 0;
// Restarts the HTTP transaction, ignoring the last error. This call can
@@ -56,16 +56,16 @@ class NET_EXPORT_PRIVATE HttpTransaction {
//
// NOTE: The transaction is not responsible for deleting the callback object.
//
- virtual int RestartIgnoringLastError(CompletionCallback* callback) = 0;
+ virtual int RestartIgnoringLastError(OldCompletionCallback* callback) = 0;
// Restarts the HTTP transaction with a client certificate.
virtual int RestartWithCertificate(X509Certificate* client_cert,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Restarts the HTTP transaction with authentication credentials.
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Returns true if auth is ready to be continued. Callers should check
// this value anytime Start() completes: if it is true, the transaction
@@ -80,9 +80,9 @@ class NET_EXPORT_PRIVATE HttpTransaction {
//
// Response data is copied into the given buffer and the number of bytes
// copied is returned. ERR_IO_PENDING is returned if response data is not
- // yet available. The CompletionCallback is notified when the data copy
+ // yet available. The OldCompletionCallback is notified when the data copy
// completes, and it is passed the number of bytes that were successfully
- // copied. Or, if a read error occurs, the CompletionCallback is notified of
+ // copied. Or, if a read error occurs, the OldCompletionCallback is notified of
// the error. Any other negative return value indicates that the transaction
// could not be read.
//
@@ -91,7 +91,7 @@ class NET_EXPORT_PRIVATE HttpTransaction {
// a reference to the provided buffer.
//
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Stops further caching of this request by the HTTP cache, if there is any.
virtual void StopCaching() = 0;
diff --git a/net/http/http_transaction_unittest.cc b/net/http/http_transaction_unittest.cc
index 38347e0..a958d8b 100644
--- a/net/http/http_transaction_unittest.cc
+++ b/net/http/http_transaction_unittest.cc
@@ -221,7 +221,7 @@ MockNetworkTransaction::MockNetworkTransaction(MockNetworkLayer* factory)
MockNetworkTransaction::~MockNetworkTransaction() {}
int MockNetworkTransaction::Start(const net::HttpRequestInfo* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
const net::BoundNetLog& net_log) {
const MockTransaction* t = FindMockTransaction(request->url);
if (!t)
@@ -260,19 +260,19 @@ int MockNetworkTransaction::Start(const net::HttpRequestInfo* request,
}
int MockNetworkTransaction::RestartIgnoringLastError(
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_FAILED;
}
int MockNetworkTransaction::RestartWithCertificate(
net::X509Certificate* client_cert,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_FAILED;
}
int MockNetworkTransaction::RestartWithAuth(const string16& username,
const string16& password,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return net::ERR_FAILED;
}
@@ -281,7 +281,7 @@ bool MockNetworkTransaction::IsReadyToRestartForAuth() {
}
int MockNetworkTransaction::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
int data_len = static_cast<int>(data_.size());
int num = std::min(buf_len, data_len - data_cursor_);
if (num) {
@@ -316,13 +316,13 @@ uint64 MockNetworkTransaction::GetUploadProgress() const {
return 0;
}
-void MockNetworkTransaction::CallbackLater(net::CompletionCallback* callback,
+void MockNetworkTransaction::CallbackLater(net::OldCompletionCallback* callback,
int result) {
MessageLoop::current()->PostTask(FROM_HERE, task_factory_.NewRunnableMethod(
&MockNetworkTransaction::RunCallback, callback, result));
}
-void MockNetworkTransaction::RunCallback(net::CompletionCallback* callback,
+void MockNetworkTransaction::RunCallback(net::OldCompletionCallback* callback,
int result) {
callback->Run(result);
}
@@ -357,7 +357,7 @@ net::HttpNetworkSession* MockNetworkLayer::GetSession() {
int ReadTransaction(net::HttpTransaction* trans, std::string* result) {
int rv;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
std::string content;
do {
diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h
index fa6572a..3573204 100644
--- a/net/http/http_transaction_unittest.h
+++ b/net/http/http_transaction_unittest.h
@@ -159,22 +159,22 @@ class MockNetworkTransaction : public net::HttpTransaction {
virtual ~MockNetworkTransaction();
virtual int Start(const net::HttpRequestInfo* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
const net::BoundNetLog& net_log);
- virtual int RestartIgnoringLastError(net::CompletionCallback* callback);
+ virtual int RestartIgnoringLastError(net::OldCompletionCallback* callback);
virtual int RestartWithCertificate(net::X509Certificate* client_cert,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int RestartWithAuth(const string16& username,
const string16& password,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool IsReadyToRestartForAuth();
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual void StopCaching();
@@ -187,8 +187,8 @@ class MockNetworkTransaction : public net::HttpTransaction {
virtual uint64 GetUploadProgress() const;
private:
- void CallbackLater(net::CompletionCallback* callback, int result);
- void RunCallback(net::CompletionCallback* callback, int result);
+ void CallbackLater(net::OldCompletionCallback* callback, int result);
+ void RunCallback(net::OldCompletionCallback* callback, int result);
ScopedRunnableMethodFactory<MockNetworkTransaction> task_factory_;
net::HttpResponseInfo response_;
diff --git a/net/http/partial_data.cc b/net/http/partial_data.cc
index f991a95..290c0e7 100644
--- a/net/http/partial_data.cc
+++ b/net/http/partial_data.cc
@@ -66,7 +66,7 @@ class PartialData::Core {
PartialData* owner_;
int64 start_;
- net::CompletionCallbackImpl<Core> callback_;
+ net::OldCompletionCallbackImpl<Core> callback_;
DISALLOW_COPY_AND_ASSIGN(Core);
};
@@ -159,7 +159,7 @@ void PartialData::RestoreHeaders(HttpRequestHeaders* headers) const {
}
int PartialData::ShouldValidateCache(disk_cache::Entry* entry,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK_GE(current_range_start_, 0);
// Scan the disk cache for the first cached portion within this range.
@@ -417,7 +417,7 @@ void PartialData::FixContentLength(HttpResponseHeaders* headers) {
}
int PartialData::CacheRead(disk_cache::Entry* entry, IOBuffer* data,
- int data_len, CompletionCallback* callback) {
+ int data_len, OldCompletionCallback* callback) {
int read_len = std::min(data_len, cached_min_len_);
if (!read_len)
return 0;
@@ -437,7 +437,7 @@ int PartialData::CacheRead(disk_cache::Entry* entry, IOBuffer* data,
}
int PartialData::CacheWrite(disk_cache::Entry* entry, IOBuffer* data,
- int data_len, CompletionCallback* callback) {
+ int data_len, OldCompletionCallback* callback) {
DVLOG(3) << "To write: " << data_len;
if (sparse_entry_) {
return entry->WriteSparseData(current_range_start_, data, data_len,
@@ -484,7 +484,7 @@ void PartialData::GetAvailableRangeCompleted(int result, int64 start) {
if (result >= 0)
result = 1; // Return success, go ahead and validate the entry.
- CompletionCallback* cb = callback_;
+ OldCompletionCallback* cb = callback_;
callback_ = NULL;
cb->Run(result);
}
diff --git a/net/http/partial_data.h b/net/http/partial_data.h
index 6224fdf..bf14cf0 100644
--- a/net/http/partial_data.h
+++ b/net/http/partial_data.h
@@ -55,7 +55,7 @@ class PartialData {
// error code. If this method returns ERR_IO_PENDING, the |callback| will be
// notified when the result is ready.
int ShouldValidateCache(disk_cache::Entry* entry,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Builds the required |headers| to perform the proper cache validation for
// the next range to be fetched.
@@ -98,12 +98,12 @@ class PartialData {
// operation completes, OnCacheReadCompleted() must be called with the result
// of the operation.
int CacheRead(disk_cache::Entry* entry, IOBuffer* data, int data_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Writes |data_len| bytes to cache. This is basically a wrapper around the
// API of the cache that provides the right arguments for the current range.
int CacheWrite(disk_cache::Entry* entry, IOBuffer* data, int data_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// This method should be called when CacheRead() finishes the read, to update
// the internal state about the current range.
@@ -136,7 +136,7 @@ class PartialData {
bool truncated_; // We have an incomplete 200 stored.
bool initial_validation_; // Only used for truncated entries.
Core* core_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
DISALLOW_COPY_AND_ASSIGN(PartialData);
};
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
index aaefc27..eae0ba4 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
@@ -50,7 +50,7 @@ DhcpProxyScriptAdapterFetcher::~DhcpProxyScriptAdapterFetcher() {
}
void DhcpProxyScriptAdapterFetcher::Fetch(
- const std::string& adapter_name, CompletionCallback* callback) {
+ const std::string& adapter_name, OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(state_, STATE_START);
result_ = ERR_IO_PENDING;
@@ -202,7 +202,7 @@ void DhcpProxyScriptAdapterFetcher::OnFetcherDone(int result) {
void DhcpProxyScriptAdapterFetcher::TransitionToFinish() {
DCHECK(state_ == STATE_WAIT_DHCP || state_ == STATE_WAIT_URL);
state_ = STATE_FINISH;
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
callback_ = NULL;
// Be careful not to touch any member state after this, as the client
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
index 3bbbaa8..a8fc43c 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
@@ -45,7 +45,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptAdapterFetcher
// You may only call Fetch() once on a given instance of
// DhcpProxyScriptAdapterFetcher.
virtual void Fetch(const std::string& adapter_name,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Cancels the fetch on this adapter.
virtual void Cancel();
@@ -181,7 +181,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptAdapterFetcher
// Callback to let our client know we're done. Invalid in states
// START, FINISH and CANCEL.
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
// Container for our worker thread. NULL if not currently running.
scoped_refptr<WorkerThread> worker_thread_;
@@ -190,7 +190,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptAdapterFetcher
scoped_ptr<ProxyScriptFetcher> script_fetcher_;
// Callback from the script fetcher.
- CompletionCallbackImpl<DhcpProxyScriptAdapterFetcher>
+ OldCompletionCallbackImpl<DhcpProxyScriptAdapterFetcher>
script_fetcher_callback_;
// Implements a timeout on the call to the Win32 DHCP API.
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
index b8ed53c..b46bbad 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
@@ -151,7 +151,7 @@ class FetcherClient {
MessageLoop::current()->RunAllPending();
}
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
scoped_refptr<URLRequestContext> url_request_context_;
scoped_ptr<MockDhcpProxyScriptAdapterFetcher> fetcher_;
string16 pac_text_;
diff --git a/net/proxy/dhcp_proxy_script_fetcher.cc b/net/proxy/dhcp_proxy_script_fetcher.cc
index 3797ecd..2d6f526 100644
--- a/net/proxy/dhcp_proxy_script_fetcher.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher.cc
@@ -25,7 +25,7 @@ DoNothingDhcpProxyScriptFetcher::~DoNothingDhcpProxyScriptFetcher() {
}
int DoNothingDhcpProxyScriptFetcher::Fetch(string16* utf16_text,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_NOT_IMPLEMENTED;
}
diff --git a/net/proxy/dhcp_proxy_script_fetcher.h b/net/proxy/dhcp_proxy_script_fetcher.h
index 13e5c34..cd98a87 100644
--- a/net/proxy/dhcp_proxy_script_fetcher.h
+++ b/net/proxy/dhcp_proxy_script_fetcher.h
@@ -58,7 +58,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptFetcher {
//
// Only one fetch is allowed to be outstanding at a time.
virtual int Fetch(string16* utf16_text,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Aborts the in-progress fetch (if any).
virtual void Cancel() = 0;
@@ -87,7 +87,7 @@ class NET_EXPORT_PRIVATE DoNothingDhcpProxyScriptFetcher
virtual ~DoNothingDhcpProxyScriptFetcher();
virtual int Fetch(string16* utf16_text,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Cancel() OVERRIDE;
virtual const GURL& GetPacURL() const OVERRIDE;
private:
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc
index 000c918..dced471 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc
@@ -54,7 +54,7 @@ DhcpProxyScriptFetcherWin::~DhcpProxyScriptFetcherWin() {
}
int DhcpProxyScriptFetcherWin::Fetch(string16* utf16_text,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
if (state_ != STATE_START && state_ != STATE_DONE) {
NOTREACHED();
@@ -223,7 +223,7 @@ void DhcpProxyScriptFetcherWin::TransitionToDone() {
}
}
- CompletionCallback* callback = client_callback_;
+ OldCompletionCallback* callback = client_callback_;
CancelImpl();
DCHECK_EQ(state_, STATE_DONE);
DCHECK(fetchers_.empty());
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.h b/net/proxy/dhcp_proxy_script_fetcher_win.h
index 2b10849..ea14eff 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.h
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.h
@@ -35,7 +35,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptFetcherWin
virtual ~DhcpProxyScriptFetcherWin();
// DhcpProxyScriptFetcher implementation.
- int Fetch(string16* utf16_text, CompletionCallback* callback) OVERRIDE;
+ int Fetch(string16* utf16_text, OldCompletionCallback* callback) OVERRIDE;
void Cancel() OVERRIDE;
const GURL& GetPacURL() const OVERRIDE;
std::string GetFetcherName() const OVERRIDE;
@@ -164,13 +164,13 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptFetcherWin
FetcherVector fetchers_;
// Callback invoked when any fetcher completes.
- CompletionCallbackImpl<DhcpProxyScriptFetcherWin> fetcher_callback_;
+ OldCompletionCallbackImpl<DhcpProxyScriptFetcherWin> fetcher_callback_;
// Number of fetchers we are waiting for.
int num_pending_fetchers_;
// Lets our client know we're done. Not valid in states START or DONE.
- CompletionCallback* client_callback_;
+ OldCompletionCallback* client_callback_;
// Pointer to string we will write results to. Not valid in states
// START and DONE.
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
index 9ecd923..8f17456 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
@@ -116,7 +116,7 @@ class RealFetchTester {
scoped_ptr<DhcpProxyScriptFetcherWin> fetcher_;
bool finished_;
string16 pac_text_;
- CompletionCallbackImpl<RealFetchTester> completion_callback_;
+ OldCompletionCallbackImpl<RealFetchTester> completion_callback_;
base::OneShotTimer<RealFetchTester> timeout_;
base::OneShotTimer<RealFetchTester> cancel_timer_;
bool on_completion_is_error_;
@@ -223,7 +223,7 @@ class DummyDhcpProxyScriptAdapterFetcher
}
void Fetch(const std::string& adapter_name,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
client_callback_ = callback;
timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(fetch_delay_ms_),
this, &DummyDhcpProxyScriptAdapterFetcher::OnTimer);
@@ -262,7 +262,7 @@ class DummyDhcpProxyScriptAdapterFetcher
int result_;
string16 pac_script_;
int fetch_delay_ms_;
- CompletionCallback* client_callback_;
+ OldCompletionCallback* client_callback_;
base::OneShotTimer<DummyDhcpProxyScriptAdapterFetcher> timer_;
};
@@ -421,7 +421,7 @@ public:
bool finished_;
int result_;
string16 pac_text_;
- CompletionCallbackImpl<FetcherClient> completion_callback_;
+ OldCompletionCallbackImpl<FetcherClient> completion_callback_;
};
// We separate out each test's logic so that we can easily implement
diff --git a/net/proxy/init_proxy_resolver.cc b/net/proxy/init_proxy_resolver.cc
index 26d2e62..e8fe85e 100644
--- a/net/proxy/init_proxy_resolver.cc
+++ b/net/proxy/init_proxy_resolver.cc
@@ -59,7 +59,7 @@ InitProxyResolver::~InitProxyResolver() {
int InitProxyResolver::Init(const ProxyConfig& config,
const base::TimeDelta wait_delay,
ProxyConfig* effective_config,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(callback);
DCHECK(config.HasAutomaticSettings());
diff --git a/net/proxy/init_proxy_resolver.h b/net/proxy/init_proxy_resolver.h
index 2f90b7e..4c90ab4 100644
--- a/net/proxy/init_proxy_resolver.h
+++ b/net/proxy/init_proxy_resolver.h
@@ -66,7 +66,7 @@ class NET_EXPORT_PRIVATE InitProxyResolver {
int Init(const ProxyConfig& config,
const base::TimeDelta wait_delay,
ProxyConfig* effective_config,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
private:
// Represents the sources from which we can get PAC files; two types of
@@ -137,8 +137,8 @@ class NET_EXPORT_PRIVATE InitProxyResolver {
ProxyScriptFetcher* proxy_script_fetcher_;
DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher_;
- CompletionCallbackImpl<InitProxyResolver> io_callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<InitProxyResolver> io_callback_;
+ OldCompletionCallback* user_callback_;
size_t current_pac_source_index_;
diff --git a/net/proxy/init_proxy_resolver_unittest.cc b/net/proxy/init_proxy_resolver_unittest.cc
index 221b556..2e48429 100644
--- a/net/proxy/init_proxy_resolver_unittest.cc
+++ b/net/proxy/init_proxy_resolver_unittest.cc
@@ -99,7 +99,7 @@ class RuleBasedProxyScriptFetcher : public ProxyScriptFetcher {
// ProxyScriptFetcher implementation.
virtual int Fetch(const GURL& url,
string16* text,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
const Rules::Rule& rule = rules_->GetRuleByUrl(url);
int rv = rule.fetch_error;
EXPECT_NE(ERR_UNEXPECTED, rv);
@@ -124,7 +124,7 @@ class RuleBasedProxyResolver : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& /*url*/,
ProxyInfo* /*results*/,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request_handle*/,
const BoundNetLog& /*net_log*/) {
NOTREACHED();
@@ -141,7 +141,7 @@ class RuleBasedProxyResolver : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
const GURL url =
script_data->type() == ProxyResolverScriptData::TYPE_SCRIPT_URL ?
@@ -184,7 +184,7 @@ TEST(InitProxyResolverTest, CustomPacSucceeds) {
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingNetLog log(CapturingNetLog::kUnbounded);
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, &log);
@@ -226,7 +226,7 @@ TEST(InitProxyResolverTest, CustomPacFails1) {
rules.AddFailDownloadRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingNetLog log(CapturingNetLog::kUnbounded);
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, &log);
@@ -263,7 +263,7 @@ TEST(InitProxyResolverTest, CustomPacFails2) {
rules.AddFailParsingRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(kFailedParsing,
init.Init(config, base::TimeDelta(), NULL, &callback));
@@ -279,7 +279,7 @@ TEST(InitProxyResolverTest, HasNullProxyScriptFetcher) {
ProxyConfig config;
config.set_pac_url(GURL("http://custom/proxy.pac"));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
InitProxyResolver init(&resolver, NULL, &dhcp_fetcher, NULL);
EXPECT_EQ(ERR_UNEXPECTED,
init.Init(config, base::TimeDelta(), NULL, &callback));
@@ -298,7 +298,7 @@ TEST(InitProxyResolverTest, AutodetectSuccess) {
Rules::Rule rule = rules.AddSuccessRule("http://wpad/wpad.dat");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(OK, init.Init(
@@ -323,7 +323,7 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess1) {
rules.AddFailDownloadRule("http://wpad/wpad.dat");
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(OK, init.Init(
@@ -350,7 +350,7 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess2) {
rules.AddFailParsingRule("http://wpad/wpad.dat");
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingNetLog log(CapturingNetLog::kUnbounded);
ProxyConfig effective_config;
@@ -423,7 +423,7 @@ TEST(InitProxyResolverTest, AutodetectFailCustomFails1) {
rules.AddFailDownloadRule("http://wpad/wpad.dat");
rules.AddFailDownloadRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(kFailedDownloading,
init.Init(config, base::TimeDelta(), NULL, &callback));
@@ -444,7 +444,7 @@ TEST(InitProxyResolverTest, AutodetectFailCustomFails2) {
rules.AddFailDownloadRule("http://wpad/wpad.dat");
rules.AddFailParsingRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(kFailedParsing,
init.Init(config, base::TimeDelta(), NULL, &callback));
@@ -467,7 +467,7 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess2_NoFetch) {
rules.AddFailParsingRule(""); // Autodetect.
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(OK, init.Init(config, base::TimeDelta(), NULL, &callback));
EXPECT_EQ(rule.url, resolver.script_data()->url());
@@ -487,7 +487,7 @@ TEST(InitProxyResolverTest, CustomPacFails1_WithPositiveDelay) {
rules.AddFailDownloadRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingNetLog log(CapturingNetLog::kUnbounded);
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, &log);
EXPECT_EQ(ERR_IO_PENDING,
@@ -530,7 +530,7 @@ TEST(InitProxyResolverTest, CustomPacFails1_WithNegativeDelay) {
rules.AddFailDownloadRule("http://custom/proxy.pac");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingNetLog log(CapturingNetLog::kUnbounded);
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, &log);
EXPECT_EQ(kFailedDownloading,
@@ -559,7 +559,7 @@ class SynchronousSuccessDhcpFetcher : public DhcpProxyScriptFetcher {
: gurl_("http://dhcppac/"), expected_text_(expected_text) {
}
- int Fetch(string16* utf16_text, CompletionCallback* callback) OVERRIDE {
+ int Fetch(string16* utf16_text, OldCompletionCallback* callback) OVERRIDE {
*utf16_text = expected_text_;
return OK;
}
@@ -600,7 +600,7 @@ TEST(InitProxyResolverTest, AutodetectDhcpSuccess) {
rules.AddSuccessRule("http://bingo/");
rules.AddFailDownloadRule("http://wpad/wpad.dat");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
EXPECT_EQ(OK, init.Init(
@@ -625,7 +625,7 @@ TEST(InitProxyResolverTest, AutodetectDhcpFailParse) {
rules.AddFailParsingRule("http://bingo/");
rules.AddFailDownloadRule("http://wpad/wpad.dat");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ProxyConfig effective_config;
InitProxyResolver init(&resolver, &fetcher, &dhcp_fetcher, NULL);
// Since there is fallback to DNS-based WPAD, the final error will be that
@@ -644,7 +644,7 @@ class AsyncFailDhcpFetcher
AsyncFailDhcpFetcher() : callback_(NULL) {
}
- int Fetch(string16* utf16_text, CompletionCallback* callback) OVERRIDE {
+ int Fetch(string16* utf16_text, OldCompletionCallback* callback) OVERRIDE {
callback_ = callback;
MessageLoop::current()->PostTask(
FROM_HERE,
@@ -667,7 +667,7 @@ class AsyncFailDhcpFetcher
private:
GURL dummy_gurl_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
};
TEST(InitProxyResolverTest, DhcpCancelledByDestructor) {
@@ -685,7 +685,7 @@ TEST(InitProxyResolverTest, DhcpCancelledByDestructor) {
config.set_auto_detect(true);
rules.AddFailDownloadRule("http://wpad/wpad.dat");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// Scope so InitProxyResolver gets destroyed early.
{
diff --git a/net/proxy/mock_proxy_resolver.cc b/net/proxy/mock_proxy_resolver.cc
index bb29984..c73daad 100644
--- a/net/proxy/mock_proxy_resolver.cc
+++ b/net/proxy/mock_proxy_resolver.cc
@@ -13,7 +13,7 @@ MockAsyncProxyResolverBase::Request::Request(
MockAsyncProxyResolverBase* resolver,
const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: resolver_(resolver),
url_(url),
results_(results),
@@ -22,7 +22,7 @@ MockAsyncProxyResolverBase::Request::Request(
}
void MockAsyncProxyResolverBase::Request::CompleteNow(int rv) {
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
// May delete |this|.
resolver_->RemovePendingRequest(this);
@@ -36,7 +36,7 @@ MockAsyncProxyResolverBase::Request::~Request() {}
MockAsyncProxyResolverBase::SetPacScriptRequest::SetPacScriptRequest(
MockAsyncProxyResolverBase* resolver,
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: resolver_(resolver),
script_data_(script_data),
callback_(callback),
@@ -46,7 +46,7 @@ MockAsyncProxyResolverBase::SetPacScriptRequest::SetPacScriptRequest(
MockAsyncProxyResolverBase::SetPacScriptRequest::~SetPacScriptRequest() {}
void MockAsyncProxyResolverBase::SetPacScriptRequest::CompleteNow(int rv) {
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
// Will delete |this|.
resolver_->RemovePendingSetPacScriptRequest(this);
@@ -58,7 +58,7 @@ MockAsyncProxyResolverBase::~MockAsyncProxyResolverBase() {}
int MockAsyncProxyResolverBase::GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request_handle,
const BoundNetLog& /*net_log*/) {
scoped_refptr<Request> request = new Request(this, url, results, callback);
@@ -79,7 +79,7 @@ void MockAsyncProxyResolverBase::CancelRequest(RequestHandle request_handle) {
int MockAsyncProxyResolverBase::SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!pending_set_pac_script_request_.get());
pending_set_pac_script_request_.reset(
new SetPacScriptRequest(this, script_data, callback));
diff --git a/net/proxy/mock_proxy_resolver.h b/net/proxy/mock_proxy_resolver.h
index 6ee5e5a..8aa0101 100644
--- a/net/proxy/mock_proxy_resolver.h
+++ b/net/proxy/mock_proxy_resolver.h
@@ -26,11 +26,11 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
Request(MockAsyncProxyResolverBase* resolver,
const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
const GURL& url() const { return url_; }
ProxyInfo* results() const { return results_; }
- CompletionCallback* callback() const { return callback_; }
+ OldCompletionCallback* callback() const { return callback_; }
void CompleteNow(int rv);
@@ -42,7 +42,7 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
MockAsyncProxyResolverBase* resolver_;
const GURL url_;
ProxyInfo* results_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
MessageLoop* origin_loop_;
};
@@ -51,7 +51,7 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
SetPacScriptRequest(
MockAsyncProxyResolverBase* resolver,
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
~SetPacScriptRequest();
const ProxyResolverScriptData* script_data() const { return script_data_; }
@@ -61,7 +61,7 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
private:
MockAsyncProxyResolverBase* resolver_;
const scoped_refptr<ProxyResolverScriptData> script_data_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
MessageLoop* origin_loop_;
};
@@ -72,13 +72,13 @@ class MockAsyncProxyResolverBase : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request_handle,
const BoundNetLog& /*net_log*/) OVERRIDE;
virtual void CancelRequest(RequestHandle request_handle) OVERRIDE;
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void CancelSetPacScript() OVERRIDE;
const RequestsList& pending_requests() const {
diff --git a/net/proxy/mock_proxy_script_fetcher.cc b/net/proxy/mock_proxy_script_fetcher.cc
index 3e9b601..1c695b7 100644
--- a/net/proxy/mock_proxy_script_fetcher.cc
+++ b/net/proxy/mock_proxy_script_fetcher.cc
@@ -18,7 +18,7 @@ MockProxyScriptFetcher::MockProxyScriptFetcher()
// ProxyScriptFetcher implementation.
int MockProxyScriptFetcher::Fetch(const GURL& url,
string16* text,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!has_pending_request());
// Save the caller's information, and have them wait.
@@ -32,7 +32,7 @@ void MockProxyScriptFetcher::NotifyFetchCompletion(
int result, const std::string& ascii_text) {
DCHECK(has_pending_request());
*pending_request_text_ = ASCIIToUTF16(ascii_text);
- CompletionCallback* callback = pending_request_callback_;
+ OldCompletionCallback* callback = pending_request_callback_;
pending_request_callback_ = NULL;
callback->Run(result);
}
diff --git a/net/proxy/mock_proxy_script_fetcher.h b/net/proxy/mock_proxy_script_fetcher.h
index bd6ac42..9ddd780 100644
--- a/net/proxy/mock_proxy_script_fetcher.h
+++ b/net/proxy/mock_proxy_script_fetcher.h
@@ -25,7 +25,7 @@ class MockProxyScriptFetcher : public ProxyScriptFetcher {
// ProxyScriptFetcher implementation.
virtual int Fetch(const GURL& url,
string16* text,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Cancel() OVERRIDE;
virtual URLRequestContext* GetRequestContext() const OVERRIDE;
@@ -35,7 +35,7 @@ class MockProxyScriptFetcher : public ProxyScriptFetcher {
private:
GURL pending_request_url_;
- CompletionCallback* pending_request_callback_;
+ OldCompletionCallback* pending_request_callback_;
string16* pending_request_text_;
};
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index 99647e3..3f42dfe 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -100,7 +100,7 @@ class MultiThreadedProxyResolver::Job
TYPE_SET_PAC_SCRIPT_INTERNAL,
};
- Job(Type type, CompletionCallback* user_callback)
+ Job(Type type, OldCompletionCallback* user_callback)
: type_(type),
user_callback_(user_callback),
executor_(NULL),
@@ -157,7 +157,7 @@ class MultiThreadedProxyResolver::Job
void RunUserCallback(int result) {
DCHECK(has_user_callback());
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
// Null the callback so has_user_callback() will now return false.
user_callback_ = NULL;
callback->Run(result);
@@ -169,7 +169,7 @@ class MultiThreadedProxyResolver::Job
private:
const Type type_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
Executor* executor_;
bool was_cancelled_;
};
@@ -181,7 +181,7 @@ class MultiThreadedProxyResolver::SetPacScriptJob
: public MultiThreadedProxyResolver::Job {
public:
SetPacScriptJob(const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: Job(callback ? TYPE_SET_PAC_SCRIPT : TYPE_SET_PAC_SCRIPT_INTERNAL,
callback),
script_data_(script_data) {
@@ -220,7 +220,7 @@ class MultiThreadedProxyResolver::GetProxyForURLJob
// |results| -- the structure to fill with proxy resolve results.
GetProxyForURLJob(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log)
: Job(TYPE_GET_PROXY_FOR_URL, callback),
results_(results),
@@ -397,7 +397,7 @@ MultiThreadedProxyResolver::~MultiThreadedProxyResolver() {
int MultiThreadedProxyResolver::GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) {
DCHECK(CalledOnValidThread());
@@ -482,7 +482,7 @@ void MultiThreadedProxyResolver::PurgeMemory() {
int MultiThreadedProxyResolver::SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(callback);
diff --git a/net/proxy/multi_threaded_proxy_resolver.h b/net/proxy/multi_threaded_proxy_resolver.h
index 2c18321..4bd2f9e 100644
--- a/net/proxy/multi_threaded_proxy_resolver.h
+++ b/net/proxy/multi_threaded_proxy_resolver.h
@@ -94,7 +94,7 @@ class NET_EXPORT_PRIVATE MultiThreadedProxyResolver
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE;
virtual void CancelRequest(RequestHandle request) OVERRIDE;
@@ -102,7 +102,7 @@ class NET_EXPORT_PRIVATE MultiThreadedProxyResolver
virtual void PurgeMemory() OVERRIDE;
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* 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 fb09669..8e060a9 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -38,7 +38,7 @@ class MockProxyResolver : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE {
if (resolve_latency_ms_)
@@ -68,7 +68,7 @@ class MockProxyResolver : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
CheckIsOnWorkerThread();
last_script_data_ = script_data;
return OK;
@@ -137,7 +137,7 @@ class BlockableProxyResolver : public MockProxyResolver {
virtual int GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE {
if (should_block_) {
@@ -164,7 +164,7 @@ class ForwardingProxyResolver : public ProxyResolver {
virtual int GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE {
return impl_->GetProxyForURL(
@@ -181,7 +181,7 @@ class ForwardingProxyResolver : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
return impl_->SetPacScript(script_data, callback);
}
@@ -244,7 +244,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_Basic) {
// Call SetPacScriptByData() -- verify that it reaches the synchronous
// resolver.
- TestCompletionCallback set_script_callback;
+ TestOldCompletionCallback set_script_callback;
rv = resolver.SetPacScript(
ProxyResolverScriptData::FromUTF8("pac script bytes"),
&set_script_callback);
@@ -254,7 +254,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_Basic) {
mock->last_script_data()->utf16());
// Start request 0.
- TestCompletionCallback callback0;
+ TestOldCompletionCallback callback0;
CapturingBoundNetLog log0(CapturingNetLog::kUnbounded);
ProxyInfo results0;
rv = resolver.GetProxyForURL(
@@ -278,19 +278,19 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_Basic) {
// Start 3 more requests (request1 to request3).
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
ProxyInfo results1;
rv = resolver.GetProxyForURL(
GURL("http://request1"), &results1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyInfo results2;
rv = resolver.GetProxyForURL(
GURL("http://request2"), &results2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
ProxyInfo results3;
rv = resolver.GetProxyForURL(
GURL("http://request3"), &results3, &callback3, NULL, BoundNetLog());
@@ -318,7 +318,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_Basic) {
// There is no way to get a callback directly when PurgeMemory() completes, so
// we queue up a dummy request after the PurgeMemory() call and wait until it
// finishes to ensure PurgeMemory() has had a chance to run.
- TestCompletionCallback dummy_callback;
+ TestOldCompletionCallback dummy_callback;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("dummy"),
&dummy_callback);
EXPECT_EQ(OK, dummy_callback.WaitForResult());
@@ -337,7 +337,7 @@ TEST(MultiThreadedProxyResolverTest,
int rv;
// Initialize the resolver.
- TestCompletionCallback init_callback;
+ TestOldCompletionCallback init_callback;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("foo"),
&init_callback);
EXPECT_EQ(OK, init_callback.WaitForResult());
@@ -347,7 +347,7 @@ TEST(MultiThreadedProxyResolverTest,
// Start request 0.
ProxyResolver::RequestHandle request0;
- TestCompletionCallback callback0;
+ TestOldCompletionCallback callback0;
ProxyInfo results0;
CapturingBoundNetLog log0(CapturingNetLog::kUnbounded);
rv = resolver.GetProxyForURL(
@@ -356,7 +356,7 @@ TEST(MultiThreadedProxyResolverTest,
// Start 2 more requests (request1 and request2).
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
ProxyInfo results1;
CapturingBoundNetLog log1(CapturingNetLog::kUnbounded);
rv = resolver.GetProxyForURL(
@@ -364,7 +364,7 @@ TEST(MultiThreadedProxyResolverTest,
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyResolver::RequestHandle request2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyInfo results2;
CapturingBoundNetLog log2(CapturingNetLog::kUnbounded);
rv = resolver.GetProxyForURL(
@@ -431,7 +431,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {
int rv;
// Initialize the resolver.
- TestCompletionCallback init_callback;
+ TestOldCompletionCallback init_callback;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("foo"),
&init_callback);
EXPECT_EQ(OK, init_callback.WaitForResult());
@@ -441,7 +441,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {
// Start request 0.
ProxyResolver::RequestHandle request0;
- TestCompletionCallback callback0;
+ TestOldCompletionCallback callback0;
ProxyInfo results0;
rv = resolver.GetProxyForURL(
GURL("http://request0"), &results0, &callback0, &request0, BoundNetLog());
@@ -452,20 +452,20 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {
// Start 3 more requests (request1 : request3).
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
ProxyInfo results1;
rv = resolver.GetProxyForURL(
GURL("http://request1"), &results1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyResolver::RequestHandle request2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyInfo results2;
rv = resolver.GetProxyForURL(
GURL("http://request2"), &results2, &callback2, &request2, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
ProxyInfo results3;
rv = resolver.GetProxyForURL(
GURL("http://request3"), &results3, &callback3, NULL, BoundNetLog());
@@ -508,7 +508,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelRequestByDeleting) {
int rv;
// Initialize the resolver.
- TestCompletionCallback init_callback;
+ TestOldCompletionCallback init_callback;
rv = resolver->SetPacScript(ProxyResolverScriptData::FromUTF8("foo"),
&init_callback);
EXPECT_EQ(OK, init_callback.WaitForResult());
@@ -518,19 +518,19 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelRequestByDeleting) {
// Start 3 requests.
- TestCompletionCallback callback0;
+ TestOldCompletionCallback callback0;
ProxyInfo results0;
rv = resolver->GetProxyForURL(
GURL("http://request0"), &results0, &callback0, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
ProxyInfo results1;
rv = resolver->GetProxyForURL(
GURL("http://request1"), &results1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyInfo results2;
rv = resolver->GetProxyForURL(
GURL("http://request2"), &results2, &callback2, NULL, BoundNetLog());
@@ -569,7 +569,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelSetPacScript) {
int rv;
- TestCompletionCallback set_pac_script_callback;
+ TestOldCompletionCallback set_pac_script_callback;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("data"),
&set_pac_script_callback);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -578,7 +578,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_CancelSetPacScript) {
resolver.CancelSetPacScript();
// Start another SetPacScript request
- TestCompletionCallback set_pac_script_callback2;
+ TestOldCompletionCallback set_pac_script_callback2;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("data2"),
&set_pac_script_callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -606,7 +606,7 @@ TEST(MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
// Call SetPacScriptByData() -- verify that it reaches the synchronous
// resolver.
- TestCompletionCallback set_script_callback;
+ TestOldCompletionCallback set_script_callback;
rv = resolver.SetPacScript(
ProxyResolverScriptData::FromUTF8("pac script bytes"),
&set_script_callback);
@@ -618,7 +618,7 @@ TEST(MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
factory->resolvers()[0]->last_script_data()->utf16());
const int kNumRequests = 9;
- TestCompletionCallback callback[kNumRequests];
+ TestOldCompletionCallback callback[kNumRequests];
ProxyInfo results[kNumRequests];
ProxyResolver::RequestHandle request[kNumRequests];
@@ -675,7 +675,7 @@ TEST(MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
// We call SetPacScript again, solely to stop the current worker threads.
// (That way we can test to see the values observed by the synchronous
// resolvers in a non-racy manner).
- TestCompletionCallback set_script_callback2;
+ TestOldCompletionCallback set_script_callback2;
rv = resolver.SetPacScript(ProxyResolverScriptData::FromUTF8("xyz"),
&set_script_callback2);
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -718,7 +718,7 @@ TEST(MultiThreadedProxyResolverTest, OneThreadBlocked) {
EXPECT_TRUE(resolver.expects_pac_bytes());
// Initialize the resolver.
- TestCompletionCallback set_script_callback;
+ TestOldCompletionCallback set_script_callback;
rv = resolver.SetPacScript(
ProxyResolverScriptData::FromUTF8("pac script bytes"),
&set_script_callback);
@@ -730,7 +730,7 @@ TEST(MultiThreadedProxyResolverTest, OneThreadBlocked) {
factory->resolvers()[0]->last_script_data()->utf16());
const int kNumRequests = 4;
- TestCompletionCallback callback[kNumRequests];
+ TestOldCompletionCallback callback[kNumRequests];
ProxyInfo results[kNumRequests];
ProxyResolver::RequestHandle request[kNumRequests];
diff --git a/net/proxy/network_delegate_error_observer_unittest.cc b/net/proxy/network_delegate_error_observer_unittest.cc
index 551c006..7a98870 100644
--- a/net/proxy/network_delegate_error_observer_unittest.cc
+++ b/net/proxy/network_delegate_error_observer_unittest.cc
@@ -26,12 +26,12 @@ class TestNetworkDelegate : public net::NetworkDelegate {
private:
// net::NetworkDelegate:
virtual int OnBeforeURLRequest(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
GURL* new_url) OVERRIDE {
return net::OK;
}
virtual int OnBeforeSendHeaders(URLRequest* request,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
HttpRequestHeaders* headers) OVERRIDE {
return net::OK;
}
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h
index 0622436..20c903d 100644
--- a/net/proxy/proxy_resolver.h
+++ b/net/proxy/proxy_resolver.h
@@ -42,7 +42,7 @@ class NET_EXPORT_PRIVATE ProxyResolver {
// |*request| is written to, and can be passed to CancelRequest().
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) = 0;
@@ -67,7 +67,7 @@ class NET_EXPORT_PRIVATE ProxyResolver {
// the result through |callback|.
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& pac_script,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Optional shutdown code to be run before destruction. This is only used
// by the multithreaded runner to signal cleanup from origin thread
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc
index f9af1b7..935f6fb 100644
--- a/net/proxy/proxy_resolver_mac.cc
+++ b/net/proxy/proxy_resolver_mac.cc
@@ -69,7 +69,7 @@ ProxyResolverMac::~ProxyResolverMac() {}
// inspired by http://developer.apple.com/samplecode/CFProxySupportTool/
int ProxyResolverMac::GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request*/,
const BoundNetLog& net_log) {
base::mac::ScopedCFTypeRef<CFStringRef> query_ref(
@@ -193,7 +193,7 @@ void ProxyResolverMac::CancelSetPacScript() {
int ProxyResolverMac::SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) {
+ OldCompletionCallback* /*callback*/) {
script_data_ = script_data;
return OK;
}
diff --git a/net/proxy/proxy_resolver_mac.h b/net/proxy/proxy_resolver_mac.h
index cdc37e7..d10aa3e 100644
--- a/net/proxy/proxy_resolver_mac.h
+++ b/net/proxy/proxy_resolver_mac.h
@@ -24,7 +24,7 @@ class NET_EXPORT ProxyResolverMac : public ProxyResolver {
// ProxyResolver methods:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE;
@@ -34,7 +34,7 @@ class NET_EXPORT ProxyResolverMac : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) OVERRIDE;
+ OldCompletionCallback* /*callback*/) OVERRIDE;
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index 365234f..5c3113d 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -691,7 +691,7 @@ ProxyResolverV8::~ProxyResolverV8() {}
int ProxyResolverV8::GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request*/,
const BoundNetLog& net_log) {
// If the V8 instance has not been initialized (either because
@@ -739,7 +739,7 @@ void ProxyResolverV8::Shutdown() {
int ProxyResolverV8::SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) {
+ OldCompletionCallback* /*callback*/) {
DCHECK(script_data.get());
context_.reset();
if (script_data->utf16().empty())
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 1f64a18..60d9c0c 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -47,7 +47,7 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request*/,
const BoundNetLog& net_log) OVERRIDE;
virtual void CancelRequest(RequestHandle request) OVERRIDE;
@@ -56,7 +56,7 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
virtual void Shutdown() OVERRIDE;
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) OVERRIDE;
+ OldCompletionCallback* /*callback*/) OVERRIDE;
private:
// Context holds the Javascript state for the most recently loaded PAC
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index 13f5fb5..2581236 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -38,7 +38,7 @@ ProxyResolverWinHttp::~ProxyResolverWinHttp() {
int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
ProxyInfo* results,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request*/,
const BoundNetLog& /*net_log*/) {
// If we don't have a WinHTTP session, then create a new one.
@@ -130,7 +130,7 @@ void ProxyResolverWinHttp::CancelSetPacScript() {
int ProxyResolverWinHttp::SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) {
+ OldCompletionCallback* /*callback*/) {
if (script_data->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT) {
pac_url_ = GURL("http://wpad/wpad.dat");
} else {
diff --git a/net/proxy/proxy_resolver_winhttp.h b/net/proxy/proxy_resolver_winhttp.h
index 5c39673..7d278e4 100644
--- a/net/proxy/proxy_resolver_winhttp.h
+++ b/net/proxy/proxy_resolver_winhttp.h
@@ -24,7 +24,7 @@ class NET_EXPORT_PRIVATE ProxyResolverWinHttp : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* /*callback*/,
+ OldCompletionCallback* /*callback*/,
RequestHandle* /*request*/,
const BoundNetLog& /*net_log*/) OVERRIDE;
virtual void CancelRequest(RequestHandle request) OVERRIDE;
@@ -33,7 +33,7 @@ class NET_EXPORT_PRIVATE ProxyResolverWinHttp : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* /*callback*/) OVERRIDE;
+ OldCompletionCallback* /*callback*/) OVERRIDE;
private:
bool OpenWinHttpSession();
diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h
index 875b6e5..7c7e4eb 100644
--- a/net/proxy/proxy_script_fetcher.h
+++ b/net/proxy/proxy_script_fetcher.h
@@ -46,7 +46,7 @@ class NET_EXPORT_PRIVATE ProxyScriptFetcher {
//
// Only one fetch is allowed to be outstanding at a time.
virtual int Fetch(const GURL& url, string16* utf16_text,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Aborts the in-progress fetch (if any).
virtual void Cancel() = 0;
diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc
index bb0e57c..7492c1a 100644
--- a/net/proxy/proxy_script_fetcher_impl.cc
+++ b/net/proxy/proxy_script_fetcher_impl.cc
@@ -118,7 +118,7 @@ void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) {
int ProxyScriptFetcherImpl::Fetch(const GURL& url,
string16* text,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// It is invalid to call Fetch() while a request is already in progress.
DCHECK(!cur_request_.get());
@@ -290,7 +290,7 @@ void ProxyScriptFetcherImpl::FetchCompleted() {
}
int result_code = result_code_;
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
// Hold a reference to the URLRequestContext to prevent re-entrancy from
// ~URLRequestContext.
diff --git a/net/proxy/proxy_script_fetcher_impl.h b/net/proxy/proxy_script_fetcher_impl.h
index 0236559..a2a7b17 100644
--- a/net/proxy/proxy_script_fetcher_impl.h
+++ b/net/proxy/proxy_script_fetcher_impl.h
@@ -46,7 +46,7 @@ class NET_EXPORT ProxyScriptFetcherImpl : public ProxyScriptFetcher,
// ProxyScriptFetcher methods:
virtual int Fetch(const GURL& url, string16* text,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Cancel() OVERRIDE;
virtual URLRequestContext* GetRequestContext() const OVERRIDE;
@@ -101,7 +101,7 @@ class NET_EXPORT ProxyScriptFetcherImpl : public ProxyScriptFetcher,
int cur_request_id_;
// Callback to invoke on completion of the fetch.
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
// Holds the error condition that was hit on the current request, or OK.
int result_code_;
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index 9e39fb8..d706632 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -132,7 +132,7 @@ TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
{ // Fetch a non-existent file.
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(GetTestFileUrl("does-not-exist"),
&text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
@@ -141,7 +141,7 @@ TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
}
{ // Fetch a file that exists.
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(GetTestFileUrl("pac.txt"),
&text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
@@ -161,7 +161,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
{ // Fetch a PAC with mime type "text/plain"
GURL url(test_server_.GetURL("files/pac.txt"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -170,7 +170,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
{ // Fetch a PAC with mime type "text/html"
GURL url(test_server_.GetURL("files/pac.html"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -179,7 +179,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
{ // Fetch a PAC with mime type "application/x-ns-proxy-autoconfig"
GURL url(test_server_.GetURL("files/pac.nsproxy"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -196,7 +196,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpStatusCode) {
{ // Fetch a PAC which gives a 500 -- FAIL
GURL url(test_server_.GetURL("files/500.pac"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_PAC_STATUS_NOT_OK, callback.WaitForResult());
@@ -205,7 +205,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpStatusCode) {
{ // Fetch a PAC which gives a 404 -- FAIL
GURL url(test_server_.GetURL("files/404.pac"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_PAC_STATUS_NOT_OK, callback.WaitForResult());
@@ -223,7 +223,7 @@ TEST_F(ProxyScriptFetcherImplTest, ContentDisposition) {
// have no effect.
GURL url(test_server_.GetURL("files/downloadable.pac"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -240,7 +240,7 @@ TEST_F(ProxyScriptFetcherImplTest, NoCache) {
GURL url(test_server_.GetURL("files/cacheable_1hr.pac"));
{
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -255,7 +255,7 @@ TEST_F(ProxyScriptFetcherImplTest, NoCache) {
// get a success.
{
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_CONNECTION_REFUSED, callback.WaitForResult());
@@ -282,7 +282,7 @@ TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
for (size_t i = 0; i < arraysize(urls); ++i) {
const GURL& url = urls[i];
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_FILE_TOO_BIG, callback.WaitForResult());
@@ -295,7 +295,7 @@ TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
{ // Make sure we can still fetch regular URLs.
GURL url(test_server_.GetURL("files/pac.nsproxy"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -317,7 +317,7 @@ TEST_F(ProxyScriptFetcherImplTest, Hang) {
// after 500 ms, and fail with a timeout error.
{ GURL url(test_server_.GetURL("slow/proxy.pac?1.2"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_TIMED_OUT, callback.WaitForResult());
@@ -330,7 +330,7 @@ TEST_F(ProxyScriptFetcherImplTest, Hang) {
{ // Make sure we can still fetch regular URLs.
GURL url(test_server_.GetURL("files/pac.nsproxy"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -351,7 +351,7 @@ TEST_F(ProxyScriptFetcherImplTest, Encodings) {
{
GURL url(test_server_.GetURL("files/gzipped_pac"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -363,7 +363,7 @@ TEST_F(ProxyScriptFetcherImplTest, Encodings) {
{
GURL url(test_server_.GetURL("files/utf16be_pac"));
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -390,7 +390,7 @@ TEST_F(ProxyScriptFetcherImplTest, DataURLs) {
{
GURL url(kEncodedUrl);
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(OK, result);
EXPECT_EQ(ASCIIToUTF16(kPacScript), text);
@@ -403,7 +403,7 @@ TEST_F(ProxyScriptFetcherImplTest, DataURLs) {
{
GURL url(kEncodedUrlBroken);
string16 text;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = pac_fetcher.Fetch(url, &text, &callback);
EXPECT_EQ(ERR_FAILED, result);
}
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index c8f3620..41ba41d 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -108,7 +108,7 @@ class ProxyResolverNull : public ProxyResolver {
// ProxyResolver implementation:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE {
return ERR_NOT_IMPLEMENTED;
@@ -124,7 +124,7 @@ class ProxyResolverNull : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& /*script_data*/,
- CompletionCallback* /*callback*/) OVERRIDE {
+ OldCompletionCallback* /*callback*/) OVERRIDE {
return ERR_NOT_IMPLEMENTED;
}
};
@@ -139,7 +139,7 @@ class ProxyResolverFromPacString : public ProxyResolver {
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) OVERRIDE {
results->UsePacString(pac_string_);
@@ -156,7 +156,7 @@ class ProxyResolverFromPacString : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& pac_script,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
return OK;
}
@@ -299,7 +299,7 @@ class ProxyService::PacRequest
PacRequest(ProxyService* service,
const GURL& url,
ProxyInfo* results,
- CompletionCallback* user_callback,
+ OldCompletionCallback* user_callback,
const BoundNetLog& net_log)
: service_(service),
user_callback_(user_callback),
@@ -393,7 +393,7 @@ class ProxyService::PacRequest
// Remove this completed PacRequest from the service's pending list.
/// (which will probably cause deletion of |this|).
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
service_->RemovePendingRequest(this);
callback->Run(result_code);
@@ -405,8 +405,8 @@ class ProxyService::PacRequest
// requests are cancelled during ~ProxyService, so this is guaranteed
// to be valid throughout our lifetime.
ProxyService* service_;
- CompletionCallback* user_callback_;
- CompletionCallbackImpl<PacRequest> io_callback_;
+ OldCompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<PacRequest> io_callback_;
ProxyInfo* results_;
GURL url_;
ProxyResolver::RequestHandle resolve_job_;
@@ -546,7 +546,7 @@ ProxyService* ProxyService::CreateFixedFromPacResult(
int ProxyService::ResolveProxy(const GURL& raw_url,
ProxyInfo* result,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PacRequest** pac_request,
const BoundNetLog& net_log) {
DCHECK(CalledOnValidThread());
@@ -720,7 +720,7 @@ void ProxyService::OnInitProxyResolverComplete(int result) {
int ProxyService::ReconsiderProxyAfterError(const GURL& url,
ProxyInfo* result,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PacRequest** pac_request,
const BoundNetLog& net_log) {
DCHECK(CalledOnValidThread());
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index cc308dd..e37b959 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -75,7 +75,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Profiling information for the request is saved to |net_log| if non-NULL.
int ResolveProxy(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PacRequest** pac_request,
const BoundNetLog& net_log);
@@ -93,7 +93,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Profiling information for the request is saved to |net_log| if non-NULL.
int ReconsiderProxyAfterError(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PacRequest** pac_request,
const BoundNetLog& net_log);
@@ -338,7 +338,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher_;
// Callback for when |init_proxy_resolver_| is done.
- CompletionCallbackImpl<ProxyService> init_proxy_resolver_callback_;
+ OldCompletionCallbackImpl<ProxyService> init_proxy_resolver_callback_;
// Helper to download the PAC script (wpad + custom) and apply fallback rules.
//
@@ -394,7 +394,7 @@ class NET_EXPORT SyncProxyServiceHelper
ProxyService* proxy_service_;
base::WaitableEvent event_;
- CompletionCallbackImpl<SyncProxyServiceHelper> callback_;
+ OldCompletionCallbackImpl<SyncProxyServiceHelper> callback_;
ProxyInfo proxy_info_;
int result_;
};
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index b2345d5..3cb0329 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -78,7 +78,7 @@ TEST(ProxyServiceTest, Direct) {
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
int rv = service.ResolveProxy(url, &info, &callback, NULL, log.bound());
EXPECT_EQ(OK, rv);
@@ -111,7 +111,7 @@ TEST(ProxyServiceTest, PAC) {
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
int rv = service.ResolveProxy(url, &info, &callback, NULL, log.bound());
@@ -160,7 +160,7 @@ TEST(ProxyServiceTest, PAC_NoIdentityOrHash) {
GURL url("http://username:password@www.google.com/?ref#hash#hash");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(url, &info, &callback, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -187,7 +187,7 @@ TEST(ProxyServiceTest, PAC_FailoverWithoutDirect) {
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -209,7 +209,7 @@ TEST(ProxyServiceTest, PAC_FailoverWithoutDirect) {
// Now, imagine that connecting to foopy:8080 fails: there is nothing
// left to fallback to, since our proxy list was NOT terminated by
// DIRECT.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
// ReconsiderProxyAfterError returns error indicating nothing left.
@@ -244,7 +244,7 @@ TEST(ProxyServiceTest, PAC_FailoverAfterDirect) {
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -264,7 +264,7 @@ TEST(ProxyServiceTest, PAC_FailoverAfterDirect) {
EXPECT_TRUE(info.is_direct());
// Fallback 1.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -272,14 +272,14 @@ TEST(ProxyServiceTest, PAC_FailoverAfterDirect) {
EXPECT_EQ("foobar:10", info.proxy_server().ToURI());
// Fallback 2.
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(url, &info, &callback3, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
// Fallback 3.
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -287,7 +287,7 @@ TEST(ProxyServiceTest, PAC_FailoverAfterDirect) {
EXPECT_EQ("foobar:20", info.proxy_server().ToURI());
// Fallback 4 -- Nothing to fall back to!
- TestCompletionCallback callback5;
+ TestOldCompletionCallback callback5;
rv = service.ReconsiderProxyAfterError(url, &info, &callback5, NULL,
BoundNetLog());
EXPECT_EQ(ERR_FAILED, rv);
@@ -309,7 +309,7 @@ TEST(ProxyServiceTest, ProxyResolverFails) {
// Start first resolve request.
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -330,7 +330,7 @@ TEST(ProxyServiceTest, ProxyResolverFails) {
// The second resolve request will try to run through the proxy resolver,
// regardless of whether the first request failed in it.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(url, &info, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -364,7 +364,7 @@ TEST(ProxyServiceTest, ProxyScriptFetcherFailsDownloadingMandatoryPac) {
// Start first resolve request.
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -382,7 +382,7 @@ TEST(ProxyServiceTest, ProxyScriptFetcherFailsDownloadingMandatoryPac) {
// As the proxy resolver failed the request and is configured for a mandatory
// PAC script, ProxyService must not implicitly fall-back to DIRECT.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(url, &info, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_MANDATORY_PROXY_CONFIGURATION_FAILED, rv);
EXPECT_FALSE(info.is_direct());
@@ -411,7 +411,7 @@ TEST(ProxyServiceTest, ProxyResolverFailsParsingJavaScriptMandatoryPac) {
// Start resolve request.
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(url, &info, &callback, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -458,7 +458,7 @@ TEST(ProxyServiceTest, ProxyResolverFailsInJavaScriptMandatoryPac) {
// Start first resolve request.
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -480,7 +480,7 @@ TEST(ProxyServiceTest, ProxyResolverFailsInJavaScriptMandatoryPac) {
// The second resolve request will try to run through the proxy resolver,
// regardless of whether the first request failed in it.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(url, &info, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -512,7 +512,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
// Get the proxy information.
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -534,7 +534,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
// Fake an error on the proxy.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -545,7 +545,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
// first proxy as bad.
service.ReportSuccess(info);
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(url, &info, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -563,7 +563,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
EXPECT_EQ("foopy3:7070", info.proxy_server().ToURI());
// We fake another error. It should now try the third one.
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -572,7 +572,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
// We fake another error. At this point we have tried all of the
// proxy servers we thought were valid; next we try the proxy server
// that was in our bad proxies map (foopy1:8080).
- TestCompletionCallback callback5;
+ TestOldCompletionCallback callback5;
rv = service.ReconsiderProxyAfterError(url, &info, &callback5, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -580,7 +580,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
// Fake another error, the last proxy is gone, the list should now be empty,
// so there is nothing left to try.
- TestCompletionCallback callback6;
+ TestOldCompletionCallback callback6;
rv = service.ReconsiderProxyAfterError(url, &info, &callback6, NULL,
BoundNetLog());
EXPECT_EQ(ERR_FAILED, rv);
@@ -588,7 +588,7 @@ TEST(ProxyServiceTest, ProxyFallback) {
EXPECT_TRUE(info.is_empty());
// Look up proxies again
- TestCompletionCallback callback7;
+ TestOldCompletionCallback callback7;
rv = service.ResolveProxy(url, &info, &callback7, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -623,7 +623,7 @@ TEST(ProxyServiceTest, ProxyFallbackToDirect) {
// Get the proxy information.
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -645,7 +645,7 @@ TEST(ProxyServiceTest, ProxyFallbackToDirect) {
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
// Fake an error on the proxy.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -654,7 +654,7 @@ TEST(ProxyServiceTest, ProxyFallbackToDirect) {
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
// Fake an error on this proxy as well.
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(url, &info, &callback3, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -663,7 +663,7 @@ TEST(ProxyServiceTest, ProxyFallbackToDirect) {
EXPECT_TRUE(info.is_direct());
// Now we tell the proxy service that even DIRECT failed.
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL,
BoundNetLog());
// There was nothing left to try after DIRECT, so we are out of
@@ -685,7 +685,7 @@ TEST(ProxyServiceTest, ProxyFallback_NewSettings) {
// Get the proxy information.
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -710,7 +710,7 @@ TEST(ProxyServiceTest, ProxyFallback_NewSettings) {
config_service->SetConfig(
ProxyConfig::CreateFromCustomPacURL(GURL("http://foopy-new/proxy.pac")));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -731,7 +731,7 @@ TEST(ProxyServiceTest, ProxyFallback_NewSettings) {
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
// We fake another error. It should now ignore the first one.
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ReconsiderProxyAfterError(url, &info, &callback3, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -743,7 +743,7 @@ TEST(ProxyServiceTest, ProxyFallback_NewSettings) {
GURL("http://foopy-new2/proxy.pac")));
// We fake another error. It should go back to the first proxy.
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL,
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -777,7 +777,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfig) {
// Get the proxy information.
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -797,7 +797,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfig) {
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
// Fake a proxy error.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -808,7 +808,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfig) {
// Fake a PAC failure.
ProxyInfo info2;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(url, &info2, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -828,7 +828,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfig) {
// proxy list. Since we have not marked the configuration as bad, it should
// "just work" the next time we call it.
ProxyInfo info3;
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info3, &callback4, NULL,
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -864,7 +864,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfigMandatory) {
// Get the proxy information.
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(url, &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -884,7 +884,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfigMandatory) {
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
// Fake a proxy error.
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -895,7 +895,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfigMandatory) {
// Fake a PAC failure.
ProxyInfo info2;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(url, &info2, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -916,7 +916,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfigMandatory) {
// proxy list. Since we have not marked the configuration as bad, it should
// "just work" the next time we call it.
ProxyInfo info3;
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = service.ReconsiderProxyAfterError(url, &info3, &callback4, NULL,
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -938,7 +938,7 @@ TEST(ProxyServiceTest, ProxyFallback_BadConfigMandatory) {
TEST(ProxyServiceTest, ProxyBypassList) {
// Test that the proxy bypass rules are consulted.
- TestCompletionCallback callback[2];
+ TestOldCompletionCallback callback[2];
ProxyInfo info[2];
ProxyConfig config;
config.proxy_rules().ParseFromString("foopy1:8080;foopy2:9090");
@@ -973,7 +973,7 @@ TEST(ProxyServiceTest, PerProtocolProxyTests) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("http://www.msn.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -985,7 +985,7 @@ TEST(ProxyServiceTest, PerProtocolProxyTests) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("ftp://ftp.google.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -997,7 +997,7 @@ TEST(ProxyServiceTest, PerProtocolProxyTests) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("https://webbranch.techcu.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1010,7 +1010,7 @@ TEST(ProxyServiceTest, PerProtocolProxyTests) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("http://www.microsoft.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1033,7 +1033,7 @@ TEST(ProxyServiceTest, DefaultProxyFallbackToSOCKS) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("http://www.msn.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1045,7 +1045,7 @@ TEST(ProxyServiceTest, DefaultProxyFallbackToSOCKS) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("ftp://ftp.google.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1057,7 +1057,7 @@ TEST(ProxyServiceTest, DefaultProxyFallbackToSOCKS) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("https://webbranch.techcu.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1069,7 +1069,7 @@ TEST(ProxyServiceTest, DefaultProxyFallbackToSOCKS) {
new MockProxyConfigService(config), new MockAsyncProxyResolver, NULL);
GURL test_url("unknown://www.microsoft.com");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(test_url, &info, &callback, NULL,
BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1090,7 +1090,7 @@ TEST(ProxyServiceTest, CancelInProgressRequest) {
// Start 3 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1108,7 +1108,7 @@ TEST(ProxyServiceTest, CancelInProgressRequest) {
EXPECT_EQ(GURL("http://request1"), resolver->pending_requests()[0]->url());
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, &request2, BoundNetLog());
@@ -1117,7 +1117,7 @@ TEST(ProxyServiceTest, CancelInProgressRequest) {
EXPECT_EQ(GURL("http://request2"), resolver->pending_requests()[1]->url());
ProxyInfo info3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(
GURL("http://request3"), &info3, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1168,7 +1168,7 @@ TEST(ProxyServiceTest, InitialPACScriptDownload) {
// Start 3 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1178,13 +1178,13 @@ TEST(ProxyServiceTest, InitialPACScriptDownload) {
EXPECT_EQ(GURL("http://foopy/proxy.pac"), fetcher->pending_request_url());
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(
GURL("http://request3"), &info3, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1248,7 +1248,7 @@ TEST(ProxyServiceTest, ChangeScriptFetcherWhilePACDownloadInProgress) {
// Start 2 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1258,7 +1258,7 @@ TEST(ProxyServiceTest, ChangeScriptFetcherWhilePACDownloadInProgress) {
EXPECT_EQ(GURL("http://foopy/proxy.pac"), fetcher->pending_request_url());
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1306,7 +1306,7 @@ TEST(ProxyServiceTest, CancelWhilePACFetching) {
// Start 3 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
ProxyService::PacRequest* request1;
CapturingBoundNetLog log1(CapturingNetLog::kUnbounded);
int rv = service.ResolveProxy(
@@ -1318,14 +1318,14 @@ TEST(ProxyServiceTest, CancelWhilePACFetching) {
EXPECT_EQ(GURL("http://foopy/proxy.pac"), fetcher->pending_request_url());
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, &request2, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = service.ResolveProxy(
GURL("http://request3"), &info3, &callback3, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1399,13 +1399,13 @@ TEST(ProxyServiceTest, FallbackFromAutodetectToCustomPac) {
// Start 2 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, &request2, BoundNetLog());
@@ -1470,13 +1470,13 @@ TEST(ProxyServiceTest, FallbackFromAutodetectToCustomPac2) {
// Start 2 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, &request2, BoundNetLog());
@@ -1546,13 +1546,13 @@ TEST(ProxyServiceTest, FallbackFromAutodetectToCustomToManual) {
// Start 2 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, &request2, BoundNetLog());
@@ -1604,7 +1604,7 @@ TEST(ProxyServiceTest, BypassDoesntApplyToPac) {
// Start 1 requests.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://www.google.com"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1635,7 +1635,7 @@ TEST(ProxyServiceTest, BypassDoesntApplyToPac) {
// Start another request, it should pickup the bypass item.
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://www.google.com"), &info2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1672,7 +1672,7 @@ TEST(ProxyServiceTest, DeleteWhileInitProxyResolverHasOutstandingFetch) {
// Start 1 request.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://www.google.com"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1701,7 +1701,7 @@ TEST(ProxyServiceTest, DeleteWhileInitProxyResolverHasOutstandingSet) {
GURL url("http://www.google.com/");
ProxyInfo info;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = service.ResolveProxy(url, &info, &callback, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1718,7 +1718,7 @@ TEST(ProxyServiceTest, ResetProxyConfigService) {
new MockAsyncProxyResolverExpectsBytes, NULL);
ProxyInfo info;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info, &callback1, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1728,7 +1728,7 @@ TEST(ProxyServiceTest, ResetProxyConfigService) {
config2.proxy_rules().ParseFromString("foopy2:8080");
config2.set_auto_detect(false);
service.ResetConfigService(new MockProxyConfigService(config2));
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://request2"), &info, &callback2, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1747,7 +1747,7 @@ TEST(ProxyServiceTest, UpdateConfigFromPACToDirect) {
// Start 1 request.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://www.google.com"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1778,7 +1778,7 @@ TEST(ProxyServiceTest, UpdateConfigFromPACToDirect) {
// Start another request -- the effective configuration has changed.
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://www.google.com"), &info2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -1808,7 +1808,7 @@ TEST(ProxyServiceTest, NetworkChangeTriggersPacRefetch) {
// Start 1 request.
ProxyInfo info1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
int rv = service.ResolveProxy(
GURL("http://request1"), &info1, &callback1, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1850,7 +1850,7 @@ TEST(ProxyServiceTest, NetworkChangeTriggersPacRefetch) {
// Start a second request.
ProxyInfo info2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = service.ResolveProxy(
GURL("http://request2"), &info2, &callback2, NULL, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
diff --git a/net/proxy/sync_host_resolver_bridge.cc b/net/proxy/sync_host_resolver_bridge.cc
index 4d204bc..7bd20c6 100644
--- a/net/proxy/sync_host_resolver_bridge.cc
+++ b/net/proxy/sync_host_resolver_bridge.cc
@@ -52,7 +52,7 @@ class SyncHostResolverBridge::Core
HostResolver* const host_resolver_;
MessageLoop* const host_resolver_loop_;
- net::CompletionCallbackImpl<Core> callback_;
+ net::OldCompletionCallbackImpl<Core> callback_;
// The result from the current request (set on |host_resolver_loop_|).
int err_;
// The currently outstanding request to |host_resolver_|, or NULL.
diff --git a/net/proxy/sync_host_resolver_bridge_unittest.cc b/net/proxy/sync_host_resolver_bridge_unittest.cc
index 75f7f16..4600ab3 100644
--- a/net/proxy/sync_host_resolver_bridge_unittest.cc
+++ b/net/proxy/sync_host_resolver_bridge_unittest.cc
@@ -32,7 +32,7 @@ class BlockableHostResolver : public HostResolver {
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE {
EXPECT_TRUE(callback);
@@ -91,7 +91,7 @@ class SyncProxyResolver : public ProxyResolver {
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log) {
EXPECT_FALSE(callback);
@@ -121,7 +121,7 @@ class SyncProxyResolver : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- CompletionCallback* callback) OVERRIDE {
+ OldCompletionCallback* callback) OVERRIDE {
return OK;
}
@@ -175,7 +175,7 @@ class IOThread : public base::Thread {
1u));
// Initialize the resolver.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
proxy_resolver_->SetPacScript(ProxyResolverScriptData::FromURL(GURL()),
&callback);
EXPECT_EQ(OK, callback.WaitForResult());
@@ -211,7 +211,7 @@ class IOThread : public base::Thread {
scoped_ptr<ProxyResolver> proxy_resolver_;
// Data for the outstanding request to the single threaded proxy resolver.
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
ProxyInfo results_;
ProxyResolver::RequestHandle request_;
};
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index 29b5bd3..8309c3f 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -73,7 +73,7 @@ LoadState ClientSocketHandle::GetLoadState() const {
}
void ClientSocketHandle::OnIOComplete(int result) {
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
HandleInitCompletion(result);
callback->Run(result);
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h
index 3f75ccb..cab6ef6 100644
--- a/net/socket/client_socket_handle.h
+++ b/net/socket/client_socket_handle.h
@@ -74,7 +74,7 @@ class NET_EXPORT ClientSocketHandle {
int Init(const std::string& group_name,
const scoped_refptr<SocketParams>& socket_params,
RequestPriority priority,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PoolType* pool,
const BoundNetLog& net_log);
@@ -167,8 +167,8 @@ class NET_EXPORT ClientSocketHandle {
scoped_ptr<StreamSocket> socket_;
std::string group_name_;
bool is_reused_;
- CompletionCallbackImpl<ClientSocketHandle> callback_;
- CompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<ClientSocketHandle> callback_;
+ OldCompletionCallback* user_callback_;
base::TimeDelta idle_time_;
int pool_id_; // See ClientSocketPool::ReleaseSocket() for an explanation.
bool is_ssl_error_;
@@ -187,7 +187,7 @@ template <typename SocketParams, typename PoolType>
int ClientSocketHandle::Init(const std::string& group_name,
const scoped_refptr<SocketParams>& socket_params,
RequestPriority priority,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
PoolType* pool,
const BoundNetLog& net_log) {
requesting_source_ = net_log.source();
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index 0c6b8a4..82d7390 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -67,7 +67,7 @@ class NET_EXPORT ClientSocketPool {
const void* params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) = 0;
// RequestSockets is used to request that |num_sockets| be connected in the
@@ -87,7 +87,7 @@ class NET_EXPORT ClientSocketPool {
// Called to cancel a RequestSocket call that returned ERR_IO_PENDING. The
// same handle parameter must be passed to this method as was passed to the
- // RequestSocket call being cancelled. The associated CompletionCallback is
+ // RequestSocket call being cancelled. The associated OldCompletionCallback is
// not run. However, for performance, we will let one ConnectJob complete
// and go idle.
virtual void CancelRequest(const std::string& group_name,
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 75fd528..231254a 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -157,7 +157,7 @@ namespace internal {
ClientSocketPoolBaseHelper::Request::Request(
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestPriority priority,
bool ignore_limits,
Flags flags,
@@ -1027,7 +1027,7 @@ bool ClientSocketPoolBaseHelper::CloseOneIdleSocketExceptInGroup(
}
void ClientSocketPoolBaseHelper::InvokeUserCallbackLater(
- ClientSocketHandle* handle, CompletionCallback* callback, int rv) {
+ ClientSocketHandle* handle, OldCompletionCallback* callback, int rv) {
CHECK(!ContainsKey(pending_callback_map_, handle));
pending_callback_map_[handle] = CallbackResultPair(callback, rv);
MessageLoop::current()->PostTask(
@@ -1046,7 +1046,7 @@ void ClientSocketPoolBaseHelper::InvokeUserCallback(
return;
CHECK(!handle->is_initialized());
- CompletionCallback* callback = it->second.callback;
+ OldCompletionCallback* callback = it->second.callback;
int result = it->second.result;
pending_callback_map_.erase(it);
callback->Run(result);
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 3ccf5bd..864369b 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -188,7 +188,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
class NET_EXPORT_PRIVATE Request {
public:
Request(ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestPriority priority,
bool ignore_limits,
Flags flags,
@@ -197,7 +197,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
virtual ~Request();
ClientSocketHandle* handle() const { return handle_; }
- CompletionCallback* callback() const { return callback_; }
+ OldCompletionCallback* callback() const { return callback_; }
RequestPriority priority() const { return priority_; }
bool ignore_limits() const { return ignore_limits_; }
Flags flags() const { return flags_; }
@@ -205,7 +205,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
private:
ClientSocketHandle* const handle_;
- CompletionCallback* const callback_;
+ OldCompletionCallback* const callback_;
const RequestPriority priority_;
bool ignore_limits_;
const Flags flags_;
@@ -419,10 +419,10 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
struct CallbackResultPair {
CallbackResultPair() : callback(NULL), result(OK) {}
- CallbackResultPair(CompletionCallback* callback_in, int result_in)
+ CallbackResultPair(OldCompletionCallback* callback_in, int result_in)
: callback(callback_in), result(result_in) {}
- CompletionCallback* callback;
+ OldCompletionCallback* callback;
int result;
};
@@ -518,7 +518,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
// current message loop. Inserts |callback| into |pending_callback_map_|,
// keyed by |handle|.
void InvokeUserCallbackLater(
- ClientSocketHandle* handle, CompletionCallback* callback, int rv);
+ ClientSocketHandle* handle, OldCompletionCallback* callback, int rv);
// Invokes the user callback for |handle|. By the time this task has run,
// it's possible that the request has been cancelled, so |handle| may not
@@ -582,7 +582,7 @@ class ClientSocketPoolBase {
class Request : public internal::ClientSocketPoolBaseHelper::Request {
public:
Request(ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestPriority priority,
internal::ClientSocketPoolBaseHelper::Flags flags,
bool ignore_limits,
@@ -642,7 +642,7 @@ class ClientSocketPoolBase {
const scoped_refptr<SocketParams>& params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
Request* request =
new Request(handle, callback, priority,
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 6d35fe7..2be05b1 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -51,13 +51,13 @@ class MockClientSocket : public StreamSocket {
// Socket methods:
virtual int Read(
- IOBuffer* /* buf */, int len, CompletionCallback* /* callback */) {
+ IOBuffer* /* buf */, int len, OldCompletionCallback* /* callback */) {
num_bytes_read_ += len;
return len;
}
virtual int Write(
- IOBuffer* /* buf */, int len, CompletionCallback* /* callback */) {
+ IOBuffer* /* buf */, int len, OldCompletionCallback* /* callback */) {
was_used_to_convey_data_ = true;
return len;
}
@@ -66,7 +66,7 @@ class MockClientSocket : public StreamSocket {
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback) {
+ virtual int Connect(OldCompletionCallback* callback) {
connected_ = true;
return OK;
}
@@ -410,7 +410,7 @@ class TestClientSocketPool : public ClientSocketPool {
const void* params,
net::RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
const scoped_refptr<TestSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
@@ -747,7 +747,7 @@ TEST_F(ClientSocketPoolBaseTest, ConnectJob_TimedOut) {
TEST_F(ClientSocketPoolBaseTest, BasicSynchronous) {
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
@@ -785,7 +785,7 @@ TEST_F(ClientSocketPoolBaseTest, InitConnectionFailure) {
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// Set the additional error state members to ensure that they get cleared.
handle.set_is_ssl_error(true);
HttpResponseInfo info;
@@ -1029,7 +1029,7 @@ TEST_F(ClientSocketPoolBaseTest, StallAndThenCancelAndTriggerAvailableSocket) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a",
params_,
@@ -1040,7 +1040,7 @@ TEST_F(ClientSocketPoolBaseTest, StallAndThenCancelAndTriggerAvailableSocket) {
ClientSocketHandle handles[4];
for (size_t i = 0; i < arraysize(handles); ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handles[i].Init("b",
params_,
@@ -1063,7 +1063,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelStalledSocketAtSocketLimit) {
{
ClientSocketHandle handles[kDefaultMaxSockets];
- TestCompletionCallback callbacks[kDefaultMaxSockets];
+ TestOldCompletionCallback callbacks[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
EXPECT_EQ(OK, handles[i].Init(base::IntToString(i),
params_,
@@ -1075,7 +1075,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelStalledSocketAtSocketLimit) {
// Force a stalled group.
ClientSocketHandle stalled_handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, stalled_handle.Init("foo",
params_,
kDefaultPriority,
@@ -1103,7 +1103,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelPendingSocketAtSocketLimit) {
{
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handles[i].Init(base::IntToString(i),
params_,
kDefaultPriority,
@@ -1115,7 +1115,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelPendingSocketAtSocketLimit) {
// Force a stalled group.
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle stalled_handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, stalled_handle.Init("foo",
params_,
kDefaultPriority,
@@ -1151,11 +1151,11 @@ TEST_F(ClientSocketPoolBaseTest, WaitForStalledSocketAtSocketLimit) {
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
ClientSocketHandle stalled_handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
{
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(OK, handles[i].Init(base::StringPrintf(
"Take 2: %d", i),
params_,
@@ -1195,7 +1195,7 @@ TEST_F(ClientSocketPoolBaseTest, CloseIdleSocketAtSocketLimitDeleteGroup) {
for (int i = 0; i < kDefaultMaxSockets; ++i) {
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(OK, handle.Init(base::IntToString(i),
params_,
kDefaultPriority,
@@ -1211,7 +1211,7 @@ TEST_F(ClientSocketPoolBaseTest, CloseIdleSocketAtSocketLimitDeleteGroup) {
// reuse a socket.
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
// "0" is special here, since it should be the first entry in the sorted map,
// which is the one which we would close an idle socket for. We shouldn't
@@ -1289,7 +1289,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelRequestClearGroup) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a",
params_,
kDefaultPriority,
@@ -1304,7 +1304,7 @@ TEST_F(ClientSocketPoolBaseTest, ConnectCancelConnect) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a",
params_,
@@ -1315,7 +1315,7 @@ TEST_F(ClientSocketPoolBaseTest, ConnectCancelConnect) {
handle.Reset();
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a",
params_,
@@ -1395,7 +1395,7 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
MessageLoop::current()->RunAllPending();
}
within_callback_ = true;
- TestCompletionCallback next_job_callback;
+ TestOldCompletionCallback next_job_callback;
scoped_refptr<TestSocketParams> params(new TestSocketParams());
int rv = handle_->Init("a",
params,
@@ -1440,7 +1440,7 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
bool within_callback_;
TestConnectJobFactory* const test_connect_job_factory_;
TestConnectJob::JobType next_job_type_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
TEST_F(ClientSocketPoolBaseTest, RequestPendingJobTwice) {
@@ -1536,7 +1536,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelActiveRequestThenRequestSocket) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init("a",
params_,
kDefaultPriority,
@@ -1602,7 +1602,7 @@ TEST_F(ClientSocketPoolBaseTest, BasicAsynchronous) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
int rv = handle.Init("a",
params_,
@@ -1639,7 +1639,7 @@ TEST_F(ClientSocketPoolBaseTest,
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
// Set the additional error state members to ensure that they get cleared.
handle.set_is_ssl_error(true);
@@ -1677,9 +1677,9 @@ TEST_F(ClientSocketPoolBaseTest, TwoRequestsCancelOne) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a",
@@ -1846,7 +1846,7 @@ TEST_F(ClientSocketPoolBaseTest, LoadState) {
TestConnectJob::kMockAdvancingLoadStateJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init("a",
params_,
kDefaultPriority,
@@ -1859,7 +1859,7 @@ TEST_F(ClientSocketPoolBaseTest, LoadState) {
MessageLoop::current()->RunAllPending();
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = handle2.Init("a",
params_,
kDefaultPriority,
@@ -1875,7 +1875,7 @@ TEST_F(ClientSocketPoolBaseTest, Recoverable) {
connect_job_factory_->set_job_type(TestConnectJob::kMockRecoverableJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_PROXY_AUTH_REQUESTED, handle.Init("a",
params_,
kDefaultPriority,
@@ -1891,7 +1891,7 @@ TEST_F(ClientSocketPoolBaseTest, AsyncRecoverable) {
connect_job_factory_->set_job_type(
TestConnectJob::kMockPendingRecoverableJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a",
params_,
@@ -1911,7 +1911,7 @@ TEST_F(ClientSocketPoolBaseTest, AdditionalErrorStateSynchronous) {
TestConnectJob::kMockAdditionalErrorStateJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_CONNECTION_FAILED,
handle.Init("a",
params_,
@@ -1931,7 +1931,7 @@ TEST_F(ClientSocketPoolBaseTest, AdditionalErrorStateAsynchronous) {
connect_job_factory_->set_job_type(
TestConnectJob::kMockPendingAdditionalErrorStateJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a",
params_,
@@ -1958,7 +1958,7 @@ TEST_F(ClientSocketPoolBaseTest, CleanupTimedOutIdleSockets) {
// Startup two mock pending connect jobs, which will sit in the MessageLoop.
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init("a",
params_,
LOWEST,
@@ -1969,7 +1969,7 @@ TEST_F(ClientSocketPoolBaseTest, CleanupTimedOutIdleSockets) {
EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = handle2.Init("a",
params_,
LOWEST,
@@ -2032,7 +2032,7 @@ TEST_F(ClientSocketPoolBaseTest, MultipleReleasingDisconnectedSockets) {
// Startup 4 connect jobs. Two of them will be pending.
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init("a",
params_,
LOWEST,
@@ -2042,7 +2042,7 @@ TEST_F(ClientSocketPoolBaseTest, MultipleReleasingDisconnectedSockets) {
EXPECT_EQ(OK, rv);
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
rv = handle2.Init("a",
params_,
LOWEST,
@@ -2052,7 +2052,7 @@ TEST_F(ClientSocketPoolBaseTest, MultipleReleasingDisconnectedSockets) {
EXPECT_EQ(OK, rv);
ClientSocketHandle handle3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
rv = handle3.Init("a",
params_,
LOWEST,
@@ -2062,7 +2062,7 @@ TEST_F(ClientSocketPoolBaseTest, MultipleReleasingDisconnectedSockets) {
EXPECT_EQ(ERR_IO_PENDING, rv);
ClientSocketHandle handle4;
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback4;
rv = handle4.Init("a",
params_,
LOWEST,
@@ -2098,9 +2098,9 @@ TEST_F(ClientSocketPoolBaseTest, SocketLimitReleasingSockets) {
// Max out the socket limit with 2 per group.
ClientSocketHandle handle_a[4];
- TestCompletionCallback callback_a[4];
+ TestOldCompletionCallback callback_a[4];
ClientSocketHandle handle_b[4];
- TestCompletionCallback callback_b[4];
+ TestOldCompletionCallback callback_b[4];
for (int i = 0; i < 2; ++i) {
EXPECT_EQ(OK, handle_a[i].Init("a",
@@ -2226,8 +2226,8 @@ class TestReleasingSocketRequest : public CallbackRunner< Tuple1<int> > {
bool reset_releasing_handle_;
ClientSocketHandle handle_;
ClientSocketHandle handle2_;
- TestCompletionCallback callback_;
- TestCompletionCallback callback2_;
+ TestOldCompletionCallback callback_;
+ TestOldCompletionCallback callback2_;
};
@@ -2274,7 +2274,7 @@ TEST_F(ClientSocketPoolBaseTest, CallbackThatReleasesPool) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a",
params_,
kDefaultPriority,
@@ -2293,7 +2293,7 @@ TEST_F(ClientSocketPoolBaseTest, DoNotReuseSocketAfterFlush) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a",
params_,
kDefaultPriority,
@@ -2352,8 +2352,8 @@ class ConnectWithinCallback : public CallbackRunner< Tuple1<int> > {
const scoped_refptr<TestSocketParams> params_;
TestClientSocketPool* const pool_;
ClientSocketHandle handle_;
- TestCompletionCallback callback_;
- TestCompletionCallback nested_callback_;
+ TestOldCompletionCallback callback_;
+ TestOldCompletionCallback nested_callback_;
};
TEST_F(ClientSocketPoolBaseTest, AbortAllRequestsOnFlush) {
@@ -2390,7 +2390,7 @@ TEST_F(ClientSocketPoolBaseTest, BackupSocketCancelAtMaxSockets) {
// timer.
connect_job_factory_->set_job_type(TestConnectJob::kMockWaitingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("bar",
params_,
kDefaultPriority,
@@ -2402,7 +2402,7 @@ TEST_F(ClientSocketPoolBaseTest, BackupSocketCancelAtMaxSockets) {
connect_job_factory_->set_job_type(TestConnectJob::kMockJob);
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 1; i < kDefaultMaxSockets; ++i) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(OK, handles[i].Init("bar",
params_,
kDefaultPriority,
@@ -2432,7 +2432,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelBackupSocketAfterCancelingAllRequests) {
// timer.
connect_job_factory_->set_job_type(TestConnectJob::kMockWaitingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("bar",
params_,
kDefaultPriority,
@@ -2461,7 +2461,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelBackupSocketAfterFinishingAllRequests) {
// timer.
connect_job_factory_->set_job_type(TestConnectJob::kMockWaitingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("bar",
params_,
kDefaultPriority,
@@ -2470,7 +2470,7 @@ TEST_F(ClientSocketPoolBaseTest, CancelBackupSocketAfterFinishingAllRequests) {
BoundNetLog()));
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle2.Init("bar",
params_,
kDefaultPriority,
@@ -2499,7 +2499,7 @@ TEST_F(ClientSocketPoolBaseTest, DelayedSocketBindingWaitingForConnect) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a",
params_,
@@ -2557,7 +2557,7 @@ TEST_F(ClientSocketPoolBaseTest, DelayedSocketBindingAtGroupCapacity) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a",
params_,
@@ -2617,7 +2617,7 @@ TEST_F(ClientSocketPoolBaseTest, DelayedSocketBindingAtStall) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a",
params_,
@@ -2680,7 +2680,7 @@ TEST_F(ClientSocketPoolBaseTest, SynchronouslyProcessOnePendingRequest) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING,
handle1.Init("a",
params_,
@@ -2694,7 +2694,7 @@ TEST_F(ClientSocketPoolBaseTest, SynchronouslyProcessOnePendingRequest) {
// empty.
connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob);
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
// It'll be ERR_IO_PENDING now, but the TestConnectJob will synchronously fail
// when created.
EXPECT_EQ(ERR_IO_PENDING,
@@ -2718,7 +2718,7 @@ TEST_F(ClientSocketPoolBaseTest, PreferUsedSocketToUnusedSocket) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -2727,7 +2727,7 @@ TEST_F(ClientSocketPoolBaseTest, PreferUsedSocketToUnusedSocket) {
BoundNetLog()));
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle2.Init("a",
params_,
kDefaultPriority,
@@ -2735,7 +2735,7 @@ TEST_F(ClientSocketPoolBaseTest, PreferUsedSocketToUnusedSocket) {
pool_.get(),
BoundNetLog()));
ClientSocketHandle handle3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
EXPECT_EQ(ERR_IO_PENDING, handle3.Init("a",
params_,
kDefaultPriority,
@@ -2790,7 +2790,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSockets) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -2799,7 +2799,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSockets) {
BoundNetLog()));
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle2.Init("a",
params_,
kDefaultPriority,
@@ -2824,7 +2824,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsWhenAlreadyHaveAConnectJob) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -2842,7 +2842,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsWhenAlreadyHaveAConnectJob) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle2.Init("a",
params_,
kDefaultPriority,
@@ -2868,7 +2868,7 @@ TEST_F(ClientSocketPoolBaseTest,
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -2877,7 +2877,7 @@ TEST_F(ClientSocketPoolBaseTest,
BoundNetLog()));
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle2.Init("a",
params_,
kDefaultPriority,
@@ -2886,7 +2886,7 @@ TEST_F(ClientSocketPoolBaseTest,
BoundNetLog()));
ClientSocketHandle handle3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
EXPECT_EQ(ERR_IO_PENDING, handle3.Init("a",
params_,
kDefaultPriority,
@@ -2960,7 +2960,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsCountIdleSockets) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -2985,7 +2985,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsCountActiveSockets) {
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -3056,7 +3056,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsMultipleTimesDoesNothing) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -3066,7 +3066,7 @@ TEST_F(ClientSocketPoolBaseTest, RequestSocketsMultipleTimesDoesNothing) {
ASSERT_EQ(OK, callback1.WaitForResult());
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
int rv = handle2.Init("a",
params_,
kDefaultPriority,
@@ -3122,7 +3122,7 @@ TEST_F(ClientSocketPoolBaseTest, PreconnectJobsTakenByNormalRequests) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -3152,7 +3152,7 @@ TEST_F(ClientSocketPoolBaseTest, PreconnectClosesIdleSocketRemovesGroup) {
// Set up one idle socket in "a".
ClientSocketHandle handle1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("a",
params_,
kDefaultPriority,
@@ -3166,7 +3166,7 @@ TEST_F(ClientSocketPoolBaseTest, PreconnectClosesIdleSocketRemovesGroup) {
// Set up two active sockets in "b".
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle1.Init("b",
params_,
kDefaultPriority,
@@ -3251,7 +3251,7 @@ TEST_F(ClientSocketPoolBaseTest, PreconnectWithBackupJob) {
// Make the backup job be a pending job, so it completes normally.
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a",
params_,
kDefaultPriority,
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index ec9e2f4..f4b642c 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -72,7 +72,7 @@ int InitSocketPoolHelper(const GURL& request_url,
const BoundNetLog& net_log,
int num_preconnect_streams,
ClientSocketHandle* socket_handle,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
scoped_refptr<TransportSocketParams> tcp_params;
scoped_refptr<HttpProxySocketParams> http_proxy_params;
scoped_refptr<SOCKSSocketParams> socks_params;
@@ -635,7 +635,7 @@ int ClientSocketPoolManager::InitSocketHandleForHttpRequest(
const SSLConfig& ssl_config_for_proxy,
const BoundNetLog& net_log,
ClientSocketHandle* socket_handle,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(socket_handle);
return InitSocketPoolHelper(request_url,
request_extra_headers,
@@ -663,7 +663,7 @@ int ClientSocketPoolManager::InitSocketHandleForRawConnect(
const SSLConfig& ssl_config_for_proxy,
const BoundNetLog& net_log,
ClientSocketHandle* socket_handle,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(socket_handle);
// Synthesize an HttpRequestInfo.
GURL request_url = GURL("http://" + host_port_pair.ToString());
diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h
index ac4aeea..29393b4 100644
--- a/net/socket/client_socket_pool_manager.h
+++ b/net/socket/client_socket_pool_manager.h
@@ -131,7 +131,7 @@ class ClientSocketPoolManager : public base::NonThreadSafe,
const SSLConfig& ssl_config_for_proxy,
const BoundNetLog& net_log,
ClientSocketHandle* socket_handle,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// A helper method that uses the passed in proxy information to initialize a
// ClientSocketHandle with the relevant socket pool. Use this method for
@@ -145,7 +145,7 @@ class ClientSocketPoolManager : public base::NonThreadSafe,
const SSLConfig& ssl_config_for_proxy,
const BoundNetLog& net_log,
ClientSocketHandle* socket_handle,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Similar to InitSocketHandleForHttpRequest except that it initiates the
// desired number of preconnect streams from the relevant socket pool.
diff --git a/net/socket/deterministic_socket_data_unittest.cc b/net/socket/deterministic_socket_data_unittest.cc
index 6261d39..6d8d7e4 100644
--- a/net/socket/deterministic_socket_data_unittest.cc
+++ b/net/socket/deterministic_socket_data_unittest.cc
@@ -41,8 +41,8 @@ class DeterministicSocketDataTest : public PlatformTest {
void AssertAsyncWriteEquals(const char* data, int len);
void AssertWriteReturns(const char* data, int len, int rv);
- TestCompletionCallback read_callback_;
- TestCompletionCallback write_callback_;
+ TestOldCompletionCallback read_callback_;
+ TestOldCompletionCallback write_callback_;
StreamSocket* sock_;
scoped_refptr<DeterministicSocketData> data_;
diff --git a/net/socket/dns_cert_provenance_checker.cc b/net/socket/dns_cert_provenance_checker.cc
index 5ab0631..38e6bbd 100644
--- a/net/socket/dns_cert_provenance_checker.cc
+++ b/net/socket/dns_cert_provenance_checker.cc
@@ -200,7 +200,7 @@ class DnsCertProvenanceCheck : public base::NonThreadSafe {
std::vector<std::string> der_certs_;
RRResponse response_;
DnsRRResolver::Handle handle_;
- CompletionCallbackImpl<DnsCertProvenanceCheck> callback_;
+ OldCompletionCallbackImpl<DnsCertProvenanceCheck> callback_;
};
SECKEYPublicKey* GetServerPubKey() {
diff --git a/net/socket/server_socket.h b/net/socket/server_socket.h
index c3e1e8a..5931cf5 100644
--- a/net/socket/server_socket.h
+++ b/net/socket/server_socket.h
@@ -29,7 +29,7 @@ class NET_EXPORT ServerSocket {
// Accept connection. Callback is called when new connection is
// accepted.
virtual int Accept(scoped_ptr<StreamSocket>* socket,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(ServerSocket);
diff --git a/net/socket/socket.h b/net/socket/socket.h
index 650bfd6..90185a2 100644
--- a/net/socket/socket.h
+++ b/net/socket/socket.h
@@ -30,7 +30,7 @@ class NET_EXPORT Socket {
// closed. If the socket is Disconnected before the read completes, the
// callback will not be invoked.
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Writes data, up to |buf_len| bytes, to the socket. Note: data may be
// written partially. The number of bytes written is returned, or an error
@@ -45,7 +45,7 @@ class NET_EXPORT Socket {
// of the actual buffer that is written to the socket. If the socket is
// Disconnected before the write completes, the callback will not be invoked.
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Set the receive buffer size (in bytes) for the socket.
// Note: changing this value can affect the TCP window size on some platforms.
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index ce64bdc..b815a9f 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -695,14 +695,14 @@ MockClientSocket::GetNextProto(std::string* proto) {
MockClientSocket::~MockClientSocket() {}
-void MockClientSocket::RunCallbackAsync(net::CompletionCallback* callback,
+void MockClientSocket::RunCallbackAsync(net::OldCompletionCallback* callback,
int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
&MockClientSocket::RunCallback, callback, result));
}
-void MockClientSocket::RunCallback(net::CompletionCallback* callback,
+void MockClientSocket::RunCallback(net::OldCompletionCallback* callback,
int result) {
if (callback)
callback->Run(result);
@@ -728,7 +728,7 @@ MockTCPClientSocket::MockTCPClientSocket(const net::AddressList& addresses,
}
int MockTCPClientSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!connected_)
return net::ERR_UNEXPECTED;
@@ -761,7 +761,7 @@ int MockTCPClientSocket::Read(net::IOBuffer* buf, int buf_len,
}
int MockTCPClientSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
@@ -781,7 +781,7 @@ int MockTCPClientSocket::Write(net::IOBuffer* buf, int buf_len,
return write_result.result;
}
-int MockTCPClientSocket::Connect(net::CompletionCallback* callback) {
+int MockTCPClientSocket::Connect(net::OldCompletionCallback* callback) {
if (connected_)
return net::OK;
connected_ = true;
@@ -846,7 +846,7 @@ void MockTCPClientSocket::OnReadComplete(const MockRead& data) {
// let CompleteRead() schedule a callback.
read_data_.async = false;
- net::CompletionCallback* callback = pending_callback_;
+ net::OldCompletionCallback* callback = pending_callback_;
int rv = CompleteRead();
RunCallback(callback, rv);
}
@@ -860,7 +860,7 @@ int MockTCPClientSocket::CompleteRead() {
// Save the pending async IO data and reset our |pending_| state.
net::IOBuffer* buf = pending_buf_;
int buf_len = pending_buf_len_;
- net::CompletionCallback* callback = pending_callback_;
+ net::OldCompletionCallback* callback = pending_callback_;
pending_buf_ = NULL;
pending_buf_len_ = 0;
pending_callback_ = NULL;
@@ -942,7 +942,7 @@ int DeterministicMockTCPClientSocket::CompleteRead() {
}
int DeterministicMockTCPClientSocket::Write(
- net::IOBuffer* buf, int buf_len, net::CompletionCallback* callback) {
+ net::IOBuffer* buf, int buf_len, net::OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
@@ -966,7 +966,7 @@ int DeterministicMockTCPClientSocket::Write(
}
int DeterministicMockTCPClientSocket::Read(
- net::IOBuffer* buf, int buf_len, net::CompletionCallback* callback) {
+ net::IOBuffer* buf, int buf_len, net::OldCompletionCallback* callback) {
if (!connected_)
return net::ERR_UNEXPECTED;
@@ -991,7 +991,7 @@ int DeterministicMockTCPClientSocket::Read(
// TODO(erikchen): Support connect sequencing.
int DeterministicMockTCPClientSocket::Connect(
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (connected_)
return net::OK;
connected_ = true;
@@ -1033,13 +1033,13 @@ base::TimeDelta DeterministicMockTCPClientSocket::GetConnectTimeMicros() const {
void DeterministicMockTCPClientSocket::OnReadComplete(const MockRead& data) {}
class MockSSLClientSocket::ConnectCallback
- : public net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback> {
+ : public net::OldCompletionCallbackImpl<MockSSLClientSocket::ConnectCallback> {
public:
ConnectCallback(MockSSLClientSocket *ssl_client_socket,
- net::CompletionCallback* user_callback,
+ net::OldCompletionCallback* user_callback,
int rv)
: ALLOW_THIS_IN_INITIALIZER_LIST(
- net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback>(
+ net::OldCompletionCallbackImpl<MockSSLClientSocket::ConnectCallback>(
this, &ConnectCallback::Wrapper)),
ssl_client_socket_(ssl_client_socket),
user_callback_(user_callback),
@@ -1055,7 +1055,7 @@ class MockSSLClientSocket::ConnectCallback
}
MockSSLClientSocket* ssl_client_socket_;
- net::CompletionCallback* user_callback_;
+ net::OldCompletionCallback* user_callback_;
int rv_;
};
@@ -1079,16 +1079,16 @@ MockSSLClientSocket::~MockSSLClientSocket() {
}
int MockSSLClientSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return transport_->socket()->Read(buf, buf_len, callback);
}
int MockSSLClientSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return transport_->socket()->Write(buf, buf_len, callback);
}
-int MockSSLClientSocket::Connect(net::CompletionCallback* callback) {
+int MockSSLClientSocket::Connect(net::OldCompletionCallback* callback) {
ConnectCallback* connect_callback = new ConnectCallback(
this, callback, data_->connect.result);
int rv = transport_->socket()->Connect(connect_callback);
@@ -1188,7 +1188,7 @@ MockUDPClientSocket::MockUDPClientSocket(SocketDataProvider* data,
MockUDPClientSocket::~MockUDPClientSocket() {}
int MockUDPClientSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!connected_)
return net::ERR_UNEXPECTED;
@@ -1215,7 +1215,7 @@ int MockUDPClientSocket::Read(net::IOBuffer* buf, int buf_len,
}
int MockUDPClientSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK_GT(buf_len, 0);
@@ -1278,7 +1278,7 @@ void MockUDPClientSocket::OnReadComplete(const MockRead& data) {
// let CompleteRead() schedule a callback.
read_data_.async = false;
- net::CompletionCallback* callback = pending_callback_;
+ net::OldCompletionCallback* callback = pending_callback_;
int rv = CompleteRead();
RunCallback(callback, rv);
}
@@ -1290,7 +1290,7 @@ int MockUDPClientSocket::CompleteRead() {
// Save the pending async IO data and reset our |pending_| state.
net::IOBuffer* buf = pending_buf_;
int buf_len = pending_buf_len_;
- net::CompletionCallback* callback = pending_callback_;
+ net::OldCompletionCallback* callback = pending_callback_;
pending_buf_ = NULL;
pending_buf_len_ = 0;
pending_callback_ = NULL;
@@ -1320,14 +1320,14 @@ int MockUDPClientSocket::CompleteRead() {
return result;
}
-void MockUDPClientSocket::RunCallbackAsync(net::CompletionCallback* callback,
+void MockUDPClientSocket::RunCallbackAsync(net::OldCompletionCallback* callback,
int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
&MockUDPClientSocket::RunCallback, callback, result));
}
-void MockUDPClientSocket::RunCallback(net::CompletionCallback* callback,
+void MockUDPClientSocket::RunCallback(net::OldCompletionCallback* callback,
int result) {
if (callback)
callback->Run(result);
@@ -1400,7 +1400,7 @@ void ClientSocketPoolTest::ReleaseAllConnections(KeepAlive keep_alive) {
MockTransportClientSocketPool::MockConnectJob::MockConnectJob(
StreamSocket* socket,
ClientSocketHandle* handle,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: socket_(socket),
handle_(handle),
user_callback_(callback),
@@ -1441,7 +1441,7 @@ void MockTransportClientSocketPool::MockConnectJob::OnConnect(int rv) {
handle_ = NULL;
if (user_callback_) {
- CompletionCallback* callback = user_callback_;
+ OldCompletionCallback* callback = user_callback_;
user_callback_ = NULL;
callback->Run(rv);
}
@@ -1465,7 +1465,7 @@ int MockTransportClientSocketPool::RequestSocket(const std::string& group_name,
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
StreamSocket* socket = client_socket_factory_->CreateTransportClientSocket(
AddressList(), net_log.net_log(), net::NetLog::Source());
@@ -1572,7 +1572,7 @@ int MockSOCKSClientSocketPool::RequestSocket(const std::string& group_name,
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
return transport_pool_->RequestSocket(group_name,
socket_params,
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 6b7cc5c..7e69da8 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -342,7 +342,7 @@ class OrderedSocketData : public StaticSocketDataProvider,
MockRead* reads, size_t reads_count,
MockWrite* writes, size_t writes_count);
- void SetCompletionCallback(CompletionCallback* callback) {
+ void SetOldCompletionCallback(OldCompletionCallback* callback) {
callback_ = callback;
}
@@ -361,7 +361,7 @@ class OrderedSocketData : public StaticSocketDataProvider,
int sequence_number_;
int loop_stop_stage_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
bool blocked_;
ScopedRunnableMethodFactory<OrderedSocketData> factory_;
};
@@ -584,14 +584,14 @@ class MockClientSocket : public net::SSLClientSocket {
// Socket methods:
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
// StreamSocket methods:
- virtual int Connect(net::CompletionCallback* callback) = 0;
+ virtual int Connect(net::OldCompletionCallback* callback) = 0;
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -613,8 +613,8 @@ class MockClientSocket : public net::SSLClientSocket {
protected:
virtual ~MockClientSocket();
- void RunCallbackAsync(net::CompletionCallback* callback, int result);
- void RunCallback(net::CompletionCallback*, int result);
+ void RunCallbackAsync(net::OldCompletionCallback* callback, int result);
+ void RunCallback(net::OldCompletionCallback*, int result);
ScopedRunnableMethodFactory<MockClientSocket> method_factory_;
@@ -633,12 +633,12 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
// Socket methods:
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// StreamSocket methods:
- virtual int Connect(net::CompletionCallback* callback);
+ virtual int Connect(net::OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -670,7 +670,7 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
// While an asynchronous IO is pending, we save our user-buffer state.
net::IOBuffer* pending_buf_;
int pending_buf_len_;
- net::CompletionCallback* pending_callback_;
+ net::OldCompletionCallback* pending_callback_;
bool was_used_to_convey_data_;
};
@@ -690,12 +690,12 @@ class DeterministicMockTCPClientSocket : public MockClientSocket,
// Socket:
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// StreamSocket:
- virtual int Connect(net::CompletionCallback* callback);
+ virtual int Connect(net::OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -709,7 +709,7 @@ class DeterministicMockTCPClientSocket : public MockClientSocket,
private:
bool write_pending_;
- net::CompletionCallback* write_callback_;
+ net::OldCompletionCallback* write_callback_;
int write_result_;
net::MockRead read_data_;
@@ -717,7 +717,7 @@ class DeterministicMockTCPClientSocket : public MockClientSocket,
net::IOBuffer* read_buf_;
int read_buf_len_;
bool read_pending_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
net::DeterministicSocketData* data_;
bool was_used_to_convey_data_;
};
@@ -734,12 +734,12 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
// Socket methods:
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// StreamSocket methods:
- virtual int Connect(net::CompletionCallback* callback);
+ virtual int Connect(net::OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool WasEverUsed() const;
@@ -776,9 +776,9 @@ class MockUDPClientSocket : public DatagramClientSocket,
// Socket interface
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -797,8 +797,8 @@ class MockUDPClientSocket : public DatagramClientSocket,
private:
int CompleteRead();
- void RunCallbackAsync(net::CompletionCallback* callback, int result);
- void RunCallback(net::CompletionCallback* callback, int result);
+ void RunCallbackAsync(net::OldCompletionCallback* callback, int result);
+ void RunCallback(net::OldCompletionCallback* callback, int result);
bool connected_;
SocketDataProvider* data_;
@@ -809,7 +809,7 @@ class MockUDPClientSocket : public DatagramClientSocket,
// While an asynchronous IO is pending, we save our user-buffer state.
net::IOBuffer* pending_buf_;
int pending_buf_len_;
- net::CompletionCallback* pending_callback_;
+ net::OldCompletionCallback* pending_callback_;
BoundNetLog net_log_;
@@ -834,7 +834,7 @@ class TestSocketRequest : public CallbackRunner< Tuple1<int> > {
ClientSocketHandle handle_;
std::vector<TestSocketRequest*>* request_order_;
size_t* completion_count_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
class ClientSocketPoolTest {
@@ -898,7 +898,7 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
class MockConnectJob {
public:
MockConnectJob(StreamSocket* socket, ClientSocketHandle* handle,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
~MockConnectJob();
int Connect();
@@ -909,8 +909,8 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
scoped_ptr<StreamSocket> socket_;
ClientSocketHandle* handle_;
- CompletionCallback* user_callback_;
- CompletionCallbackImpl<MockConnectJob> connect_callback_;
+ OldCompletionCallback* user_callback_;
+ OldCompletionCallbackImpl<MockConnectJob> connect_callback_;
DISALLOW_COPY_AND_ASSIGN(MockConnectJob);
};
@@ -931,7 +931,7 @@ class MockTransportClientSocketPool : public TransportClientSocketPool {
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void CancelRequest(const std::string& group_name,
@@ -1010,7 +1010,7 @@ class MockSOCKSClientSocketPool : public SOCKSClientSocketPool {
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void CancelRequest(const std::string& group_name,
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index 2f5cee4..f106f70 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -64,7 +64,7 @@ SOCKS5ClientSocket::~SOCKS5ClientSocket() {
Disconnect();
}
-int SOCKS5ClientSocket::Connect(CompletionCallback* callback) {
+int SOCKS5ClientSocket::Connect(OldCompletionCallback* callback) {
DCHECK(transport_.get());
DCHECK(transport_->socket());
DCHECK_EQ(STATE_NONE, next_state_);
@@ -161,7 +161,7 @@ base::TimeDelta SOCKS5ClientSocket::GetConnectTimeMicros() const {
// Read is called by the transport layer above to read. This can only be done
// if the SOCKS handshake is complete.
int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake_);
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
@@ -172,7 +172,7 @@ int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
// Write is called by the transport layer. This can only be done if the
// SOCKS handshake is complete.
int SOCKS5ClientSocket::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake_);
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
@@ -194,7 +194,7 @@ void SOCKS5ClientSocket::DoCallback(int result) {
// Since Run() may result in Read being called,
// clear user_callback_ up front.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(result);
}
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h
index 97fa61a..03b17f2 100644
--- a/net/socket/socks5_client_socket.h
+++ b/net/socket/socks5_client_socket.h
@@ -51,7 +51,7 @@ class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket {
// StreamSocket methods:
// Does the SOCKS handshake and completes the protocol.
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -64,8 +64,8 @@ class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -117,7 +117,7 @@ class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket {
// and return OK on success.
int BuildHandshakeWriteBuffer(std::string* handshake) const;
- CompletionCallbackImpl<SOCKS5ClientSocket> io_callback_;
+ OldCompletionCallbackImpl<SOCKS5ClientSocket> io_callback_;
// Stores the underlying socket.
scoped_ptr<ClientSocketHandle> transport_;
@@ -125,7 +125,7 @@ class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket {
State next_state_;
// Stores the callback to the layer above, called on completing Connect().
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
// This IOBuffer is used by the class to read and write
// SOCKS handshake data. The length contains the expected size to
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index 68125de..9cd45db 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -47,7 +47,7 @@ class SOCKS5ClientSocketTest : public PlatformTest {
scoped_ptr<SOCKS5ClientSocket> user_sock_;
AddressList address_list_;
StreamSocket* tcp_sock_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
scoped_ptr<MockHostResolver> host_resolver_;
scoped_ptr<SocketDataProvider> data_;
@@ -67,7 +67,7 @@ void SOCKS5ClientSocketTest::SetUp() {
// Resolve the "localhost" AddressList used by the TCP connection to connect.
HostResolver::RequestInfo info(HostPortPair("www.socks-proxy.com", 1080));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = host_resolver_->Resolve(info, &address_list_, &callback, NULL,
BoundNetLog());
ASSERT_EQ(ERR_IO_PENDING, rv);
@@ -83,7 +83,7 @@ SOCKS5ClientSocket* SOCKS5ClientSocketTest::BuildMockSocket(
const std::string& hostname,
int port,
NetLog* net_log) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
data_.reset(new StaticSocketDataProvider(reads, reads_count,
writes, writes_count));
tcp_sock_ = new MockTCPClientSocket(address_list_, net_log, data_.get());
@@ -221,7 +221,7 @@ TEST_F(SOCKS5ClientSocketTest, LargeHostNameFails) {
// Try to connect -- should fail (without having read/written anything to
// the transport socket first) because the hostname is too long.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = user_sock_->Connect(&callback);
EXPECT_EQ(ERR_SOCKS_CONNECTION_FAILED, rv);
}
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index 4a45b01..d05f1f9 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -91,7 +91,7 @@ SOCKSClientSocket::~SOCKSClientSocket() {
Disconnect();
}
-int SOCKSClientSocket::Connect(CompletionCallback* callback) {
+int SOCKSClientSocket::Connect(OldCompletionCallback* callback) {
DCHECK(transport_.get());
DCHECK(transport_->socket());
DCHECK_EQ(STATE_NONE, next_state_);
@@ -189,7 +189,7 @@ base::TimeDelta SOCKSClientSocket::GetConnectTimeMicros() const {
// Read is called by the transport layer above to read. This can only be done
// if the SOCKS handshake is complete.
int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake_);
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
@@ -200,7 +200,7 @@ int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len,
// Write is called by the transport layer. This can only be done if the
// SOCKS handshake is complete.
int SOCKSClientSocket::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake_);
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
@@ -222,7 +222,7 @@ void SOCKSClientSocket::DoCallback(int result) {
// Since Run() may result in Read being called,
// clear user_callback_ up front.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
DVLOG(1) << "Finished setting up SOCKS handshake";
c->Run(result);
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index f7929b5..a7aff1c 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -49,7 +49,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
// StreamSocket methods:
// Does the SOCKS handshake and completes the protocol.
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -62,8 +62,8 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -99,7 +99,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
const std::string BuildHandshakeWriteBuffer() const;
- CompletionCallbackImpl<SOCKSClientSocket> io_callback_;
+ OldCompletionCallbackImpl<SOCKSClientSocket> io_callback_;
// Stores the underlying socket.
scoped_ptr<ClientSocketHandle> transport_;
@@ -107,7 +107,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
State next_state_;
// Stores the callback to the layer above, called on completing Connect().
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
// This IOBuffer is used by the class to read and write
// SOCKS handshake data. The length contains the expected size to
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index 7b18426..c80bb66 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -213,7 +213,7 @@ int SOCKSClientSocketPool::RequestSocket(const std::string& group_name,
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
const scoped_refptr<SOCKSSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<SOCKSSocketParams>*>(socket_params);
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index 56b4848..11dbd33 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -98,7 +98,7 @@ class SOCKSConnectJob : public ConnectJob {
HostResolver* const resolver_;
State next_state_;
- CompletionCallbackImpl<SOCKSConnectJob> callback_;
+ OldCompletionCallbackImpl<SOCKSConnectJob> callback_;
scoped_ptr<ClientSocketHandle> transport_socket_handle_;
scoped_ptr<StreamSocket> socket_;
@@ -122,7 +122,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocketPool : public ClientSocketPool {
const void* connect_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void RequestSockets(const std::string& group_name,
diff --git a/net/socket/socks_client_socket_pool_unittest.cc b/net/socket/socks_client_socket_pool_unittest.cc
index 431a009..b3658c9 100644
--- a/net/socket/socks_client_socket_pool_unittest.cc
+++ b/net/socket/socks_client_socket_pool_unittest.cc
@@ -112,7 +112,7 @@ TEST_F(SOCKSClientSocketPoolTest, Async) {
SOCKS5MockData data(true);
transport_client_socket_factory_.AddSocketDataProvider(data.data_provider());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", ignored_socket_params_, LOW, &callback, &pool_,
BoundNetLog());
@@ -143,7 +143,7 @@ TEST_F(SOCKSClientSocketPoolTest, AsyncTransportConnectError) {
socket_data->set_connect_data(MockConnect(true, ERR_CONNECTION_REFUSED));
transport_client_socket_factory_.AddSocketDataProvider(socket_data.get());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", ignored_socket_params_, LOW, &callback, &pool_,
BoundNetLog());
@@ -184,7 +184,7 @@ TEST_F(SOCKSClientSocketPoolTest, AsyncSOCKSConnectError) {
socket_data->set_connect_data(MockConnect(false, 0));
transport_client_socket_factory_.AddSocketDataProvider(socket_data.get());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
EXPECT_EQ(0, transport_socket_pool_.release_count());
int rv = handle.Init("a", ignored_socket_params_, LOW, &callback, &pool_,
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 437d657..ce80719 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -38,7 +38,7 @@ class SOCKSClientSocketTest : public PlatformTest {
scoped_ptr<SOCKSClientSocket> user_sock_;
AddressList address_list_;
StreamSocket* tcp_sock_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
scoped_ptr<MockHostResolver> host_resolver_;
scoped_ptr<SocketDataProvider> data_;
};
@@ -62,7 +62,7 @@ SOCKSClientSocket* SOCKSClientSocketTest::BuildMockSocket(
int port,
NetLog* net_log) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
data_.reset(new StaticSocketDataProvider(reads, reads_count,
writes, writes_count));
tcp_sock_ = new MockTCPClientSocket(address_list_, net_log, data_.get());
@@ -87,7 +87,7 @@ class HangingHostResolver : public HostResolver {
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& net_log) OVERRIDE {
DCHECK(addresses);
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index 46865f7..104cca3 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -39,7 +39,7 @@ class DNSSECProvider {
// some point in the future. Once the callback has been made, this
// function will return OK if called again.
virtual int GetDNSSECRecords(RRResponse** out,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
private:
~DNSSECProvider() {}
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index bd13772..97527b8 100644
--- a/net/socket/ssl_client_socket_mac.cc
+++ b/net/socket/ssl_client_socket_mac.cc
@@ -554,7 +554,7 @@ SSLClientSocketMac::~SSLClientSocketMac() {
Disconnect();
}
-int SSLClientSocketMac::Connect(CompletionCallback* callback) {
+int SSLClientSocketMac::Connect(OldCompletionCallback* callback) {
DCHECK(transport_.get());
DCHECK(next_handshake_state_ == STATE_NONE);
DCHECK(!user_connect_callback_);
@@ -675,7 +675,7 @@ base::TimeDelta SSLClientSocketMac::GetConnectTimeMicros() const {
}
int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake());
DCHECK(!user_read_callback_);
DCHECK(!user_read_buf_);
@@ -694,7 +694,7 @@ int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len,
}
int SSLClientSocketMac::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake());
DCHECK(!user_write_callback_);
DCHECK(!user_write_buf_);
@@ -893,7 +893,7 @@ void SSLClientSocketMac::DoConnectCallback(int rv) {
DCHECK(rv != ERR_IO_PENDING);
DCHECK(user_connect_callback_);
- CompletionCallback* c = user_connect_callback_;
+ OldCompletionCallback* c = user_connect_callback_;
user_connect_callback_ = NULL;
c->Run(rv > OK ? OK : rv);
}
@@ -904,7 +904,7 @@ void SSLClientSocketMac::DoReadCallback(int rv) {
// Since Run may result in Read being called, clear user_read_callback_ up
// front.
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -917,7 +917,7 @@ void SSLClientSocketMac::DoWriteCallback(int rv) {
// Since Run may result in Write being called, clear user_write_callback_ up
// front.
- CompletionCallback* c = user_write_callback_;
+ OldCompletionCallback* c = user_write_callback_;
user_write_callback_ = NULL;
user_write_buf_ = NULL;
user_write_buf_len_ = 0;
diff --git a/net/socket/ssl_client_socket_mac.h b/net/socket/ssl_client_socket_mac.h
index 2a3418e..2f3b1e3 100644
--- a/net/socket/ssl_client_socket_mac.h
+++ b/net/socket/ssl_client_socket_mac.h
@@ -50,7 +50,7 @@ class SSLClientSocketMac : public SSLClientSocket {
virtual NextProtoStatus GetNextProto(std::string* proto);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -65,8 +65,8 @@ class SSLClientSocketMac : public SSLClientSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -105,17 +105,17 @@ class SSLClientSocketMac : public SSLClientSocket {
const void* data,
size_t* data_length);
- CompletionCallbackImpl<SSLClientSocketMac> handshake_io_callback_;
- CompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_;
- CompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketMac> handshake_io_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_;
scoped_ptr<ClientSocketHandle> transport_;
HostPortPair host_and_port_;
SSLConfig ssl_config_;
- CompletionCallback* user_connect_callback_;
- CompletionCallback* user_read_callback_;
- CompletionCallback* user_write_callback_;
+ OldCompletionCallback* user_connect_callback_;
+ OldCompletionCallback* user_read_callback_;
+ OldCompletionCallback* user_write_callback_;
// Used by Read function.
scoped_refptr<IOBuffer> user_read_buf_;
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 74b031b..79fd69a 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -586,7 +586,7 @@ SSLClientSocketNSS::GetNextProto(std::string* proto) {
#endif
}
-int SSLClientSocketNSS::Connect(CompletionCallback* callback) {
+int SSLClientSocketNSS::Connect(OldCompletionCallback* callback) {
EnterFunction("");
DCHECK(transport_.get());
DCHECK(next_handshake_state_ == STATE_NONE);
@@ -776,7 +776,7 @@ base::TimeDelta SSLClientSocketNSS::GetConnectTimeMicros() const {
}
int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
EnterFunction(buf_len);
DCHECK(completed_handshake_);
DCHECK(next_handshake_state_ == STATE_NONE);
@@ -801,7 +801,7 @@ int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len,
}
int SSLClientSocketNSS::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
EnterFunction(buf_len);
DCHECK(completed_handshake_);
DCHECK(next_handshake_state_ == STATE_NONE);
@@ -1157,7 +1157,7 @@ void SSLClientSocketNSS::DoReadCallback(int rv) {
// Since Run may result in Read being called, clear |user_read_callback_|
// up front.
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -1172,7 +1172,7 @@ void SSLClientSocketNSS::DoWriteCallback(int rv) {
// Since Run may result in Write being called, clear |user_write_callback_|
// up front.
- CompletionCallback* c = user_write_callback_;
+ OldCompletionCallback* c = user_write_callback_;
user_write_callback_ = NULL;
user_write_buf_ = NULL;
user_write_buf_len_ = 0;
@@ -1192,7 +1192,7 @@ void SSLClientSocketNSS::DoConnectCallback(int rv) {
DCHECK_NE(rv, ERR_IO_PENDING);
DCHECK(user_connect_callback_);
- CompletionCallback* c = user_connect_callback_;
+ OldCompletionCallback* c = user_connect_callback_;
user_connect_callback_ = NULL;
c->Run(rv > OK ? OK : rv);
LeaveFunction("");
diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h
index 6d403f7..4cc681a 100644
--- a/net/socket/ssl_client_socket_nss.h
+++ b/net/socket/ssl_client_socket_nss.h
@@ -69,7 +69,7 @@ class SSLClientSocketNSS : public SSLClientSocket {
virtual NextProtoStatus GetNextProto(std::string* proto);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -84,8 +84,8 @@ class SSLClientSocketNSS : public SSLClientSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -193,8 +193,8 @@ class SSLClientSocketNSS : public SSLClientSocket {
void EnsureThreadIdAssigned() const;
bool CalledOnValidThread() const;
- CompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_;
- CompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_;
bool transport_send_busy_;
bool transport_recv_busy_;
// corked_ is true if we are currently suspending writes to the network. This
@@ -205,14 +205,14 @@ class SSLClientSocketNSS : public SSLClientSocket {
base::OneShotTimer<SSLClientSocketNSS> uncork_timer_;
scoped_refptr<IOBuffer> recv_buffer_;
- CompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_;
scoped_ptr<ClientSocketHandle> transport_;
HostPortPair host_and_port_;
SSLConfig ssl_config_;
- CompletionCallback* user_connect_callback_;
- CompletionCallback* user_read_callback_;
- CompletionCallback* user_write_callback_;
+ OldCompletionCallback* user_connect_callback_;
+ OldCompletionCallback* user_read_callback_;
+ OldCompletionCallback* user_write_callback_;
// Used by Read function.
scoped_refptr<IOBuffer> user_read_buf_;
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 52014ea..db9dc78 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -611,7 +611,7 @@ SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto(
void SSLClientSocketOpenSSL::DoReadCallback(int rv) {
// Since Run may result in Read being called, clear |user_read_callback_|
// up front.
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -621,7 +621,7 @@ void SSLClientSocketOpenSSL::DoReadCallback(int rv) {
void SSLClientSocketOpenSSL::DoWriteCallback(int rv) {
// Since Run may result in Write being called, clear |user_write_callback_|
// up front.
- CompletionCallback* c = user_write_callback_;
+ OldCompletionCallback* c = user_write_callback_;
user_write_callback_ = NULL;
user_write_buf_ = NULL;
user_write_buf_len_ = 0;
@@ -630,7 +630,7 @@ void SSLClientSocketOpenSSL::DoWriteCallback(int rv) {
// StreamSocket methods
-int SSLClientSocketOpenSSL::Connect(CompletionCallback* callback) {
+int SSLClientSocketOpenSSL::Connect(OldCompletionCallback* callback) {
net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT, NULL);
// Set up new ssl object.
@@ -988,7 +988,7 @@ void SSLClientSocketOpenSSL::TransportReadComplete(int result) {
}
void SSLClientSocketOpenSSL::DoConnectCallback(int rv) {
- CompletionCallback* c = user_connect_callback_;
+ OldCompletionCallback* c = user_connect_callback_;
user_connect_callback_ = NULL;
c->Run(rv > OK ? OK : rv);
}
@@ -1120,7 +1120,7 @@ base::TimeDelta SSLClientSocketOpenSSL::GetConnectTimeMicros() const {
int SSLClientSocketOpenSSL::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
user_read_buf_ = buf;
user_read_buf_len_ = buf_len;
@@ -1152,7 +1152,7 @@ int SSLClientSocketOpenSSL::DoReadLoop(int result) {
int SSLClientSocketOpenSSL::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
user_write_buf_ = buf;
user_write_buf_len_ = buf_len;
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index e3529a4..81ece4c 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -62,7 +62,7 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
virtual NextProtoStatus GetNextProto(std::string* proto);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -77,8 +77,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -111,16 +111,16 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
void TransportWriteComplete(int result);
void TransportReadComplete(int result);
- CompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_;
- CompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_;
bool transport_send_busy_;
scoped_refptr<DrainableIOBuffer> send_buffer_;
bool transport_recv_busy_;
scoped_refptr<IOBuffer> recv_buffer_;
- CompletionCallback* user_connect_callback_;
- CompletionCallback* user_read_callback_;
- CompletionCallback* user_write_callback_;
+ OldCompletionCallback* user_connect_callback_;
+ OldCompletionCallback* user_read_callback_;
+ OldCompletionCallback* user_write_callback_;
// Used by Read function.
scoped_refptr<IOBuffer> user_read_buf_;
@@ -142,7 +142,7 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
CertVerifier* const cert_verifier_;
scoped_ptr<SingleRequestCertVerifier> verifier_;
- CompletionCallbackImpl<SSLClientSocketOpenSSL> handshake_io_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketOpenSSL> handshake_io_callback_;
// OpenSSL stuff
SSL* ssl_;
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 619acdb..4698a3a 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -498,7 +498,7 @@ int SSLClientSocketPool::RequestSocket(const std::string& group_name,
const void* socket_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
const scoped_refptr<SSLSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params);
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 7d9134d..e29bea5 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -153,7 +153,7 @@ class SSLConnectJob : public ConnectJob {
const SSLClientSocketContext context_;
State next_state_;
- CompletionCallbackImpl<SSLConnectJob> callback_;
+ OldCompletionCallbackImpl<SSLConnectJob> callback_;
scoped_ptr<ClientSocketHandle> transport_socket_handle_;
scoped_ptr<SSLClientSocket> ssl_socket_;
scoped_ptr<SSLHostInfo> ssl_host_info_;
@@ -196,7 +196,7 @@ class NET_EXPORT_PRIVATE SSLClientSocketPool
const void* connect_params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void RequestSockets(const std::string& group_name,
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 2175e17..de6af006 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -197,7 +197,7 @@ TEST_F(SSLClientSocketPoolTest, TCPFailAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -222,7 +222,7 @@ TEST_F(SSLClientSocketPoolTest, BasicDirect) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -241,7 +241,7 @@ TEST_F(SSLClientSocketPoolTest, BasicDirectAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -264,7 +264,7 @@ TEST_F(SSLClientSocketPoolTest, DirectCertError) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -287,7 +287,7 @@ TEST_F(SSLClientSocketPoolTest, DirectSSLError) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -313,7 +313,7 @@ TEST_F(SSLClientSocketPoolTest, DirectWithNPN) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -340,7 +340,7 @@ TEST_F(SSLClientSocketPoolTest, DirectNoSPDY) {
true);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -366,7 +366,7 @@ TEST_F(SSLClientSocketPoolTest, DirectGotSPDY) {
true);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -398,7 +398,7 @@ TEST_F(SSLClientSocketPoolTest, DirectGotBonusSPDY) {
true);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -427,7 +427,7 @@ TEST_F(SSLClientSocketPoolTest, SOCKSFail) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_CONNECTION_FAILED, rv);
@@ -446,7 +446,7 @@ TEST_F(SSLClientSocketPoolTest, SOCKSFailAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -471,7 +471,7 @@ TEST_F(SSLClientSocketPoolTest, SOCKSBasic) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -490,7 +490,7 @@ TEST_F(SSLClientSocketPoolTest, SOCKSBasicAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -512,7 +512,7 @@ TEST_F(SSLClientSocketPoolTest, HttpProxyFail) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_PROXY_CONNECTION_FAILED, rv);
@@ -531,7 +531,7 @@ TEST_F(SSLClientSocketPoolTest, HttpProxyFailAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -568,7 +568,7 @@ TEST_F(SSLClientSocketPoolTest, HttpProxyBasic) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(OK, rv);
@@ -598,7 +598,7 @@ TEST_F(SSLClientSocketPoolTest, HttpProxyBasicAsync) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -633,7 +633,7 @@ TEST_F(SSLClientSocketPoolTest, NeedProxyAuth) {
false);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle.Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -698,7 +698,7 @@ TEST_F(SSLClientSocketPoolTest, IPPooling) {
true);
scoped_ptr<ClientSocketHandle> handle(new ClientSocketHandle());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = handle->Init(
"a", params, MEDIUM, &callback, pool_.get(), BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index be91029..ca659b0 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -73,7 +73,7 @@ TEST_F(SSLClientSocketTest, Connect) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -117,7 +117,7 @@ TEST_F(SSLClientSocketTest, ConnectExpired) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -160,7 +160,7 @@ TEST_F(SSLClientSocketTest, ConnectMismatched) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -205,7 +205,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthCertRequested) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -265,7 +265,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthSendNullCert) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -316,7 +316,7 @@ TEST_F(SSLClientSocketTest, Read) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::StreamSocket* transport = new net::TCPClientSocket(
addr, NULL, net::NetLog::Source());
int rv = transport->Connect(&callback);
@@ -369,8 +369,8 @@ TEST_F(SSLClientSocketTest, Read_FullDuplex) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback; // Used for everything except Write.
- TestCompletionCallback callback2; // Used for Write only.
+ TestOldCompletionCallback callback; // Used for everything except Write.
+ TestOldCompletionCallback callback2; // Used for Write only.
net::StreamSocket* transport = new net::TCPClientSocket(
addr, NULL, net::NetLog::Source());
@@ -428,7 +428,7 @@ TEST_F(SSLClientSocketTest, Read_SmallChunks) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::StreamSocket* transport = new net::TCPClientSocket(
addr, NULL, net::NetLog::Source());
int rv = transport->Connect(&callback);
@@ -478,7 +478,7 @@ TEST_F(SSLClientSocketTest, Read_Interrupted) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::StreamSocket* transport = new net::TCPClientSocket(
addr, NULL, net::NetLog::Source());
int rv = transport->Connect(&callback);
@@ -525,7 +525,7 @@ TEST_F(SSLClientSocketTest, Read_FullLogging) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
log.SetLogLevel(net::NetLog::LOG_ALL);
net::StreamSocket* transport = new net::TCPClientSocket(
@@ -588,7 +588,7 @@ TEST_F(SSLClientSocketTest, PrematureApplicationData) {
ASSERT_TRUE(test_server.Start());
net::AddressList addr;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
static const unsigned char application_data[] = {
0x17, 0x03, 0x01, 0x00, 0x4a, 0x02, 0x00, 0x00, 0x46, 0x03, 0x01, 0x4b,
@@ -649,7 +649,7 @@ TEST_F(SSLClientSocketTest, CipherSuiteDisables) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::CapturingNetLog log(net::CapturingNetLog::kUnbounded);
net::StreamSocket* transport = new net::TCPClientSocket(
addr, &log, net::NetLog::Source());
@@ -718,7 +718,7 @@ TEST_F(SSLClientSocketTest, ClientSocketHandleNotFromPool) {
net::AddressList addr;
ASSERT_TRUE(test_server.GetAddressList(&addr));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
net::StreamSocket* transport = new net::TCPClientSocket(
addr, NULL, net::NetLog::Source());
int rv = transport->Connect(&callback);
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc
index f1f6ec5..50b24db 100644
--- a/net/socket/ssl_client_socket_win.cc
+++ b/net/socket/ssl_client_socket_win.cc
@@ -554,7 +554,7 @@ SSLClientSocketWin::GetNextProto(std::string* proto) {
return kNextProtoUnsupported;
}
-int SSLClientSocketWin::Connect(CompletionCallback* callback) {
+int SSLClientSocketWin::Connect(OldCompletionCallback* callback) {
DCHECK(transport_.get());
DCHECK(next_state_ == STATE_NONE);
DCHECK(!user_connect_callback_);
@@ -753,7 +753,7 @@ base::TimeDelta SSLClientSocketWin::GetConnectTimeMicros() const {
}
int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake());
DCHECK(!user_read_callback_);
@@ -795,7 +795,7 @@ int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
}
int SSLClientSocketWin::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake());
DCHECK(!user_write_callback_);
@@ -835,7 +835,7 @@ void SSLClientSocketWin::OnHandshakeIOComplete(int result) {
// (which occurs because we are in the middle of a Read when the
// renegotiation process starts). So we complete the Read here.
if (!user_connect_callback_) {
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -843,7 +843,7 @@ void SSLClientSocketWin::OnHandshakeIOComplete(int result) {
return;
}
net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT, NULL);
- CompletionCallback* c = user_connect_callback_;
+ OldCompletionCallback* c = user_connect_callback_;
user_connect_callback_ = NULL;
c->Run(rv);
}
@@ -857,7 +857,7 @@ void SSLClientSocketWin::OnReadComplete(int result) {
result = DoPayloadDecrypt();
if (result != ERR_IO_PENDING) {
DCHECK(user_read_callback_);
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -871,7 +871,7 @@ void SSLClientSocketWin::OnWriteComplete(int result) {
int rv = DoPayloadWriteComplete(result);
if (rv != ERR_IO_PENDING) {
DCHECK(user_write_callback_);
- CompletionCallback* c = user_write_callback_;
+ OldCompletionCallback* c = user_write_callback_;
user_write_callback_ = NULL;
user_write_buf_ = NULL;
user_write_buf_len_ = 0;
diff --git a/net/socket/ssl_client_socket_win.h b/net/socket/ssl_client_socket_win.h
index fb3d5a7..d4cabf9 100644
--- a/net/socket/ssl_client_socket_win.h
+++ b/net/socket/ssl_client_socket_win.h
@@ -55,7 +55,7 @@ class SSLClientSocketWin : public SSLClientSocket {
virtual NextProtoStatus GetNextProto(std::string* proto);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -70,8 +70,8 @@ class SSLClientSocketWin : public SSLClientSocket {
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -111,24 +111,24 @@ class SSLClientSocketWin : public SSLClientSocket {
void FreeSendBuffer();
// Internal callbacks as async operations complete.
- CompletionCallbackImpl<SSLClientSocketWin> handshake_io_callback_;
- CompletionCallbackImpl<SSLClientSocketWin> read_callback_;
- CompletionCallbackImpl<SSLClientSocketWin> write_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketWin> handshake_io_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketWin> read_callback_;
+ OldCompletionCallbackImpl<SSLClientSocketWin> write_callback_;
scoped_ptr<ClientSocketHandle> transport_;
HostPortPair host_and_port_;
SSLConfig ssl_config_;
// User function to callback when the Connect() completes.
- CompletionCallback* user_connect_callback_;
+ OldCompletionCallback* user_connect_callback_;
// User function to callback when a Read() completes.
- CompletionCallback* user_read_callback_;
+ OldCompletionCallback* user_read_callback_;
scoped_refptr<IOBuffer> user_read_buf_;
int user_read_buf_len_;
// User function to callback when a Write() completes.
- CompletionCallback* user_write_callback_;
+ OldCompletionCallback* user_write_callback_;
scoped_refptr<IOBuffer> user_write_buf_;
int user_write_buf_len_;
diff --git a/net/socket/ssl_host_info.cc b/net/socket/ssl_host_info.cc
index d428911..2f03a1a 100644
--- a/net/socket/ssl_host_info.cc
+++ b/net/socket/ssl_host_info.cc
@@ -35,7 +35,7 @@ SSLHostInfo::SSLHostInfo(
rev_checking_enabled_(ssl_config.rev_checking_enabled),
verify_ev_cert_(ssl_config.verify_ev_cert),
verifier_(cert_verifier),
- callback_(new CancelableCompletionCallback<SSLHostInfo>(
+ callback_(new CancelableOldCompletionCallback<SSLHostInfo>(
ALLOW_THIS_IN_INITIALIZER_LIST(this),
&SSLHostInfo::VerifyCallback)),
dnsrr_resolver_(NULL),
@@ -179,7 +179,7 @@ const CertVerifyResult& SSLHostInfo::cert_verify_result() const {
return cert_verify_result_;
}
-int SSLHostInfo::WaitForCertVerification(CompletionCallback* callback) {
+int SSLHostInfo::WaitForCertVerification(OldCompletionCallback* callback) {
if (cert_verification_complete_)
return cert_verification_error_;
DCHECK(!cert_parsing_failed_);
@@ -205,7 +205,7 @@ void SSLHostInfo::VerifyCallback(int rv) {
cert_verification_complete_ = true;
cert_verification_error_ = rv;
if (cert_verification_callback_) {
- CompletionCallback* callback = cert_verification_callback_;
+ OldCompletionCallback* callback = cert_verification_callback_;
cert_verification_callback_ = NULL;
callback->Run(rv);
}
diff --git a/net/socket/ssl_host_info.h b/net/socket/ssl_host_info.h
index 6441e60e..b4884a7 100644
--- a/net/socket/ssl_host_info.h
+++ b/net/socket/ssl_host_info.h
@@ -49,7 +49,7 @@ class NET_EXPORT_PRIVATE SSLHostInfo {
//
// |callback| may be NULL, in which case ERR_IO_PENDING may still be returned
// but, obviously, a callback will never be made.
- virtual int WaitForDataReady(CompletionCallback* callback) = 0;
+ virtual int WaitForDataReady(OldCompletionCallback* callback) = 0;
// Persist allows for the host information to be updated for future users.
// This is a fire and forget operation: the caller may drop its reference
@@ -89,7 +89,7 @@ class NET_EXPORT_PRIVATE SSLHostInfo {
// callback to be called when the verification completes. If the verification
// has already finished then WaitForCertVerification returns the result of
// that verification.
- int WaitForCertVerification(CompletionCallback* callback);
+ int WaitForCertVerification(OldCompletionCallback* callback);
base::TimeTicks verification_start_time() const {
return verification_start_time_;
@@ -119,7 +119,7 @@ class NET_EXPORT_PRIVATE SSLHostInfo {
// This is the hostname that we'll validate the certificates against.
const std::string hostname_;
bool cert_parsing_failed_;
- CompletionCallback* cert_verification_callback_;
+ OldCompletionCallback* cert_verification_callback_;
// These two members are taken from the SSLConfig.
bool rev_checking_enabled_;
bool verify_ev_cert_;
@@ -128,10 +128,10 @@ class NET_EXPORT_PRIVATE SSLHostInfo {
CertVerifyResult cert_verify_result_;
SingleRequestCertVerifier verifier_;
scoped_refptr<X509Certificate> cert_;
- scoped_refptr<CancelableCompletionCallback<SSLHostInfo> > callback_;
+ scoped_refptr<CancelableOldCompletionCallback<SSLHostInfo> > callback_;
DnsRRResolver* dnsrr_resolver_;
- CompletionCallback* dns_callback_;
+ OldCompletionCallback* dns_callback_;
DnsRRResolver::Handle dns_handle_;
RRResponse dns_response_;
base::TimeTicks dns_lookup_start_time_;
diff --git a/net/socket/ssl_server_socket.h b/net/socket/ssl_server_socket.h
index d01ad72..bdf5b80 100644
--- a/net/socket/ssl_server_socket.h
+++ b/net/socket/ssl_server_socket.h
@@ -32,7 +32,7 @@ class SSLServerSocket : public StreamSocket {
// if the process completes asynchronously. If Disconnect is called before
// completion then the callback will be silently, as for other StreamSocket
// calls.
- virtual int Handshake(CompletionCallback* callback) = 0;
+ virtual int Handshake(OldCompletionCallback* callback) = 0;
// Exports data derived from the SSL master-secret (see RFC 5705).
// The call will fail with an error if the socket is not connected, or the
diff --git a/net/socket/ssl_server_socket_nss.cc b/net/socket/ssl_server_socket_nss.cc
index dfec9d2..4316049 100644
--- a/net/socket/ssl_server_socket_nss.cc
+++ b/net/socket/ssl_server_socket_nss.cc
@@ -92,7 +92,7 @@ SSLServerSocketNSS::~SSLServerSocketNSS() {
}
}
-int SSLServerSocketNSS::Handshake(CompletionCallback* callback) {
+int SSLServerSocketNSS::Handshake(OldCompletionCallback* callback) {
net_log_.BeginEvent(NetLog::TYPE_SSL_SERVER_HANDSHAKE, NULL);
int rv = Init();
@@ -143,13 +143,13 @@ int SSLServerSocketNSS::ExportKeyingMaterial(const base::StringPiece& label,
return OK;
}
-int SSLServerSocketNSS::Connect(CompletionCallback* callback) {
+int SSLServerSocketNSS::Connect(OldCompletionCallback* callback) {
NOTIMPLEMENTED();
return ERR_NOT_IMPLEMENTED;
}
int SSLServerSocketNSS::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!user_read_callback_);
DCHECK(!user_handshake_callback_);
DCHECK(!user_read_buf_);
@@ -172,7 +172,7 @@ int SSLServerSocketNSS::Read(IOBuffer* buf, int buf_len,
}
int SSLServerSocketNSS::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!user_write_callback_);
DCHECK(!user_write_buf_);
DCHECK(nss_bufs_);
@@ -706,7 +706,7 @@ int SSLServerSocketNSS::DoHandshake() {
void SSLServerSocketNSS::DoHandshakeCallback(int rv) {
DCHECK_NE(rv, ERR_IO_PENDING);
- CompletionCallback* c = user_handshake_callback_;
+ OldCompletionCallback* c = user_handshake_callback_;
user_handshake_callback_ = NULL;
c->Run(rv > OK ? OK : rv);
}
@@ -717,7 +717,7 @@ void SSLServerSocketNSS::DoReadCallback(int rv) {
// Since Run may result in Read being called, clear |user_read_callback_|
// up front.
- CompletionCallback* c = user_read_callback_;
+ OldCompletionCallback* c = user_read_callback_;
user_read_callback_ = NULL;
user_read_buf_ = NULL;
user_read_buf_len_ = 0;
@@ -730,7 +730,7 @@ void SSLServerSocketNSS::DoWriteCallback(int rv) {
// Since Run may result in Write being called, clear |user_write_callback_|
// up front.
- CompletionCallback* c = user_write_callback_;
+ OldCompletionCallback* c = user_write_callback_;
user_write_callback_ = NULL;
user_write_buf_ = NULL;
user_write_buf_len_ = 0;
diff --git a/net/socket/ssl_server_socket_nss.h b/net/socket/ssl_server_socket_nss.h
index 9f13d4a..980464d 100644
--- a/net/socket/ssl_server_socket_nss.h
+++ b/net/socket/ssl_server_socket_nss.h
@@ -32,7 +32,7 @@ class SSLServerSocketNSS : public SSLServerSocket {
virtual ~SSLServerSocketNSS();
// SSLServerSocket interface.
- virtual int Handshake(CompletionCallback* callback);
+ virtual int Handshake(OldCompletionCallback* callback);
virtual int ExportKeyingMaterial(const base::StringPiece& label,
const base::StringPiece& context,
unsigned char *out,
@@ -40,14 +40,14 @@ class SSLServerSocketNSS : public SSLServerSocket {
// Socket interface (via StreamSocket).
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
// StreamSocket interface.
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -98,8 +98,8 @@ class SSLServerSocketNSS : public SSLServerSocket {
virtual int Init();
// Members used to send and receive buffer.
- CompletionCallbackImpl<SSLServerSocketNSS> buffer_send_callback_;
- CompletionCallbackImpl<SSLServerSocketNSS> buffer_recv_callback_;
+ OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_send_callback_;
+ OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_recv_callback_;
bool transport_send_busy_;
bool transport_recv_busy_;
@@ -107,9 +107,9 @@ class SSLServerSocketNSS : public SSLServerSocket {
BoundNetLog net_log_;
- CompletionCallback* user_handshake_callback_;
- CompletionCallback* user_read_callback_;
- CompletionCallback* user_write_callback_;
+ OldCompletionCallback* user_handshake_callback_;
+ OldCompletionCallback* user_read_callback_;
+ OldCompletionCallback* user_write_callback_;
// Used by Read function.
scoped_refptr<IOBuffer> user_read_buf_;
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 6c5e3b8..2340967 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -57,7 +57,7 @@ class FakeDataChannel {
}
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (data_.empty()) {
read_callback_ = callback;
read_buf_ = buf;
@@ -68,7 +68,7 @@ class FakeDataChannel {
}
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
data_.push(new net::DrainableIOBuffer(buf, buf_len));
MessageLoop::current()->PostTask(
FROM_HERE, task_factory_.NewRunnableMethod(
@@ -82,7 +82,7 @@ class FakeDataChannel {
return;
int copied = PropogateData(read_buf_, read_buf_len_);
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
read_buf_ = NULL;
read_buf_len_ = 0;
@@ -100,7 +100,7 @@ class FakeDataChannel {
return copied;
}
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
scoped_refptr<net::IOBuffer> read_buf_;
int read_buf_len_;
@@ -123,14 +123,14 @@ class FakeSocket : public StreamSocket {
}
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// 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,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// Write random number of bytes.
buf_len = rand() % buf_len + 1;
return outgoing_->Write(buf, buf_len, callback);
@@ -144,7 +144,7 @@ class FakeSocket : public StreamSocket {
return true;
}
- virtual int Connect(CompletionCallback* callback) {
+ virtual int Connect(OldCompletionCallback* callback) {
return net::OK;
}
@@ -228,7 +228,7 @@ TEST(FakeSocketTest, DataTransfer) {
EXPECT_EQ(0, memcmp(kTestData, read_buf->data(), read));
// Read then write.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(net::ERR_IO_PENDING,
server.Read(read_buf, kReadBufSize, &callback));
@@ -326,8 +326,8 @@ TEST_F(SSLServerSocketTest, Initialize) {
TEST_F(SSLServerSocketTest, Handshake) {
Initialize();
- TestCompletionCallback connect_callback;
- TestCompletionCallback handshake_callback;
+ TestOldCompletionCallback connect_callback;
+ TestOldCompletionCallback handshake_callback;
int server_ret = server_socket_->Handshake(&handshake_callback);
EXPECT_TRUE(server_ret == net::OK || server_ret == net::ERR_IO_PENDING);
@@ -351,8 +351,8 @@ TEST_F(SSLServerSocketTest, Handshake) {
TEST_F(SSLServerSocketTest, DataTransfer) {
Initialize();
- TestCompletionCallback connect_callback;
- TestCompletionCallback handshake_callback;
+ TestOldCompletionCallback connect_callback;
+ TestOldCompletionCallback handshake_callback;
// Establish connection.
int client_ret = client_socket_->Connect(&connect_callback);
@@ -374,8 +374,8 @@ TEST_F(SSLServerSocketTest, DataTransfer) {
kReadBufSize);
// Write then read.
- TestCompletionCallback write_callback;
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback write_callback;
+ TestOldCompletionCallback read_callback;
server_ret = server_socket_->Write(write_buf, write_buf->size(),
&write_callback);
EXPECT_TRUE(server_ret > 0 || server_ret == net::ERR_IO_PENDING);
@@ -435,8 +435,8 @@ TEST_F(SSLServerSocketTest, DataTransfer) {
TEST_F(SSLServerSocketTest, ExportKeyingMaterial) {
Initialize();
- TestCompletionCallback connect_callback;
- TestCompletionCallback handshake_callback;
+ TestOldCompletionCallback connect_callback;
+ TestOldCompletionCallback handshake_callback;
int client_ret = client_socket_->Connect(&connect_callback);
ASSERT_TRUE(client_ret == net::OK || client_ret == net::ERR_IO_PENDING);
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h
index 85bb352..0a68442 100644
--- a/net/socket/stream_socket.h
+++ b/net/socket/stream_socket.h
@@ -33,7 +33,7 @@ class NET_EXPORT_PRIVATE StreamSocket : public Socket {
//
// Connect may also be called again after a call to the Disconnect method.
//
- virtual int Connect(CompletionCallback* callback) = 0;
+ virtual int Connect(OldCompletionCallback* callback) = 0;
// Called to disconnect a socket. Does nothing if the socket is already
// disconnected. After calling Disconnect it is possible to call Connect
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index bc6270d..2a490e1 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -202,7 +202,7 @@ int TCPClientSocketLibevent::Bind(const IPEndPoint& address) {
return 0;
}
-int TCPClientSocketLibevent::Connect(CompletionCallback* callback) {
+int TCPClientSocketLibevent::Connect(OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
// If already connected, then just return OK.
@@ -429,7 +429,7 @@ bool TCPClientSocketLibevent::IsConnectedAndIdle() const {
int TCPClientSocketLibevent::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
DCHECK(!waiting_connect());
@@ -469,7 +469,7 @@ int TCPClientSocketLibevent::Read(IOBuffer* buf,
int TCPClientSocketLibevent::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
DCHECK(!waiting_connect());
@@ -589,7 +589,7 @@ void TCPClientSocketLibevent::DoReadCallback(int rv) {
DCHECK(read_callback_);
// since Run may result in Read being called, clear read_callback_ up front.
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
c->Run(rv);
}
@@ -599,7 +599,7 @@ void TCPClientSocketLibevent::DoWriteCallback(int rv) {
DCHECK(write_callback_);
// since Run may result in Write being called, clear write_callback_ up front.
- CompletionCallback* c = write_callback_;
+ OldCompletionCallback* c = write_callback_;
write_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/socket/tcp_client_socket_libevent.h b/net/socket/tcp_client_socket_libevent.h
index b0cc7a6..3baf6c9 100644
--- a/net/socket/tcp_client_socket_libevent.h
+++ b/net/socket/tcp_client_socket_libevent.h
@@ -43,7 +43,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
int Bind(const IPEndPoint& address);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -60,8 +60,8 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
// Socket methods:
// 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, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -172,10 +172,10 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
int write_buf_len_;
// External callback; called when read is complete.
- CompletionCallback* read_callback_;
+ OldCompletionCallback* read_callback_;
// External callback; called when write is complete.
- CompletionCallback* write_callback_;
+ OldCompletionCallback* write_callback_;
// The next state for the Connect() state machine.
ConnectState next_connect_state_;
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc
index edb3c20..4abce1f 100644
--- a/net/socket/tcp_client_socket_unittest.cc
+++ b/net/socket/tcp_client_socket_unittest.cc
@@ -38,10 +38,10 @@ TEST(TCPClientSocketTest, BindLoopbackToLoopback) {
EXPECT_EQ(OK, socket.Bind(IPEndPoint(lo_address, 0)));
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
EXPECT_EQ(ERR_IO_PENDING, socket.Connect(&connect_callback));
- TestCompletionCallback accept_callback;
+ TestOldCompletionCallback accept_callback;
scoped_ptr<StreamSocket> accepted_socket;
int result = server.Accept(&accepted_socket, &accept_callback);
if (result == ERR_IO_PENDING)
@@ -63,7 +63,7 @@ TEST(TCPClientSocketTest, BindLoopbackToExternal) {
ASSERT_TRUE(ParseIPLiteralToNumber("127.0.0.1", &lo_address));
EXPECT_EQ(OK, socket.Bind(IPEndPoint(lo_address, 0)));
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
int result = socket.Connect(&connect_callback);
if (result == ERR_IO_PENDING)
result = connect_callback.WaitForResult();
@@ -97,7 +97,7 @@ TEST(TCPClientSocketTest, BindLoopbackToIPv6) {
ASSERT_TRUE(ParseIPLiteralToNumber("127.0.0.1", &ipv4_lo_ip));
EXPECT_EQ(OK, socket.Bind(IPEndPoint(ipv4_lo_ip, 0)));
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
int result = socket.Connect(&connect_callback);
if (result == ERR_IO_PENDING)
result = connect_callback.WaitForResult();
diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc
index 8b192f4..1e69dd9 100644
--- a/net/socket/tcp_client_socket_win.cc
+++ b/net/socket/tcp_client_socket_win.cc
@@ -382,7 +382,7 @@ int TCPClientSocketWin::Bind(const IPEndPoint& address) {
}
-int TCPClientSocketWin::Connect(CompletionCallback* callback) {
+int TCPClientSocketWin::Connect(OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
// If already connected, then just return OK.
@@ -670,7 +670,7 @@ base::TimeDelta TCPClientSocketWin::GetConnectTimeMicros() const {
int TCPClientSocketWin::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(socket_, INVALID_SOCKET);
DCHECK(!waiting_read_);
@@ -712,7 +712,7 @@ int TCPClientSocketWin::Read(IOBuffer* buf,
int TCPClientSocketWin::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(socket_, INVALID_SOCKET);
DCHECK(!waiting_write_);
@@ -808,7 +808,7 @@ void TCPClientSocketWin::DoReadCallback(int rv) {
DCHECK(read_callback_);
// since Run may result in Read being called, clear read_callback_ up front.
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
c->Run(rv);
}
@@ -818,7 +818,7 @@ void TCPClientSocketWin::DoWriteCallback(int rv) {
DCHECK(write_callback_);
// since Run may result in Write being called, clear write_callback_ up front.
- CompletionCallback* c = write_callback_;
+ OldCompletionCallback* c = write_callback_;
write_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/socket/tcp_client_socket_win.h b/net/socket/tcp_client_socket_win.h
index ee08509..59ab3b4 100644
--- a/net/socket/tcp_client_socket_win.h
+++ b/net/socket/tcp_client_socket_win.h
@@ -42,7 +42,7 @@ class NET_EXPORT TCPClientSocketWin : public StreamSocket,
int Bind(const IPEndPoint& address);
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -59,8 +59,8 @@ class NET_EXPORT TCPClientSocketWin : public StreamSocket,
// Socket methods:
// 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, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -123,10 +123,10 @@ class NET_EXPORT TCPClientSocketWin : public StreamSocket,
scoped_refptr<Core> core_;
// External callback; called when connect or read is complete.
- CompletionCallback* read_callback_;
+ OldCompletionCallback* read_callback_;
// External callback; called when write is complete.
- CompletionCallback* write_callback_;
+ OldCompletionCallback* write_callback_;
// The next state for the Connect() state machine.
ConnectState next_connect_state_;
diff --git a/net/socket/tcp_server_socket_libevent.cc b/net/socket/tcp_server_socket_libevent.cc
index 3e25fab..5ed52a9 100644
--- a/net/socket/tcp_server_socket_libevent.cc
+++ b/net/socket/tcp_server_socket_libevent.cc
@@ -106,7 +106,7 @@ int TCPServerSocketLibevent::GetLocalAddress(IPEndPoint* address) const {
}
int TCPServerSocketLibevent::Accept(
- scoped_ptr<StreamSocket>* socket, CompletionCallback* callback) {
+ scoped_ptr<StreamSocket>* socket, OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(socket);
DCHECK(callback);
@@ -185,7 +185,7 @@ void TCPServerSocketLibevent::OnFileCanReadWithoutBlocking(int fd) {
int result = AcceptInternal(accept_socket_);
if (result != ERR_IO_PENDING) {
- CompletionCallback* c = accept_callback_;
+ OldCompletionCallback* c = accept_callback_;
accept_callback_ = NULL;
accept_socket_ = NULL;
bool ok = accept_socket_watcher_.StopWatchingFileDescriptor();
diff --git a/net/socket/tcp_server_socket_libevent.h b/net/socket/tcp_server_socket_libevent.h
index 90e90d8..df846b2 100644
--- a/net/socket/tcp_server_socket_libevent.h
+++ b/net/socket/tcp_server_socket_libevent.h
@@ -29,7 +29,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent
virtual int Listen(const net::IPEndPoint& address, int backlog);
virtual int GetLocalAddress(IPEndPoint* address) const;
virtual int Accept(scoped_ptr<StreamSocket>* socket,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// MessageLoopForIO::Watcher implementation.
virtual void OnFileCanReadWithoutBlocking(int fd);
@@ -44,7 +44,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketLibevent
MessageLoopForIO::FileDescriptorWatcher accept_socket_watcher_;
scoped_ptr<StreamSocket>* accept_socket_;
- CompletionCallback* accept_callback_;
+ OldCompletionCallback* accept_callback_;
BoundNetLog net_log_;
};
diff --git a/net/socket/tcp_server_socket_unittest.cc b/net/socket/tcp_server_socket_unittest.cc
index 5b5b9f5..8c36dca 100644
--- a/net/socket/tcp_server_socket_unittest.cc
+++ b/net/socket/tcp_server_socket_unittest.cc
@@ -77,12 +77,12 @@ class TCPServerSocketTest : public PlatformTest {
TEST_F(TCPServerSocketTest, Accept) {
ASSERT_NO_FATAL_FAILURE(SetUpIPv4());
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
TCPClientSocket connecting_socket(local_address_list(),
NULL, NetLog::Source());
connecting_socket.Connect(&connect_callback);
- TestCompletionCallback accept_callback;
+ TestOldCompletionCallback accept_callback;
scoped_ptr<StreamSocket> accepted_socket;
int result = socket_.Accept(&accepted_socket, &accept_callback);
if (result == ERR_IO_PENDING)
@@ -102,12 +102,12 @@ TEST_F(TCPServerSocketTest, Accept) {
TEST_F(TCPServerSocketTest, AcceptAsync) {
ASSERT_NO_FATAL_FAILURE(SetUpIPv4());
- TestCompletionCallback accept_callback;
+ TestOldCompletionCallback accept_callback;
scoped_ptr<StreamSocket> accepted_socket;
ASSERT_EQ(ERR_IO_PENDING, socket_.Accept(&accepted_socket, &accept_callback));
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
TCPClientSocket connecting_socket(local_address_list(),
NULL, NetLog::Source());
connecting_socket.Connect(&connect_callback);
@@ -126,25 +126,25 @@ TEST_F(TCPServerSocketTest, AcceptAsync) {
TEST_F(TCPServerSocketTest, Accept2Connections) {
ASSERT_NO_FATAL_FAILURE(SetUpIPv4());
- TestCompletionCallback accept_callback;
+ TestOldCompletionCallback accept_callback;
scoped_ptr<StreamSocket> accepted_socket;
ASSERT_EQ(ERR_IO_PENDING,
socket_.Accept(&accepted_socket, &accept_callback));
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
TCPClientSocket connecting_socket(local_address_list(),
NULL, NetLog::Source());
connecting_socket.Connect(&connect_callback);
- TestCompletionCallback connect_callback2;
+ TestOldCompletionCallback connect_callback2;
TCPClientSocket connecting_socket2(local_address_list(),
NULL, NetLog::Source());
connecting_socket2.Connect(&connect_callback2);
EXPECT_EQ(OK, accept_callback.WaitForResult());
- TestCompletionCallback accept_callback2;
+ TestOldCompletionCallback accept_callback2;
scoped_ptr<StreamSocket> accepted_socket2;
int result = socket_.Accept(&accepted_socket2, &accept_callback2);
if (result == ERR_IO_PENDING)
@@ -169,12 +169,12 @@ TEST_F(TCPServerSocketTest, AcceptIPv6) {
if (!initialized)
return;
- TestCompletionCallback connect_callback;
+ TestOldCompletionCallback connect_callback;
TCPClientSocket connecting_socket(local_address_list(),
NULL, NetLog::Source());
connecting_socket.Connect(&connect_callback);
- TestCompletionCallback accept_callback;
+ TestOldCompletionCallback accept_callback;
scoped_ptr<StreamSocket> accepted_socket;
int result = socket_.Accept(&accepted_socket, &accept_callback);
if (result == ERR_IO_PENDING)
diff --git a/net/socket/tcp_server_socket_win.cc b/net/socket/tcp_server_socket_win.cc
index 55c2439..bde65ec 100644
--- a/net/socket/tcp_server_socket_win.cc
+++ b/net/socket/tcp_server_socket_win.cc
@@ -99,7 +99,7 @@ int TCPServerSocketWin::GetLocalAddress(IPEndPoint* address) const {
}
int TCPServerSocketWin::Accept(
- scoped_ptr<StreamSocket>* socket, CompletionCallback* callback) {
+ scoped_ptr<StreamSocket>* socket, OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(socket);
DCHECK(callback);
@@ -182,7 +182,7 @@ void TCPServerSocketWin::OnObjectSignaled(HANDLE object) {
if (ev.lNetworkEvents & FD_ACCEPT) {
int result = AcceptInternal(accept_socket_);
if (result != ERR_IO_PENDING) {
- CompletionCallback* c = accept_callback_;
+ OldCompletionCallback* c = accept_callback_;
accept_callback_ = NULL;
accept_socket_ = NULL;
c->Run(result);
diff --git a/net/socket/tcp_server_socket_win.h b/net/socket/tcp_server_socket_win.h
index 8da5fa1..22eab44 100644
--- a/net/socket/tcp_server_socket_win.h
+++ b/net/socket/tcp_server_socket_win.h
@@ -31,7 +31,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketWin
virtual int Listen(const net::IPEndPoint& address, int backlog);
virtual int GetLocalAddress(IPEndPoint* address) const;
virtual int Accept(scoped_ptr<StreamSocket>* socket,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// base::ObjectWatcher::Delegate implementation.
virtual void OnObjectSignaled(HANDLE object);
@@ -46,7 +46,7 @@ class NET_EXPORT_PRIVATE TCPServerSocketWin
base::win::ObjectWatcher accept_watcher_;
scoped_ptr<StreamSocket>* accept_socket_;
- CompletionCallback* accept_callback_;
+ OldCompletionCallback* accept_callback_;
BoundNetLog net_log_;
};
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 8cb9570..cd666d3 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -400,7 +400,7 @@ int TransportClientSocketPool::RequestSocket(
const void* params,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log) {
const scoped_refptr<TransportSocketParams>* casted_params =
static_cast<const scoped_refptr<TransportSocketParams>*>(params);
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h
index e0b6080..3addf33 100644
--- a/net/socket/transport_client_socket_pool.h
+++ b/net/socket/transport_client_socket_pool.h
@@ -110,7 +110,7 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob {
scoped_refptr<TransportSocketParams> params_;
ClientSocketFactory* const client_socket_factory_;
- CompletionCallbackImpl<TransportConnectJob> callback_;
+ OldCompletionCallbackImpl<TransportConnectJob> callback_;
SingleRequestHostResolver resolver_;
AddressList addresses_;
State next_state_;
@@ -125,7 +125,7 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob {
scoped_ptr<StreamSocket> fallback_transport_socket_;
scoped_ptr<AddressList> fallback_addresses_;
- CompletionCallbackImpl<TransportConnectJob> fallback_callback_;
+ OldCompletionCallbackImpl<TransportConnectJob> fallback_callback_;
base::TimeTicks fallback_connect_start_time_;
base::OneShotTimer<TransportConnectJob> fallback_timer_;
@@ -150,7 +150,7 @@ class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool {
const void* resolve_info,
RequestPriority priority,
ClientSocketHandle* handle,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
const BoundNetLog& net_log);
virtual void RequestSockets(const std::string& group_name,
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index c262bfb..8ea292b 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -52,7 +52,7 @@ class MockClientSocket : public StreamSocket {
addrlist_(addrlist) {}
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback) {
+ virtual int Connect(OldCompletionCallback* callback) {
connected_ = true;
return OK;
}
@@ -92,11 +92,11 @@ class MockClientSocket : public StreamSocket {
// Socket methods:
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual bool SetReceiveBufferSize(int32 size) { return true; }
@@ -113,7 +113,7 @@ class MockFailingClientSocket : public StreamSocket {
MockFailingClientSocket(const AddressList& addrlist) : addrlist_(addrlist) {}
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback) {
+ virtual int Connect(OldCompletionCallback* callback) {
return ERR_CONNECTION_FAILED;
}
@@ -146,12 +146,12 @@ class MockFailingClientSocket : public StreamSocket {
// Socket methods:
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual bool SetReceiveBufferSize(int32 size) { return true; }
@@ -181,7 +181,7 @@ class MockPendingClientSocket : public StreamSocket {
addrlist_(addrlist) {}
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback) {
+ virtual int Connect(OldCompletionCallback* callback) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
method_factory_.NewRunnableMethod(
@@ -224,19 +224,19 @@ class MockPendingClientSocket : public StreamSocket {
// Socket methods:
virtual int Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual int Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return ERR_FAILED;
}
virtual bool SetReceiveBufferSize(int32 size) { return true; }
virtual bool SetSendBufferSize(int32 size) { return true; }
private:
- void DoCallback(CompletionCallback* callback) {
+ void DoCallback(OldCompletionCallback* callback) {
if (should_stall_)
return;
@@ -500,7 +500,7 @@ TEST(TransportConnectJobTest, MakeAddrListStartWithIPv4) {
}
TEST_F(TransportClientSocketPoolTest, Basic) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -516,7 +516,7 @@ TEST_F(TransportClientSocketPoolTest, Basic) {
TEST_F(TransportClientSocketPoolTest, InitHostResolutionFailure) {
host_resolver_->rules()->AddSimulatedFailure("unresolvable.host.name");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
HostPortPair host_port_pair("unresolvable.host.name", 80);
scoped_refptr<TransportSocketParams> dest(new TransportSocketParams(
@@ -530,7 +530,7 @@ TEST_F(TransportClientSocketPoolTest, InitHostResolutionFailure) {
TEST_F(TransportClientSocketPoolTest, InitConnectionFailure) {
client_socket_factory_.set_client_socket_type(
MockClientSocketFactory::MOCK_FAILING_CLIENT_SOCKET);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", params_, kDefaultPriority,
&callback, &pool_, BoundNetLog()));
@@ -643,7 +643,7 @@ TEST_F(TransportClientSocketPoolTest, PendingRequests_NoKeepAlive) {
// The pending host resolution will eventually complete, and destroy the
// ClientSocketPool which will crash if the group was not cleared properly.
TEST_F(TransportClientSocketPoolTest, CancelRequestClearGroup) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", params_, kDefaultPriority,
&callback, &pool_, BoundNetLog()));
@@ -652,9 +652,9 @@ TEST_F(TransportClientSocketPoolTest, CancelRequestClearGroup) {
TEST_F(TransportClientSocketPoolTest, TwoRequestsCancelOne) {
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", params_, kDefaultPriority,
&callback, &pool_, BoundNetLog()));
@@ -671,13 +671,13 @@ TEST_F(TransportClientSocketPoolTest, ConnectCancelConnect) {
client_socket_factory_.set_client_socket_type(
MockClientSocketFactory::MOCK_PENDING_CLIENT_SOCKET);
ClientSocketHandle handle;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", params_, kDefaultPriority,
&callback, &pool_, BoundNetLog()));
handle.Reset();
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", params_, kDefaultPriority,
&callback2, &pool_, BoundNetLog()));
@@ -794,7 +794,7 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
ClientSocketHandle* const handle_;
TransportClientSocketPool* const pool_;
bool within_callback_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
// Disabled in release with dcheck : http://crbug.com/94501
@@ -869,7 +869,7 @@ TEST_F(TransportClientSocketPoolTest, FailingActiveRequestWithPendingRequests) {
}
TEST_F(TransportClientSocketPoolTest, ResetIdleSocketsOnIPAddressChange) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -924,7 +924,7 @@ TEST_F(TransportClientSocketPoolTest, BackupSocketConnect) {
EXPECT_EQ(0, pool_.IdleSocketCount());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("b", low_params_, LOW, &callback, &pool_,
BoundNetLog());
@@ -966,7 +966,7 @@ TEST_F(TransportClientSocketPoolTest, BackupSocketCancel) {
for (int index = CANCEL_BEFORE_WAIT; index < CANCEL_AFTER_WAIT; ++index) {
EXPECT_EQ(0, pool_.IdleSocketCount());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("c", low_params_, LOW, &callback, &pool_,
BoundNetLog());
@@ -1022,7 +1022,7 @@ TEST_F(TransportClientSocketPoolTest, MAYBE_BackupSocketFailAfterStall) {
EXPECT_EQ(0, pool_.IdleSocketCount());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("b", low_params_, LOW, &callback, &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1074,7 +1074,7 @@ TEST_F(TransportClientSocketPoolTest, MAYBE_BackupSocketFailAfterDelay) {
EXPECT_EQ(0, pool_.IdleSocketCount());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("b", low_params_, LOW, &callback, &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1128,7 +1128,7 @@ TEST_F(TransportClientSocketPoolTest, IPv6FallbackSocketIPv4FinishesFirst) {
host_resolver_->rules()->AddIPLiteralRule(
"*", "2:abcd::3:4:ff,2.2.2.2", "");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1172,7 +1172,7 @@ TEST_F(TransportClientSocketPoolTest, IPv6FallbackSocketIPv6FinishesFirst) {
host_resolver_->rules()->AddIPLiteralRule(
"*", "2:abcd::3:4:ff,2.2.2.2", "");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1205,7 +1205,7 @@ TEST_F(TransportClientSocketPoolTest, IPv6NoIPv4AddressesToFallbackTo) {
host_resolver_->rules()->AddIPLiteralRule(
"*", "2:abcd::3:4:ff,3:abcd::3:4:ff", "");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1238,7 +1238,7 @@ TEST_F(TransportClientSocketPoolTest, IPv4HasNoFallback) {
host_resolver_->rules()->AddIPLiteralRule(
"*", "1.1.1.1", "");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
ClientSocketHandle handle;
int rv = handle.Init("a", low_params_, LOW, &callback, &pool, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 1379f4a..62473fe 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -75,7 +75,7 @@ class TransportClientSocketTest
int DrainClientSocket(IOBuffer* buf,
uint32 buf_len,
uint32 bytes_to_read,
- TestCompletionCallback* callback);
+ TestOldCompletionCallback* callback);
void SendClientRequest();
@@ -122,7 +122,7 @@ void TransportClientSocketTest::SetUp() {
HostResolver::kDefaultRetryAttempts,
NULL));
HostResolver::RequestInfo info(HostPortPair("localhost", listen_port_));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = resolver->Resolve(info, &addr, &callback, NULL, BoundNetLog());
CHECK_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -135,7 +135,7 @@ void TransportClientSocketTest::SetUp() {
int TransportClientSocketTest::DrainClientSocket(
IOBuffer* buf, uint32 buf_len,
- uint32 bytes_to_read, TestCompletionCallback* callback) {
+ uint32 bytes_to_read, TestOldCompletionCallback* callback) {
int rv = OK;
uint32 bytes_read = 0;
@@ -157,7 +157,7 @@ void TransportClientSocketTest::SendClientRequest() {
const char request_text[] = "GET / HTTP/1.0\r\n\r\n";
scoped_refptr<IOBuffer> request_buffer(
new IOBuffer(arraysize(request_text) - 1));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv;
memcpy(request_buffer->data(), request_text, arraysize(request_text) - 1);
@@ -175,7 +175,7 @@ INSTANTIATE_TEST_CASE_P(StreamSocket,
::testing::Values(TCP));
TEST_P(TransportClientSocketTest, Connect) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
EXPECT_FALSE(sock_->IsConnected());
int rv = sock_->Connect(&callback);
@@ -203,7 +203,7 @@ TEST_P(TransportClientSocketTest, Connect) {
TEST_P(TransportClientSocketTest, IsConnected) {
scoped_refptr<IOBuffer> buf(new IOBuffer(4096));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
uint32 bytes_read;
EXPECT_FALSE(sock_->IsConnected());
@@ -260,7 +260,7 @@ TEST_P(TransportClientSocketTest, IsConnected) {
}
TEST_P(TransportClientSocketTest, Read) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = sock_->Connect(&callback);
if (rv != OK) {
ASSERT_EQ(rv, ERR_IO_PENDING);
@@ -287,7 +287,7 @@ TEST_P(TransportClientSocketTest, Read) {
}
TEST_P(TransportClientSocketTest, Read_SmallChunks) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = sock_->Connect(&callback);
if (rv != OK) {
ASSERT_EQ(rv, ERR_IO_PENDING);
@@ -322,7 +322,7 @@ TEST_P(TransportClientSocketTest, Read_SmallChunks) {
}
TEST_P(TransportClientSocketTest, Read_Interrupted) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = sock_->Connect(&callback);
if (rv != OK) {
ASSERT_EQ(ERR_IO_PENDING, rv);
@@ -347,7 +347,7 @@ TEST_P(TransportClientSocketTest, Read_Interrupted) {
}
TEST_P(TransportClientSocketTest, DISABLED_FullDuplex_ReadFirst) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = sock_->Connect(&callback);
if (rv != OK) {
ASSERT_EQ(rv, ERR_IO_PENDING);
@@ -367,7 +367,7 @@ TEST_P(TransportClientSocketTest, DISABLED_FullDuplex_ReadFirst) {
scoped_refptr<IOBuffer> request_buffer(new IOBuffer(kWriteBufLen));
char* request_data = request_buffer->data();
memset(request_data, 'A', kWriteBufLen);
- TestCompletionCallback write_callback;
+ TestOldCompletionCallback write_callback;
while (true) {
rv = sock_->Write(request_buffer, kWriteBufLen, &write_callback);
@@ -389,7 +389,7 @@ TEST_P(TransportClientSocketTest, DISABLED_FullDuplex_ReadFirst) {
}
TEST_P(TransportClientSocketTest, DISABLED_FullDuplex_WriteFirst) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = sock_->Connect(&callback);
if (rv != OK) {
ASSERT_EQ(ERR_IO_PENDING, rv);
@@ -403,7 +403,7 @@ TEST_P(TransportClientSocketTest, DISABLED_FullDuplex_WriteFirst) {
scoped_refptr<IOBuffer> request_buffer(new IOBuffer(kWriteBufLen));
char* request_data = request_buffer->data();
memset(request_data, 'A', kWriteBufLen);
- TestCompletionCallback write_callback;
+ TestOldCompletionCallback write_callback;
while (true) {
rv = sock_->Write(request_buffer, kWriteBufLen, &write_callback);
diff --git a/net/socket/web_socket_server_socket.cc b/net/socket/web_socket_server_socket.cc
index 7b17ae7..4bb7b9f 100644
--- a/net/socket/web_socket_server_socket.cc
+++ b/net/socket/web_socket_server_socket.cc
@@ -172,7 +172,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
};
PendingReq(Type type, net::DrainableIOBuffer* io_buf,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: type(type),
io_buf(io_buf),
callback(callback) {
@@ -193,12 +193,12 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
Type type;
scoped_refptr<net::DrainableIOBuffer> io_buf;
- net::CompletionCallback* callback;
+ net::OldCompletionCallback* callback;
};
// Socket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
if (buf_len == 0)
return 0;
if (buf == NULL || buf_len < 0) {
@@ -263,7 +263,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
}
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
if (buf_len == 0)
return 0;
if (buf == NULL || buf_len < 0) {
@@ -319,7 +319,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
}
// WebSocketServerSocket implementation.
- virtual int Accept(net::CompletionCallback* callback) {
+ virtual int Accept(net::OldCompletionCallback* callback) {
if (phase_ != PHASE_NYMPH)
return net::ERR_UNEXPECTED;
phase_ = PHASE_HANDSHAKE;
@@ -447,7 +447,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
if (rv > 0) {
process_handshake_buf_->DidConsume(rv);
phase_ = PHASE_FRAME_OUTSIDE;
- net::CompletionCallback* cb = pending_reqs_.front().callback;
+ net::OldCompletionCallback* cb = pending_reqs_.front().callback;
pending_reqs_.pop_front();
ConsiderTransportWrite(); // Schedule answer handshake.
if (cb)
@@ -474,7 +474,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
return;
}
if (rv > 0 || phase_ == PHASE_SHUT) {
- net::CompletionCallback* cb = it->callback;
+ net::OldCompletionCallback* cb = it->callback;
pending_reqs_.erase(it);
if (cb)
cb->Run(rv);
@@ -515,7 +515,7 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
DCHECK_LE(result, it->io_buf->BytesRemaining());
it->io_buf->DidConsume(result);
if (it->io_buf->BytesRemaining() == 0) {
- net::CompletionCallback* cb = it->callback;
+ net::OldCompletionCallback* cb = it->callback;
int bytes_written = it->io_buf->BytesConsumed();
DCHECK_GT(bytes_written, 0);
pending_reqs_.erase(it);
@@ -878,8 +878,8 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
std::deque<PendingReq> pending_reqs_;
// Callbacks from transport to us.
- scoped_ptr<net::CompletionCallback> transport_read_callback_;
- scoped_ptr<net::CompletionCallback> transport_write_callback_;
+ scoped_ptr<net::OldCompletionCallback> transport_read_callback_;
+ scoped_ptr<net::OldCompletionCallback> transport_write_callback_;
// Whether transport requests are pending.
bool is_transport_read_pending_;
diff --git a/net/socket/web_socket_server_socket.h b/net/socket/web_socket_server_socket.h
index 55c273e..2415575 100644
--- a/net/socket/web_socket_server_socket.h
+++ b/net/socket/web_socket_server_socket.h
@@ -50,7 +50,7 @@ class WebSocketServerSocket : public Socket {
// Returns either ERR_IO_PENDING, in which case the given callback will be
// called in the future with the real result, or it completes synchronously,
// returning the result immediately.
- virtual int Accept(CompletionCallback* callback) = 0;
+ virtual int Accept(OldCompletionCallback* callback) = 0;
};
// Creates websocket server socket atop of already connected socket. This
diff --git a/net/socket/web_socket_server_socket_unittest.cc b/net/socket/web_socket_server_socket_unittest.cc
index 20e3dcf..476fc33 100644
--- a/net/socket/web_socket_server_socket_unittest.cc
+++ b/net/socket/web_socket_server_socket_unittest.cc
@@ -94,7 +94,7 @@ class TestingTransportSocket : public net::Socket {
// Socket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
CHECK_GT(buf_len, 0);
int remaining = sample_->BytesRemaining();
if (remaining < 1) {
@@ -116,7 +116,7 @@ class TestingTransportSocket : public net::Socket {
}
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
CHECK_GT(buf_len, 0);
int remaining = answer_->BytesRemaining();
CHECK_GE(remaining, buf_len);
@@ -144,7 +144,7 @@ class TestingTransportSocket : public net::Socket {
net::DrainableIOBuffer* answer() { return answer_.get(); }
- void DoReadCallback(net::CompletionCallback* callback, int result) {
+ void DoReadCallback(net::OldCompletionCallback* callback, int result) {
if (result == 0 && !is_closed_) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
@@ -155,7 +155,7 @@ class TestingTransportSocket : public net::Socket {
}
}
- void DoWriteCallback(net::CompletionCallback* callback, int result) {
+ void DoWriteCallback(net::OldCompletionCallback* callback, int result) {
if (callback)
callback->Run(result);
}
@@ -169,7 +169,7 @@ class TestingTransportSocket : public net::Socket {
scoped_refptr<net::DrainableIOBuffer> answer_;
// Final read callback to report zero (zero stands for EOF).
- net::CompletionCallback* final_read_callback_;
+ net::OldCompletionCallback* final_read_callback_;
ScopedRunnableMethodFactory<TestingTransportSocket> method_factory_;
};
@@ -302,9 +302,9 @@ class ReadWriteTracker {
private:
net::WebSocketServerSocket* const ws_;
int const buf_size_;
- scoped_ptr<net::CompletionCallback> accept_callback_;
- scoped_ptr<net::CompletionCallback> read_callback_;
- scoped_ptr<net::CompletionCallback> write_callback_;
+ scoped_ptr<net::OldCompletionCallback> accept_callback_;
+ scoped_ptr<net::OldCompletionCallback> read_callback_;
+ scoped_ptr<net::OldCompletionCallback> write_callback_;
scoped_refptr<net::IOBuffer> read_buf_;
scoped_refptr<net::IOBuffer> write_buf_;
int bytes_remaining_to_read_;
@@ -348,7 +348,7 @@ class WebSocketServerSocketTest : public testing::Test {
}
int count_;
- scoped_ptr<net::CompletionCallback> accept_callback_[2];
+ scoped_ptr<net::OldCompletionCallback> accept_callback_[2];
};
TEST_F(WebSocketServerSocketTest, Handshake) {
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index 9ce0074..03b1a18 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -63,7 +63,7 @@ class NET_EXPORT SocketStream
virtual ~Delegate() {}
virtual int OnStartOpenConnection(SocketStream* socket,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return OK;
}
@@ -337,9 +337,9 @@ class NET_EXPORT SocketStream
SSLConfig ssl_config_;
- CompletionCallbackImpl<SocketStream> io_callback_;
- CompletionCallbackImpl<SocketStream> read_callback_;
- CompletionCallbackImpl<SocketStream> write_callback_;
+ OldCompletionCallbackImpl<SocketStream> io_callback_;
+ OldCompletionCallbackImpl<SocketStream> read_callback_;
+ OldCompletionCallbackImpl<SocketStream> write_callback_;
scoped_refptr<IOBuffer> read_buf_;
int read_buf_size_;
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index 80bff3c..cbdd6ed 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -32,7 +32,7 @@ struct SocketStreamEvent {
int num,
const std::string& str,
net::AuthChallengeInfo* auth_challenge_info,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
int error)
: event_type(type), socket(socket_stream), number(num), data(str),
auth_info(auth_challenge_info), error_code(error) {}
@@ -47,7 +47,7 @@ struct SocketStreamEvent {
class SocketStreamEventRecorder : public net::SocketStream::Delegate {
public:
- explicit SocketStreamEventRecorder(net::CompletionCallback* callback)
+ explicit SocketStreamEventRecorder(net::OldCompletionCallback* callback)
: callback_(callback) {}
virtual ~SocketStreamEventRecorder() {}
@@ -79,7 +79,7 @@ class SocketStreamEventRecorder : public net::SocketStream::Delegate {
}
virtual int OnStartOpenConnection(net::SocketStream* socket,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
connection_callback_ = callback;
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
@@ -170,8 +170,8 @@ class SocketStreamEventRecorder : public net::SocketStream::Delegate {
base::Callback<void(SocketStreamEvent*)> on_close_;
base::Callback<void(SocketStreamEvent*)> on_auth_required_;
base::Callback<void(SocketStreamEvent*)> on_error_;
- net::CompletionCallback* callback_;
- net::CompletionCallback* connection_callback_;
+ net::OldCompletionCallback* callback_;
+ net::OldCompletionCallback* connection_callback_;
string16 username_;
string16 password_;
@@ -239,7 +239,7 @@ class SocketStreamTest : public PlatformTest {
static const char kWebSocketHandshakeResponse[];
protected:
- TestCompletionCallback io_callback_;
+ TestOldCompletionCallback io_callback_;
private:
std::string handshake_request_;
@@ -272,7 +272,7 @@ const char SocketStreamTest::kWebSocketHandshakeResponse[] =
"8jKS'y:G*Co,Wxa-";
TEST_F(SocketStreamTest, CloseFlushPendingWrite) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -368,7 +368,7 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
data_writes2, arraysize(data_writes2));
mock_socket_factory.AddSocketDataProvider(&data2);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -406,7 +406,7 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
}
TEST_F(SocketStreamTest, IOPending) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -474,7 +474,7 @@ TEST_F(SocketStreamTest, IOPending) {
}
TEST_F(SocketStreamTest, SwitchToSpdy) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -503,7 +503,7 @@ TEST_F(SocketStreamTest, SwitchToSpdy) {
}
TEST_F(SocketStreamTest, SwitchAfterPending) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -558,7 +558,7 @@ TEST_F(SocketStreamTest, SecureProxyConnectError) {
SSLSocketDataProvider ssl(false, ERR_SSL_PROTOCOL_ERROR);
mock_socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -610,7 +610,7 @@ TEST_F(SocketStreamTest, SecureProxyConnect) {
SSLSocketDataProvider ssl(false, OK);
mock_socket_factory.AddSSLSocketDataProvider(&ssl);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index ac0c4ce..474d497 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -50,7 +50,7 @@ SpdyHttpStream::~SpdyHttpStream() {
int SpdyHttpStream::InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& stream_net_log,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!stream_.get());
if (spdy_session_->IsClosed())
return ERR_CONNECTION_CLOSED;
@@ -82,7 +82,7 @@ uint64 SpdyHttpStream::GetUploadProgress() const {
return request_body_stream_->position();
}
-int SpdyHttpStream::ReadResponseHeaders(CompletionCallback* callback) {
+int SpdyHttpStream::ReadResponseHeaders(OldCompletionCallback* callback) {
CHECK(callback);
CHECK(!stream_->cancelled());
@@ -102,7 +102,7 @@ int SpdyHttpStream::ReadResponseHeaders(CompletionCallback* callback) {
}
int SpdyHttpStream::ReadResponseBody(
- IOBuffer* buf, int buf_len, CompletionCallback* callback) {
+ IOBuffer* buf, int buf_len, OldCompletionCallback* callback) {
CHECK(stream_->is_idle());
CHECK(buf);
CHECK(buf_len);
@@ -190,7 +190,7 @@ void SpdyHttpStream::set_chunk_callback(ChunkCallback* callback) {
int SpdyHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
base::Time request_time = base::Time::Now();
CHECK(stream_.get());
@@ -451,7 +451,7 @@ void SpdyHttpStream::DoCallback(int rv) {
CHECK(user_callback_);
// Since Run may result in being called back, clear user_callback_ in advance.
- CompletionCallback* c = user_callback_;
+ OldCompletionCallback* c = user_callback_;
user_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index 4bb5d58..46a4104 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -46,17 +46,17 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
// HttpStream methods:
virtual int InitializeStream(const HttpRequestInfo* request_info,
const BoundNetLog& net_log,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual int SendRequest(const HttpRequestHeaders& headers,
UploadDataStream* request_body,
HttpResponseInfo* response,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual uint64 GetUploadProgress() const OVERRIDE;
- virtual int ReadResponseHeaders(CompletionCallback* callback) OVERRIDE;
+ virtual int ReadResponseHeaders(OldCompletionCallback* callback) OVERRIDE;
virtual const HttpResponseInfo* GetResponseInfo() const;
virtual int ReadResponseBody(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) OVERRIDE;
+ OldCompletionCallback* callback) OVERRIDE;
virtual void Close(bool not_reusable) OVERRIDE;
virtual HttpStream* RenewStreamForAuth() OVERRIDE;
virtual bool IsResponseBodyComplete() const OVERRIDE;
@@ -118,7 +118,7 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
// TODO(mbelshe): is this infinite buffering?
std::list<scoped_refptr<IOBufferWithSize> > response_body_;
- CompletionCallback* user_callback_;
+ OldCompletionCallback* user_callback_;
// User provided buffer for the ReadResponseBody() response.
scoped_refptr<IOBuffer> user_buffer_;
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index 9054e2b..4cafa32 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -32,7 +32,7 @@ class SpdyHttpStreamTest : public testing::Test {
session_ = http_session_->spdy_session_pool()->Get(pair, BoundNetLog());
transport_params_ = new TransportSocketParams(host_port_pair,
MEDIUM, GURL(), false, false);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
EXPECT_EQ(ERR_IO_PENDING,
connection->Init(host_port_pair.ToString(),
@@ -73,7 +73,7 @@ TEST_F(SpdyHttpStreamTest, SendRequest) {
HttpRequestInfo request;
request.method = "GET";
request.url = GURL("http://www.google.com/");
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
BoundNetLog net_log;
@@ -133,7 +133,7 @@ TEST_F(SpdyHttpStreamTest, SendChunkedPost) {
request.upload_data->set_is_chunked(true);
request.upload_data->AppendChunk(kUploadData, kUploadDataSize, false);
request.upload_data->AppendChunk(kUploadData, kUploadDataSize, true);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
BoundNetLog net_log;
@@ -187,7 +187,7 @@ TEST_F(SpdyHttpStreamTest, SpdyURLTest) {
HttpRequestInfo request;
request.method = "GET";
request.url = GURL(full_url);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpResponseInfo response;
HttpRequestHeaders headers;
BoundNetLog net_log;
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 5acd830..4a9e111 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -322,7 +322,7 @@ class SpdyNetworkTransactionTest
TransactionHelperResult output_;
scoped_ptr<StaticSocketDataProvider> first_transaction_;
SSLVector ssl_vector_;
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<HttpNetworkTransaction> trans_;
scoped_ptr<HttpNetworkTransaction> trans_http_;
DataVector data_vector_;
@@ -406,7 +406,7 @@ class SpdyNetworkTransactionTest
int bytes_read = 0;
scoped_refptr<net::IOBufferWithSize> buf(new net::IOBufferWithSize(kSize));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
while (true) {
int rv = trans->Read(buf, kSize, &callback);
if (rv == ERR_IO_PENDING) {
@@ -456,7 +456,7 @@ class SpdyNetworkTransactionTest
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -668,9 +668,9 @@ TEST_P(SpdyNetworkTransactionTest, ThreeGets) {
scoped_ptr<HttpNetworkTransaction> trans3(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
+ TestOldCompletionCallback callback3;
HttpRequestInfo httpreq1 = CreateGetRequest();
HttpRequestInfo httpreq2 = CreateGetRequest();
@@ -753,8 +753,8 @@ TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBinding) {
scoped_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
HttpRequestInfo httpreq1 = CreateGetRequest();
HttpRequestInfo httpreq2 = CreateGetRequest();
@@ -842,8 +842,8 @@ TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBindingFromPreconnect) {
scoped_ptr<HttpNetworkTransaction> trans2(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
HttpRequestInfo httpreq = CreateGetRequest();
@@ -967,9 +967,9 @@ TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrent) {
scoped_ptr<HttpNetworkTransaction> trans3(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
+ TestOldCompletionCallback callback3;
HttpRequestInfo httpreq1 = CreateGetRequest();
HttpRequestInfo httpreq2 = CreateGetRequest();
@@ -1109,10 +1109,10 @@ TEST_P(SpdyNetworkTransactionTest, FourGetsWithMaxConcurrentPriority) {
scoped_ptr<HttpNetworkTransaction> trans4(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
- TestCompletionCallback callback3;
- TestCompletionCallback callback4;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
+ TestOldCompletionCallback callback3;
+ TestOldCompletionCallback callback4;
HttpRequestInfo httpreq1 = CreateGetRequest();
HttpRequestInfo httpreq2 = CreateGetRequest();
@@ -1243,9 +1243,9 @@ TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) {
scoped_ptr<HttpNetworkTransaction> trans3(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
+ TestOldCompletionCallback callback3;
HttpRequestInfo httpreq1 = CreateGetRequest();
HttpRequestInfo httpreq2 = CreateGetRequest();
@@ -1293,7 +1293,7 @@ TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) {
// The KillerCallback will delete the transaction on error as part of the
// callback.
-class KillerCallback : public TestCompletionCallback {
+class KillerCallback : public TestOldCompletionCallback {
public:
explicit KillerCallback(HttpNetworkTransaction* transaction)
: transaction_(transaction) {}
@@ -1301,7 +1301,7 @@ class KillerCallback : public TestCompletionCallback {
virtual void RunWithParams(const Tuple1<int>& params) {
if (params.a < 0)
delete transaction_;
- TestCompletionCallback::RunWithParams(params);
+ TestOldCompletionCallback::RunWithParams(params);
}
private:
@@ -1361,8 +1361,8 @@ TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentSocketClose) {
HttpNetworkTransaction trans2(helper.session());
HttpNetworkTransaction* trans3(new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback1;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback1;
+ TestOldCompletionCallback callback2;
KillerCallback callback3(trans3);
HttpRequestInfo httpreq1 = CreateGetRequest();
@@ -1755,7 +1755,7 @@ TEST_P(SpdyNetworkTransactionTest, SocketWriteReturnsZero) {
helper.AddDeterministicData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1811,7 +1811,7 @@ TEST_P(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) {
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -1906,7 +1906,7 @@ TEST_P(SpdyNetworkTransactionTest, WindowUpdateReceived) {
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -1963,7 +1963,7 @@ TEST_P(SpdyNetworkTransactionTest, WindowUpdateSent) {
helper.RunPreTestSetup();
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2069,7 +2069,7 @@ TEST_P(SpdyNetworkTransactionTest, WindowUpdateOverflow) {
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2177,7 +2177,7 @@ TEST_P(SpdyNetworkTransactionTest, FlowControlStallResume) {
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2222,7 +2222,7 @@ TEST_P(SpdyNetworkTransactionTest, CancelledTransaction) {
helper.AddData(&data);
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
helper.ResetTrans(); // Cancel the transaction.
@@ -2261,7 +2261,7 @@ TEST_P(SpdyNetworkTransactionTest, CancelledTransactionSendRst) {
helper.AddDeterministicData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2287,7 +2287,7 @@ class SpdyNetworkTransactionTest::StartTransactionCallback
virtual void RunWithParams(const Tuple1<int>& params) {
scoped_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(session_));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
HttpRequestInfo request;
request.method = "GET";
request.url = GURL("http://www.google.com/");
@@ -2348,7 +2348,7 @@ TEST_P(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -2406,7 +2406,7 @@ TEST_P(SpdyNetworkTransactionTest, DeleteSessionOnReadCallback) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -2813,7 +2813,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushServerAborted) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -3067,7 +3067,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -3128,7 +3128,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID9) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -3185,7 +3185,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushNoURL) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
@@ -3776,7 +3776,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferFull) {
writes, arraysize(writes)));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
NormalSpdyTransactionHelper helper(CreateGetRequest(),
BoundNetLog(), GetParam());
@@ -3797,7 +3797,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferFull) {
out.response_info = *response; // Make a copy so we can verify.
// Read Data
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback read_callback;
std::string content;
do {
@@ -3873,7 +3873,7 @@ TEST_P(SpdyNetworkTransactionTest, Buffering) {
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3888,7 +3888,7 @@ TEST_P(SpdyNetworkTransactionTest, Buffering) {
out.response_info = *response; // Make a copy so we can verify.
// Read Data
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback read_callback;
std::string content;
int reads_completed = 0;
@@ -3968,7 +3968,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedAll) {
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -3983,7 +3983,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedAll) {
out.response_info = *response; // Make a copy so we can verify.
// Read Data
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback read_callback;
std::string content;
int reads_completed = 0;
@@ -4056,7 +4056,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedClosed) {
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4072,7 +4072,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedClosed) {
out.response_info = *response; // Make a copy so we can verify.
// Read Data
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback read_callback;
std::string content;
int reads_completed = 0;
@@ -4135,7 +4135,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) {
helper.RunPreTestSetup();
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4151,7 +4151,7 @@ TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) {
out.response_info = *response; // Make a copy so we can verify.
// Read Data
- TestCompletionCallback read_callback;
+ TestOldCompletionCallback read_callback;
do {
const int kReadSize = 256;
@@ -4440,7 +4440,7 @@ TEST_P(SpdyNetworkTransactionTest, CloseWithActiveStream) {
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
TransactionHelperResult out;
out.rv = trans->Start(&CreateGetRequest(), &callback, log);
@@ -4533,7 +4533,7 @@ TEST_P(SpdyNetworkTransactionTest, ProxyConnect) {
}
helper.AddData(data.get());
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4593,7 +4593,7 @@ TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
TransactionHelperResult out;
out.rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
@@ -4709,7 +4709,7 @@ TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
helper_proxy.AddData(data_proxy.get());
HttpNetworkTransaction* trans_proxy = helper_proxy.trans();
- TestCompletionCallback callback_proxy;
+ TestOldCompletionCallback callback_proxy;
int rv = trans_proxy->Start(&request_proxy, &callback_proxy, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback_proxy.WaitForResult();
@@ -4777,7 +4777,7 @@ TEST_P(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) {
scoped_ptr<HttpNetworkTransaction> trans(
new HttpNetworkTransaction(helper.session()));
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&helper.request(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
// On the second transaction, we trigger the RST.
@@ -4915,7 +4915,7 @@ TEST_P(SpdyNetworkTransactionTest, SpdyBasicAuth) {
helper.RunPreTestSetup();
helper.AddData(data.get());
HttpNetworkTransaction* trans = helper.trans();
- TestCompletionCallback callback_start;
+ TestOldCompletionCallback callback_start;
const int rv_start = trans->Start(&request, &callback_start, net_log);
EXPECT_EQ(ERR_IO_PENDING, rv_start);
const int rv_start_complete = callback_start.WaitForResult();
@@ -4936,7 +4936,7 @@ TEST_P(SpdyNetworkTransactionTest, SpdyBasicAuth) {
// Restart with a username/password.
const string16 kFoo(ASCIIToUTF16("foo"));
const string16 kBar(ASCIIToUTF16("bar"));
- TestCompletionCallback callback_restart;
+ TestOldCompletionCallback callback_restart;
const int rv_restart = trans->RestartWithAuth(kFoo, kBar, &callback_restart);
EXPECT_EQ(ERR_IO_PENDING, rv_restart);
const int rv_restart_complete = callback_restart.WaitForResult();
@@ -5118,7 +5118,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
data->SetStop(3);
// Start the transaction.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
data->Run();
@@ -5267,7 +5267,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
data->SetStop(4);
// Start the transaction.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&CreateGetRequest(), &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
data->Run();
@@ -5581,7 +5581,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushCrossOriginCorrectness) {
HttpNetworkTransaction* trans = helper.trans();
// Start the transaction with basic parameters.
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = trans->Start(&request, &callback, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 5034d44..1b2674d 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -78,7 +78,7 @@ HttpStream* SpdyProxyClientSocket::CreateConnectResponseStream() {
// by creating a new stream for the subsequent request.
// TODO(rch): create a more appropriate error code to disambiguate
// the HTTPS Proxy tunnel failure from an HTTP Proxy tunnel failure.
-int SpdyProxyClientSocket::Connect(CompletionCallback* callback) {
+int SpdyProxyClientSocket::Connect(OldCompletionCallback* callback) {
DCHECK(!read_callback_);
if (next_state_ == STATE_OPEN)
return OK;
@@ -147,7 +147,7 @@ base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const {
}
int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!read_callback_);
DCHECK(!user_buffer_);
@@ -196,7 +196,7 @@ int SpdyProxyClientSocket::PopulateUserReadBuffer() {
}
int SpdyProxyClientSocket::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!write_callback_);
if (next_state_ == STATE_DISCONNECTED)
return ERR_SOCKET_NOT_CONNECTED;
@@ -264,7 +264,7 @@ void SpdyProxyClientSocket::OnIOComplete(int result) {
DCHECK_NE(STATE_DISCONNECTED, next_state_);
int rv = DoLoop(result);
if (rv != ERR_IO_PENDING) {
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
c->Run(rv);
}
@@ -457,7 +457,7 @@ void SpdyProxyClientSocket::OnDataReceived(const char* data, int length) {
if (read_callback_) {
int rv = PopulateUserReadBuffer();
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
user_buffer_ = NULL;
c->Run(rv);
@@ -475,7 +475,7 @@ void SpdyProxyClientSocket::OnDataSent(int length) {
int rv = write_buffer_len_;
write_buffer_len_ = 0;
write_bytes_outstanding_ = 0;
- CompletionCallback* c = write_callback_;
+ OldCompletionCallback* c = write_callback_;
write_callback_ = NULL;
c->Run(rv);
}
@@ -493,7 +493,7 @@ void SpdyProxyClientSocket::OnClose(int status) {
else
next_state_ = STATE_DISCONNECTED;
- CompletionCallback* write_callback = write_callback_;
+ OldCompletionCallback* write_callback = write_callback_;
write_callback_ = NULL;
write_buffer_len_ = 0;
write_bytes_outstanding_ = 0;
@@ -502,7 +502,7 @@ void SpdyProxyClientSocket::OnClose(int status) {
// we invoke the connect callback.
if (connecting) {
DCHECK(read_callback_);
- CompletionCallback* read_callback = read_callback_;
+ OldCompletionCallback* read_callback = read_callback_;
read_callback_ = NULL;
read_callback->Run(status);
} else if (read_callback_) {
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index 1b423c2..6f6e5a8 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -68,7 +68,7 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
virtual HttpStream* CreateConnectResponseStream();
// StreamSocket methods:
- virtual int Connect(CompletionCallback* callback);
+ virtual int Connect(OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -81,8 +81,8 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
virtual base::TimeDelta GetConnectTimeMicros() const;
// Socket methods:
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
virtual int GetPeerAddress(AddressList* address) const;
@@ -125,7 +125,7 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
// and returns the number of bytes read.
int PopulateUserReadBuffer();
- CompletionCallbackImpl<SpdyProxyClientSocket> io_callback_;
+ OldCompletionCallbackImpl<SpdyProxyClientSocket> io_callback_;
State next_state_;
// Pointer to the SPDY Stream that this sits on top of.
@@ -133,9 +133,9 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
// Stores the callback to the layer above, called on completing Read() or
// Connect().
- CompletionCallback* read_callback_;
+ OldCompletionCallback* read_callback_;
// Stores the callback to the layer above, called on completing Write().
- CompletionCallback* write_callback_;
+ OldCompletionCallback* write_callback_;
// CONNECT request and response.
HttpRequestInfo request_;
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 9d1aaa6..c54e9c7 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -100,8 +100,8 @@ class SpdyProxyClientSocketTest : public PlatformTest {
}
scoped_ptr<SpdyProxyClientSocket> sock_;
- TestCompletionCallback read_callback_;
- TestCompletionCallback write_callback_;
+ TestOldCompletionCallback read_callback_;
+ TestOldCompletionCallback write_callback_;
scoped_refptr<DeterministicSocketData> data_;
private:
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 317ec58..d4fcda5 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -351,7 +351,7 @@ int SpdySession::CreateStream(
RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
if (!max_concurrent_streams_ ||
active_streams_.size() < max_concurrent_streams_) {
return CreateStreamImpl(url, priority, spdy_stream, stream_net_log);
@@ -1531,7 +1531,7 @@ void SpdySession::InvokeUserStreamCreationCallback(
if (it == pending_callback_map_.end())
return;
- CompletionCallback* callback = it->second.callback;
+ OldCompletionCallback* callback = it->second.callback;
int result = it->second.result;
pending_callback_map_.erase(it);
callback->Run(result);
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index ad6ff84..c3711a1 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -84,7 +84,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Remove PendingCreateStream objects on transaction deletion
void CancelPendingCreateStreams(const scoped_refptr<SpdyStream>* spdy_stream);
@@ -215,7 +215,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
PendingCreateStream(const GURL& url, RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: url(&url), priority(priority), spdy_stream(spdy_stream),
stream_net_log(&stream_net_log), callback(callback) { }
@@ -223,7 +223,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
RequestPriority priority;
scoped_refptr<SpdyStream>* spdy_stream;
const BoundNetLog* stream_net_log;
- CompletionCallback* callback;
+ OldCompletionCallback* callback;
};
typedef std::queue<PendingCreateStream, std::list< PendingCreateStream> >
PendingCreateStreamQueue;
@@ -234,10 +234,10 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
struct CallbackResultPair {
CallbackResultPair() : callback(NULL), result(OK) {}
- CallbackResultPair(CompletionCallback* callback_in, int result_in)
+ CallbackResultPair(OldCompletionCallback* callback_in, int result_in)
: callback(callback_in), result(result_in) {}
- CompletionCallback* callback;
+ OldCompletionCallback* callback;
int result;
};
@@ -343,8 +343,8 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
virtual void OnDataFrameHeader(const spdy::SpdyDataFrame* frame);
// Callbacks for the Spdy session.
- CompletionCallbackImpl<SpdySession> read_callback_;
- CompletionCallbackImpl<SpdySession> write_callback_;
+ OldCompletionCallbackImpl<SpdySession> read_callback_;
+ OldCompletionCallbackImpl<SpdySession> write_callback_;
// Used for posting asynchronous IO tasks. We use this even though
// SpdySession is refcounted because we don't need to keep the SpdySession
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 9a0a2be..8d69fd3 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -147,7 +147,7 @@ class StreamReleaserCallback : public CallbackRunner<Tuple1<int> > {
scoped_refptr<SpdySession> session_;
scoped_refptr<SpdyStream> first_stream_;
scoped_refptr<SpdyStream> stream_;
- TestCompletionCallback callback_;
+ TestOldCompletionCallback callback_;
};
// TODO(kristianm): Could also test with more sessions where some are idle,
@@ -165,7 +165,7 @@ TEST_F(SpdySessionTest, CloseIdleSessions) {
scoped_refptr<SpdySession> session1 =
spdy_session_pool->Get(pair1, BoundNetLog());
scoped_refptr<SpdyStream> spdy_stream1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
GURL url1(kTestHost1);
EXPECT_EQ(OK, session1->CreateStream(url1,
MEDIUM, /* priority, not important */
@@ -180,7 +180,7 @@ TEST_F(SpdySessionTest, CloseIdleSessions) {
scoped_refptr<SpdySession> session2 =
spdy_session_pool->Get(pair2, BoundNetLog());
scoped_refptr<SpdyStream> spdy_stream2;
- TestCompletionCallback callback2;
+ TestOldCompletionCallback callback2;
GURL url2(kTestHost2);
EXPECT_EQ(OK, session2->CreateStream(url2,
MEDIUM, /* priority, not important */
@@ -195,7 +195,7 @@ TEST_F(SpdySessionTest, CloseIdleSessions) {
scoped_refptr<SpdySession> session3 =
spdy_session_pool->Get(pair3, BoundNetLog());
scoped_refptr<SpdyStream> spdy_stream3;
- TestCompletionCallback callback3;
+ TestOldCompletionCallback callback3;
GURL url3(kTestHost3);
EXPECT_EQ(OK, session3->CreateStream(url3,
MEDIUM, /* priority, not important */
@@ -326,7 +326,7 @@ TEST_F(SpdySessionTest, OnSettings) {
// Create 2 streams. First will succeed. Second will be pending.
scoped_refptr<SpdyStream> spdy_stream1;
- TestCompletionCallback callback1;
+ TestOldCompletionCallback callback1;
GURL url("http://www.google.com");
EXPECT_EQ(OK,
session->CreateStream(url,
@@ -412,7 +412,7 @@ TEST_F(SpdySessionTest, CancelPendingCreateStream) {
// Use scoped_ptr to let us invalidate the memory when we want to, to trigger
// a valgrind error if the callback is invoked when it's not supposed to be.
- scoped_ptr<TestCompletionCallback> callback(new TestCompletionCallback);
+ scoped_ptr<TestOldCompletionCallback> callback(new TestOldCompletionCallback);
// Create 2 streams. First will succeed. Second will be pending.
scoped_refptr<SpdyStream> spdy_stream1;
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index 55ee198..78ffff5 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -19,7 +19,7 @@ class TestSpdyStreamDelegate : public SpdyStream::Delegate {
public:
TestSpdyStreamDelegate(SpdyStream* stream,
IOBufferWithSize* buf,
- CompletionCallback* callback)
+ OldCompletionCallback* callback)
: stream_(stream),
buf_(buf),
callback_(callback),
@@ -62,7 +62,7 @@ class TestSpdyStreamDelegate : public SpdyStream::Delegate {
}
virtual void OnClose(int status) {
closed_ = true;
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
callback_ = NULL;
callback->Run(OK);
}
@@ -79,7 +79,7 @@ class TestSpdyStreamDelegate : public SpdyStream::Delegate {
private:
SpdyStream* stream_;
scoped_refptr<IOBufferWithSize> buf_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
bool send_headers_completed_;
linked_ptr<spdy::SpdyHeaderBlock> response_;
std::string received_data_;
@@ -202,7 +202,7 @@ TEST_F(SpdyStreamTest, SendDataAfterOpen) {
session->CreateStream(url, LOWEST, &stream, BoundNetLog(), NULL));
scoped_refptr<IOBufferWithSize> buf(new IOBufferWithSize(8));
memcpy(buf->data(), "\0hello!\xff", 8);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<TestSpdyStreamDelegate> delegate(
new TestSpdyStreamDelegate(stream.get(), buf.get(), &callback));
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 138c38e..686e7ca 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -89,7 +89,7 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
scoped_refptr<SpdySession> spdy_session_;
Delegate* delegate_;
- CompletionCallbackImpl<SpdyWebSocketStream> spdy_stream_created_callback_;
+ OldCompletionCallbackImpl<SpdyWebSocketStream> spdy_stream_created_callback_;
DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStream);
};
diff --git a/net/spdy/spdy_websocket_stream_unittest.cc b/net/spdy/spdy_websocket_stream_unittest.cc
index 76ae76a..0644c96 100644
--- a/net/spdy/spdy_websocket_stream_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_unittest.cc
@@ -48,7 +48,7 @@ namespace net {
class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
public:
- explicit SpdyWebSocketStreamEventRecorder(CompletionCallback* callback)
+ explicit SpdyWebSocketStreamEventRecorder(OldCompletionCallback* callback)
: callback_(callback) {}
virtual ~SpdyWebSocketStreamEventRecorder() {}
@@ -148,7 +148,7 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
scoped_ptr<Callback1<SpdyWebSocketStreamEvent*>::Type> on_sent_data_;
scoped_ptr<Callback1<SpdyWebSocketStreamEvent*>::Type> on_received_data_;
scoped_ptr<Callback1<SpdyWebSocketStreamEvent*>::Type> on_close_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStreamEventRecorder);
};
@@ -264,7 +264,7 @@ class SpdyWebSocketStreamTest : public testing::Test {
EXPECT_TRUE(spdy_session_pool->HasSession(host_port_proxy_pair_));
transport_params_ = new TransportSocketParams(host_port_pair_, MEDIUM,
GURL(), false, false);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
EXPECT_EQ(ERR_IO_PENDING,
connection->Init(host_port_pair_.ToString(), transport_params_,
@@ -297,8 +297,8 @@ class SpdyWebSocketStreamTest : public testing::Test {
scoped_ptr<spdy::SpdyFrame> closing_frame_;
HostPortPair host_port_pair_;
HostPortProxyPair host_port_proxy_pair_;
- TestCompletionCallback completion_callback_;
- TestCompletionCallback sync_callback_;
+ TestOldCompletionCallback completion_callback_;
+ TestOldCompletionCallback sync_callback_;
static const char kMessageFrame[];
static const char kClosingFrame[];
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index 39d09c2..6e67753 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -196,7 +196,7 @@ bool TestServer::GetAddressList(AddressList* address_list) const {
HostResolver::kDefaultRetryAttempts,
NULL));
HostResolver::RequestInfo info(host_port_pair_);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = resolver->Resolve(info, address_list, &callback, NULL,
BoundNetLog());
if (rv == ERR_IO_PENDING)
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index 57fa32c..45bcb87 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -126,7 +126,7 @@ bool CreateTargetFolder(const FilePath& path, RankCrashes action,
// Makes sure that any pending task is processed.
void FlushQueue(disk_cache::Backend* cache) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv =
reinterpret_cast<disk_cache::BackendImpl*>(cache)->FlushQueueForTest(&cb);
cb.GetResult(rv); // Ignore the result;
@@ -135,7 +135,7 @@ void FlushQueue(disk_cache::Backend* cache) {
// Generates the files for an empty and one item cache.
int SimpleInsert(const FilePath& path, RankCrashes action,
base::Thread* cache_thread) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE, path, 0, false,
cache_thread->message_loop_proxy(),
@@ -175,7 +175,7 @@ int SimpleRemove(const FilePath& path, RankCrashes action,
DCHECK(action >= disk_cache::REMOVE_ONE_1);
DCHECK(action <= disk_cache::REMOVE_TAIL_3);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
// Use a simple LRU for eviction.
int rv = disk_cache::CreateCacheBackend(net::MEDIA_CACHE, path, 0, false,
@@ -218,7 +218,7 @@ int HeadRemove(const FilePath& path, RankCrashes action,
DCHECK(action >= disk_cache::REMOVE_HEAD_1);
DCHECK(action <= disk_cache::REMOVE_HEAD_4);
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
// Use a simple LRU for eviction.
int rv = disk_cache::CreateCacheBackend(net::MEDIA_CACHE, path, 0, false,
@@ -264,7 +264,7 @@ int LoadOperations(const FilePath& path, RankCrashes action,
if (!cache || !cache->SetMaxSize(0x100000))
return GENERIC;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = cache->Init(&cb);
if (cb.GetResult(rv) != net::OK || cache->GetEntryCount())
return GENERIC;
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index 0335516..8e830fa 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -15,13 +15,13 @@
int CacheDumper::CreateEntry(const std::string& key,
disk_cache::Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return cache_->CreateEntry(key, entry, callback);
}
int CacheDumper::WriteEntry(disk_cache::Entry* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
return entry->WriteData(index, offset, buf, buf_len, callback, false);
}
@@ -66,7 +66,7 @@ bool SafeCreateDirectory(const std::wstring& path) {
int DiskDumper::CreateEntry(const std::string& key,
disk_cache::Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
FilePath path(path_);
// The URL may not start with a valid protocol; search for it.
int urlpos = key.find("http");
@@ -147,7 +147,7 @@ void GetNormalizedHeaders(const net::HttpResponseInfo& info,
int DiskDumper::WriteEntry(disk_cache::Entry* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!entry_)
return 0;
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 03c7ac9..a062026 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -30,13 +30,13 @@ class CacheDumpWriter {
// Returns a net error code.
virtual int CreateEntry(const std::string& key,
disk_cache::Entry** entry,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
// Write to the current entry.
// Returns a net error code.
virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
// Close the current entry.
virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
@@ -49,10 +49,10 @@ class CacheDumper : public CacheDumpWriter {
explicit CacheDumper(disk_cache::Backend* cache) : cache_(cache) {}
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
base::Time last_modified);
@@ -67,10 +67,10 @@ class DiskDumper : public CacheDumpWriter {
file_util::CreateDirectory(FilePath(path));
}
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
base::Time last_modified);
diff --git a/net/tools/dump_cache/upgrade.cc b/net/tools/dump_cache/upgrade.cc
index 80d97b3..60a0d35 100644
--- a/net/tools/dump_cache/upgrade.cc
+++ b/net/tools/dump_cache/upgrade.cc
@@ -266,8 +266,8 @@ class MasterSM : public BaseSM {
CacheDumpWriter* writer_;
const std::wstring& path_;
bool dump_to_disk_;
- net::CompletionCallbackImpl<MasterSM> create_callback_;
- net::CompletionCallbackImpl<MasterSM> write_callback_;
+ net::OldCompletionCallbackImpl<MasterSM> create_callback_;
+ net::OldCompletionCallbackImpl<MasterSM> write_callback_;
};
void MasterSM::OnIOCompleted(MessageLoopForIO::IOContext* context,
@@ -323,7 +323,7 @@ bool MasterSM::DoInit() {
writer_ = new DiskDumper(path_);
} else {
disk_cache::Backend* cache;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
FilePath::FromWStringHack(path_), 0,
false,
@@ -592,8 +592,8 @@ class SlaveSM : public BaseSM {
void* iterator_;
Message msg_; // Used for DoReadDataComplete and DoGetEntryComplete.
- net::CompletionCallbackImpl<SlaveSM> read_callback_;
- net::CompletionCallbackImpl<SlaveSM> next_callback_;
+ net::OldCompletionCallbackImpl<SlaveSM> read_callback_;
+ net::OldCompletionCallbackImpl<SlaveSM> next_callback_;
scoped_ptr<disk_cache::BackendImpl> cache_;
};
@@ -604,7 +604,7 @@ SlaveSM::SlaveSM(const std::wstring& path, HANDLE channel)
ALLOW_THIS_IN_INITIALIZER_LIST(
next_callback_(this, &SlaveSM::DoGetEntryComplete)) {
disk_cache::Backend* cache;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
FilePath::FromWStringHack(path), 0,
false,
diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc
index 4556080..7c1b0f3 100644
--- a/net/tools/fetch/fetch_client.cc
+++ b/net/tools/fetch/fetch_client.cc
@@ -113,8 +113,8 @@ class Client {
net::HttpRequestInfo request_info_;
scoped_ptr<net::HttpTransaction> transaction_;
scoped_refptr<net::IOBuffer> buffer_;
- net::CompletionCallbackImpl<Client> connect_callback_;
- net::CompletionCallbackImpl<Client> read_callback_;
+ net::OldCompletionCallbackImpl<Client> connect_callback_;
+ net::OldCompletionCallbackImpl<Client> read_callback_;
};
int main(int argc, char** argv) {
diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
index 9f2c2ea6..9b43f36 100644
--- a/net/udp/datagram_server_socket.h
+++ b/net/udp/datagram_server_socket.h
@@ -39,7 +39,7 @@ class NET_EXPORT DatagramServerSocket : public DatagramSocket {
virtual int RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
// Send to a socket with a particular destination.
// |buf| is the buffer to send
@@ -53,7 +53,7 @@ class NET_EXPORT DatagramServerSocket : public DatagramSocket {
virtual int SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback) = 0;
+ OldCompletionCallback* callback) = 0;
};
} // namespace net
diff --git a/net/udp/udp_client_socket.cc b/net/udp/udp_client_socket.cc
index 32fc50b..96c4c33 100644
--- a/net/udp/udp_client_socket.cc
+++ b/net/udp/udp_client_socket.cc
@@ -24,13 +24,13 @@ int UDPClientSocket::Connect(const IPEndPoint& address) {
int UDPClientSocket::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return socket_.Read(buf, buf_len, callback);
}
int UDPClientSocket::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return socket_.Write(buf, buf_len, callback);
}
diff --git a/net/udp/udp_client_socket.h b/net/udp/udp_client_socket.h
index cb4d525..7aa4a7f 100644
--- a/net/udp/udp_client_socket.h
+++ b/net/udp/udp_client_socket.h
@@ -26,8 +26,8 @@ class NET_EXPORT_PRIVATE UDPClientSocket : public DatagramClientSocket {
// Implement DatagramClientSocket:
virtual int Connect(const IPEndPoint& address);
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
+ virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
virtual void Close();
virtual int GetPeerAddress(IPEndPoint* address) const;
virtual int GetLocalAddress(IPEndPoint* address) const;
diff --git a/net/udp/udp_server_socket.cc b/net/udp/udp_server_socket.cc
index 80b831f..54391c5 100644
--- a/net/udp/udp_server_socket.cc
+++ b/net/udp/udp_server_socket.cc
@@ -26,14 +26,14 @@ int UDPServerSocket::Listen(const IPEndPoint& address) {
int UDPServerSocket::RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return socket_.RecvFrom(buf, buf_len, address, callback);
}
int UDPServerSocket::SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return socket_.SendTo(buf, buf_len, address, callback);
}
diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h
index 6fdc2c4..92dfef3 100644
--- a/net/udp/udp_server_socket.h
+++ b/net/udp/udp_server_socket.h
@@ -27,11 +27,11 @@ class NET_EXPORT UDPServerSocket : public DatagramServerSocket {
virtual int RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual int SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
virtual void Close();
virtual int GetPeerAddress(IPEndPoint* address) const;
virtual int GetLocalAddress(IPEndPoint* address) const;
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index 201f208..33f9edd 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -135,14 +135,14 @@ int UDPSocketLibevent::GetLocalAddress(IPEndPoint* address) const {
int UDPSocketLibevent::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return RecvFrom(buf, buf_len, NULL, callback);
}
int UDPSocketLibevent::RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
DCHECK(!read_callback_);
@@ -170,21 +170,21 @@ int UDPSocketLibevent::RecvFrom(IOBuffer* buf,
int UDPSocketLibevent::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return SendToOrWrite(buf, buf_len, NULL, callback);
}
int UDPSocketLibevent::SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return SendToOrWrite(buf, buf_len, &address, callback);
}
int UDPSocketLibevent::SendToOrWrite(IOBuffer* buf,
int buf_len,
const IPEndPoint* address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
DCHECK(!write_callback_);
@@ -262,7 +262,7 @@ void UDPSocketLibevent::DoReadCallback(int rv) {
DCHECK(read_callback_);
// since Run may result in Read being called, clear read_callback_ up front.
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
c->Run(rv);
}
@@ -272,7 +272,7 @@ void UDPSocketLibevent::DoWriteCallback(int rv) {
DCHECK(write_callback_);
// since Run may result in Write being called, clear write_callback_ up front.
- CompletionCallback* c = write_callback_;
+ OldCompletionCallback* c = write_callback_;
write_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index a078150..d6a99b1 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -55,12 +55,12 @@ class UDPSocketLibevent : public base::NonThreadSafe {
// Read from the socket.
// Only usable from the client-side of a UDP socket, after the socket
// has been connected.
- int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// Write to the socket.
// Only usable from the client-side of a UDP socket, after the socket
// has been connected.
- int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// Read from a socket and receive sender address information.
// |buf| is the buffer to read data into.
@@ -78,7 +78,7 @@ class UDPSocketLibevent : public base::NonThreadSafe {
int RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Send to a socket with a particular destination.
// |buf| is the buffer to send
@@ -92,7 +92,7 @@ class UDPSocketLibevent : public base::NonThreadSafe {
int SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Returns true if the socket is already connected or bound.
bool is_connected() const { return socket_ != kInvalidSocket; }
@@ -154,7 +154,7 @@ class UDPSocketLibevent : public base::NonThreadSafe {
int SendToOrWrite(IOBuffer* buf,
int buf_len,
const IPEndPoint* address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
int InternalRecvFrom(IOBuffer* buf, int buf_len, IPEndPoint* address);
int InternalSendTo(IOBuffer* buf, int buf_len, const IPEndPoint* address);
@@ -195,10 +195,10 @@ class UDPSocketLibevent : public base::NonThreadSafe {
scoped_ptr<IPEndPoint> send_to_address_;
// External callback; called when read is complete.
- CompletionCallback* read_callback_;
+ OldCompletionCallback* read_callback_;
// External callback; called when write is complete.
- CompletionCallback* write_callback_;
+ OldCompletionCallback* write_callback_;
BoundNetLog net_log_;
diff --git a/net/udp/udp_socket_unittest.cc b/net/udp/udp_socket_unittest.cc
index bae3a87..8a66f34 100644
--- a/net/udp/udp_socket_unittest.cc
+++ b/net/udp/udp_socket_unittest.cc
@@ -31,7 +31,7 @@ class UDPSocketTest : public PlatformTest {
// Blocks until data is read from the socket.
std::string RecvFromSocket(UDPServerSocket* socket) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = socket->RecvFrom(buffer_, kMaxRead, &recv_from_address_,
&callback);
@@ -54,7 +54,7 @@ class UDPSocketTest : public PlatformTest {
int SendToSocket(UDPServerSocket* socket,
std::string msg,
const IPEndPoint& address) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int length = msg.length();
scoped_refptr<StringIOBuffer> io_buffer(new StringIOBuffer(msg));
@@ -76,7 +76,7 @@ class UDPSocketTest : public PlatformTest {
}
std::string ReadSocket(UDPClientSocket* socket) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int rv = socket->Read(buffer_, kMaxRead, &callback);
if (rv == ERR_IO_PENDING)
@@ -89,7 +89,7 @@ class UDPSocketTest : public PlatformTest {
// Loop until |msg| has been written to the socket or until an
// error occurs.
int WriteSocket(UDPClientSocket* socket, std::string msg) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int length = msg.length();
scoped_refptr<StringIOBuffer> io_buffer(new StringIOBuffer(msg));
@@ -394,7 +394,7 @@ TEST_F(UDPSocketTest, CloseWithPendingRead) {
int rv = server.Listen(bind_address);
EXPECT_EQ(OK, rv);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
IPEndPoint from;
rv = server.RecvFrom(buffer_, kMaxRead, &from, &callback);
EXPECT_EQ(rv, ERR_IO_PENDING);
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index fe7eaae..49f2f44 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -134,14 +134,14 @@ int UDPSocketWin::GetLocalAddress(IPEndPoint* address) const {
int UDPSocketWin::Read(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return RecvFrom(buf, buf_len, NULL, callback);
}
int UDPSocketWin::RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(INVALID_SOCKET, socket_);
DCHECK(!read_callback_);
@@ -161,21 +161,21 @@ int UDPSocketWin::RecvFrom(IOBuffer* buf,
int UDPSocketWin::Write(IOBuffer* buf,
int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return SendToOrWrite(buf, buf_len, NULL, callback);
}
int UDPSocketWin::SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return SendToOrWrite(buf, buf_len, &address, callback);
}
int UDPSocketWin::SendToOrWrite(IOBuffer* buf,
int buf_len,
const IPEndPoint* address,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(INVALID_SOCKET, socket_);
DCHECK(!write_callback_);
@@ -244,7 +244,7 @@ void UDPSocketWin::DoReadCallback(int rv) {
DCHECK(read_callback_);
// since Run may result in Read being called, clear read_callback_ up front.
- CompletionCallback* c = read_callback_;
+ OldCompletionCallback* c = read_callback_;
read_callback_ = NULL;
c->Run(rv);
}
@@ -254,7 +254,7 @@ void UDPSocketWin::DoWriteCallback(int rv) {
DCHECK(write_callback_);
// since Run may result in Write being called, clear write_callback_ up front.
- CompletionCallback* c = write_callback_;
+ OldCompletionCallback* c = write_callback_;
write_callback_ = NULL;
c->Run(rv);
}
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h
index 2dc818a..a3ed37e 100644
--- a/net/udp/udp_socket_win.h
+++ b/net/udp/udp_socket_win.h
@@ -57,12 +57,12 @@ class UDPSocketWin : public base::NonThreadSafe {
// Read from the socket.
// Only usable from the client-side of a UDP socket, after the socket
// has been connected.
- int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// Write to the socket.
// Only usable from the client-side of a UDP socket, after the socket
// has been connected.
- int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
+ int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
// Read from a socket and receive sender address information.
// |buf| is the buffer to read data into.
@@ -80,7 +80,7 @@ class UDPSocketWin : public base::NonThreadSafe {
int RecvFrom(IOBuffer* buf,
int buf_len,
IPEndPoint* address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Send to a socket with a particular destination.
// |buf| is the buffer to send
@@ -94,7 +94,7 @@ class UDPSocketWin : public base::NonThreadSafe {
int SendTo(IOBuffer* buf,
int buf_len,
const IPEndPoint& address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Returns true if the socket is already connected or bound.
bool is_connected() const { return socket_ != INVALID_SOCKET; }
@@ -142,7 +142,7 @@ class UDPSocketWin : public base::NonThreadSafe {
int SendToOrWrite(IOBuffer* buf,
int buf_len,
const IPEndPoint* address,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
int InternalRecvFrom(IOBuffer* buf, int buf_len, IPEndPoint* address);
int InternalSendTo(IOBuffer* buf, int buf_len, const IPEndPoint* address);
@@ -186,10 +186,10 @@ class UDPSocketWin : public base::NonThreadSafe {
scoped_refptr<IOBuffer> write_iobuffer_;
// External callback; called when read is complete.
- CompletionCallback* read_callback_;
+ OldCompletionCallback* read_callback_;
// External callback; called when write is complete.
- CompletionCallback* write_callback_;
+ OldCompletionCallback* write_callback_;
BoundNetLog net_log_;
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 7f5f961..1888ba0 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -801,7 +801,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// Callback passed to the network delegate to notify us when a blocked request
// is ready to be resumed or canceled.
- CompletionCallbackImpl<URLRequest> before_request_callback_;
+ OldCompletionCallbackImpl<URLRequest> before_request_callback_;
// Safe-guard to ensure that we do not send multiple "I am completed"
// messages to network delegate.
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index 3df2fb7..9bc42bd 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -57,7 +57,7 @@ class NET_EXPORT URLRequestFileJob : public URLRequestJob {
// Callback after data is asynchronously read from the file.
void DidRead(int result);
- CompletionCallbackImpl<URLRequestFileJob> io_callback_;
+ OldCompletionCallbackImpl<URLRequestFileJob> io_callback_;
FileStream stream_;
bool is_directory_;
diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h
index 5fc5a13..1285d7b 100644
--- a/net/url_request/url_request_ftp_job.h
+++ b/net/url_request/url_request_ftp_job.h
@@ -63,8 +63,8 @@ class URLRequestFtpJob : public URLRequestJob {
FtpRequestInfo request_info_;
scoped_ptr<FtpTransaction> transaction_;
- CompletionCallbackImpl<URLRequestFtpJob> start_callback_;
- CompletionCallbackImpl<URLRequestFtpJob> read_callback_;
+ OldCompletionCallbackImpl<URLRequestFtpJob> start_callback_;
+ OldCompletionCallbackImpl<URLRequestFtpJob> read_callback_;
bool read_in_progress_;
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index 883948d..7b09dd4 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -107,9 +107,9 @@ class URLRequestHttpJob : public URLRequestJob {
string16 username_;
string16 password_;
- CompletionCallbackImpl<URLRequestHttpJob> start_callback_;
- CompletionCallbackImpl<URLRequestHttpJob> read_callback_;
- CompletionCallbackImpl<URLRequestHttpJob>
+ OldCompletionCallbackImpl<URLRequestHttpJob> start_callback_;
+ OldCompletionCallbackImpl<URLRequestHttpJob> read_callback_;
+ OldCompletionCallbackImpl<URLRequestHttpJob>
notify_before_headers_sent_callback_;
bool read_in_progress_;
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index bffad74..259af7c 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -328,7 +328,7 @@ void TestNetworkDelegate::InitRequestStatesIfNew(int request_id) {
int TestNetworkDelegate::OnBeforeURLRequest(
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url ) {
int req_id = request->identifier();
event_order_[req_id] += "OnBeforeURLRequest\n";
@@ -346,7 +346,7 @@ int TestNetworkDelegate::OnBeforeURLRequest(
int TestNetworkDelegate::OnBeforeSendHeaders(
net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers) {
int req_id = request->identifier();
event_order_[req_id] += "OnBeforeSendHeaders\n";
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index f8ef867..85d2a9b 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -190,10 +190,10 @@ class TestNetworkDelegate : public net::NetworkDelegate {
protected:
// net::NetworkDelegate:
virtual int OnBeforeURLRequest(net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url);
virtual int OnBeforeSendHeaders(net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
net::HttpRequestHeaders* headers);
virtual void OnSendHeaders(net::URLRequest* request,
const net::HttpRequestHeaders& headers);
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 3dd539b..bcff3a0 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -137,7 +137,7 @@ class BlockingNetworkDelegate : public TestNetworkDelegate {
private:
// TestNetworkDelegate:
virtual int OnBeforeURLRequest(net::URLRequest* request,
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
GURL* new_url) {
if (redirect_url_ == request->url()) {
// We've already seen this request and redirected elsewhere.
@@ -159,7 +159,7 @@ class BlockingNetworkDelegate : public TestNetworkDelegate {
return net::ERR_IO_PENDING;
}
- void DoCallback(net::CompletionCallback* callback) {
+ void DoCallback(net::OldCompletionCallback* callback) {
callback->Run(callback_retval_);
}
diff --git a/net/url_request/view_cache_helper.cc b/net/url_request/view_cache_helper.cc
index 768782e..677e038 100644
--- a/net/url_request/view_cache_helper.cc
+++ b/net/url_request/view_cache_helper.cc
@@ -50,7 +50,7 @@ ViewCacheHelper::ViewCacheHelper()
ALLOW_THIS_IN_INITIALIZER_LIST(
cache_callback_(this, &ViewCacheHelper::OnIOComplete)),
ALLOW_THIS_IN_INITIALIZER_LIST(
- entry_callback_(new CancelableCompletionCallback<ViewCacheHelper>(
+ entry_callback_(new CancelableOldCompletionCallback<ViewCacheHelper>(
this, &ViewCacheHelper::OnIOComplete))) {
}
@@ -65,14 +65,14 @@ ViewCacheHelper::~ViewCacheHelper() {
int ViewCacheHelper::GetEntryInfoHTML(const std::string& key,
const URLRequestContext* context,
std::string* out,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return GetInfoHTML(key, context, std::string(), out, callback);
}
int ViewCacheHelper::GetContentsHTML(const URLRequestContext* context,
const std::string& url_prefix,
std::string* out,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
return GetInfoHTML(std::string(), context, url_prefix, out, callback);
}
@@ -121,7 +121,7 @@ int ViewCacheHelper::GetInfoHTML(const std::string& key,
const URLRequestContext* context,
const std::string& url_prefix,
std::string* out,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!callback_);
DCHECK(context);
key_ = key;
@@ -141,7 +141,7 @@ void ViewCacheHelper::DoCallback(int rv) {
DCHECK_NE(ERR_IO_PENDING, rv);
DCHECK(callback_);
- CompletionCallback* c = callback_;
+ OldCompletionCallback* c = callback_;
callback_ = NULL;
c->Run(rv);
}
diff --git a/net/url_request/view_cache_helper.h b/net/url_request/view_cache_helper.h
index 5a67498..7471ca5 100644
--- a/net/url_request/view_cache_helper.h
+++ b/net/url_request/view_cache_helper.h
@@ -33,7 +33,7 @@ class NET_EXPORT ViewCacheHelper {
int GetEntryInfoHTML(const std::string& key,
const URLRequestContext* context,
std::string* out,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Formats the cache contents as HTML. Returns a net error code.
// If this method returns ERR_IO_PENDING, |callback| will be notified when the
@@ -43,7 +43,7 @@ class NET_EXPORT ViewCacheHelper {
int GetContentsHTML(const URLRequestContext* context,
const std::string& url_prefix,
std::string* out,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// Lower-level helper to produce a textual representation of binary data.
// The results are appended to |result| and can be used in HTML pages
@@ -70,7 +70,7 @@ class NET_EXPORT ViewCacheHelper {
const URLRequestContext* context,
const std::string& url_prefix,
std::string* out,
- CompletionCallback* callback);
+ OldCompletionCallback* callback);
// This is a helper function used to trigger a completion callback. It may
// only be called if callback_ is non-null.
@@ -110,12 +110,12 @@ class NET_EXPORT ViewCacheHelper {
std::string key_;
std::string url_prefix_;
std::string* data_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
State next_state_;
- CompletionCallbackImpl<ViewCacheHelper> cache_callback_;
- scoped_refptr<CancelableCompletionCallback<ViewCacheHelper> > entry_callback_;
+ OldCompletionCallbackImpl<ViewCacheHelper> cache_callback_;
+ scoped_refptr<CancelableOldCompletionCallback<ViewCacheHelper> > entry_callback_;
DISALLOW_COPY_AND_ASSIGN(ViewCacheHelper);
};
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index be9b30d..a0c3d1e 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -47,7 +47,7 @@ void WriteHeaders(disk_cache::Entry* entry, int flags, const std::string data) {
reinterpret_cast<const char*>(pickle.data())));
int len = static_cast<int>(pickle.size());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(0, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -60,7 +60,7 @@ void WriteData(disk_cache::Entry* entry, int index, const std::string data) {
scoped_refptr<IOBuffer> buf(new IOBuffer(len));
memcpy(buf->data(), data.data(), data.length());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(index, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -68,7 +68,7 @@ void WriteData(disk_cache::Entry* entry, int index, const std::string data) {
void WriteToEntry(disk_cache::Backend* cache, const std::string key,
const std::string data0, const std::string data1,
const std::string data2) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Entry* entry;
int rv = cache->CreateEntry(key, &entry, &cb);
rv = cb.GetResult(rv);
@@ -85,7 +85,7 @@ void WriteToEntry(disk_cache::Backend* cache, const std::string key,
}
void FillCache(URLRequestContext* context) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv =
context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);
@@ -103,7 +103,7 @@ TEST(ViewCacheHelper, EmptyCache) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
std::string prefix, data;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -117,7 +117,7 @@ TEST(ViewCacheHelper, ListContents) {
FillCache(context);
std::string prefix, data;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -139,7 +139,7 @@ TEST(ViewCacheHelper, DumpEntry) {
FillCache(context);
std::string data;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetEntryInfoHTML("second", context, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -165,7 +165,7 @@ TEST(ViewCacheHelper, Prefix) {
std::string key, data;
std::string prefix("prefix:");
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -180,7 +180,7 @@ TEST(ViewCacheHelper, TruncatedFlag) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv =
context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index cbf7592..18db83c 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -182,7 +182,7 @@ void WebSocketJob::DetachDelegate() {
}
int WebSocketJob::OnStartOpenConnection(
- SocketStream* socket, CompletionCallback* callback) {
+ SocketStream* socket, OldCompletionCallback* callback) {
DCHECK(!callback_);
state_ = CONNECTING;
addresses_ = socket->address_list();
@@ -633,7 +633,7 @@ void WebSocketJob::RetryPendingIO() {
void WebSocketJob::CompleteIO(int result) {
// |callback_| may be NULL if OnClose() or DetachDelegate() was called.
if (callback_) {
- net::CompletionCallback* callback = callback_;
+ net::OldCompletionCallback* callback = callback_;
callback_ = NULL;
callback->Run(result);
Release(); // Balanced with OnStartOpenConnection().
diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h
index 1543f93..041cc8a 100644
--- a/net/websockets/websocket_job.h
+++ b/net/websockets/websocket_job.h
@@ -64,7 +64,7 @@ class NET_EXPORT WebSocketJob
// SocketStream::Delegate methods.
virtual int OnStartOpenConnection(
- SocketStream* socket, CompletionCallback* callback);
+ SocketStream* socket, OldCompletionCallback* callback);
virtual void OnConnected(SocketStream* socket, int max_pending_send_allowed);
virtual void OnSentData(SocketStream* socket, int amount_sent);
virtual void OnReceivedData(SocketStream* socket, const char* data, int len);
@@ -119,7 +119,7 @@ class NET_EXPORT WebSocketJob
State state_;
bool waiting_;
AddressList addresses_;
- CompletionCallback* callback_; // for throttling.
+ OldCompletionCallback* callback_; // for throttling.
scoped_ptr<WebSocketHandshakeRequestHandler> handshake_request_;
scoped_ptr<WebSocketHandshakeResponseHandler> handshake_response_;
diff --git a/net/websockets/websocket_job_unittest.cc b/net/websockets/websocket_job_unittest.cc
index 9a1a8bc..131f2d3 100644
--- a/net/websockets/websocket_job_unittest.cc
+++ b/net/websockets/websocket_job_unittest.cc
@@ -88,7 +88,7 @@ class MockSocketStreamDelegate : public net::SocketStream::Delegate {
}
virtual int OnStartOpenConnection(net::SocketStream* socket,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (on_start_open_connection_.get())
on_start_open_connection_->Run();
return net::OK;
@@ -441,7 +441,7 @@ class WebSocketJobTest : public PlatformTest {
scoped_refptr<SocketStream> socket_;
scoped_ptr<MockClientSocketFactory> socket_factory_;
scoped_refptr<OrderedSocketData> data_;
- TestCompletionCallback sync_callback_;
+ TestOldCompletionCallback sync_callback_;
scoped_refptr<MockSSLConfigService> ssl_config_service_;
scoped_ptr<net::ProxyService> proxy_service_;
scoped_ptr<net::MockHostResolver> host_resolver_;
diff --git a/net/websockets/websocket_throttle_unittest.cc b/net/websockets/websocket_throttle_unittest.cc
index c1c8480..909dcf9 100644
--- a/net/websockets/websocket_throttle_unittest.cc
+++ b/net/websockets/websocket_throttle_unittest.cc
@@ -100,7 +100,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket1";
- TestCompletionCallback callback_s1;
+ TestOldCompletionCallback callback_s1;
// Trying to open connection to host1 will start without wait.
EXPECT_EQ(OK, w1->OnStartOpenConnection(s1, &callback_s1));
@@ -121,7 +121,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket2";
- TestCompletionCallback callback_s2;
+ TestOldCompletionCallback callback_s2;
// Trying to open connection to host2 will wait for w1.
EXPECT_EQ(ERR_IO_PENDING, w2->OnStartOpenConnection(s2, &callback_s2));
// Now waiting queue looks like
@@ -141,7 +141,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket3";
- TestCompletionCallback callback_s3;
+ TestOldCompletionCallback callback_s3;
// Trying to open connection to host3 will wait for w1.
EXPECT_EQ(ERR_IO_PENDING, w3->OnStartOpenConnection(s3, &callback_s3));
// Address | head -> tail
@@ -161,7 +161,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket4";
- TestCompletionCallback callback_s4;
+ TestOldCompletionCallback callback_s4;
// Trying to open connection to host4 will wait for w1, w2.
EXPECT_EQ(ERR_IO_PENDING, w4->OnStartOpenConnection(s4, &callback_s4));
// Address | head -> tail
@@ -180,7 +180,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket5";
- TestCompletionCallback callback_s5;
+ TestOldCompletionCallback callback_s5;
// Trying to open connection to host5 will wait for w1, w4
EXPECT_EQ(ERR_IO_PENDING, w5->OnStartOpenConnection(s5, &callback_s5));
// Address | head -> tail
@@ -199,7 +199,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket6";
- TestCompletionCallback callback_s6;
+ TestOldCompletionCallback callback_s6;
// Trying to open connection to host6 will wait for w1, w4, w5
EXPECT_EQ(ERR_IO_PENDING, w6->OnStartOpenConnection(s6, &callback_s6));
// Address | head -> tail
@@ -311,7 +311,7 @@ TEST_F(WebSocketThrottleTest, NoThrottleForDuplicateAddress) {
DeleteAddrInfo(addr);
DVLOG(1) << "socket1";
- TestCompletionCallback callback_s1;
+ TestOldCompletionCallback callback_s1;
// Trying to open connection to localhost will start without wait.
EXPECT_EQ(OK, w1->OnStartOpenConnection(s1, &callback_s1));
diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc
index 1a3dff5..625b8c1 100644
--- a/remoting/jingle_glue/ssl_socket_adapter.cc
+++ b/remoting/jingle_glue/ssl_socket_adapter.cc
@@ -200,7 +200,7 @@ TransportSocket::TransportSocket(talk_base::AsyncSocket* socket,
TransportSocket::~TransportSocket() {
}
-int TransportSocket::Connect(net::CompletionCallback* callback) {
+int TransportSocket::Connect(net::OldCompletionCallback* callback) {
// Connect is never called by SSLClientSocket, instead SSLSocketAdapter
// calls Connect() on socket_ directly.
NOTREACHED();
@@ -282,7 +282,7 @@ base::TimeDelta TransportSocket::GetConnectTimeMicros() const {
}
int TransportSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK(!read_callback_);
DCHECK(!read_buffer_.get());
@@ -301,7 +301,7 @@ int TransportSocket::Read(net::IOBuffer* buf, int buf_len,
}
int TransportSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(buf);
DCHECK(!write_callback_);
DCHECK(!write_buffer_.get());
@@ -332,7 +332,7 @@ bool TransportSocket::SetSendBufferSize(int32 size) {
void TransportSocket::OnReadEvent(talk_base::AsyncSocket* socket) {
if (read_callback_) {
DCHECK(read_buffer_.get());
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
scoped_refptr<net::IOBuffer> buffer = read_buffer_;
int buffer_len = read_buffer_len_;
@@ -358,7 +358,7 @@ void TransportSocket::OnReadEvent(talk_base::AsyncSocket* socket) {
void TransportSocket::OnWriteEvent(talk_base::AsyncSocket* socket) {
if (write_callback_) {
DCHECK(write_buffer_.get());
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
scoped_refptr<net::IOBuffer> buffer = write_buffer_;
int buffer_len = write_buffer_len_;
diff --git a/remoting/jingle_glue/ssl_socket_adapter.h b/remoting/jingle_glue/ssl_socket_adapter.h
index e990310..2930b47 100644
--- a/remoting/jingle_glue/ssl_socket_adapter.h
+++ b/remoting/jingle_glue/ssl_socket_adapter.h
@@ -41,7 +41,7 @@ class TransportSocket : public net::StreamSocket, public sigslot::has_slots<> {
// net::StreamSocket implementation
- virtual int Connect(net::CompletionCallback* callback);
+ virtual int Connect(net::OldCompletionCallback* callback);
virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
@@ -58,9 +58,9 @@ class TransportSocket : public net::StreamSocket, public sigslot::has_slots<> {
// net::Socket implementation
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -70,8 +70,8 @@ class TransportSocket : public net::StreamSocket, public sigslot::has_slots<> {
void OnReadEvent(talk_base::AsyncSocket* socket);
void OnWriteEvent(talk_base::AsyncSocket* socket);
- net::CompletionCallback* read_callback_;
- net::CompletionCallback* write_callback_;
+ net::OldCompletionCallback* read_callback_;
+ net::OldCompletionCallback* write_callback_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_len_;
@@ -141,9 +141,9 @@ class SSLSocketAdapter : public talk_base::SSLAdapter {
scoped_ptr<net::CertVerifier> cert_verifier_;
scoped_ptr<net::SSLClientSocket> ssl_socket_;
- net::CompletionCallbackImpl<SSLSocketAdapter> connected_callback_;
- net::CompletionCallbackImpl<SSLSocketAdapter> read_callback_;
- net::CompletionCallbackImpl<SSLSocketAdapter> write_callback_;
+ net::OldCompletionCallbackImpl<SSLSocketAdapter> connected_callback_;
+ net::OldCompletionCallbackImpl<SSLSocketAdapter> read_callback_;
+ net::OldCompletionCallbackImpl<SSLSocketAdapter> write_callback_;
SSLState ssl_state_;
IOState read_state_;
IOState write_state_;
diff --git a/remoting/protocol/buffered_socket_writer.h b/remoting/protocol/buffered_socket_writer.h
index 424c4dc..ebdc200 100644
--- a/remoting/protocol/buffered_socket_writer.h
+++ b/remoting/protocol/buffered_socket_writer.h
@@ -99,7 +99,7 @@ class BufferedSocketWriterBase
bool write_pending_;
- net::CompletionCallbackImpl<BufferedSocketWriterBase> written_callback_;
+ net::OldCompletionCallbackImpl<BufferedSocketWriterBase> written_callback_;
bool closed_;
};
diff --git a/remoting/protocol/channel_authenticator.h b/remoting/protocol/channel_authenticator.h
index 9fe2700..4d2dc05 100644
--- a/remoting/protocol/channel_authenticator.h
+++ b/remoting/protocol/channel_authenticator.h
@@ -66,7 +66,7 @@ class HostChannelAuthenticator : public ChannelAuthenticator {
scoped_refptr<net::GrowableIOBuffer> auth_read_buf_;
- net::CompletionCallbackImpl<HostChannelAuthenticator> auth_read_callback_;
+ net::OldCompletionCallbackImpl<HostChannelAuthenticator> auth_read_callback_;
DISALLOW_COPY_AND_ASSIGN(HostChannelAuthenticator);
};
@@ -90,7 +90,7 @@ class ClientChannelAuthenticator : public ChannelAuthenticator {
scoped_refptr<net::DrainableIOBuffer> auth_write_buf_;
- net::CompletionCallbackImpl<ClientChannelAuthenticator> auth_write_callback_;
+ net::OldCompletionCallbackImpl<ClientChannelAuthenticator> auth_write_callback_;
DISALLOW_COPY_AND_ASSIGN(ClientChannelAuthenticator);
};
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index a6ed4fd..0cda8bb 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -42,7 +42,7 @@ void FakeSocket::AppendInputData(const char* data, int data_size) {
}
int FakeSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
EXPECT_EQ(message_loop_, MessageLoop::current());
if (input_pos_ < static_cast<int>(input_data_.size())) {
int result = std::min(buf_len,
@@ -60,7 +60,7 @@ int FakeSocket::Read(net::IOBuffer* buf, int buf_len,
}
int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
EXPECT_EQ(message_loop_, MessageLoop::current());
written_data_.insert(written_data_.end(),
buf->data(), buf->data() + buf_len);
@@ -76,7 +76,7 @@ bool FakeSocket::SetSendBufferSize(int32 size) {
return false;
}
-int FakeSocket::Connect(net::CompletionCallback* callback) {
+int FakeSocket::Connect(net::OldCompletionCallback* callback) {
EXPECT_EQ(message_loop_, MessageLoop::current());
return net::OK;
}
@@ -167,7 +167,7 @@ void FakeUdpSocket::AppendInputPacket(const char* data, int data_size) {
}
int FakeUdpSocket::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
EXPECT_EQ(message_loop_, MessageLoop::current());
if (input_pos_ < static_cast<int>(input_packets_.size())) {
int result = std::min(
@@ -185,7 +185,7 @@ int FakeUdpSocket::Read(net::IOBuffer* buf, int buf_len,
}
int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
EXPECT_EQ(message_loop_, MessageLoop::current());
written_packets_.push_back(std::string());
written_packets_.back().assign(buf->data(), buf->data() + buf_len);
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index d415ab1..0e098b4 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -39,15 +39,15 @@ class FakeSocket : public net::StreamSocket {
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
// net::StreamSocket interface.
- virtual int Connect(net::CompletionCallback* callback) OVERRIDE;
+ virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
@@ -65,7 +65,7 @@ class FakeSocket : public net::StreamSocket {
bool read_pending_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
std::string written_data_;
std::string input_data_;
@@ -95,9 +95,9 @@ class FakeUdpSocket : public net::Socket {
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -106,7 +106,7 @@ class FakeUdpSocket : public net::Socket {
bool read_pending_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
std::vector<std::string> written_packets_;
std::vector<std::string> input_packets_;
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index e55b91c..35e4181 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -478,8 +478,8 @@ class TCPChannelTester : public ChannelTesterBase {
scoped_refptr<net::DrainableIOBuffer> output_buffer_;
scoped_refptr<net::GrowableIOBuffer> input_buffer_;
- net::CompletionCallbackImpl<TCPChannelTester> write_cb_;
- net::CompletionCallbackImpl<TCPChannelTester> read_cb_;
+ net::OldCompletionCallbackImpl<TCPChannelTester> write_cb_;
+ net::OldCompletionCallbackImpl<TCPChannelTester> read_cb_;
int write_errors_;
int read_errors_;
int message_size_;
@@ -660,8 +660,8 @@ class UDPChannelTester : public ChannelTesterBase {
scoped_refptr<net::IOBuffer> sent_packets_[kMessages];
scoped_refptr<net::IOBuffer> read_buffer_;
- net::CompletionCallbackImpl<UDPChannelTester> write_cb_;
- net::CompletionCallbackImpl<UDPChannelTester> read_cb_;
+ net::OldCompletionCallbackImpl<UDPChannelTester> write_cb_;
+ net::OldCompletionCallbackImpl<UDPChannelTester> read_cb_;
int write_errors_;
int read_errors_;
int packets_sent_;
diff --git a/remoting/protocol/jingle_stream_connector.h b/remoting/protocol/jingle_stream_connector.h
index 6f7ce3b..d443ffd 100644
--- a/remoting/protocol/jingle_stream_connector.h
+++ b/remoting/protocol/jingle_stream_connector.h
@@ -88,8 +88,8 @@ class JingleStreamConnector : public JingleChannelConnector {
scoped_ptr<ChannelAuthenticator> authenticator_;
// Callback called by the TCP and SSL layers.
- net::CompletionCallbackImpl<JingleStreamConnector> tcp_connect_callback_;
- net::CompletionCallbackImpl<JingleStreamConnector> ssl_connect_callback_;
+ net::OldCompletionCallbackImpl<JingleStreamConnector> tcp_connect_callback_;
+ net::OldCompletionCallbackImpl<JingleStreamConnector> ssl_connect_callback_;
DISALLOW_COPY_AND_ASSIGN(JingleStreamConnector);
};
diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h
index c8d214c..8a8abda 100644
--- a/remoting/protocol/message_reader.h
+++ b/remoting/protocol/message_reader.h
@@ -72,7 +72,7 @@ class MessageReader : public base::RefCountedThreadSafe<MessageReader> {
bool closed_;
scoped_refptr<net::IOBuffer> read_buffer_;
- net::CompletionCallbackImpl<MessageReader> read_callback_;
+ net::OldCompletionCallbackImpl<MessageReader> read_callback_;
MessageDecoder message_decoder_;
diff --git a/remoting/protocol/pepper_stream_channel.h b/remoting/protocol/pepper_stream_channel.h
index d5afe27..d0f7bb2 100644
--- a/remoting/protocol/pepper_stream_channel.h
+++ b/remoting/protocol/pepper_stream_channel.h
@@ -80,8 +80,8 @@ class PepperStreamChannel : public PepperChannel,
scoped_ptr<ChannelAuthenticator> authenticator_;
// Callback called by the TCP and SSL layers.
- net::CompletionCallbackImpl<PepperStreamChannel> p2p_connect_callback_;
- net::CompletionCallbackImpl<PepperStreamChannel> ssl_connect_callback_;
+ net::OldCompletionCallbackImpl<PepperStreamChannel> p2p_connect_callback_;
+ net::OldCompletionCallbackImpl<PepperStreamChannel> ssl_connect_callback_;
DISALLOW_COPY_AND_ASSIGN(PepperStreamChannel);
};
diff --git a/remoting/protocol/pepper_transport_socket_adapter.cc b/remoting/protocol/pepper_transport_socket_adapter.cc
index 1b8084f..6acb8e3 100644
--- a/remoting/protocol/pepper_transport_socket_adapter.cc
+++ b/remoting/protocol/pepper_transport_socket_adapter.cc
@@ -66,7 +66,7 @@ void PepperTransportSocketAdapter::AddRemoteCandidate(
}
int PepperTransportSocketAdapter::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(!read_callback_);
DCHECK(!read_buffer_);
@@ -88,7 +88,7 @@ int PepperTransportSocketAdapter::Read(net::IOBuffer* buf, int buf_len,
}
int PepperTransportSocketAdapter::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
DCHECK(!write_callback_);
DCHECK(!write_buffer_);
@@ -123,7 +123,7 @@ bool PepperTransportSocketAdapter::SetSendBufferSize(int32 size) {
return false;
}
-int PepperTransportSocketAdapter::Connect(net::CompletionCallback* callback) {
+int PepperTransportSocketAdapter::Connect(net::OldCompletionCallback* callback) {
DCHECK(CalledOnValidThread());
if (!transport_.get())
@@ -259,7 +259,7 @@ void PepperTransportSocketAdapter::OnConnect(int result) {
if (result == PP_OK)
connected_ = true;
- net::CompletionCallback* callback = connect_callback_;
+ net::OldCompletionCallback* callback = connect_callback_;
connect_callback_ = NULL;
callback->Run(PPErrorToNetError(result));
}
@@ -269,7 +269,7 @@ void PepperTransportSocketAdapter::OnRead(int32_t result) {
DCHECK(read_callback_);
DCHECK(read_buffer_);
- net::CompletionCallback* callback = read_callback_;
+ net::OldCompletionCallback* callback = read_callback_;
read_callback_ = NULL;
read_buffer_ = NULL;
callback->Run(PPErrorToNetError(result));
@@ -280,7 +280,7 @@ void PepperTransportSocketAdapter::OnWrite(int32_t result) {
DCHECK(write_callback_);
DCHECK(write_buffer_);
- net::CompletionCallback* callback = write_callback_;
+ net::OldCompletionCallback* callback = write_callback_;
write_callback_ = NULL;
write_buffer_ = NULL;
callback->Run(PPErrorToNetError(result));
diff --git a/remoting/protocol/pepper_transport_socket_adapter.h b/remoting/protocol/pepper_transport_socket_adapter.h
index 92cc410..d7e49c9 100644
--- a/remoting/protocol/pepper_transport_socket_adapter.h
+++ b/remoting/protocol/pepper_transport_socket_adapter.h
@@ -50,14 +50,14 @@ class PepperTransportSocketAdapter : public base::NonThreadSafe,
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE;
+ net::OldCompletionCallback* callback) OVERRIDE;
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
virtual bool SetSendBufferSize(int32 size) OVERRIDE;
// net::StreamSocket interface.
- virtual int Connect(net::CompletionCallback* callback) OVERRIDE;
+ virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
@@ -85,15 +85,15 @@ class PepperTransportSocketAdapter : public base::NonThreadSafe,
scoped_ptr<pp::Transport_Dev> transport_;
- net::CompletionCallback* connect_callback_;
+ net::OldCompletionCallback* connect_callback_;
bool connected_;
bool get_address_pending_;
- net::CompletionCallback* read_callback_;
+ net::OldCompletionCallback* read_callback_;
scoped_refptr<net::IOBuffer> read_buffer_;
- net::CompletionCallback* write_callback_;
+ net::OldCompletionCallback* write_callback_;
scoped_refptr<net::IOBuffer> write_buffer_;
net::BoundNetLog net_log_;
diff --git a/remoting/protocol/protocol_test_client.cc b/remoting/protocol/protocol_test_client.cc
index 2029e31..bfcb496 100644
--- a/remoting/protocol/protocol_test_client.cc
+++ b/remoting/protocol/protocol_test_client.cc
@@ -74,9 +74,9 @@ class ProtocolTestConnection
ProtocolTestClient* client_;
MessageLoop* message_loop_;
scoped_ptr<Session> session_;
- net::CompletionCallbackImpl<ProtocolTestConnection> write_cb_;
+ net::OldCompletionCallbackImpl<ProtocolTestConnection> write_cb_;
bool pending_write_;
- net::CompletionCallbackImpl<ProtocolTestConnection> read_cb_;
+ net::OldCompletionCallbackImpl<ProtocolTestConnection> read_cb_;
scoped_refptr<net::IOBuffer> read_buffer_;
};
diff --git a/remoting/protocol/secure_p2p_socket.cc b/remoting/protocol/secure_p2p_socket.cc
index c980775..8bc939e 100644
--- a/remoting/protocol/secure_p2p_socket.cc
+++ b/remoting/protocol/secure_p2p_socket.cc
@@ -10,7 +10,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-using net::CompletionCallback;
+using net::OldCompletionCallback;
using net::IOBuffer;
namespace remoting {
@@ -120,7 +120,7 @@ SecureP2PSocket::~SecureP2PSocket() {
}
int SecureP2PSocket::Read(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(!user_read_buf_);
DCHECK(!user_read_buf_len_);
DCHECK(!user_read_callback_);
@@ -132,7 +132,7 @@ int SecureP2PSocket::Read(IOBuffer* buf, int buf_len,
}
int SecureP2PSocket::Write(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
+ OldCompletionCallback* callback) {
// See the spec for the steps taken in this method:
// http://www.whatwg.org/specs/web-apps/current-work/complete/video-conferencing-and-peer-to-peer-communication.html#peer-to-peer-connections
// 4. Increment sequence number by one.
@@ -215,7 +215,7 @@ int SecureP2PSocket::ReadInternal() {
}
void SecureP2PSocket::ReadDone(int err) {
- net::CompletionCallback* callback = user_read_callback_;
+ net::OldCompletionCallback* callback = user_read_callback_;
user_read_callback_ = NULL;
if (err < 0) {
@@ -237,7 +237,7 @@ void SecureP2PSocket::ReadDone(int err) {
}
void SecureP2PSocket::WriteDone(int err) {
- net::CompletionCallback* callback = user_write_callback_;
+ net::OldCompletionCallback* callback = user_write_callback_;
int buf_len = user_write_buf_len_;
user_write_callback_ = NULL;
diff --git a/remoting/protocol/secure_p2p_socket.h b/remoting/protocol/secure_p2p_socket.h
index 67b1638..5691b6a 100644
--- a/remoting/protocol/secure_p2p_socket.h
+++ b/remoting/protocol/secure_p2p_socket.h
@@ -43,9 +43,9 @@ class SecureP2PSocket : public net::Socket {
// Socket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
@@ -60,17 +60,17 @@ class SecureP2PSocket : public net::Socket {
uint64 write_seq_;
uint64 read_seq_;
- net::CompletionCallback* user_read_callback_;
+ net::OldCompletionCallback* user_read_callback_;
scoped_refptr<net::IOBuffer> user_read_buf_;
int user_read_buf_len_;
- net::CompletionCallback* user_write_callback_;
+ net::OldCompletionCallback* user_write_callback_;
int user_write_buf_len_;
- scoped_ptr<net::CompletionCallback> read_callback_;
+ scoped_ptr<net::OldCompletionCallback> read_callback_;
scoped_refptr<net::IOBufferWithSize> read_buf_;
- scoped_ptr<net::CompletionCallback> write_callback_;
+ scoped_ptr<net::OldCompletionCallback> write_callback_;
scoped_ptr<crypto::SymmetricKey> mask_key_;
crypto::HMAC msg_hasher_;
diff --git a/remoting/protocol/secure_p2p_socket_unittest.cc b/remoting/protocol/secure_p2p_socket_unittest.cc
index 2d46794..4fd2f29 100644
--- a/remoting/protocol/secure_p2p_socket_unittest.cc
+++ b/remoting/protocol/secure_p2p_socket_unittest.cc
@@ -22,7 +22,7 @@ class TestSocket : public net::Socket {
// Socket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
std::string buffer = buffer_.front();
buffer_.pop();
@@ -32,7 +32,7 @@ class TestSocket : public net::Socket {
}
virtual int Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
buffer_.push(std::string(buf->data(), buf_len));
return buf_len;
}
diff --git a/remoting/protocol/socket_reader_base.h b/remoting/protocol/socket_reader_base.h
index 63e4e81..a315217 100644
--- a/remoting/protocol/socket_reader_base.h
+++ b/remoting/protocol/socket_reader_base.h
@@ -32,7 +32,7 @@ class SocketReaderBase {
net::Socket* socket_;
bool closed_;
scoped_refptr<net::IOBuffer> read_buffer_;
- net::CompletionCallbackImpl<SocketReaderBase> read_callback_;
+ net::OldCompletionCallbackImpl<SocketReaderBase> read_callback_;
};
} // namespace remoting
diff --git a/webkit/appcache/appcache_disk_cache.cc b/webkit/appcache/appcache_disk_cache.cc
index 4aa3fb5..1f9033b 100644
--- a/webkit/appcache/appcache_disk_cache.cc
+++ b/webkit/appcache/appcache_disk_cache.cc
@@ -21,14 +21,14 @@ class AppCacheDiskCache::EntryImpl : public Entry {
DCHECK(disk_cache_entry);
}
virtual int Read(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (offset < 0 || offset > kint32max)
return net::ERR_INVALID_ARGUMENT;
return disk_cache_entry_->ReadData(
index, static_cast<int>(offset), buf, buf_len, completion_callback);
}
virtual int Write(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (offset < 0 || offset > kint32max)
return net::ERR_INVALID_ARGUMENT;
const bool kTruncate = true;
@@ -58,19 +58,19 @@ class AppCacheDiskCache::ActiveCall {
async_completion_(this, &ActiveCall::OnAsyncCompletion)) {
}
- int CreateEntry(int64 key, Entry** entry, net::CompletionCallback* callback) {
+ int CreateEntry(int64 key, Entry** entry, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->CreateEntry(
base::Int64ToString(key), &entry_ptr_, &async_completion_);
return HandleImmediateReturnValue(rv, entry, callback);
}
- int OpenEntry(int64 key, Entry** entry, net::CompletionCallback* callback) {
+ int OpenEntry(int64 key, Entry** entry, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->OpenEntry(
base::Int64ToString(key), &entry_ptr_, &async_completion_);
return HandleImmediateReturnValue(rv, entry, callback);
}
- int DoomEntry(int64 key, net::CompletionCallback* callback) {
+ int DoomEntry(int64 key, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->DoomEntry(
base::Int64ToString(key), &async_completion_);
return HandleImmediateReturnValue(rv, NULL, callback);
@@ -78,7 +78,7 @@ class AppCacheDiskCache::ActiveCall {
private:
int HandleImmediateReturnValue(int rv, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (rv == net::ERR_IO_PENDING) {
// OnAsyncCompletion will be called later.
callback_ = callback;
@@ -102,10 +102,10 @@ class AppCacheDiskCache::ActiveCall {
}
Entry** entry_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
AppCacheDiskCache* owner_;
disk_cache::Entry* entry_ptr_;
- net::CompletionCallbackImpl<ActiveCall> async_completion_;
+ net::OldCompletionCallbackImpl<ActiveCall> async_completion_;
};
AppCacheDiskCache::AppCacheDiskCache()
@@ -124,13 +124,13 @@ AppCacheDiskCache::~AppCacheDiskCache() {
int AppCacheDiskCache::InitWithDiskBackend(
const FilePath& disk_cache_directory, int disk_cache_size, bool force,
- base::MessageLoopProxy* cache_thread, net::CompletionCallback* callback) {
+ base::MessageLoopProxy* cache_thread, net::OldCompletionCallback* callback) {
return Init(net::APP_CACHE, disk_cache_directory,
disk_cache_size, force, cache_thread, callback);
}
int AppCacheDiskCache::InitWithMemBackend(
- int mem_cache_size, net::CompletionCallback* callback) {
+ int mem_cache_size, net::OldCompletionCallback* callback) {
return Init(net::MEMORY_CACHE, FilePath(), mem_cache_size, false, NULL,
callback);
}
@@ -149,7 +149,7 @@ void AppCacheDiskCache::Disable() {
}
int AppCacheDiskCache::CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(entry && callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -166,7 +166,7 @@ int AppCacheDiskCache::CreateEntry(int64 key, Entry** entry,
}
int AppCacheDiskCache::OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(entry && callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -183,7 +183,7 @@ int AppCacheDiskCache::OpenEntry(int64 key, Entry** entry,
}
int AppCacheDiskCache::DoomEntry(int64 key,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -203,7 +203,7 @@ int AppCacheDiskCache::Init(net::CacheType cache_type,
const FilePath& cache_directory,
int cache_size, bool force,
base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!is_initializing() && !disk_cache_.get());
is_disabled_ = false;
create_backend_callback_ = new CreateBackendCallback(
diff --git a/webkit/appcache/appcache_disk_cache.h b/webkit/appcache/appcache_disk_cache.h
index da39098..a4aa551 100644
--- a/webkit/appcache/appcache_disk_cache.h
+++ b/webkit/appcache/appcache_disk_cache.h
@@ -27,29 +27,29 @@ class APPCACHE_EXPORT AppCacheDiskCache
int InitWithDiskBackend(const FilePath& disk_cache_directory,
int disk_cache_size, bool force,
base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Initializes the object to use memory only storage.
// This is used for Chrome's incognito browsing.
int InitWithMemBackend(int disk_cache_size,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void Disable();
bool is_disabled() const { return is_disabled_; }
virtual int CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback);
- virtual int DoomEntry(int64 key, net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
+ virtual int DoomEntry(int64 key, net::OldCompletionCallback* callback);
private:
class EntryImpl;
class CreateBackendCallback
- : public net::CancelableCompletionCallback<AppCacheDiskCache> {
+ : public net::CancelableOldCompletionCallback<AppCacheDiskCache> {
public:
- typedef net::CancelableCompletionCallback<AppCacheDiskCache> BaseClass;
+ typedef net::CancelableOldCompletionCallback<AppCacheDiskCache> BaseClass;
CreateBackendCallback(AppCacheDiskCache* object,
void (AppCacheDiskCache::* method)(int))
: BaseClass(object, method), backend_ptr_(NULL) {}
@@ -75,12 +75,12 @@ class APPCACHE_EXPORT AppCacheDiskCache
PendingCallType call_type;
int64 key;
Entry** entry;
- net::CompletionCallback* callback;
+ net::OldCompletionCallback* callback;
PendingCall()
: call_type(CREATE), key(0), entry(NULL), callback(NULL) {}
PendingCall(PendingCallType call_type, int64 key,
- Entry** entry, net::CompletionCallback* callback)
+ Entry** entry, net::OldCompletionCallback* callback)
: call_type(call_type), key(key), entry(entry), callback(callback) {}
};
typedef std::vector<PendingCall> PendingCalls;
@@ -94,13 +94,13 @@ class APPCACHE_EXPORT AppCacheDiskCache
disk_cache::Backend* disk_cache() { return disk_cache_.get(); }
int Init(net::CacheType cache_type, const FilePath& directory,
int cache_size, bool force, base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void OnCreateBackendComplete(int rv);
void AddActiveCall(ActiveCall* call) { active_calls_.insert(call); }
void RemoveActiveCall(ActiveCall* call) { active_calls_.erase(call); }
bool is_disabled_;
- net::CompletionCallback* init_callback_;
+ net::OldCompletionCallback* init_callback_;
scoped_refptr<CreateBackendCallback> create_backend_callback_;
PendingCalls pending_calls_;
ActiveCalls active_calls_;
diff --git a/webkit/appcache/appcache_quota_client.cc b/webkit/appcache/appcache_quota_client.cc
index db41d5e..94ce7fb 100644
--- a/webkit/appcache/appcache_quota_client.cc
+++ b/webkit/appcache/appcache_quota_client.cc
@@ -26,7 +26,7 @@ namespace appcache {
AppCacheQuotaClient::AppCacheQuotaClient(AppCacheService* service)
: ALLOW_THIS_IN_INITIALIZER_LIST(service_delete_callback_(
- new net::CancelableCompletionCallback<AppCacheQuotaClient>(
+ new net::CancelableOldCompletionCallback<AppCacheQuotaClient>(
this, &AppCacheQuotaClient::DidDeleteAppCachesForOrigin))),
service_(service), appcache_is_ready_(false),
quota_manager_is_destroyed_(false) {
diff --git a/webkit/appcache/appcache_quota_client.h b/webkit/appcache/appcache_quota_client.h
index 7618f9b..5f0387c 100644
--- a/webkit/appcache/appcache_quota_client.h
+++ b/webkit/appcache/appcache_quota_client.h
@@ -97,7 +97,7 @@ class AppCacheQuotaClient : public quota::QuotaClient {
// And once it's ready, we can only handle one delete request at a time,
// so we queue up additional requests while one is in already in progress.
scoped_ptr<DeletionCallback> current_delete_request_callback_;
- scoped_refptr<net::CancelableCompletionCallback<AppCacheQuotaClient> >
+ scoped_refptr<net::CancelableOldCompletionCallback<AppCacheQuotaClient> >
service_delete_callback_;
AppCacheService* service_;
diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc
index 5917fef..3845ce3 100644
--- a/webkit/appcache/appcache_response.cc
+++ b/webkit/appcache/appcache_response.cc
@@ -77,7 +77,7 @@ AppCacheResponseIO::AppCacheResponseIO(
entry_(NULL), buffer_len_(0), user_callback_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(raw_callback_(
- new net::CancelableCompletionCallback<AppCacheResponseIO>(
+ new net::CancelableOldCompletionCallback<AppCacheResponseIO>(
this, &AppCacheResponseIO::OnRawIOComplete))) {
}
@@ -87,18 +87,18 @@ AppCacheResponseIO::~AppCacheResponseIO() {
entry_->Close();
}
-void AppCacheResponseIO::ScheduleIOCompletionCallback(int result) {
+void AppCacheResponseIO::ScheduleIOOldCompletionCallback(int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
&AppCacheResponseIO::OnIOComplete, result));
}
-void AppCacheResponseIO::InvokeUserCompletionCallback(int result) {
+void AppCacheResponseIO::InvokeUserOldCompletionCallback(int result) {
// Clear the user callback and buffers prior to invoking the callback
// so the caller can schedule additional operations in the callback.
buffer_ = NULL;
info_buffer_ = NULL;
- net::CompletionCallback* temp_user_callback = user_callback_;
+ net::OldCompletionCallback* temp_user_callback = user_callback_;
user_callback_ = NULL;
temp_user_callback->Run(result);
}
@@ -110,7 +110,7 @@ void AppCacheResponseIO::ReadRaw(int index, int offset,
int rv = entry_->Read(index, offset, buf, buf_len, raw_callback_);
if (rv != net::ERR_IO_PENDING) {
raw_callback_->Release();
- ScheduleIOCompletionCallback(rv);
+ ScheduleIOOldCompletionCallback(rv);
}
}
@@ -121,7 +121,7 @@ void AppCacheResponseIO::WriteRaw(int index, int offset,
int rv = entry_->Write(index, offset, buf, buf_len, raw_callback_);
if (rv != net::ERR_IO_PENDING) {
raw_callback_->Release();
- ScheduleIOCompletionCallback(rv);
+ ScheduleIOOldCompletionCallback(rv);
}
}
@@ -147,7 +147,7 @@ AppCacheResponseReader::~AppCacheResponseReader() {
}
void AppCacheResponseReader::ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsReadPending());
DCHECK(info_buf && !info_buf->http_info.get());
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -159,13 +159,13 @@ void AppCacheResponseReader::ReadInfo(HttpResponseInfoIOBuffer* info_buf,
void AppCacheResponseReader::ContinueReadInfo() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
int size = entry_->GetSize(kResponseInfoIndex);
if (size <= 0) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
@@ -174,7 +174,7 @@ void AppCacheResponseReader::ContinueReadInfo() {
}
void AppCacheResponseReader::ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsReadPending());
DCHECK(buf && (buf_len >= 0));
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -187,7 +187,7 @@ void AppCacheResponseReader::ReadData(net::IOBuffer* buf, int buf_len,
void AppCacheResponseReader::ContinueReadData() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
@@ -215,7 +215,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
bool response_truncated = false;
if (!info->InitFromPickle(pickle, &response_truncated) ||
!info->headers) {
- InvokeUserCompletionCallback(net::ERR_FAILED);
+ InvokeUserOldCompletionCallback(net::ERR_FAILED);
return;
}
DCHECK(!response_truncated);
@@ -229,7 +229,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
read_position_ += result;
}
}
- InvokeUserCompletionCallback(result);
+ InvokeUserOldCompletionCallback(result);
}
void AppCacheResponseReader::OpenEntryIfNeededAndContinue() {
@@ -281,7 +281,7 @@ AppCacheResponseWriter::~AppCacheResponseWriter() {
}
void AppCacheResponseWriter::WriteInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsWritePending());
DCHECK(info_buf && info_buf->http_info.get());
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -294,7 +294,7 @@ void AppCacheResponseWriter::WriteInfo(HttpResponseInfoIOBuffer* info_buf,
void AppCacheResponseWriter::ContinueWriteInfo() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_FAILED);
+ ScheduleIOOldCompletionCallback(net::ERR_FAILED);
return;
}
@@ -308,7 +308,7 @@ void AppCacheResponseWriter::ContinueWriteInfo() {
}
void AppCacheResponseWriter::WriteData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsWritePending());
DCHECK(buf && (buf_len >= 0));
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -321,7 +321,7 @@ void AppCacheResponseWriter::WriteData(net::IOBuffer* buf, int buf_len,
void AppCacheResponseWriter::ContinueWriteData() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_FAILED);
+ ScheduleIOOldCompletionCallback(net::ERR_FAILED);
return;
}
WriteRaw(kResponseContentIndex, write_position_, buffer_, write_amount_);
@@ -335,7 +335,7 @@ void AppCacheResponseWriter::OnIOComplete(int result) {
else
info_size_ = result;
}
- InvokeUserCompletionCallback(result);
+ InvokeUserOldCompletionCallback(result);
}
void AppCacheResponseWriter::CreateEntryIfNeededAndContinue() {
diff --git a/webkit/appcache/appcache_response.h b/webkit/appcache/appcache_response.h
index a31bb9c..ca24c37 100644
--- a/webkit/appcache/appcache_response.h
+++ b/webkit/appcache/appcache_response.h
@@ -73,9 +73,9 @@ class APPCACHE_EXPORT AppCacheDiskCacheInterface {
class Entry {
public:
virtual int Read(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) = 0;
+ net::OldCompletionCallback* completion_callback) = 0;
virtual int Write(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) = 0;
+ net::OldCompletionCallback* completion_callback) = 0;
virtual int64 GetSize(int index) = 0;
virtual void Close() = 0;
protected:
@@ -83,10 +83,10 @@ class APPCACHE_EXPORT AppCacheDiskCacheInterface {
};
virtual int CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
virtual int OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) = 0;
- virtual int DoomEntry(int64 key, net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
+ virtual int DoomEntry(int64 key, net::OldCompletionCallback* callback) = 0;
protected:
friend class base::RefCounted<AppCacheDiskCacheInterface>;
@@ -103,9 +103,9 @@ class APPCACHE_EXPORT AppCacheResponseIO {
friend class ScopedRunnableMethodFactory<AppCacheResponseIO>;
template <class T>
- class EntryCallback : public net::CancelableCompletionCallback<T> {
+ class EntryCallback : public net::CancelableOldCompletionCallback<T> {
public:
- typedef net::CancelableCompletionCallback<T> BaseClass;
+ typedef net::CancelableOldCompletionCallback<T> BaseClass;
EntryCallback(T* object, void (T::* method)(int))
: BaseClass(object, method), entry_ptr_(NULL) {}
@@ -123,8 +123,8 @@ class APPCACHE_EXPORT AppCacheResponseIO {
virtual void OnIOComplete(int result) = 0;
bool IsIOPending() { return user_callback_ ? true : false; }
- void ScheduleIOCompletionCallback(int result);
- void InvokeUserCompletionCallback(int result);
+ void ScheduleIOOldCompletionCallback(int result);
+ void InvokeUserOldCompletionCallback(int result);
void ReadRaw(int index, int offset, net::IOBuffer* buf, int buf_len);
void WriteRaw(int index, int offset, net::IOBuffer* buf, int buf_len);
@@ -134,13 +134,13 @@ class APPCACHE_EXPORT AppCacheResponseIO {
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
scoped_refptr<net::IOBuffer> buffer_;
int buffer_len_;
- net::CompletionCallback* user_callback_;
+ net::OldCompletionCallback* user_callback_;
ScopedRunnableMethodFactory<AppCacheResponseIO> method_factory_;
private:
void OnRawIOComplete(int result);
- scoped_refptr<net::CancelableCompletionCallback<AppCacheResponseIO> >
+ scoped_refptr<net::CancelableOldCompletionCallback<AppCacheResponseIO> >
raw_callback_;
};
@@ -163,7 +163,7 @@ class APPCACHE_EXPORT AppCacheResponseReader : public AppCacheResponseIO {
// Should only be called where there is no Read operation in progress.
// (virtual for testing)
virtual void ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Reads data from storage. Always returns the result of the read
// asynchronously through the 'callback'. Returns the number of bytes read
@@ -174,7 +174,7 @@ class APPCACHE_EXPORT AppCacheResponseReader : public AppCacheResponseIO {
// Should only be called where there is no Read operation in progress.
// (virtual for testing)
virtual void ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns true if there is a read operation, for data or info, pending.
bool IsReadPending() { return IsIOPending(); }
@@ -220,7 +220,7 @@ class APPCACHE_EXPORT AppCacheResponseWriter : public AppCacheResponseIO {
// required parameter. The contents of 'info_buf' are not modified.
// Should only be called where there is no Write operation in progress.
void WriteInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Writes data to storage. Always returns the result of the write
// asynchronously through the 'callback'. Returns the number of bytes written
@@ -231,7 +231,7 @@ class APPCACHE_EXPORT AppCacheResponseWriter : public AppCacheResponseIO {
// The contents of 'buf' are not modified.
// Should only be called where there is no Write operation in progress.
void WriteData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns true if there is a write pending.
bool IsWritePending() { return IsIOPending(); }
diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc
index 8c181d6..2a36b5e 100644
--- a/webkit/appcache/appcache_response_unittest.cc
+++ b/webkit/appcache/appcache_response_unittest.cc
@@ -662,8 +662,8 @@ class AppCacheResponseTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
scoped_refptr<IOBuffer> read_buffer_;
int expected_read_result_;
- net::CompletionCallbackImpl<AppCacheResponseTest> read_callback_;
- net::CompletionCallbackImpl<AppCacheResponseTest> read_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> read_info_callback_;
bool should_delete_reader_in_completion_callback_;
int reader_deletion_count_down_;
bool read_callback_was_called_;
@@ -673,8 +673,8 @@ class AppCacheResponseTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
int expected_write_result_;
- net::CompletionCallbackImpl<AppCacheResponseTest> write_callback_;
- net::CompletionCallbackImpl<AppCacheResponseTest> write_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> write_info_callback_;
bool should_delete_writer_in_completion_callback_;
int writer_deletion_count_down_;
bool write_callback_was_called_;
diff --git a/webkit/appcache/appcache_service.cc b/webkit/appcache/appcache_service.cc
index b05ff01..a16a9dc 100644
--- a/webkit/appcache/appcache_service.cc
+++ b/webkit/appcache/appcache_service.cc
@@ -31,7 +31,7 @@ class AppCacheService::AsyncHelper
: public AppCacheStorage::Delegate {
public:
AsyncHelper(
- AppCacheService* service, net::CompletionCallback* callback)
+ AppCacheService* service, net::OldCompletionCallback* callback)
: service_(service), callback_(callback) {
service_->pending_helpers_.insert(this);
}
@@ -55,12 +55,12 @@ class AppCacheService::AsyncHelper
callback_ = NULL;
}
- static void DeferredCallCallback(net::CompletionCallback* callback, int rv) {
+ static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) {
callback->Run(rv);
}
AppCacheService* service_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
};
void AppCacheService::AsyncHelper::Cancel() {
@@ -78,7 +78,7 @@ class AppCacheService::CanHandleOfflineHelper : AsyncHelper {
public:
CanHandleOfflineHelper(
AppCacheService* service, const GURL& url,
- const GURL& first_party, net::CompletionCallback* callback)
+ const GURL& first_party, net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), url_(url), first_party_(first_party) {
}
@@ -119,7 +119,7 @@ class AppCacheService::DeleteHelper : public AsyncHelper {
public:
DeleteHelper(
AppCacheService* service, const GURL& manifest_url,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), manifest_url_(manifest_url) {
}
@@ -162,7 +162,7 @@ class AppCacheService::DeleteOriginHelper : public AsyncHelper {
public:
DeleteOriginHelper(
AppCacheService* service, const GURL& origin,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), origin_(origin),
num_caches_to_delete_(0), successes_(0), failures_(0) {
}
@@ -252,7 +252,7 @@ class AppCacheService::GetInfoHelper : AsyncHelper {
public:
GetInfoHelper(
AppCacheService* service, AppCacheInfoCollection* collection,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), collection_(collection) {
}
@@ -327,8 +327,8 @@ class AppCacheService::CheckResponseHelper : AsyncHelper {
int64 expected_total_size_;
int amount_headers_read_;
int amount_data_read_;
- net::CompletionCallbackImpl<CheckResponseHelper> read_info_callback_;
- net::CompletionCallbackImpl<CheckResponseHelper> read_data_callback_;
+ net::OldCompletionCallbackImpl<CheckResponseHelper> read_info_callback_;
+ net::OldCompletionCallbackImpl<CheckResponseHelper> read_data_callback_;
DISALLOW_COPY_AND_ASSIGN(CheckResponseHelper);
};
@@ -445,27 +445,27 @@ void AppCacheService::Initialize(const FilePath& cache_directory,
void AppCacheService::CanHandleMainResourceOffline(
const GURL& url,
const GURL& first_party,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
CanHandleOfflineHelper* helper =
new CanHandleOfflineHelper(this, url, first_party, callback);
helper->Start();
}
void AppCacheService::GetAllAppCacheInfo(AppCacheInfoCollection* collection,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(collection);
GetInfoHelper* helper = new GetInfoHelper(this, collection, callback);
helper->Start();
}
void AppCacheService::DeleteAppCacheGroup(const GURL& manifest_url,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DeleteHelper* helper = new DeleteHelper(this, manifest_url, callback);
helper->Start();
}
void AppCacheService::DeleteAppCachesForOrigin(
- const GURL& origin, net::CompletionCallback* callback) {
+ const GURL& origin, net::OldCompletionCallback* callback) {
DeleteOriginHelper* helper = new DeleteOriginHelper(this, origin, callback);
helper->Start();
}
diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h
index f8bc5b7..3a81a07 100644
--- a/webkit/appcache/appcache_service.h
+++ b/webkit/appcache/appcache_service.h
@@ -71,14 +71,14 @@ class APPCACHE_EXPORT AppCacheService {
// This method always completes asynchronously.
void CanHandleMainResourceOffline(const GURL& url,
const GURL& first_party,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Populates 'collection' with info about all of the appcaches stored
// within the service, 'callback' is invoked upon completion. The service
// acquires a reference to the 'collection' until until completion.
// This method always completes asynchronously.
void GetAllAppCacheInfo(AppCacheInfoCollection* collection,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Deletes the group identified by 'manifest_url', 'callback' is
// invoked upon completion. Upon completion, the cache group and
@@ -86,13 +86,13 @@ class APPCACHE_EXPORT AppCacheService {
// subresource loads for pages associated with a deleted group
// will fail. This method always completes asynchronously.
void DeleteAppCacheGroup(const GURL& manifest_url,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Deletes all appcaches for the origin, 'callback' is invoked upon
// completion. This method always completes asynchronously.
// (virtual for unittesting)
virtual void DeleteAppCachesForOrigin(const GURL& origin,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Checks the integrity of 'response_id' by reading the headers and data.
// If it cannot be read, the cache group for 'manifest_url' is deleted.
diff --git a/webkit/appcache/appcache_service_unittest.cc b/webkit/appcache/appcache_service_unittest.cc
index a939248..8002177 100644
--- a/webkit/appcache/appcache_service_unittest.cc
+++ b/webkit/appcache/appcache_service_unittest.cc
@@ -38,7 +38,7 @@ class MockResponseReader : public AppCacheResponseReader {
data_(data), data_size_(data_size) {
}
virtual void ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
info_buffer_ = info_buf;
user_callback_ = callback; // Cleared on completion.
@@ -48,7 +48,7 @@ class MockResponseReader : public AppCacheResponseReader {
ScheduleUserCallback(rv);
}
virtual void ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
buffer_ = buf;
buffer_len_ = buf_len;
user_callback_ = callback; // Cleared on completion.
@@ -67,7 +67,7 @@ class MockResponseReader : public AppCacheResponseReader {
void ScheduleUserCallback(int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
- &MockResponseReader::InvokeUserCompletionCallback, result));
+ &MockResponseReader::InvokeUserOldCompletionCallback, result));
}
scoped_ptr<net::HttpResponseInfo> info_;
@@ -170,7 +170,7 @@ class AppCacheServiceTest : public testing::Test {
scoped_ptr<AppCacheService> service_;
int delete_result_;
int delete_completion_count_;
- net::CompletionCallbackImpl<AppCacheServiceTest> deletion_callback_;
+ net::OldCompletionCallbackImpl<AppCacheServiceTest> deletion_callback_;
};
TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index b9b3d40..7df1580 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -251,7 +251,7 @@ class APPCACHE_EXPORT AppCacheStorage {
scoped_ptr<AppCacheResponseReader> reader_;
DelegateReferenceVector delegates_;
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
- net::CompletionCallbackImpl<ResponseInfoLoadTask> read_callback_;
+ net::OldCompletionCallbackImpl<ResponseInfoLoadTask> read_callback_;
};
typedef std::map<int64, ResponseInfoLoadTask*> PendingResponseInfoLoads;
diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h
index 3e7b0da..b8f1a91 100644
--- a/webkit/appcache/appcache_storage_impl.h
+++ b/webkit/appcache/appcache_storage_impl.h
@@ -147,8 +147,8 @@ class AppCacheStorageImpl : public AppCacheStorage {
int64 last_deletable_response_rowid_;
// AppCacheDiskCache async callbacks
- net::CompletionCallbackImpl<AppCacheStorageImpl> doom_callback_;
- net::CompletionCallbackImpl<AppCacheStorageImpl> init_callback_;
+ net::OldCompletionCallbackImpl<AppCacheStorageImpl> doom_callback_;
+ net::OldCompletionCallbackImpl<AppCacheStorageImpl> init_callback_;
// Created on the IO thread, but only used on the DB thread.
AppCacheDatabase* database_;
diff --git a/webkit/appcache/appcache_test_helper.h b/webkit/appcache/appcache_test_helper.h
index 7ca944f..70f4707 100644
--- a/webkit/appcache/appcache_test_helper.h
+++ b/webkit/appcache/appcache_test_helper.h
@@ -37,7 +37,7 @@ class AppCacheTestHelper : public appcache::AppCacheStorage::Delegate {
int group_id_;
int appcache_id_;
int response_id_;
- net::CompletionCallbackImpl<AppCacheTestHelper> appcache_got_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheTestHelper> appcache_got_info_callback_;
scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
std::set<GURL>* origins_; // not owned
diff --git a/webkit/appcache/appcache_update_job.h b/webkit/appcache/appcache_update_job.h
index adbf22f..6af14bd 100644
--- a/webkit/appcache/appcache_update_job.h
+++ b/webkit/appcache/appcache_update_job.h
@@ -143,7 +143,7 @@ class APPCACHE_EXPORT AppCacheUpdateJob : public AppCacheStorage::Delegate,
scoped_refptr<net::HttpResponseHeaders> existing_response_headers_;
std::string manifest_data_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
- net::CompletionCallbackImpl<URLFetcher> write_callback_;
+ net::OldCompletionCallbackImpl<URLFetcher> write_callback_;
}; // class URLFetcher
AppCacheResponseWriter* CreateResponseWriter();
@@ -304,9 +304,9 @@ class APPCACHE_EXPORT AppCacheUpdateJob : public AppCacheStorage::Delegate,
// Whether we've stored the resulting group/cache yet.
StoredState stored_state_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_info_write_callback_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_write_callback_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_info_write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_;
FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate);
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index c8a4a71..9283e0f 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -952,7 +952,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<net::StringIOBuffer> io_buffer(
new net::StringIOBuffer(seed_data));
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteData(io_buffer, seed_data.length(),
write_callback_.get());
@@ -1050,7 +1050,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<net::StringIOBuffer> io_buffer(
new net::StringIOBuffer(seed_data));
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteData(io_buffer, seed_data.length(),
write_callback_.get());
@@ -1112,7 +1112,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -1170,7 +1170,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -1228,7 +1228,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -2608,7 +2608,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -2666,7 +2666,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -3152,7 +3152,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_ptr<base::WaitableEvent> event_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
- scoped_ptr<net::CompletionCallbackImpl<AppCacheUpdateJobTest> >
+ scoped_ptr<net::OldCompletionCallbackImpl<AppCacheUpdateJobTest> >
write_callback_;
// Hosts used by an async test that need to live until update job finishes.
diff --git a/webkit/appcache/appcache_url_request_job.h b/webkit/appcache/appcache_url_request_job.h
index 8144ebd..fed5722 100644
--- a/webkit/appcache/appcache_url_request_job.h
+++ b/webkit/appcache/appcache_url_request_job.h
@@ -133,7 +133,7 @@ class APPCACHE_EXPORT AppCacheURLRequestJob : public net::URLRequestJob,
net::HttpByteRange range_requested_;
scoped_ptr<net::HttpResponseInfo> range_response_info_;
scoped_ptr<AppCacheResponseReader> reader_;
- net::CompletionCallbackImpl<AppCacheURLRequestJob> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJob> read_callback_;
ScopedRunnableMethodFactory<AppCacheURLRequestJob> method_factory_;
};
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index 455f403..9f406ca 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_unittest.cc
@@ -751,8 +751,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
scoped_refptr<IOBuffer> read_buffer_;
int expected_read_result_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> read_callback_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> read_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> read_info_callback_;
bool should_delete_reader_in_completion_callback_;
int reader_deletion_count_down_;
bool read_callback_was_called_;
@@ -762,8 +762,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
int expected_write_result_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> write_callback_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> write_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> write_info_callback_;
bool should_delete_writer_in_completion_callback_;
int writer_deletion_count_down_;
bool write_callback_was_called_;
diff --git a/webkit/appcache/mock_appcache_service.cc b/webkit/appcache/mock_appcache_service.cc
index d87e4f1..a78fd39 100644
--- a/webkit/appcache/mock_appcache_service.cc
+++ b/webkit/appcache/mock_appcache_service.cc
@@ -8,12 +8,12 @@
namespace appcache {
-static void DeferredCallCallback(net::CompletionCallback* callback, int rv) {
+static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) {
callback->Run(rv);
}
void MockAppCacheService::DeleteAppCachesForOrigin(
- const GURL& origin, net::CompletionCallback* callback) {
+ const GURL& origin, net::OldCompletionCallback* callback) {
++delete_called_count_;
MessageLoop::current()->PostTask(
FROM_HERE,
diff --git a/webkit/appcache/mock_appcache_service.h b/webkit/appcache/mock_appcache_service.h
index 1679d9f..e828504 100644
--- a/webkit/appcache/mock_appcache_service.h
+++ b/webkit/appcache/mock_appcache_service.h
@@ -25,7 +25,7 @@ class MockAppCacheService : public AppCacheService {
// Just returns a canned completion code without actually
// removing groups and caches in our mock storage instance.
virtual void DeleteAppCachesForOrigin(const GURL& origin,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void set_quota_manager_proxy(quota::QuotaManagerProxy* proxy) {
quota_manager_proxy_ = proxy;
diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc
index 8e5f32a..8e73052 100644
--- a/webkit/appcache/view_appcache_internals_job.cc
+++ b/webkit/appcache/view_appcache_internals_job.cc
@@ -315,7 +315,7 @@ class MainPageJob : public BaseInternalsJob {
DCHECK(request_);
info_collection_ = new AppCacheInfoCollection;
gotinfo_complete_callback_ =
- new net::CancelableCompletionCallback<MainPageJob>(
+ new net::CancelableOldCompletionCallback<MainPageJob>(
this, &MainPageJob::OnGotInfoComplete);
appcache_service_->GetAllAppCacheInfo(
info_collection_, gotinfo_complete_callback_);
@@ -365,7 +365,7 @@ class MainPageJob : public BaseInternalsJob {
StartAsync();
}
- scoped_refptr<net::CancelableCompletionCallback<MainPageJob> >
+ scoped_refptr<net::CancelableOldCompletionCallback<MainPageJob> >
gotinfo_complete_callback_;
scoped_refptr<AppCacheInfoCollection> info_collection_;
DISALLOW_COPY_AND_ASSIGN(MainPageJob);
@@ -402,7 +402,7 @@ class RemoveAppCacheJob : public RedirectToMainPageJob {
virtual void Start() {
DCHECK(request_);
delete_appcache_callback_ =
- new net::CancelableCompletionCallback<RemoveAppCacheJob>(
+ new net::CancelableOldCompletionCallback<RemoveAppCacheJob>(
this, &RemoveAppCacheJob::OnDeleteAppCacheComplete);
appcache_service_->DeleteAppCacheGroup(
manifest_url_, delete_appcache_callback_);
@@ -420,7 +420,7 @@ class RemoveAppCacheJob : public RedirectToMainPageJob {
}
GURL manifest_url_;
- scoped_refptr<net::CancelableCompletionCallback<RemoveAppCacheJob> >
+ scoped_refptr<net::CancelableOldCompletionCallback<RemoveAppCacheJob> >
delete_appcache_callback_;
};
@@ -579,7 +579,7 @@ class ViewEntryJob : public BaseInternalsJob,
scoped_refptr<net::IOBuffer> response_data_;
int amount_read_;
scoped_ptr<AppCacheResponseReader> reader_;
- net::CompletionCallbackImpl<ViewEntryJob> read_callback_;
+ net::OldCompletionCallbackImpl<ViewEntryJob> read_callback_;
};
} // namespace
diff --git a/webkit/blob/blob_url_request_job.h b/webkit/blob/blob_url_request_job.h
index 1153f13..843d9ca 100644
--- a/webkit/blob/blob_url_request_job.h
+++ b/webkit/blob/blob_url_request_job.h
@@ -72,7 +72,7 @@ class BlobURLRequestJob : public net::URLRequestJob {
base::ScopedCallbackFactory<BlobURLRequestJob> callback_factory_;
scoped_refptr<BlobData> blob_data_;
scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
- net::CompletionCallbackImpl<BlobURLRequestJob> io_callback_;
+ net::OldCompletionCallbackImpl<BlobURLRequestJob> io_callback_;
std::vector<int64> item_length_list_;
scoped_ptr<net::FileStream> stream_;
size_t item_index_;
diff --git a/webkit/database/database_quota_client.cc b/webkit/database/database_quota_client.cc
index f72910d..32482fd 100644
--- a/webkit/database/database_quota_client.cc
+++ b/webkit/database/database_quota_client.cc
@@ -143,7 +143,7 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
result_(quota::kQuotaStatusUnknown),
caller_callback_(caller_callback),
ALLOW_THIS_IN_INITIALIZER_LIST(completion_callback_(
- this, &DeleteOriginTask::OnCompletionCallback)) {
+ this, &DeleteOriginTask::OnOldCompletionCallback)) {
}
private:
@@ -159,16 +159,16 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
}
virtual bool RunOnTargetThreadAsync() OVERRIDE {
- AddRef(); // balanced in OnCompletionCallback
+ AddRef(); // balanced in OnOldCompletionCallback
string16 origin_id = DatabaseUtil::GetOriginIdentifier(origin_url_);
int rv = db_tracker_->DeleteDataForOrigin(origin_id, &completion_callback_);
if (rv == net::ERR_IO_PENDING)
return false; // we wait for the callback
- OnCompletionCallback(rv);
+ OnOldCompletionCallback(rv);
return false;
}
- void OnCompletionCallback(int rv) {
+ void OnOldCompletionCallback(int rv) {
if (rv == net::OK)
result_ = quota::kQuotaStatusOk;
original_message_loop()->PostTask(
@@ -179,7 +179,7 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
const GURL origin_url_;
quota::QuotaStatusCode result_;
scoped_ptr<DeletionCallback> caller_callback_;
- net::CompletionCallbackImpl<DeleteOriginTask> completion_callback_;
+ net::OldCompletionCallbackImpl<DeleteOriginTask> completion_callback_;
};
// DatabaseQuotaClient --------------------------------------------------------
diff --git a/webkit/database/database_quota_client_unittest.cc b/webkit/database/database_quota_client_unittest.cc
index 2f29f60..ba91206 100644
--- a/webkit/database/database_quota_client_unittest.cc
+++ b/webkit/database/database_quota_client_unittest.cc
@@ -68,7 +68,7 @@ class MockDatabaseTracker : public DatabaseTracker {
virtual int DeleteDataForOrigin(
const string16& origin_id,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
++delete_called_count_;
if (async_delete()) {
base::MessageLoopProxy::current()->PostTask(FROM_HERE,
@@ -79,7 +79,7 @@ class MockDatabaseTracker : public DatabaseTracker {
return net::OK;
}
- void AsyncDeleteDataForOrigin(net::CompletionCallback* callback) {
+ void AsyncDeleteDataForOrigin(net::OldCompletionCallback* callback) {
callback->Run(net::OK);
}
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 12c6f5c..1bd532c 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -214,7 +214,7 @@ void DatabaseTracker::DeleteDatabaseIfNeeded(const string16& origin_identifier,
if (dbs_to_be_deleted_[origin_identifier].empty())
dbs_to_be_deleted_.erase(origin_identifier);
- std::vector<net::CompletionCallback*> to_be_deleted;
+ std::vector<net::OldCompletionCallback*> to_be_deleted;
for (PendingCompletionMap::iterator callback = deletion_callbacks_.begin();
callback != deletion_callbacks_.end(); ++callback) {
DatabaseSet::iterator found_origin =
@@ -225,14 +225,14 @@ void DatabaseTracker::DeleteDatabaseIfNeeded(const string16& origin_identifier,
if (databases.empty()) {
callback->second.erase(found_origin);
if (callback->second.empty()) {
- net::CompletionCallback* cb = callback->first;
+ net::OldCompletionCallback* cb = callback->first;
cb->Run(net::OK);
to_be_deleted.push_back(cb);
}
}
}
}
- for (std::vector<net::CompletionCallback*>::iterator cb =
+ for (std::vector<net::OldCompletionCallback*>::iterator cb =
to_be_deleted.begin(); cb != to_be_deleted.end(); ++cb)
deletion_callbacks_.erase(*cb);
}
@@ -629,7 +629,7 @@ void DatabaseTracker::ScheduleDatabaseForDeletion(
void DatabaseTracker::ScheduleDatabasesForDeletion(
const DatabaseSet& databases,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!callback ||
deletion_callbacks_.find(callback) == deletion_callbacks_.end());
DCHECK(!databases.empty());
@@ -645,7 +645,7 @@ void DatabaseTracker::ScheduleDatabasesForDeletion(
int DatabaseTracker::DeleteDatabase(const string16& origin_identifier,
const string16& database_name,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
@@ -665,7 +665,7 @@ int DatabaseTracker::DeleteDatabase(const string16& origin_identifier,
int DatabaseTracker::DeleteDataModifiedSince(
const base::Time& cutoff,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
@@ -715,7 +715,7 @@ int DatabaseTracker::DeleteDataModifiedSince(
}
int DatabaseTracker::DeleteDataForOrigin(const string16& origin,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 1acfc92..c2432f5 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -133,7 +133,7 @@ class DatabaseTracker
// if non-NULL.
int DeleteDatabase(const string16& origin_identifier,
const string16& database_name,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Delete any databases that have been touched since the cutoff date that's
// supplied, omitting any that match IDs within |protected_origins|.
@@ -142,14 +142,14 @@ class DatabaseTracker
// if non-NULL. Protected origins, according the the SpecialStoragePolicy,
// are not deleted by this method.
int DeleteDataModifiedSince(const base::Time& cutoff,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Delete all databases that belong to the given origin. Returns net::OK on
// success, net::FAILED if not all databases could be deleted, and
// net::ERR_IO_PENDING and |callback| is invoked upon completion, if non-NULL.
// virtual for unit testing only
virtual int DeleteDataForOrigin(const string16& origin_identifier,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
bool IsIncognitoProfile() const { return is_incognito_; }
@@ -170,7 +170,7 @@ class DatabaseTracker
friend class MockDatabaseTracker; // for testing
typedef std::map<string16, std::set<string16> > DatabaseSet;
- typedef std::map<net::CompletionCallback*, DatabaseSet> PendingCompletionMap;
+ typedef std::map<net::OldCompletionCallback*, DatabaseSet> PendingCompletionMap;
typedef std::map<string16, base::PlatformFile> FileHandlesMap;
typedef std::map<string16, string16> OriginDirectoriesMap;
@@ -247,7 +247,7 @@ class DatabaseTracker
// Schedule a set of open databases for deletion. If non-null, callback is
// invoked upon completion.
void ScheduleDatabasesForDeletion(const DatabaseSet& databases,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns the directory where all DB files for the given origin are stored.
string16 GetOriginDirectory(const string16& origin_identifier);
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index 6fa492c..e46e16b 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -214,7 +214,7 @@ class DatabaseTracker_TestHelper_Test {
// Delete db1. Should also delete origin1.
TestObserver observer;
tracker->AddObserver(&observer);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = tracker->DeleteDatabase(kOrigin1, kDB1, &callback);
EXPECT_EQ(net::ERR_IO_PENDING, result);
ASSERT_FALSE(callback.have_result());
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h
index cedabcd..1caa988 100644
--- a/webkit/fileapi/file_system_url_request_job.h
+++ b/webkit/fileapi/file_system_url_request_job.h
@@ -64,7 +64,7 @@ class FileSystemURLRequestJob : public net::URLRequestJob {
scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_;
base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_;
- net::CompletionCallbackImpl<FileSystemURLRequestJob> io_callback_;
+ net::OldCompletionCallbackImpl<FileSystemURLRequestJob> io_callback_;
scoped_ptr<net::FileStream> stream_;
bool is_directory_;
scoped_ptr<net::HttpResponseInfo> response_info_;
diff --git a/webkit/fileapi/file_writer_delegate.h b/webkit/fileapi/file_writer_delegate.h
index 7f25212..18677fb 100644
--- a/webkit/fileapi/file_writer_delegate.h
+++ b/webkit/fileapi/file_writer_delegate.h
@@ -81,7 +81,7 @@ class FileWriterDelegate : public net::URLRequest::Delegate {
scoped_refptr<net::IOBufferWithSize> io_buffer_;
scoped_ptr<net::FileStream> file_stream_;
net::URLRequest* request_;
- net::CompletionCallbackImpl<FileWriterDelegate> io_callback_;
+ net::OldCompletionCallbackImpl<FileWriterDelegate> io_callback_;
ScopedRunnableMethodFactory<FileWriterDelegate> method_factory_;
base::ScopedCallbackFactory<FileWriterDelegate> callback_factory_;
};
diff --git a/webkit/fileapi/webfilewriter_base_unittest.cc b/webkit/fileapi/webfilewriter_base_unittest.cc
index 43164e7..69ef033 100644
--- a/webkit/fileapi/webfilewriter_base_unittest.cc
+++ b/webkit/fileapi/webfilewriter_base_unittest.cc
@@ -385,7 +385,7 @@ TEST_F(FileWriterTest, CancelFailedTruncate) {
EXPECT_EQ(0, received_did_write_count_);
}
-TEST_F(FileWriterTest, DeleteInCompletionCallbacks) {
+TEST_F(FileWriterTest, DeleteInOldCompletionCallbacks) {
delete_in_client_callback_ = true;
writer()->write(kBasicFileWrite_Offset, GURL("blob://bloburl/"));
EXPECT_FALSE(testable_writer_.get());
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 4b10e79..1a7c28c 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -74,12 +74,12 @@ class MockBufferedResourceLoader : public BufferedResourceLoader {
: BufferedResourceLoader(GURL(), 0, 0, new media::MediaLog()) {
}
- MOCK_METHOD3(Start, void(net::CompletionCallback* read_callback,
+ MOCK_METHOD3(Start, void(net::OldCompletionCallback* read_callback,
const base::Closure& network_callback,
WebFrame* frame));
MOCK_METHOD0(Stop, void());
MOCK_METHOD4(Read, void(int64 position, int read_size, uint8* buffer,
- net::CompletionCallback* callback));
+ net::OldCompletionCallback* callback));
MOCK_METHOD0(content_length, int64());
MOCK_METHOD0(instance_size, int64());
MOCK_METHOD0(range_supported, bool());
@@ -225,7 +225,7 @@ class BufferedDataSourceTest : public testing::Test {
}
void InvokeStartCallback(
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
const base::Closure& network_callback,
WebFrame* frame) {
callback->RunWithParams(Tuple1<int>(error_));
@@ -234,7 +234,7 @@ class BufferedDataSourceTest : public testing::Test {
}
void InvokeReadCallback(int64 position, int size, uint8* buffer,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (error_ > 0)
memcpy(buffer, data_ + static_cast<int>(position), error_);
callback->RunWithParams(Tuple1<int>(error_));
diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc
index 44ebc75..07f5729 100644
--- a/webkit/glue/media/buffered_resource_loader.cc
+++ b/webkit/glue/media/buffered_resource_loader.cc
@@ -89,7 +89,7 @@ BufferedResourceLoader::~BufferedResourceLoader() {
url_loader_->cancel();
}
-void BufferedResourceLoader::Start(net::CompletionCallback* start_callback,
+void BufferedResourceLoader::Start(net::OldCompletionCallback* start_callback,
const base::Closure& event_callback,
WebFrame* frame) {
// Make sure we have not started.
@@ -172,7 +172,7 @@ void BufferedResourceLoader::Stop() {
void BufferedResourceLoader::Read(int64 position,
int read_size,
uint8* buffer,
- net::CompletionCallback* read_callback) {
+ net::OldCompletionCallback* read_callback) {
DCHECK(!read_callback_.get());
DCHECK(buffer_.get());
DCHECK(read_callback);
diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h
index 0d1a4dd..a9a1520 100644
--- a/webkit/glue/media/buffered_resource_loader.h
+++ b/webkit/glue/media/buffered_resource_loader.h
@@ -73,7 +73,7 @@ class BufferedResourceLoader
// An error code that indicates the request has failed.
// |event_callback| is called when the response is completed, data is
// received, the request is suspended or resumed.
- virtual void Start(net::CompletionCallback* callback,
+ virtual void Start(net::OldCompletionCallback* callback,
const base::Closure& event_callback,
WebKit::WebFrame* frame);
@@ -92,7 +92,7 @@ class BufferedResourceLoader
// - net::ERR_CACHE_MISS
// The read was made too far away from the current buffered position.
virtual void Read(int64 position, int read_size,
- uint8* buffer, net::CompletionCallback* callback);
+ uint8* buffer, net::OldCompletionCallback* callback);
// Returns the position of the last byte buffered. Returns
// |kPositionNotSpecified| if such value is not available.
@@ -261,14 +261,14 @@ class BufferedResourceLoader
base::Closure event_callback_;
// Members used during request start.
- scoped_ptr<net::CompletionCallback> start_callback_;
+ scoped_ptr<net::OldCompletionCallback> start_callback_;
int64 offset_;
int64 content_length_;
int64 instance_size_;
// Members used during a read operation. They should be reset after each
// read has completed or failed.
- scoped_ptr<net::CompletionCallback> read_callback_;
+ scoped_ptr<net::OldCompletionCallback> read_callback_;
int64 read_position_;
size_t read_size_;
uint8* read_buffer_;
diff --git a/webkit/plugins/ppapi/ppb_transport_impl.h b/webkit/plugins/ppapi/ppb_transport_impl.h
index 58138ab..f768ad9 100644
--- a/webkit/plugins/ppapi/ppb_transport_impl.h
+++ b/webkit/plugins/ppapi/ppb_transport_impl.h
@@ -73,8 +73,8 @@ class PPB_Transport_Impl : public ::ppapi::Resource,
scoped_refptr<TrackedCompletionCallback> recv_callback_;
scoped_refptr<TrackedCompletionCallback> send_callback_;
- net::CompletionCallbackImpl<PPB_Transport_Impl> channel_write_callback_;
- net::CompletionCallbackImpl<PPB_Transport_Impl> channel_read_callback_;
+ net::OldCompletionCallbackImpl<PPB_Transport_Impl> channel_write_callback_;
+ net::OldCompletionCallbackImpl<PPB_Transport_Impl> channel_read_callback_;
DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl);
};