Chromium Code Reviews| Index: blimp/client/session/blimp_client_url_request_context_getter.h |
| diff --git a/blimp/client/session/blimp_client_url_request_context_getter.h b/blimp/client/session/blimp_client_url_request_context_getter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f28569095ec135e2cdf288aa2a37b34417bbe8dd |
| --- /dev/null |
| +++ b/blimp/client/session/blimp_client_url_request_context_getter.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ |
| +#define BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "net/url_request/url_request_context.h" |
| +#include "net/url_request/url_request_context_builder.h" |
| +#include "net/url_request/url_request_context_getter.h" |
| + |
| +namespace blimp { |
| +namespace client { |
| + |
| +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
|
| + public: |
| + BlimpClientURLRequestContextGetter( |
| + const scoped_refptr<base::SingleThreadTaskRunner>& io_loop_task_runner); |
| + |
| + // net::URLRequestContextGetter implementation. |
| + net::URLRequestContext* GetURLRequestContext() override; |
| + scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
| + const override; |
| + |
| + protected: |
| + ~BlimpClientURLRequestContextGetter() override; |
| + |
| + private: |
| + scoped_refptr<base::SingleThreadTaskRunner> io_loop_task_runner_; |
| + |
| + net::URLRequestContextBuilder builder_; |
| + scoped_ptr<net::URLRequestContext> url_request_context_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(BlimpClientURLRequestContextGetter); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ |