Chromium Code Reviews
DescriptionlogPrivate API: prevent log dump from trying to use a non-native path
The log dump directory is supposed to be under Downloads, but for a
logged-in user the download path is a non-native path:
/special/drive-<uid>/...
The logging code uses regular file system calls from base that fail
when encountering "/special".
There is a similar code path in
NetInternalsMessageHandler::OnStoreDebugLogs (net_internals_ui.cc)
which checks for a non-native download path and changes the path to
GetDefaultDownloadDirectoryForProfile; copying that logic to
GetLogDumpDirectory fixes the problem.
API reference: https://developer.chrome.com/extensions/logPrivate
BUG=None
TEST=Build with chromeos=1. Whitelist an extension to allow using the logPrivate API and have the extension call chrome.logPrivate.dumpLogs. Run the extension while logged in (not ephemeral user) and confirm that logs are dumped to Downloads/log_dumps.
Review-Url: https://codereview.chromium.org/2838923004
Cr-Commit-Position: refs/heads/master@{#467326}
Committed: https://chromium.googlesource.com/chromium/src/+/02ebdb393ac0b4c2651881ce8b6a08312c653474
Patch Set 1 #
Messages
Total messages: 8 (4 generated)
|
|||||||||||||||||||