diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-26 19:46:26 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-26 19:46:26 +0000 |
commit | 99372841aea3f058340e82a09c7f0d64a7d9ed47 (patch) | |
tree | cfe1c76fcfed564131432222d626edef7debbca0 /chrome_frame/chrome_frame_automation.cc | |
parent | 5561a2f81f61f37604552f6c36c2d5b1a52336af (diff) | |
download | chromium_src-99372841aea3f058340e82a09c7f0d64a7d9ed47.zip chromium_src-99372841aea3f058340e82a09c7f0d64a7d9ed47.tar.gz chromium_src-99372841aea3f058340e82a09c7f0d64a7d9ed47.tar.bz2 |
Remove the \servers build output directory and place Chrome Frame parts into the root output folder next to chrome.exe et al.
Also add a more helpful error message when failing to register the Chrome Frame dll.
Review URL: http://codereview.chromium.org/8013001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 792f047..e120f14 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -249,57 +249,60 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, proxy->set_perform_version_check(params->version_check()); // Launch browser - scoped_ptr<CommandLine> command_line( - chrome_launcher::CreateLaunchCommandLine()); - command_line->AppendSwitchASCII(switches::kAutomationClientChannelID, - channel_id); + std::wstring command_line_string; + scoped_ptr<CommandLine> command_line; + if (chrome_launcher::CreateLaunchCommandLine(&command_line)) { + command_line->AppendSwitchASCII(switches::kAutomationClientChannelID, + channel_id); - // Run Chrome in Chrome Frame mode. In practice, this modifies the paths - // and registry keys that Chrome looks in via the BrowserDistribution - // mechanism. - command_line->AppendSwitch(switches::kChromeFrame); + // Run Chrome in Chrome Frame mode. In practice, this modifies the paths + // and registry keys that Chrome looks in via the BrowserDistribution + // mechanism. + command_line->AppendSwitch(switches::kChromeFrame); - // Chrome Frame never wants Chrome to start up with a First Run UI. - command_line->AppendSwitch(switches::kNoFirstRun); + // Chrome Frame never wants Chrome to start up with a First Run UI. + command_line->AppendSwitch(switches::kNoFirstRun); - command_line->AppendSwitch(switches::kDisablePopupBlocking); + command_line->AppendSwitch(switches::kDisablePopupBlocking); - // Disable the "Whoa! Chrome has crashed." dialog, because that isn't very - // useful for Chrome Frame users. + // Disable the "Whoa! Chrome has crashed." dialog, because that isn't very + // useful for Chrome Frame users. #ifndef NDEBUG - command_line->AppendSwitch(switches::kNoErrorDialogs); + command_line->AppendSwitch(switches::kNoErrorDialogs); #endif - // In headless mode runs like reliability test runs we want full crash dumps - // from chrome. - if (IsHeadlessMode()) - command_line->AppendSwitch(switches::kFullMemoryCrashReport); + // In headless mode runs like reliability test runs we want full crash dumps + // from chrome. + if (IsHeadlessMode()) + command_line->AppendSwitch(switches::kFullMemoryCrashReport); - // In accessible mode automation tests expect renderer accessibility to be - // enabled in chrome. - if (IsAccessibleMode()) - command_line->AppendSwitch(switches::kForceRendererAccessibility); + // In accessible mode automation tests expect renderer accessibility to be + // enabled in chrome. + if (IsAccessibleMode()) + command_line->AppendSwitch(switches::kForceRendererAccessibility); - DVLOG(1) << "Profile path: " << params->profile_path().value(); - command_line->AppendSwitchPath(switches::kUserDataDir, - params->profile_path()); + DVLOG(1) << "Profile path: " << params->profile_path().value(); + command_line->AppendSwitchPath(switches::kUserDataDir, + params->profile_path()); - // Ensure that Chrome is running the specified version of chrome.dll. - command_line->AppendSwitchNative(switches::kChromeVersion, - GetCurrentModuleVersion()); + // Ensure that Chrome is running the specified version of chrome.dll. + command_line->AppendSwitchNative(switches::kChromeVersion, + GetCurrentModuleVersion()); - if (!params->language().empty()) - command_line->AppendSwitchNative(switches::kLang, params->language()); + if (!params->language().empty()) + command_line->AppendSwitchNative(switches::kLang, params->language()); - std::wstring command_line_string(command_line->GetCommandLineString()); - // If there are any extra arguments, append them to the command line. - if (!params->extra_arguments().empty()) { - command_line_string += L' ' + params->extra_arguments(); + command_line_string = command_line->GetCommandLineString(); + // If there are any extra arguments, append them to the command line. + if (!params->extra_arguments().empty()) { + command_line_string += L' ' + params->extra_arguments(); + } } automation_server_launch_start_time_ = base::TimeTicks::Now(); - if (!base::LaunchProcess(command_line_string, base::LaunchOptions(), NULL)) { + if (command_line_string.empty() || + !base::LaunchProcess(command_line_string, base::LaunchOptions(), NULL)) { // We have no code for launch failure. launch_result_ = AUTOMATION_LAUNCH_RESULT_INVALID; } else { |