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

Side by Side Diff: ios/web_view/internal/criwv_url_request_context_getter.mm

Issue 2649083002: Divide CookieStoreIOS into two different classes with different backends (Closed)
Patch Set: fix compilation Created 3 years, 10 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/criwv_url_request_context_getter.h" 5 #include "ios/web_view/internal/criwv_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"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/threading/worker_pool.h" 14 #include "base/threading/worker_pool.h"
15 #import "ios/net/cookies/cookie_store_ios.h" 15 #import "ios/net/cookies/cookie_store_ios_persistent.h"
16 #import "ios/web/public/web_client.h" 16 #import "ios/web/public/web_client.h"
17 #include "ios/web/public/web_thread.h" 17 #include "ios/web/public/web_thread.h"
18 #include "ios/web_view/internal/criwv_network_delegate.h" 18 #include "ios/web_view/internal/criwv_network_delegate.h"
19 #include "net/base/cache_type.h" 19 #include "net/base/cache_type.h"
20 #include "net/cert/cert_verifier.h" 20 #include "net/cert/cert_verifier.h"
21 #include "net/dns/host_resolver.h" 21 #include "net/dns/host_resolver.h"
22 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" 22 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
23 #include "net/http/http_auth_handler_factory.h" 23 #include "net/http/http_auth_handler_factory.h"
24 #include "net/http/http_cache.h" 24 #include "net/http/http_cache.h"
25 #include "net/http/http_network_session.h" 25 #include "net/http/http_network_session.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool cookie_path_found = PathService::Get(base::DIR_APP_DATA, &cookie_path); 71 bool cookie_path_found = PathService::Get(base::DIR_APP_DATA, &cookie_path);
72 DCHECK(cookie_path_found); 72 DCHECK(cookie_path_found);
73 cookie_path = cookie_path.Append("WebShell").Append("Cookies"); 73 cookie_path = cookie_path.Append("WebShell").Append("Cookies");
74 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store = 74 scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store =
75 new net::SQLitePersistentCookieStore( 75 new net::SQLitePersistentCookieStore(
76 cookie_path, network_task_runner_, 76 cookie_path, network_task_runner_,
77 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner( 77 web::WebThread::GetBlockingPool()->GetSequencedTaskRunner(
78 web::WebThread::GetBlockingPool()->GetSequenceToken()), 78 web::WebThread::GetBlockingPool()->GetSequenceToken()),
79 true, nullptr); 79 true, nullptr);
80 std::unique_ptr<net::CookieStoreIOS> cookie_store( 80 std::unique_ptr<net::CookieStoreIOS> cookie_store(
81 new net::CookieStoreIOS(persistent_store.get())); 81 new net::CookieStoreIOSPersistent(persistent_store.get()));
82 storage_->set_cookie_store(std::move(cookie_store)); 82 storage_->set_cookie_store(std::move(cookie_store));
83 83
84 std::string user_agent = web::GetWebClient()->GetUserAgent(false); 84 std::string user_agent = web::GetWebClient()->GetUserAgent(false);
85 85
86 storage_->set_http_user_agent_settings( 86 storage_->set_http_user_agent_settings(
87 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en", 87 base::MakeUnique<net::StaticHttpUserAgentSettings>("en-us,en",
88 user_agent)); 88 user_agent));
89 storage_->set_proxy_service( 89 storage_->set_proxy_service(
90 net::ProxyService::CreateUsingSystemProxyResolver( 90 net::ProxyService::CreateUsingSystemProxyResolver(
91 std::move(proxy_config_service_), 0, 91 std::move(proxy_config_service_), 0,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 return url_request_context_.get(); 155 return url_request_context_.get();
156 } 156 }
157 157
158 scoped_refptr<base::SingleThreadTaskRunner> 158 scoped_refptr<base::SingleThreadTaskRunner>
159 CRIWVURLRequestContextGetter::GetNetworkTaskRunner() const { 159 CRIWVURLRequestContextGetter::GetNetworkTaskRunner() const {
160 return network_task_runner_; 160 return network_task_runner_;
161 } 161 }
162 162
163 } // namespace ios_web_view 163 } // namespace ios_web_view
OLDNEW
« ios/net/cookies/cookie_store_ios.mm ('K') | « ios/web/shell/shell_url_request_context_getter.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698