Chromium Code Reviews| Index: content/browser/android/browser_startup_controller.cc |
| diff --git a/content/browser/android/browser_startup_controller.cc b/content/browser/android/browser_startup_controller.cc |
| index 6b90ce262d87526ad738249ee58fc10765ec969d..a46c5d5c8dfc5c67b5dc61bf8c6b1d066d6ab2ec 100644 |
| --- a/content/browser/android/browser_startup_controller.cc |
| +++ b/content/browser/android/browser_startup_controller.cc |
| @@ -5,6 +5,12 @@ |
| #include "content/browser/android/browser_startup_controller.h" |
| #include "base/android/jni_android.h" |
| +#include "base/android/jni_string.h" |
| +#include "base/debug/debugger.h" |
|
nyquist
2013/08/23 06:28:32
unused import?
aberent
2013/08/23 11:40:21
Done.
Sorry, copied from old android_browser_proc
|
| +#include "base/logging.h" |
|
nyquist
2013/08/23 06:28:32
unused import?
aberent
2013/08/23 11:40:21
Done.
|
| +#include "content/browser/android/content_startup_flags.h" |
| +#include "content/public/common/content_constants.h" |
|
nyquist
2013/08/23 06:28:32
unused import?
aberent
2013/08/23 11:40:21
Done.
|
| + |
| #include "jni/BrowserStartupController_jni.h" |
| namespace content { |
| @@ -22,4 +28,32 @@ void BrowserStartupComplete(int result) { |
| bool RegisterBrowserStartupController(JNIEnv* env) { |
| return RegisterNativesImpl(env); |
| } |
| + |
| +static void SetCommandLineFlags(JNIEnv* env, |
| + jclass clazz, |
| + jint max_render_process_count, |
| + jstring plugin_descriptor) { |
| + std::string plugin_str = |
| + (plugin_descriptor == NULL |
| + ? std::string() |
| + : base::android::ConvertJavaStringToUTF8(env, plugin_descriptor)); |
| + SetContentCommandLineFlags(max_render_process_count, plugin_str); |
| +} |
| + |
| +static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { |
| +#if defined(OFFICIAL_BUILD) |
| + return true; |
| +#else |
| + return false; |
| +#endif |
| +} |
| + |
| +static jboolean IsPluginEnabled(JNIEnv* env, jclass clazz) { |
| +#if defined(ENABLE_PLUGINS) |
| + return true; |
| +#else |
| + return false; |
| +#endif |
| +} |
| + |
| } // namespace content |