Commit f4345068 authored by Sorin Jianu's avatar Sorin Jianu Committed by Commit Bot

Bind COM calls directly in chrome/updater/server/win.

base::Bind can now bind __stdcall calls and indirection through
lambdas is not needed.

Bug: 1053729
Change-Id: Id9381a9370db07319f2e0998827b726a722281c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132932Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755530}
parent 26dae69e
......@@ -229,7 +229,6 @@ HRESULT UpdaterImpl::Update(const base::char16* app_id) {
// Called by the COM RPC runtime on one of its threads.
HRESULT UpdaterImpl::UpdateAll(IUpdaterObserver* observer) {
using IUpdaterObserverPtr = Microsoft::WRL::ComPtr<IUpdaterObserver>;
using ICompleteStatusPtr = Microsoft::WRL::ComPtr<ICompleteStatus>;
// Invoke the in-process |update_service| on the main sequence.
auto com_server = ComServer::Instance();
......@@ -250,11 +249,7 @@ HRESULT UpdaterImpl::UpdateAll(IUpdaterObserver* observer) {
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock()},
base::BindOnce(
[](IUpdaterObserverPtr observer,
ICompleteStatusPtr status) {
return observer->OnComplete(status.Get());
},
observer,
&IUpdaterObserver::OnComplete, observer,
Microsoft::WRL::Make<CompleteStatusImpl>(
static_cast<int>(result), L"Test")),
base::BindOnce([](HRESULT hr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment