Move destruction of WebRtcLogUploader to post threads teardown.

Needs to outlive the file thread.

Fixes rare crash.

BUG=344892

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253551 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 253551
API to Convert Java Bitmap Config to SkBitmap::Config

This patch implements a generic way of mapping Java Bitmap Config to SkBitmap::Config.
And we use this API by providing GetScaledContentBitmap with a extra config parameter.
It helps in passing the Bitmap.Config.Format from java directly to native, where we can
directly get the SkBitmap::Config.

BUG=342822

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253552 0039d316-1c4b-4281-b951-d872f2087c98
Pepper: Use calloc instead of malloc(sizeof * count)

Using calloc is preferred, since 'sizeof * count' can overflow
resulting in less memory being allocated than expected.
Integer overflow becomes heap buffer overflow. This pattern
is in general readily exploitable.

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

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