Chromium Code Reviews| Index: chrome/app/chrome_main_delegate.cc |
| diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc |
| index 03ff32e60da870bbab44e9b91ffa097d0aa3797c..6e3508d31c2f54c00d5c75c7ec1d5321ac7ed02a 100644 |
| --- a/chrome/app/chrome_main_delegate.cc |
| +++ b/chrome/app/chrome_main_delegate.cc |
| @@ -17,6 +17,7 @@ |
| #include "chrome/browser/chrome_content_browser_client.h" |
| #include "chrome/browser/defaults.h" |
| #include "chrome/browser/diagnostics/diagnostics_main.h" |
| +#include "chrome/browser/first_run/first_run.h" |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_content_client.h" |
| #include "chrome/common/chrome_paths.h" |
| @@ -125,6 +126,17 @@ bool HasDeprecatedArguments(const std::wstring& command_line) { |
| return (pos != std::wstring::npos); |
| } |
| +// Handles command line switches to extract information from Chrome, which |
| +// can be passed via |exit_code| or by stdout. |
| +bool HandleInfoQuery(const CommandLine& command_line, int* exit_code) { |
| + if (command_line.HasSwitch(switches::kQueryEULAAcceptance)) { |
| + *exit_code = first_run::IsEULAAccepted() ? 1 : 0; |
| + return true; |
| + } |
| + |
| + return false; |
| +} |
| + |
| // Checks if the registry key exists in the given hive and expands any |
| // variables in the string. |
| bool LoadUserDataDirPolicyFromRegistry(HKEY hive, |
| @@ -423,6 +435,10 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { |
| *exit_code = 1; |
| return true; |
| } |
| + |
| + if (HandleInfoQuery(command_line, exit_code)) { |
|
grt (UTC plus 2)
2013/01/23 19:02:29
nit: no braces
huangs
2013/01/24 00:08:08
Done.
|
| + return true; |
| + } |
| #endif |
| if (!command_line.HasSwitch(switches::kProcessType) && |