Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1338)

Side by Side Diff: net/proxy/mock_proxy_script_fetcher.h

Issue 8985012: base::Bind: Convert net/proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ 5 #ifndef NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_
6 #define NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ 6 #define NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "net/proxy/proxy_script_fetcher.h" 11 #include "net/proxy/proxy_script_fetcher.h"
12 12
13 #include <string> 13 #include <string>
14 14
15 namespace net { 15 namespace net {
16 16
17 class URLRequestContext; 17 class URLRequestContext;
18 18
19 // A mock ProxyScriptFetcher. No result will be returned to the fetch client 19 // A mock ProxyScriptFetcher. No result will be returned to the fetch client
20 // until we call NotifyFetchCompletion() to set the results. 20 // until we call NotifyFetchCompletion() to set the results.
21 class MockProxyScriptFetcher : public ProxyScriptFetcher { 21 class MockProxyScriptFetcher : public ProxyScriptFetcher {
22 public: 22 public:
23 MockProxyScriptFetcher(); 23 MockProxyScriptFetcher();
24 24
25 // ProxyScriptFetcher implementation. 25 // ProxyScriptFetcher implementation.
26 virtual int Fetch(const GURL& url, 26 virtual int Fetch(const GURL& url,
27 string16* text, 27 string16* text,
28 OldCompletionCallback* callback) OVERRIDE; 28 const net::CompletionCallback& callback) OVERRIDE;
James Hawkins 2011/12/17 23:50:55 Remove net:: here and below.
James Hawkins 2011/12/18 00:05:47 Done.
29 virtual void Cancel() OVERRIDE; 29 virtual void Cancel() OVERRIDE;
30 virtual URLRequestContext* GetRequestContext() const OVERRIDE; 30 virtual URLRequestContext* GetRequestContext() const OVERRIDE;
31 31
32 void NotifyFetchCompletion(int result, const std::string& ascii_text); 32 void NotifyFetchCompletion(int result, const std::string& ascii_text);
33 const GURL& pending_request_url() const; 33 const GURL& pending_request_url() const;
34 bool has_pending_request() const; 34 bool has_pending_request() const;
35 35
36 private: 36 private:
37 GURL pending_request_url_; 37 GURL pending_request_url_;
38 OldCompletionCallback* pending_request_callback_; 38 net::CompletionCallback pending_request_callback_;
39 string16* pending_request_text_; 39 string16* pending_request_text_;
40 }; 40 };
41 41
42 } // namespace net 42 } // namespace net
43 43
44 #endif // NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ 44 #endif // NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698