Allow ConvertJavaStringTo* to be called with (JNIEnv, JavaRef).

Lots of places in the code currently call the two-arg version of
ConvertJavaStringTo* with a JNI method parameter, which is now relying
on the implicit conversion from JavaParamRef<jstring> to jstring. To
avoid this, define a two-arg version that takes a JavaRef as the second
parameter. If we have the environment it's more efficient to keep it
around rather than change all the callers to the one-arg version, since
the one-arg version has to call AttachCurrentThread.

BUG=506850
R=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#348874}


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