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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_context_getter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/url_request/url_request_context_getter.h" 5 #include "net/url_request/url_request_context_getter.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "net/url_request/url_request_context.h" 9 #include "net/url_request/url_request_context.h"
10 10
(...skipping 17 matching lines...) Expand all
28 // aid in debugging. 28 // aid in debugging.
29 DLOG(WARNING) << "URLRequestContextGetter leaking due to no owning" 29 DLOG(WARNING) << "URLRequestContextGetter leaking due to no owning"
30 << " thread."; 30 << " thread.";
31 } 31 }
32 } 32 }
33 } 33 }
34 // If no IO message loop proxy was available, we will just leak memory. 34 // If no IO message loop proxy was available, we will just leak memory.
35 // This is also true if the IO thread is gone. 35 // This is also true if the IO thread is gone.
36 } 36 }
37 37
38 TrivialURLRequestContextGetter::TrivialURLRequestContextGetter(
39 net::URLRequestContext* context,
40 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner)
41 : context_(context), main_task_runner_(main_task_runner) {}
42
43 TrivialURLRequestContextGetter::~TrivialURLRequestContextGetter() {}
44
45 net::URLRequestContext*
46 TrivialURLRequestContextGetter::GetURLRequestContext() {
47 return context_;
48 }
49
50 scoped_refptr<base::SingleThreadTaskRunner>
51 TrivialURLRequestContextGetter::GetNetworkTaskRunner() const {
52 return main_task_runner_;
53 }
54
55
38 } // namespace net 56 } // namespace net
OLDNEW
« 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