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