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

Side by Side Diff: content/browser/android/browser_startup_controller.cc

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address John(me)'s comments. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser_startup_controller.h" 5 #include "content/browser/android/browser_startup_controller.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 "content/browser/android/content_startup_flags.h" 9 #include "content/browser/android/content_startup_flags.h"
10 10
(...skipping 10 matching lines...) Expand all
21 JNIEnv* env = base::android::AttachCurrentThread(); 21 JNIEnv* env = base::android::AttachCurrentThread();
22 Java_BrowserStartupController_browserStartupComplete(env, result); 22 Java_BrowserStartupController_browserStartupComplete(env, result);
23 } 23 }
24 24
25 bool RegisterBrowserStartupController(JNIEnv* env) { 25 bool RegisterBrowserStartupController(JNIEnv* env) {
26 return RegisterNativesImpl(env); 26 return RegisterNativesImpl(env);
27 } 27 }
28 28
29 static void SetCommandLineFlags(JNIEnv* env, 29 static void SetCommandLineFlags(JNIEnv* env,
30 jclass clazz, 30 jclass clazz,
31 jint max_render_process_count, 31 jboolean single_process,
32 jstring plugin_descriptor) { 32 jstring plugin_descriptor) {
33 std::string plugin_str = 33 std::string plugin_str =
34 (plugin_descriptor == NULL 34 (plugin_descriptor == NULL
35 ? std::string() 35 ? std::string()
36 : base::android::ConvertJavaStringToUTF8(env, plugin_descriptor)); 36 : base::android::ConvertJavaStringToUTF8(env, plugin_descriptor));
37 SetContentCommandLineFlags(max_render_process_count, plugin_str); 37 SetContentCommandLineFlags(static_cast<bool>(single_process), plugin_str);
38 } 38 }
39 39
40 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { 40 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) {
41 #if defined(OFFICIAL_BUILD) 41 #if defined(OFFICIAL_BUILD)
42 return true; 42 return true;
43 #else 43 #else
44 return false; 44 return false;
45 #endif 45 #endif
46 } 46 }
47 47
48 static jboolean IsPluginEnabled(JNIEnv* env, jclass clazz) { 48 static jboolean IsPluginEnabled(JNIEnv* env, jclass clazz) {
49 #if defined(ENABLE_PLUGINS) 49 #if defined(ENABLE_PLUGINS)
50 return true; 50 return true;
51 #else 51 #else
52 return false; 52 return false;
53 #endif 53 #endif
54 } 54 }
55 55
56 } // namespace content 56 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698