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

Unified Diff: net/url_request/url_request_context_getter.h

Issue 292063002: Create a TrivialURLRequestContextGetter to shim an existing URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks to compile. Created 6 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/get_server_time/get_server_time.cc ('k') | net/url_request/url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_getter.h
diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
index 4c8e4af55c3b8257044c480ec8fb124a2b530515..8a2691bc53fc8181a24d72354a9250c36587345d 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -53,6 +53,27 @@ struct URLRequestContextGetterTraits {
}
};
+// For use in shimming a URLRequestContext into a URLRequestContextGetter.
+class NET_EXPORT TrivialURLRequestContextGetter
+ : public URLRequestContextGetter {
+public:
+ TrivialURLRequestContextGetter(
+ net::URLRequestContext* context,
+ const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner);
+
+ // net::URLRequestContextGetter implementation:
+ virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
+
+ virtual scoped_refptr<base::SingleThreadTaskRunner>
+ GetNetworkTaskRunner() const OVERRIDE;
+
+private:
+ virtual ~TrivialURLRequestContextGetter();
+
+ net::URLRequestContext* context_;
+ const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+};
willchan no longer on Chromium 2014/05/22 22:49:01 DISALLOW_COPY_AND_ASSIGN
Randy Smith (Not in Mondays) 2014/05/23 15:40:13 Done.
+
} // namespace net
#endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
« no previous file with comments | « net/tools/get_server_time/get_server_time.cc ('k') | net/url_request/url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698