Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chromecast/base/android/dumpstate_writer.cc

Issue 2199973003: Android JNI gen: Don't emit code for empty RegisterNatives() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg1
Patch Set: Android JNI gen: Don't emit code for empty RegisterNatives() Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/base/android/dumpstate_writer.h ('k') | chromecast/base/cast_sys_info_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/base/android/dumpstate_writer.h" 5 #include "chromecast/base/android/dumpstate_writer.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "jni/DumpstateWriter_jni.h" 9 #include "jni/DumpstateWriter_jni.h"
10 10
11 namespace chromecast { 11 namespace chromecast {
12 12
13 // static 13 // static
14 bool DumpstateWriter::RegisterJni(JNIEnv* env) {
15 return RegisterNativesImpl(env);
16 }
17
18 // static
19 void DumpstateWriter::AddDumpValue(const std::string& name, 14 void DumpstateWriter::AddDumpValue(const std::string& name,
20 const std::string& value) { 15 const std::string& value) {
21 JNIEnv* env = base::android::AttachCurrentThread(); 16 JNIEnv* env = base::android::AttachCurrentThread();
22 Java_DumpstateWriter_addDumpValue( 17 Java_DumpstateWriter_addDumpValue(
23 env, 18 env,
24 base::android::ConvertUTF8ToJavaString(env, name).obj(), 19 base::android::ConvertUTF8ToJavaString(env, name).obj(),
25 base::android::ConvertUTF8ToJavaString(env, value).obj()); 20 base::android::ConvertUTF8ToJavaString(env, value).obj());
26 } 21 }
27 22
28 } // namespace chromecast 23 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/base/android/dumpstate_writer.h ('k') | chromecast/base/cast_sys_info_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698