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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1144253003: Remove --enable-strict-site-isolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set correct upstream Created 5 years, 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 switches::kEnablePreciseMemoryInfo, 1283 switches::kEnablePreciseMemoryInfo,
1284 switches::kEnablePreferCompositingToLCDText, 1284 switches::kEnablePreferCompositingToLCDText,
1285 switches::kEnablePushMessagePayload, 1285 switches::kEnablePushMessagePayload,
1286 switches::kEnableRendererMojoChannel, 1286 switches::kEnableRendererMojoChannel,
1287 switches::kEnableSeccompFilterSandbox, 1287 switches::kEnableSeccompFilterSandbox,
1288 switches::kEnableSkiaBenchmarking, 1288 switches::kEnableSkiaBenchmarking,
1289 switches::kEnableSlimmingPaint, 1289 switches::kEnableSlimmingPaint,
1290 switches::kEnableSmoothScrolling, 1290 switches::kEnableSmoothScrolling,
1291 switches::kEnableStaleWhileRevalidate, 1291 switches::kEnableStaleWhileRevalidate,
1292 switches::kEnableStatsTable, 1292 switches::kEnableStatsTable,
1293 switches::kEnableStrictSiteIsolation,
1294 switches::kEnableThreadedCompositing, 1293 switches::kEnableThreadedCompositing,
1295 switches::kEnableTouchDragDrop, 1294 switches::kEnableTouchDragDrop,
1296 switches::kEnableTouchEditing, 1295 switches::kEnableTouchEditing,
1297 switches::kEnableUnsafeES3APIs, 1296 switches::kEnableUnsafeES3APIs,
1298 switches::kEnableViewport, 1297 switches::kEnableViewport,
1299 switches::kEnableViewportMeta, 1298 switches::kEnableViewportMeta,
1300 switches::kEnableVtune, 1299 switches::kEnableVtune,
1301 switches::kEnableWebBluetooth, 1300 switches::kEnableWebBluetooth,
1302 switches::kEnableWebGLDraftExtensions, 1301 switches::kEnableWebGLDraftExtensions,
1303 switches::kEnableWebGLImageChromium, 1302 switches::kEnableWebGLImageChromium,
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 1931
1933 // static 1932 // static
1934 RenderProcessHost* RenderProcessHost::FromID(int render_process_id) { 1933 RenderProcessHost* RenderProcessHost::FromID(int render_process_id) {
1935 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1934 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1936 return g_all_hosts.Get().Lookup(render_process_id); 1935 return g_all_hosts.Get().Lookup(render_process_id);
1937 } 1936 }
1938 1937
1939 // static 1938 // static
1940 bool RenderProcessHost::ShouldTryToUseExistingProcessHost( 1939 bool RenderProcessHost::ShouldTryToUseExistingProcessHost(
1941 BrowserContext* browser_context, const GURL& url) { 1940 BrowserContext* browser_context, const GURL& url) {
1942 // Experimental: 1941 // If --site-per-process is enabled, do not try to reuse renderer processes
1943 // If --enable-strict-site-isolation or --site-per-process is enabled, do not 1942 // when over the limit. (We could allow pages from the same site to share, if
1944 // try to reuse renderer processes when over the limit. (We could allow pages 1943 // we knew what the given process was dedicated to. Allowing no sharing is
1945 // from the same site to share, if we knew what the given process was 1944 // simpler for now.) This may cause resource exhaustion issues if too many
1946 // dedicated to. Allowing no sharing is simpler for now.) This may cause 1945 // sites are open at once.
1947 // resource exhaustion issues if too many sites are open at once.
1948 const base::CommandLine& command_line = 1946 const base::CommandLine& command_line =
1949 *base::CommandLine::ForCurrentProcess(); 1947 *base::CommandLine::ForCurrentProcess();
1950 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 1948 if (command_line.HasSwitch(switches::kSitePerProcess))
1951 command_line.HasSwitch(switches::kSitePerProcess))
1952 return false; 1949 return false;
1953 1950
1954 if (run_renderer_in_process()) 1951 if (run_renderer_in_process())
1955 return true; 1952 return true;
1956 1953
1957 // NOTE: Sometimes it's necessary to create more render processes than 1954 // NOTE: Sometimes it's necessary to create more render processes than
1958 // GetMaxRendererProcessCount(), for instance when we want to create 1955 // GetMaxRendererProcessCount(), for instance when we want to create
1959 // a renderer process for a browser context that has no existing 1956 // a renderer process for a browser context that has no existing
1960 // renderers. This is OK in moderation, since the 1957 // renderers. This is OK in moderation, since the
1961 // GetMaxRendererProcessCount() is conservative. 1958 // GetMaxRendererProcessCount() is conservative.
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 void RenderProcessHostImpl::GetAudioOutputControllers( 2497 void RenderProcessHostImpl::GetAudioOutputControllers(
2501 const GetAudioOutputControllersCallback& callback) const { 2498 const GetAudioOutputControllersCallback& callback) const {
2502 audio_renderer_host()->GetOutputControllers(callback); 2499 audio_renderer_host()->GetOutputControllers(callback);
2503 } 2500 }
2504 2501
2505 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2502 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2506 return bluetooth_dispatcher_host_.get(); 2503 return bluetooth_dispatcher_host_.get();
2507 } 2504 }
2508 2505
2509 } // namespace content 2506 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698