Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ | |
| 6 #define BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "net/url_request/url_request_context.h" | |
| 11 #include "net/url_request/url_request_context_builder.h" | |
| 12 #include "net/url_request/url_request_context_getter.h" | |
| 13 | |
| 14 namespace blimp { | |
| 15 namespace client { | |
| 16 | |
| 17 class BlimpClientURLRequestContextGetter : public net::URLRequestContextGetter { | |
|
Kevin M
2016/02/12 19:45:27
Add some comments?
Kevin M
2016/02/12 19:45:27
Can you use TrivialURLRequestContextGetter?
David Trainor- moved to gerrit
2016/02/17 21:09:48
Can't without dealing with annoying thread ownersh
| |
| 18 public: | |
| 19 BlimpClientURLRequestContextGetter( | |
| 20 const scoped_refptr<base::SingleThreadTaskRunner>& io_loop_task_runner); | |
| 21 | |
| 22 // net::URLRequestContextGetter implementation. | |
| 23 net::URLRequestContext* GetURLRequestContext() override; | |
| 24 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() | |
| 25 const override; | |
| 26 | |
| 27 protected: | |
| 28 ~BlimpClientURLRequestContextGetter() override; | |
| 29 | |
| 30 private: | |
| 31 scoped_refptr<base::SingleThreadTaskRunner> io_loop_task_runner_; | |
| 32 | |
| 33 net::URLRequestContextBuilder builder_; | |
| 34 scoped_ptr<net::URLRequestContext> url_request_context_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(BlimpClientURLRequestContextGetter); | |
| 37 }; | |
| 38 | |
| 39 } // namespace client | |
| 40 } // namespace blimp | |
| 41 | |
| 42 #endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ | |
| OLD | NEW |