Make all tests profilable

We did not run profiling on unit and perf tests even when the
enable_profiling build flag was present. In order to dump profiling data,
base::debug::StartProfiling(..) must be called somewhere. I've moved that
code to base::TestSuite. Note that this code is a no-op unless the profiling
build flag is present.

BUG=624459
TBR=sky@chromium.org

Review-Url: https://codereview.chromium.org/2131293002
Cr-Commit-Position: refs/heads/master@{#404522}


CrOS-Libchrome-Original-Commit: 2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626
diff --git a/base/base_switches.cc b/base/base_switches.cc
index fa0bc33..f5c6eb3 100644
--- a/base/base_switches.cc
+++ b/base/base_switches.cc
@@ -89,6 +89,16 @@
 // chrome://profiler.
 const char kProfilerTimingDisabledValue[]   = "0";
 
+// Specifies a location for profiling output. This will only work if chrome has
+// been built with the gyp variable profiling=1 or gn arg enable_profiling=true.
+//
+//   {pid} if present will be replaced by the pid of the process.
+//   {count} if present will be incremented each time a profile is generated
+//           for this process.
+// The default is chrome-profile-{pid} for the browser and test-profile-{pid}
+// for tests.
+const char kProfilingFile[] = "profiling-file";
+
 #if defined(OS_WIN)
 // Disables the USB keyboard detection for blocking the OSK on Win8+.
 const char kDisableUsbKeyboardDetect[]      = "disable-usb-keyboard-detect";