mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Ban raw pointers to ref-counted types on base::Bind
https://chromium-review.googlesource.com/c/chromium/src/+/549537
This commit is contained in:
committed by
Cheng Zhao
parent
12a4321e2b
commit
a9eb0cbec0
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user