Commit 831d2daf authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Add debug to FilesApp ImportContainer call

If import fails for any reason such as being disallowed by policy,
it is helpful to log the result code.

TBR=juwa@google.com

Bug: 1003944
Change-Id: I38eff42f2981a8c166b1d7f4708879f1f3497de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808949Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697862}
parent 6046ca5c
...@@ -723,7 +723,15 @@ FileManagerPrivateInternalImportCrostiniImageFunction::Run() { ...@@ -723,7 +723,15 @@ FileManagerPrivateInternalImportCrostiniImageFunction::Run() {
crostini::CrostiniExportImport::GetForProfile(profile)->ImportContainer( crostini::CrostiniExportImport::GetForProfile(profile)->ImportContainer(
crostini::ContainerId{crostini::kCrostiniDefaultVmName, crostini::ContainerId{crostini::kCrostiniDefaultVmName,
crostini::kCrostiniDefaultContainerName}, crostini::kCrostiniDefaultContainerName},
path, base::DoNothing()); path,
base::BindOnce(
[](base::FilePath path, crostini::CrostiniResult result) {
if (result != crostini::CrostiniResult::SUCCESS) {
LOG(ERROR) << "Error importing crostini image " << path.value()
<< ": " << (int)result;
}
},
path));
return RespondNow(NoArguments()); return RespondNow(NoArguments());
} }
......
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