android: fix base::Time::FromLocalExploded() crash.

This patch does the following:

- Provide a work-around for an Android platform bug that
  happens on older Android releases (e.g. 4.1.2), but fixed
  on later ones (e.g. 4.3), where mktime() / mktime64()
  would return -1 even when passed proper time values.

- Improve the code to properly deal with the fact that
  SysTime is actually int64 on Android, unlike other
  platforms, allowing us to remove the CHECK() that
  was triggered by the platform bug.

- Add a new unit test to verify that the new code
  doesn't crash on Android 4.1.2 anymore, and returns
  the correct values.

BUG=287821
R=jar@chromium.org,mark@chromium.org,brettw@chromium.org

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

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


CrOS-Libchrome-Original-Commit: 2a278516943eee02e0206506a4b907fc0b55f27b
2 files changed
tree: 05964c0152d6137ade4119966e962ecf47eca52f
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. ipc/
  6. mojo/
  7. testing/
  8. third_party/
  9. ui/