crash-reporter: Remove some dependency on /proc

Make the existence of a crashing process's /proc/<PID>/ directory optional
for all of crash_reporter, except for core2md.  In particular, have the
kernel pass the UID of the crashing process to crash_reporter in case the
"status" file is unavailable.

BUG=chromium-os:34385
TEST=Ran unittests and autotests
CQ-DEPEND=I6048d3eb84f8188bee6a755eaa010510f5d2459b

Change-Id: I62df52cab44cf1febc7ed3e55b75bcffa0daf524
Reviewed-on: https://gerrit.chromium.org/gerrit/34078
Commit-Queue: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
diff --git a/crash_reporter/user_collector.h b/crash_reporter/user_collector.h
index 01ca2af..26f2b72 100644
--- a/crash_reporter/user_collector.h
+++ b/crash_reporter/user_collector.h
@@ -104,7 +104,7 @@
   FilePath GetProcessPath(pid_t pid);
   bool GetSymlinkTarget(const FilePath &symlink,
                         FilePath *target);
-  bool GetExecutableBaseNameFromPid(uid_t pid,
+  bool GetExecutableBaseNameFromPid(pid_t pid,
                                     std::string *base_name);
   // Returns, via |line|, the first line in |lines| that starts with |prefix|.
   // Returns true if a line is found, or false otherwise.
@@ -149,7 +149,7 @@
   // and creates the directory if necessary with appropriate permissions.
   // Returns true whether or not directory needed to be created, false on
   // any failure.
-  bool GetCreatedCrashDirectory(pid_t pid,
+  bool GetCreatedCrashDirectory(pid_t pid, uid_t supplied_ruid,
                                 FilePath *crash_file_path,
                                 bool *out_of_capacity);
   bool CopyStdinToCoreFile(const FilePath &core_path);
@@ -161,10 +161,10 @@
                                   const FilePath &container_dir,
                                   const FilePath &core_path,
                                   const FilePath &minidump_path);
-  ErrorType ConvertAndEnqueueCrash(int pid, const std::string &exec_name,
-                                   bool *out_of_capacity);
+  ErrorType ConvertAndEnqueueCrash(pid_t pid, const std::string &exec_name,
+                                   uid_t supplied_ruid, bool *out_of_capacity);
   bool ParseCrashAttributes(const std::string &crash_attributes,
-                            pid_t *pid, int *signal,
+                            pid_t *pid, int *signal, uid_t *uid,
                             std::string *kernel_supplied_name);
 
   bool ShouldDump(bool has_owner_consent,