| OLD | NEW |
| 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/browser/android/android_browser_process.h" | 5 #include "content/browser/android/android_browser_process.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/browser/android/content_startup_flags.h" | 10 #include "content/browser/android/content_startup_flags.h" |
| 11 #include "content/public/common/content_constants.h" | 11 #include "content/public/common/content_constants.h" |
| 12 #include "jni/android_browser_process_jni.h" | 12 #include "jni/AndroidBrowserProcess_jni.h" |
| 13 | 13 |
| 14 using base::android::ConvertJavaStringToUTF8; | 14 using base::android::ConvertJavaStringToUTF8; |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 static void SetCommandLineFlags(JNIEnv*env, | 18 static void SetCommandLineFlags(JNIEnv*env, |
| 19 jclass clazz, | 19 jclass clazz, |
| 20 jint max_render_process_count, | 20 jint max_render_process_count, |
| 21 jstring plugin_descriptor) { | 21 jstring plugin_descriptor) { |
| 22 std::string plugin_str = ConvertJavaStringToUTF8(env, plugin_descriptor); | 22 std::string plugin_str = ConvertJavaStringToUTF8(env, plugin_descriptor); |
| 23 SetContentCommandLineFlags(max_render_process_count, plugin_str); | 23 SetContentCommandLineFlags(max_render_process_count, plugin_str); |
| 24 } | 24 } |
| 25 | 25 |
| 26 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { | 26 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { |
| 27 #if defined(OFFICIAL_BUILD) | 27 #if defined(OFFICIAL_BUILD) |
| 28 return true; | 28 return true; |
| 29 #else | 29 #else |
| 30 return false; | 30 return false; |
| 31 #endif | 31 #endif |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool RegisterAndroidBrowserProcess(JNIEnv* env) { | 34 bool RegisterAndroidBrowserProcess(JNIEnv* env) { |
| 35 return RegisterNativesImpl(env); | 35 return RegisterNativesImpl(env); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| OLD | NEW |