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

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: Sync'd up to r272911 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 b04ee8f60246cdec28d15f4a8dd5d5de9fa239fe..1f56f70750b868c3cd07efbb9427257436a9553b 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -53,6 +53,29 @@ 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_;
+
+ DISALLOW_COPY_AND_ASSIGN(TrivialURLRequestContextGetter);
+};
+
} // namespace net
#endif // NET_URL_REQUEST_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