Index: ios/web/shell/shell_url_request_context_getter.mm |
diff --git a/ios/web/shell/shell_url_request_context_getter.mm b/ios/web/shell/shell_url_request_context_getter.mm |
index 6fc3e7a77621d49cf75d82e70029fd2c9fbd3248..02ad8d7432ed21e7769fb8bfc9e162b71cb912bb 100644 |
--- a/ios/web/shell/shell_url_request_context_getter.mm |
+++ b/ios/web/shell/shell_url_request_context_getter.mm |
@@ -77,10 +77,10 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { |
web::WebThread::GetBlockingPool()->GetSequencedTaskRunner( |
web::WebThread::GetBlockingPool()->GetSequenceToken()), |
true, nullptr); |
- scoped_refptr<net::CookieStoreIOS> cookie_store = |
- new net::CookieStoreIOS(persistent_store.get()); |
- storage_->set_cookie_store(cookie_store.get()); |
+ scoped_ptr<net::CookieStoreIOS> cookie_store( |
+ new net::CookieStoreIOS(persistent_store.get())); |
net::CookieStoreIOS::SwitchSynchronizedStore(nullptr, cookie_store.get()); |
+ storage_->set_cookie_store(std::move(cookie_store)); |
std::string user_agent = web::GetWebClient()->GetUserAgent(false); |
storage_->set_http_user_agent_settings(make_scoped_ptr( |