Add UMA tracking for warm start time.

This adds UMA tracking for Startup.WarmStartTimeFromRemoteProcessStart, which
is the time between when a chrome process starts and when it successfully
notifies an already running process of its existence.

BUG=238591
[email protected], [email protected]

Review URL: https://codereview.chromium.org/15021013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199655 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index fe40b96..f8aaf81 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -10,8 +10,11 @@
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/path_service.h"
+#include "base/process_info.h"
 #include "base/process_util.h"
 #include "base/stringprintf.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/time.h"
 #include "base/utf_string_conversions.h"
 #include "base/win/metro.h"
 #include "base/win/registry.h"
@@ -328,6 +331,12 @@
   to_send.append(cur_dir.value());
   to_send.append(L"\0", 1);  // Null separator.
   to_send.append(::GetCommandLineW());
+  // Add the process start time as a flag.
+  to_send.append(L" --");
+  to_send.append(ASCIIToWide(switches::kOriginalProcessStartTime));
+  to_send.append(L"=");
+  to_send.append(base::Int64ToString16(
+      base::CurrentProcessInfo::CreationTime()->ToInternalValue()));
   to_send.append(L"\0", 1);  // Null separator.
 
   base::win::ScopedHandle process_handle;