Move the guts of user_metrics to a new static lib in //base/metrics.

I retained a couple of wrapper functions in content that post back to the UI thread if they are called from another thread. All existing code will continue to use these wrappers. The intent is that some code that I don't want to depend on content that only lives on the UI thread can now call //base/metrics code directly.

R=isherman@chromium.org, jam@chromium.org
http://crbug.com/332504

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244580 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 244580
Added check in URLFetcher's Finish() to prevent crash.

In some error cases, Finish() can be called after CloseAndDeleteFile(),
which will cause a crash if the latter function resets file_stream_.

BUG=330642

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244581 0039d316-1c4b-4281-b951-d872f2087c98
Add message_util utility.

This utility operates on Juri's saved IPC message file format. We are going to need this to help slice and dice these files to make minimal reproductions, and to understand the order in which messages are being sent.

R=aedla@chromium.org, brettw@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244582 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 244582