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

Side by Side Diff: content/app/android/user_agent.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
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 "content/app/android/user_agent.h" 5 #include "content/app/android/user_agent.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 "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "jni/user_agent_jni.h" 10 #include "jni/UserAgent_jni.h"
11 11
12 using base::android::AttachCurrentThread; 12 using base::android::AttachCurrentThread;
13 using base::android::ScopedJavaLocalRef; 13 using base::android::ScopedJavaLocalRef;
14 using base::android::ConvertJavaStringToUTF8; 14 using base::android::ConvertJavaStringToUTF8;
15 using base::android::GetApplicationContext; 15 using base::android::GetApplicationContext;
16 16
17 namespace content { 17 namespace content {
18 18
19 std::string GetUserAgentOSInfo() { 19 std::string GetUserAgentOSInfo() {
20 JNIEnv* env = AttachCurrentThread(); 20 JNIEnv* env = AttachCurrentThread();
21 ScopedJavaLocalRef<jstring> os_info = 21 ScopedJavaLocalRef<jstring> os_info =
22 Java_UserAgent_getUserAgentOSInfo(env); 22 Java_UserAgent_getUserAgentOSInfo(env);
23 return ConvertJavaStringToUTF8(os_info); 23 return ConvertJavaStringToUTF8(os_info);
24 } 24 }
25 25
26 bool RegisterUserAgent(JNIEnv* env) { 26 bool RegisterUserAgent(JNIEnv* env) {
27 return RegisterNativesImpl(env); 27 return RegisterNativesImpl(env);
28 } 28 }
29 29
30 } // namespace content 30 } // namespace content
OLDNEW
« no previous file with comments | « content/app/android/sandboxed_process_service.cc ('k') | content/browser/android/android_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698