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

Side by Side Diff: base/android/build_info.cc

Issue 10798010: Uses gyp "rules" rather than "actions" templates for the JNI generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo on content_jni.gypi Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/android/jni_generator/jni_generator.gyp » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/android/build_info.h" 5 #include "base/android/build_info.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "jni/build_info_jni.h" 14 #include "jni/BuildInfo_jni.h"
15 15
16 namespace { 16 namespace {
17 17
18 // The caller takes ownership of the returned const char*. 18 // The caller takes ownership of the returned const char*.
19 const char* StrDupJString(const base::android::JavaRef<jstring>& java_string) { 19 const char* StrDupJString(const base::android::JavaRef<jstring>& java_string) {
20 std::string str = ConvertJavaStringToUTF8(java_string); 20 std::string str = ConvertJavaStringToUTF8(java_string);
21 return strdup(str.c_str()); 21 return strdup(str.c_str());
22 } 22 }
23 23
24 } // namespace 24 } // namespace
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 java_exception_info_ = strndup(info.c_str(), 1024); 64 java_exception_info_ = strndup(info.c_str(), 1024);
65 } 65 }
66 66
67 // static 67 // static
68 bool BuildInfo::RegisterBindings(JNIEnv* env) { 68 bool BuildInfo::RegisterBindings(JNIEnv* env) {
69 return RegisterNativesImpl(env); 69 return RegisterNativesImpl(env);
70 } 70 }
71 71
72 } // namespace android 72 } // namespace android
73 } // namespace base 73 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/android/jni_generator/jni_generator.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698