diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 20:38:10 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 20:38:10 +0000 |
commit | f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch) | |
tree | 6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /net/proxy | |
parent | d1666539b57bf8552e203d355fd09909d36f9732 (diff) | |
download | chromium_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
Diffstat (limited to 'net/proxy')
35 files changed, 235 insertions, 235 deletions
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_; }; |