OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/engine/app/blimp_url_request_context_getter.h" | 5 #include "blimp/engine/app/blimp_url_request_context_getter.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 builder.set_data_enabled(true); | 62 builder.set_data_enabled(true); |
63 for (auto& scheme_handler : protocol_handlers_) { | 63 for (auto& scheme_handler : protocol_handlers_) { |
64 builder.SetProtocolHandler( | 64 builder.SetProtocolHandler( |
65 scheme_handler.first, | 65 scheme_handler.first, |
66 base::WrapUnique(scheme_handler.second.release())); | 66 base::WrapUnique(scheme_handler.second.release())); |
67 } | 67 } |
68 protocol_handlers_.clear(); | 68 protocol_handlers_.clear(); |
69 | 69 |
70 std::vector<std::unique_ptr<net::URLRequestInterceptor>> | 70 std::vector<std::unique_ptr<net::URLRequestInterceptor>> |
71 request_interceptors; | 71 request_interceptors; |
72 for (auto i : request_interceptors_) { | 72 for (auto* i : request_interceptors_) { |
73 request_interceptors.push_back(base::WrapUnique(i)); | 73 request_interceptors.push_back(base::WrapUnique(i)); |
74 } | 74 } |
75 request_interceptors_.weak_clear(); | 75 request_interceptors_.weak_clear(); |
76 builder.SetInterceptors(std::move(request_interceptors)); | 76 builder.SetInterceptors(std::move(request_interceptors)); |
77 | 77 |
78 net::URLRequestContextBuilder::HttpCacheParams cache_params; | 78 net::URLRequestContextBuilder::HttpCacheParams cache_params; |
79 cache_params.type = | 79 cache_params.type = |
80 net::URLRequestContextBuilder::HttpCacheParams::IN_MEMORY; | 80 net::URLRequestContextBuilder::HttpCacheParams::IN_MEMORY; |
81 builder.EnableHttpCache(cache_params); | 81 builder.EnableHttpCache(cache_params); |
82 | 82 |
(...skipping 11 matching lines...) Expand all Loading... |
94 return content::BrowserThread::GetMessageLoopProxyForThread( | 94 return content::BrowserThread::GetMessageLoopProxyForThread( |
95 content::BrowserThread::IO); | 95 content::BrowserThread::IO); |
96 } | 96 } |
97 | 97 |
98 net::HostResolver* BlimpURLRequestContextGetter::host_resolver() { | 98 net::HostResolver* BlimpURLRequestContextGetter::host_resolver() { |
99 return url_request_context_->host_resolver(); | 99 return url_request_context_->host_resolver(); |
100 } | 100 } |
101 | 101 |
102 } // namespace engine | 102 } // namespace engine |
103 } // namespace blimp | 103 } // namespace blimp |
OLD | NEW |