[debugd] return relative paths from GetUserLogFiles
This serves to handle multiprofile - Chrome becomes responsible for gluing the
paths to active profiles onto the paths returned by this method.
BUG=chromium:221779
TEST=adhoc
dbus-send --system --fixed --print-reply --dest=org.chromium.debugd \
/org/chromium/debugd org.chromium.debugd.GetUserLogFiles
This should output relative paths.
Change-Id: I79c78f2f0c7db5893a5877f436f90c5b9648040d
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48370
diff --git a/share/org.chromium.debugd.xml b/share/org.chromium.debugd.xml
index a99828b..786fc1f 100644
--- a/share/org.chromium.debugd.xml
+++ b/share/org.chromium.debugd.xml
@@ -228,6 +228,8 @@
<method name="GetUserLogFiles">
<tp:docstring>
Returns list of User log file names that Chrome itself must collect.
+ These logfiles are relative to the user's profile path and must be
+ collected separately for each user.
</tp:docstring>
<arg name="user_log_files" type="a{ss}" direction="out" />
</method>
diff --git a/src/log_tool.cc b/src/log_tool.cc
index ccdccf3..848c53c 100644
--- a/src/log_tool.cc
+++ b/src/log_tool.cc
@@ -175,9 +175,9 @@
// debugd is running under a VFS namespace and does not have access to later
// cryptohome mounts.
static const Log user_logs[] = {
- {"chrome_user_log", "/home/chronos/user/log/chrome"},
- {"login-times", "/home/chronos/user/login-times"},
- {"logout-times", "/home/chronos/user/logout-times"},
+ {"chrome_user_log", "log/chrome"},
+ {"login-times", "login-times"},
+ {"logout-times", "logout-times"},
{ NULL, NULL}
};