OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 switches::kLoggingLevel, | 254 switches::kLoggingLevel, |
255 switches::kDebugPrint, | 255 switches::kDebugPrint, |
256 switches::kAllowAllActiveX, | 256 switches::kAllowAllActiveX, |
257 switches::kMemoryProfiling, | 257 switches::kMemoryProfiling, |
258 switches::kEnableWatchdog, | 258 switches::kEnableWatchdog, |
259 switches::kMessageLoopHistogrammer, | 259 switches::kMessageLoopHistogrammer, |
260 switches::kEnableDCHECK, | 260 switches::kEnableDCHECK, |
261 switches::kSilentDumpOnDCHECK, | 261 switches::kSilentDumpOnDCHECK, |
262 switches::kDisablePopupBlocking, | 262 switches::kDisablePopupBlocking, |
263 switches::kUseLowFragHeapCrt, | 263 switches::kUseLowFragHeapCrt, |
264 switches::kGearsInRenderer, | |
265 switches::kEnableVideo, | 264 switches::kEnableVideo, |
266 }; | 265 }; |
267 | 266 |
268 for (size_t i = 0; i < arraysize(switch_names); ++i) { | 267 for (size_t i = 0; i < arraysize(switch_names); ++i) { |
269 if (browser_command_line.HasSwitch(switch_names[i])) { | 268 if (browser_command_line.HasSwitch(switch_names[i])) { |
270 cmd_line.AppendSwitchWithValue(switch_names[i], | 269 cmd_line.AppendSwitchWithValue(switch_names[i], |
271 browser_command_line.GetSwitchValue(switch_names[i])); | 270 browser_command_line.GetSwitchValue(switch_names[i])); |
272 } | 271 } |
273 } | 272 } |
274 | 273 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 policy->SetDesktop(kDesktopName); | 354 policy->SetDesktop(kDesktopName); |
356 } else { | 355 } else { |
357 DLOG(WARNING) << "Failed to apply desktop security to the renderer"; | 356 DLOG(WARNING) << "Failed to apply desktop security to the renderer"; |
358 } | 357 } |
359 | 358 |
360 if (!AddGenericPolicy(policy)) { | 359 if (!AddGenericPolicy(policy)) { |
361 NOTREACHED(); | 360 NOTREACHED(); |
362 return false; | 361 return false; |
363 } | 362 } |
364 | 363 |
365 if (browser_command_line.HasSwitch(switches::kGearsInRenderer)) { | |
366 if (!AddPolicyForGearsInRenderer(policy)) { | |
367 NOTREACHED(); | |
368 return false; | |
369 } | |
370 } | |
371 | |
372 if (!AddDllEvictionPolicy(policy)) { | 364 if (!AddDllEvictionPolicy(policy)) { |
373 NOTREACHED(); | 365 NOTREACHED(); |
374 return false; | 366 return false; |
375 } | 367 } |
376 | 368 |
377 result = | 369 result = |
378 broker_service->SpawnTarget(renderer_path.c_str(), | 370 broker_service->SpawnTarget(renderer_path.c_str(), |
379 cmd_line.command_line_string().c_str(), | 371 cmd_line.command_line_string().c_str(), |
380 policy, &target); | 372 policy, &target); |
381 policy->Release(); | 373 policy->Release(); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 SendUserScriptsUpdate(shared_memory); | 857 SendUserScriptsUpdate(shared_memory); |
866 } | 858 } |
867 break; | 859 break; |
868 } | 860 } |
869 default: { | 861 default: { |
870 NOTREACHED(); | 862 NOTREACHED(); |
871 break; | 863 break; |
872 } | 864 } |
873 } | 865 } |
874 } | 866 } |
OLD | NEW |