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, ...@@ -40,20 +40,19 @@ bool FindSearchBoxElement(IUIAutomation* automation,
L"SystemSettings_StorageSense_AppSizesListFilter_DisplayStringValue"); L"SystemSettings_StorageSense_AppSizesListFilter_DisplayStringValue");
Microsoft::WRL::ComPtr<IUIAutomationCondition> condition; Microsoft::WRL::ComPtr<IUIAutomationCondition> condition;
HRESULT result = automation->CreatePropertyCondition( HRESULT result = automation->CreatePropertyCondition(
UIA_AutomationIdPropertyId, search_box_id, condition.GetAddressOf()); UIA_AutomationIdPropertyId, search_box_id, &condition);
if (FAILED(result)) if (FAILED(result))
return false; return false;
Microsoft::WRL::ComPtr<IUIAutomationTreeWalker> tree_walker; Microsoft::WRL::ComPtr<IUIAutomationTreeWalker> tree_walker;
result = result = automation->CreateTreeWalker(condition.Get(), &tree_walker);
automation->CreateTreeWalker(condition.Get(), tree_walker.GetAddressOf());
if (FAILED(result)) if (FAILED(result))
return false; return false;
// Setup a cache request so that the element contains the needed property // Setup a cache request so that the element contains the needed property
// afterwards. // afterwards.
Microsoft::WRL::ComPtr<IUIAutomationCacheRequest> cache_request; Microsoft::WRL::ComPtr<IUIAutomationCacheRequest> cache_request;
result = automation->CreateCacheRequest(cache_request.GetAddressOf()); result = automation->CreateCacheRequest(&cache_request);
if (FAILED(result)) if (FAILED(result))
return false; return false;
cache_request->AddPattern(UIA_ValuePatternId); cache_request->AddPattern(UIA_ValuePatternId);
...@@ -214,12 +213,12 @@ void UninstallAppController::AutomationControllerDelegate::OnFocusChangedEvent( ...@@ -214,12 +213,12 @@ void UninstallAppController::AutomationControllerDelegate::OnFocusChangedEvent(
return; return;
Microsoft::WRL::ComPtr<IUIAutomationElement> search_box; Microsoft::WRL::ComPtr<IUIAutomationElement> search_box;
if (!FindSearchBoxElement(automation, sender, search_box.GetAddressOf())) if (!FindSearchBoxElement(automation, sender, &search_box))
return; return;
Microsoft::WRL::ComPtr<IUIAutomationValuePattern> value_pattern; Microsoft::WRL::ComPtr<IUIAutomationValuePattern> value_pattern;
HRESULT result = search_box->GetCachedPatternAs( HRESULT result = search_box->GetCachedPatternAs(UIA_ValuePatternId,
UIA_ValuePatternId, IID_PPV_ARGS(value_pattern.GetAddressOf())); IID_PPV_ARGS(&value_pattern));
if (FAILED(result)) if (FAILED(result))
return; 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