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

Unified Diff: chrome_frame/chrome_launcher_utils.cc

Issue 9836037: Adding policy support to Chrome Frame's launcher so that additional parameters can be passed to Chr… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix arguments in policy_settings_unittest.cc Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome_frame/chrome_launcher_utils.cc
diff --git a/chrome_frame/chrome_launcher_utils.cc b/chrome_frame/chrome_launcher_utils.cc
index c77b9a8d763385139b71f13eeedbaec511caab50..6c4bac733665e36f4aa9d51652f50ec827294169 100644
--- a/chrome_frame/chrome_launcher_utils.cc
+++ b/chrome_frame/chrome_launcher_utils.cc
@@ -15,6 +15,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome_frame/chrome_frame_automation.h"
+#include "chrome_frame/policy_settings.h"
namespace {
@@ -73,6 +74,15 @@ bool CreateLaunchCommandLine(scoped_ptr<CommandLine>* command_line) {
// Shortcut for OS versions that don't need the integrity broker.
if (base::win::GetVersion() < base::win::VERSION_VISTA) {
command_line->reset(new CommandLine(GetChromeExecutablePath()));
+
+ // When we do not use the Chrome Launcher, we need to add the optional extra
+ // parameters from the group policy here (this is normally done by the
+ // chrome launcher). We don't do this when we use the launcher as the
+ // optional arguments could trip off sanitization checks and prevent Chrome
+ // from being launched.
+ const CommandLine& additional_params =
+ PolicySettings::GetInstance()->AdditionalLaunchParameters();
+ command_line->get()->AppendArguments(additional_params, false);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698