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

Unified Diff: net/url_request/url_request_context_getter.cc

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/url_request/url_request_context_getter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_getter.cc
diff --git a/net/url_request/url_request_context_getter.cc b/net/url_request/url_request_context_getter.cc
index 88a6f3d6490015958742f82a8a618bf80c90b902..721a709fbd44837124ac4660ecedf0916eb6f720 100644
--- a/net/url_request/url_request_context_getter.cc
+++ b/net/url_request/url_request_context_getter.cc
@@ -35,4 +35,22 @@ void URLRequestContextGetter::OnDestruct() const {
// This is also true if the IO thread is gone.
}
+TrivialURLRequestContextGetter::TrivialURLRequestContextGetter(
+ net::URLRequestContext* context,
+ const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner)
+ : context_(context), main_task_runner_(main_task_runner) {}
+
+TrivialURLRequestContextGetter::~TrivialURLRequestContextGetter() {}
+
+net::URLRequestContext*
+TrivialURLRequestContextGetter::GetURLRequestContext() {
+ return context_;
+}
+
+scoped_refptr<base::SingleThreadTaskRunner>
+TrivialURLRequestContextGetter::GetNetworkTaskRunner() const {
+ return main_task_runner_;
+}
+
+
} // namespace net
« no previous file with comments | « net/url_request/url_request_context_getter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698