Ban raw pointers to ref-counted types on base::Bind

https://chromium-review.googlesource.com/c/chromium/src/+/549537
This commit is contained in:
Aleksei Kuzmin 2017-08-24 01:42:59 +03:00 committed by Cheng Zhao
parent 12a4321e2b
commit a9eb0cbec0
2 changed files with 5 additions and 3 deletions

View file

@ -623,7 +623,8 @@ void Session::SetUserAgent(const std::string& user_agent,
std::string accept_lang = l10n_util::GetApplicationLocale("");
args->GetNext(&accept_lang);
auto getter = browser_context_->GetRequestContext();
scoped_refptr<brightray::URLRequestContextGetter> getter(
browser_context_->GetRequestContext());
getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&SetUserAgentInIO, getter, accept_lang, user_agent));