Support initializing logging with a file descriptor rather than a path.

This CL adds an optional file descriptor to LoggingSettings, which can
be used to initialize logging to an already open file. Previously,
logging to a file required passing a path and letting the logging
system open() it for append. Passing a file-descriptor means that a
process can be sandboxed to have no access to the log directory, but
can still be passed a file-descriptor to log to.

This is needed for the Network Service on ChromeOS, whose logging needs
to be reinitialized to a new location after it's already started.

Bug: 977415
Change-Id: I2d07dc13a7e9f0f57d0802e4816628c181f183cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699477
Commit-Queue: Robbie McElrath <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Achuith Bhandarkar <[email protected]>
Reviewed-by: Will Harris <[email protected]>
Reviewed-by: Wez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688754}
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index d7a7e0f..56c9d57 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -301,7 +301,7 @@
 
   LoggingSettings settings;
   settings.logging_dest = logging_dest;
-  settings.log_file = log_path.value().c_str();
+  settings.log_file_path = log_path.value().c_str();
   settings.lock_log = log_locking_state;
   settings.delete_old = delete_old_log_file;
   bool success = InitLogging(settings);