| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/web/shell/shell_url_request_context_getter.h" | 5 #include "ios/web/shell/shell_url_request_context_getter.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 DCHECK(cookie_path_found); | 79 DCHECK(cookie_path_found); |
| 80 cookie_path = cookie_path.Append("WebShell").Append("Cookies"); | 80 cookie_path = cookie_path.Append("WebShell").Append("Cookies"); |
| 81 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store = | 81 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store = |
| 82 new net::SQLitePersistentCookieStore( | 82 new net::SQLitePersistentCookieStore( |
| 83 cookie_path, network_task_runner_, | 83 cookie_path, network_task_runner_, |
| 84 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner( | 84 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner( |
| 85 web::WebThread::GetBlockingPool()->GetSequenceToken()), | 85 web::WebThread::GetBlockingPool()->GetSequenceToken()), |
| 86 true, nullptr); | 86 true, nullptr); |
| 87 std::unique_ptr<net::CookieStoreIOS> cookie_store( | 87 std::unique_ptr<net::CookieStoreIOS> cookie_store( |
| 88 new net::CookieStoreIOS(persistent_store.get())); | 88 new net::CookieStoreIOS(persistent_store.get())); |
| 89 net::CookieStoreIOS::SwitchSynchronizedStore(nullptr, cookie_store.get()); | |
| 90 storage_->set_cookie_store(std::move(cookie_store)); | 89 storage_->set_cookie_store(std::move(cookie_store)); |
| 91 | 90 |
| 92 std::string user_agent = web::GetWebClient()->GetUserAgent(false); | 91 std::string user_agent = web::GetWebClient()->GetUserAgent(false); |
| 93 storage_->set_http_user_agent_settings( | 92 storage_->set_http_user_agent_settings( |
| 94 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en", | 93 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en", |
| 95 user_agent)); | 94 user_agent)); |
| 96 storage_->set_proxy_service( | 95 storage_->set_proxy_service( |
| 97 net::ProxyService::CreateUsingSystemProxyResolver( | 96 net::ProxyService::CreateUsingSystemProxyResolver( |
| 98 std::move(proxy_config_service_), 0, | 97 std::move(proxy_config_service_), 0, |
| 99 url_request_context_->net_log())); | 98 url_request_context_->net_log())); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 168 |
| 170 return url_request_context_.get(); | 169 return url_request_context_.get(); |
| 171 } | 170 } |
| 172 | 171 |
| 173 scoped_refptr<base::SingleThreadTaskRunner> | 172 scoped_refptr<base::SingleThreadTaskRunner> |
| 174 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { | 173 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { |
| 175 return network_task_runner_; | 174 return network_task_runner_; |
| 176 } | 175 } |
| 177 | 176 |
| 178 } // namespace web | 177 } // namespace web |
| OLD | NEW |