Commit 9e12d074 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //chrome/browser/apps/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: Ic7e3f55119dd266d166ca9a40c382b386de13754
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2549442Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830151}
parent 86f35c52
......@@ -768,8 +768,9 @@ void ArcApps::LaunchAppWithIntent(const std::string& app_id,
}
if (intent->mime_type.has_value() && intent->file_urls.has_value()) {
const auto file_urls = intent->file_urls.value();
file_manager::util::ConvertToContentUrls(
apps::GetFileSystemURL(profile_, intent->file_urls.value()),
apps::GetFileSystemURL(profile_, file_urls),
base::BindOnce(&OnContentUrlResolved, std::move(intent),
std::move(activity)));
return;
......
......@@ -56,12 +56,14 @@ void DigitalGoodsFactoryImpl::CreateDigitalGoods(
std::move(callback).Run(payments::mojom::CreateDigitalGoodsResponseCode::
kUnsupportedPaymentMethod,
/*digital_goods=*/mojo::NullRemote());
return;
}
if (apps::GetTwaPackageName(render_frame_host_).empty()) {
std::move(callback).Run(
payments::mojom::CreateDigitalGoodsResponseCode::kUnsupportedContext,
/*digital_goods=*/mojo::NullRemote());
return;
}
// TODO(jshikaram): check with Android if there is a payment_method available.
......
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