Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Issue 2838923004: logPrivate API: prevent log dump from trying to use a non-native path (Closed)

Created:
3 years, 8 months ago by nicholasbishop
Modified:
3 years, 8 months ago
Reviewers:
Finnur
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

logPrivate 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc View 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
nicholasbishop
3 years, 8 months ago (2017-04-26 00:56:24 UTC) #2
Finnur
LGTM
3 years, 8 months ago (2017-04-26 13:50:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2838923004/1
3 years, 8 months ago (2017-04-26 14:29:06 UTC) #5
commit-bot: I haz the power
3 years, 8 months ago (2017-04-26 14:56:57 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/02ebdb393ac0b4c2651881ce8b6a...

Powered by Google App Engine
This is Rietveld 408576698