Part I: Move from base::Bind to base::BindOnce and remove unneeded base::Passed (#12661)

This commit is contained in:
Robo 2018-04-20 16:25:05 +05:30 committed by Cheng Zhao
parent fcc82ebd35
commit ff571f3b5d
26 changed files with 143 additions and 135 deletions

View file

@ -23,7 +23,7 @@ void HandlerCallback(const BeforeStartCallback& before_start,
v8::Local<v8::Value> value;
if (!args->GetNext(&value)) {
content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
base::Bind(callback, false, nullptr));
base::BindOnce(callback, false, nullptr));
return;
}
@ -36,7 +36,7 @@ void HandlerCallback(const BeforeStartCallback& before_start,
std::unique_ptr<base::Value> options(converter.FromV8Value(value, context));
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
base::Bind(callback, true, base::Passed(&options)));
base::BindOnce(callback, true, std::move(options)));
}
} // namespace