Commit 6253d7ca authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

Remove the use of ComPtr's GetAddressOf in uninstall_application_win.cc

This fixes a presubmit error when modifying this file.

Bug: 914910
Change-Id: I58210d65f15d2d19a7a29e51067964ff68557cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1592763
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659112}
parent 8e956337
......@@ -40,20 +40,19 @@ bool FindSearchBoxElement(IUIAutomation* automation,
L"SystemSettings_StorageSense_AppSizesListFilter_DisplayStringValue");
Microsoft::WRL::ComPtr<IUIAutomationCondition> condition;
HRESULT result = automation->CreatePropertyCondition(
UIA_AutomationIdPropertyId, search_box_id, condition.GetAddressOf());
UIA_AutomationIdPropertyId, search_box_id, &condition);
if (FAILED(result))
return false;
Microsoft::WRL::ComPtr<IUIAutomationTreeWalker> tree_walker;
result =
automation->CreateTreeWalker(condition.Get(), tree_walker.GetAddressOf());
result = automation->CreateTreeWalker(condition.Get(), &tree_walker);
if (FAILED(result))
return false;
// Setup a cache request so that the element contains the needed property
// afterwards.
Microsoft::WRL::ComPtr<IUIAutomationCacheRequest> cache_request;
result = automation->CreateCacheRequest(cache_request.GetAddressOf());
result = automation->CreateCacheRequest(&cache_request);
if (FAILED(result))
return false;
cache_request->AddPattern(UIA_ValuePatternId);
......@@ -214,12 +213,12 @@ void UninstallAppController::AutomationControllerDelegate::OnFocusChangedEvent(
return;
Microsoft::WRL::ComPtr<IUIAutomationElement> search_box;
if (!FindSearchBoxElement(automation, sender, search_box.GetAddressOf()))
if (!FindSearchBoxElement(automation, sender, &search_box))
return;
Microsoft::WRL::ComPtr<IUIAutomationValuePattern> value_pattern;
HRESULT result = search_box->GetCachedPatternAs(
UIA_ValuePatternId, IID_PPV_ARGS(value_pattern.GetAddressOf()));
HRESULT result = search_box->GetCachedPatternAs(UIA_ValuePatternId,
IID_PPV_ARGS(&value_pattern));
if (FAILED(result))
return;
......
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