From 6d0ac6593c905a49c74d1bc460f5bca47520e2bc Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 18 Apr 2018 17:44:21 +0530 Subject: [PATCH] [chromium-style] Complex class/struct needs an explicit out-of-line copy constructor. --- brightray/browser/url_request_context_getter.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index c14b2b9707ef..31219c5fa604 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -27,6 +27,7 @@ #include "net/cert/ct_log_verifier.h" #include "net/cert/ct_policy_enforcer.h" #include "net/cert/multi_log_ct_verifier.h" +#include "net/cookies/cookie_monster.h" #include "net/dns/mapped_host_resolver.h" #include "net/http/http_auth_filter.h" #include "net/http/http_auth_handler_factory.h" @@ -208,13 +209,16 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { auto cookie_path = in_memory_ ? base::FilePath() : base_path_.Append(FILE_PATH_LITERAL("Cookies")); - auto cookie_config = content::CookieStoreConfig( - cookie_path, content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, - nullptr); - cookie_config.cookieable_schemes = delegate_->GetCookieableSchemes(); std::unique_ptr cookie_store = - content::CreateCookieStore(cookie_config); + content::CreateCookieStore(content::CookieStoreConfig( + cookie_path, content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, + nullptr)); storage_->set_cookie_store(std::move(cookie_store)); + + // Set custom schemes that can accept cookies. + net::CookieMonster* cookie_monster = + static_cast(url_request_context_->cookie_store()); + cookie_monster->SetCookieableSchemes(delegate_->GetCookieableSchemes()); // Cookie store will outlive notifier by order of declaration // in the header. cookie_change_sub_ =