Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: ios/web/shell/shell_url_request_context_getter.mm

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/public/web_client.mm ('k') | ios/web/shell/shell_web_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CookieStoreIOSPersistent(persistent_store.get())); 88 new net::CookieStoreIOSPersistent(persistent_store.get()));
89 storage_->set_cookie_store(std::move(cookie_store)); 89 storage_->set_cookie_store(std::move(cookie_store));
90 90
91 std::string user_agent = web::GetWebClient()->GetUserAgent(false); 91 std::string user_agent =
92 web::GetWebClient()->GetUserAgent(web::UserAgentType::MOBILE);
92 storage_->set_http_user_agent_settings( 93 storage_->set_http_user_agent_settings(
93 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en", 94 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en",
94 user_agent)); 95 user_agent));
95 storage_->set_proxy_service( 96 storage_->set_proxy_service(
96 net::ProxyService::CreateUsingSystemProxyResolver( 97 net::ProxyService::CreateUsingSystemProxyResolver(
97 std::move(proxy_config_service_), 0, 98 std::move(proxy_config_service_), 0,
98 url_request_context_->net_log())); 99 url_request_context_->net_log()));
99 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); 100 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
100 storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); 101 storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
101 102
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 return url_request_context_.get(); 169 return url_request_context_.get();
169 } 170 }
170 171
171 scoped_refptr<base::SingleThreadTaskRunner> 172 scoped_refptr<base::SingleThreadTaskRunner>
172 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 173 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
173 return network_task_runner_; 174 return network_task_runner_;
174 } 175 }
175 176
176 } // namespace web 177 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/web_client.mm ('k') | ios/web/shell/shell_web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698