1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chromecast/base/android/dumpstate_writer.h"
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "jni/DumpstateWriter_jni.h"
11 namespace chromecast
{
14 bool DumpstateWriter::RegisterJni(JNIEnv
* env
) {
15 return RegisterNativesImpl(env
);
19 void DumpstateWriter::AddDumpValue(const std::string
& name
,
20 const std::string
& value
) {
21 JNIEnv
* env
= base::android::AttachCurrentThread();
22 Java_DumpstateWriter_addDumpValue(
24 base::android::ConvertUTF8ToJavaString(env
, name
).obj(),
25 base::android::ConvertUTF8ToJavaString(env
, value
).obj());
28 } // namespace chromecast