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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6027004: Revert 69753 - Added group policy for disabling all client-side 3D APIs in Ch... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <algorithm> 10 #include <algorithm>
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 FilePath user_data_dir = 589 FilePath user_data_dir =
590 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); 590 browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
591 if (!user_data_dir.empty()) 591 if (!user_data_dir.empty())
592 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); 592 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
593 #if defined(OS_CHROMEOS) 593 #if defined(OS_CHROMEOS)
594 const std::string& profile = 594 const std::string& profile =
595 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); 595 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile);
596 if (!profile.empty()) 596 if (!profile.empty())
597 command_line->AppendSwitchASCII(switches::kLoginProfile, profile); 597 command_line->AppendSwitchASCII(switches::kLoginProfile, profile);
598 #endif 598 #endif
599
600 PrefService* prefs = profile()->GetPrefs();
601 // Currently this pref is only registered if applied via a policy.
602 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) &&
603 prefs->GetBoolean(prefs::kDisable3DAPIs)) {
604 // Turn this policy into a command line switch.
605 command_line->AppendSwitch(switches::kDisable3DAPIs);
606 }
607 } 599 }
608 600
609 void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( 601 void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer(
610 const CommandLine& browser_cmd, 602 const CommandLine& browser_cmd,
611 CommandLine* renderer_cmd) const { 603 CommandLine* renderer_cmd) const {
612 // Propagate the following switches to the renderer command line (along 604 // Propagate the following switches to the renderer command line (along
613 // with any associated values) if present in the browser command line. 605 // with any associated values) if present in the browser command line.
614 static const char* const kSwitchNames[] = { 606 static const char* const kSwitchNames[] = {
615 switches::kRendererAssertTest, 607 switches::kRendererAssertTest,
616 #if !defined(OFFICIAL_BUILD) 608 #if !defined(OFFICIAL_BUILD)
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 switches::kBlockNonSandboxedPlugins, 691 switches::kBlockNonSandboxedPlugins,
700 switches::kBlockOutdatedPlugins, 692 switches::kBlockOutdatedPlugins,
701 switches::kEnableRemoting, 693 switches::kEnableRemoting,
702 switches::kEnableClickToPlay, 694 switches::kEnableClickToPlay,
703 switches::kEnableResourceContentSettings, 695 switches::kEnableResourceContentSettings,
704 switches::kPrelaunchGpuProcess, 696 switches::kPrelaunchGpuProcess,
705 switches::kEnableAcceleratedDecoding, 697 switches::kEnableAcceleratedDecoding,
706 switches::kDisableFileSystem, 698 switches::kDisableFileSystem,
707 switches::kPpapiOutOfProcess, 699 switches::kPpapiOutOfProcess,
708 switches::kEnablePrintPreview, 700 switches::kEnablePrintPreview,
709 switches::kEnableCrxlessWebApps, 701 switches::kEnableCrxlessWebApps
710 switches::kDisable3DAPIs
711 }; 702 };
712 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames, 703 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
713 arraysize(kSwitchNames)); 704 arraysize(kSwitchNames));
714 705
715 // Disable databases in incognito mode. 706 // Disable databases in incognito mode.
716 if (profile()->IsOffTheRecord() && 707 if (profile()->IsOffTheRecord() &&
717 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { 708 !browser_cmd.HasSwitch(switches::kDisableDatabases)) {
718 renderer_cmd->AppendSwitch(switches::kDisableDatabases); 709 renderer_cmd->AppendSwitch(switches::kDisableDatabases);
719 } 710 }
720 711
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 IPC::PlatformFileForTransit file; 1289 IPC::PlatformFileForTransit file;
1299 #if defined(OS_POSIX) 1290 #if defined(OS_POSIX)
1300 file = base::FileDescriptor(model_file, false); 1291 file = base::FileDescriptor(model_file, false);
1301 #elif defined(OS_WIN) 1292 #elif defined(OS_WIN)
1302 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1293 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1303 false, DUPLICATE_SAME_ACCESS); 1294 false, DUPLICATE_SAME_ACCESS);
1304 #endif 1295 #endif
1305 Send(new ViewMsg_SetPhishingModel(file)); 1296 Send(new ViewMsg_SetPhishingModel(file));
1306 } 1297 }
1307 } 1298 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/tab_contents/render_view_host_delegate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698