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 #include "blimp/engine/app/blimp_system_url_request_context_getter.h" | |
| 6 | |
| 7 #include <utility> | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/logging.h" | |
| 11 #include "base/single_thread_task_runner.h" | |
| 12 #include "blimp/engine/app/blimp_network_delegate.h" | |
|
Kevin M
2016/04/08 01:09:07
Is this needed?
Jess
2016/04/08 19:39:02
Nope. Removed.
| |
| 13 #include "blimp/engine/common/blimp_content_client.h" | |
|
Kevin M
2016/04/08 01:09:08
Is this needed?
Jess
2016/04/08 19:39:02
Same here. Are they any includes checking tools I
Kevin M
2016/04/08 19:44:28
Last I checked, the Chromium IWYU tools were still
| |
| 14 #include "content/public/browser/browser_thread.h" | |
| 15 #include "net/url_request/url_request_context.h" | |
| 16 #include "net/url_request/url_request_context_builder.h" | |
| 17 | |
| 18 namespace blimp { | |
| 19 namespace engine { | |
| 20 | |
| 21 BlimpSystemURLRequestContextGetter::BlimpSystemURLRequestContextGetter() { | |
| 22 // Must first be created on the UI thread. | |
| 23 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | |
| 24 } | |
| 25 | |
| 26 BlimpSystemURLRequestContextGetter::~BlimpSystemURLRequestContextGetter() {} | |
| 27 | |
| 28 net::URLRequestContext* | |
| 29 BlimpSystemURLRequestContextGetter::GetURLRequestContext() { | |
| 30 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | |
| 31 if (!url_request_context_.get()) { | |
|
Kevin M
2016/04/08 01:09:07
nit: get() isn't necessary for null checks
Jess
2016/04/08 19:39:02
Done.
| |
| 32 // Use default values | |
| 33 net::URLRequestContextBuilder builder; | |
| 34 url_request_context_ = builder.Build(); | |
| 35 } | |
| 36 return url_request_context_.get(); | |
| 37 } | |
| 38 | |
| 39 scoped_refptr<base::SingleThreadTaskRunner> | |
| 40 BlimpSystemURLRequestContextGetter::GetNetworkTaskRunner() const { | |
| 41 return content::BrowserThread::GetMessageLoopProxyForThread( | |
| 42 content::BrowserThread::IO); | |
| 43 } | |
| 44 | |
| 45 } // namespace engine | |
| 46 } // namespace blimp | |
| OLD | NEW |