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

Side by Side Diff: ios/web_view/internal/web_view_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
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_view/internal/web_view_url_request_context_getter.h" 5 #include "ios/web_view/internal/web_view_url_request_context_getter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store = 78 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store =
79 new net::SQLitePersistentCookieStore( 79 new net::SQLitePersistentCookieStore(
80 cookie_path, network_task_runner_, 80 cookie_path, network_task_runner_,
81 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner( 81 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner(
82 web::WebThread::GetBlockingPool()->GetSequenceToken()), 82 web::WebThread::GetBlockingPool()->GetSequenceToken()),
83 true, nullptr); 83 true, nullptr);
84 std::unique_ptr<net::CookieStoreIOS> cookie_store( 84 std::unique_ptr<net::CookieStoreIOS> cookie_store(
85 new net::CookieStoreIOSPersistent(persistent_store.get())); 85 new net::CookieStoreIOSPersistent(persistent_store.get()));
86 storage_->set_cookie_store(std::move(cookie_store)); 86 storage_->set_cookie_store(std::move(cookie_store));
87 87
88 std::string user_agent = web::GetWebClient()->GetUserAgent(false); 88 std::string user_agent =
89 web::GetWebClient()->GetUserAgent(web::UserAgentType::MOBILE);
89 90
90 storage_->set_http_user_agent_settings( 91 storage_->set_http_user_agent_settings(
91 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en", 92 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en",
92 user_agent)); 93 user_agent));
93 storage_->set_proxy_service( 94 storage_->set_proxy_service(
94 net::ProxyService::CreateUsingSystemProxyResolver( 95 net::ProxyService::CreateUsingSystemProxyResolver(
95 std::move(proxy_config_service_), 0, 96 std::move(proxy_config_service_), 0,
96 url_request_context_->net_log())); 97 url_request_context_->net_log()));
97 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); 98 storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
98 storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); 99 storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 158
158 return url_request_context_.get(); 159 return url_request_context_.get();
159 } 160 }
160 161
161 scoped_refptr<base::SingleThreadTaskRunner> 162 scoped_refptr<base::SingleThreadTaskRunner>
162 WebViewURLRequestContextGetter::GetNetworkTaskRunner() const { 163 WebViewURLRequestContextGetter::GetNetworkTaskRunner() const {
163 return network_task_runner_; 164 return network_task_runner_;
164 } 165 }
165 166
166 } // namespace ios_web_view 167 } // namespace ios_web_view
OLDNEW
« no previous file with comments | « ios/web/web_state/web_view_internal_creation_util.mm ('k') | ios/web_view/internal/web_view_web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698