[Logging] Make /var/log/chrome/chrome relative

This is more convenient for downloaded log archives.

Bug: 976821
Change-Id: If9c65729fa7f20dd080bbde5aa3873bcfbac7a22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671527
Reviewed-by: Mike Frysinger <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: Vladislav Kuzkokov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#672545}
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 173b5041..d7a7e0f 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -212,9 +212,10 @@
     }
   }
   // If all went well, the symlink no longer exists.  Recreate it.
-  if (!base::CreateSymbolicLink(target_path, symlink_path)) {
+  base::FilePath relative_target_path = target_path.BaseName();
+  if (!base::CreateSymbolicLink(relative_target_path, symlink_path)) {
     DPLOG(ERROR) << "Unable to create symlink " << symlink_path.value()
-                 << " pointing at " << target_path.value();
+                 << " pointing at " << relative_target_path.value();
   }
   return target_path;
 }