Chromium Code Reviews| Index: chrome/browser/ui/browser_init.cc |
| diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
| index 7c71eb740eac8b6ee00fd81bda0ecb9d81c3e8b0..f010735afc11e15e503e60378b22908f45819e06 100644 |
| --- a/chrome/browser/ui/browser_init.cc |
| +++ b/chrome/browser/ui/browser_init.cc |
| @@ -1720,6 +1720,7 @@ bool BrowserInit::ProcessCmdLineImpl( |
| #endif |
| RegisterComponentsForUpdate(command_line); |
| +#if defined(ENABLE_AUTOMATION) |
| // Look for the testing channel ID ONLY during process startup |
| if (command_line.HasSwitch(switches::kTestingChannelID)) { |
| std::string testing_channel_id = command_line.GetSwitchValueASCII( |
| @@ -1757,10 +1758,12 @@ bool BrowserInit::ProcessCmdLineImpl( |
| static_cast<size_t>(expected_tab_count))) |
| return false; |
| } |
| +#endif // enabled(ENABLE_AUTOMATION) |
| } |
| bool silent_launch = false; |
|
jam
2012/03/14 17:48:13
nit: move this to line 1723 and then you can have
Xianzhu
2012/03/14 18:02:31
Done (with if (process_startup) also merged into t
|
| +#if defined(ENABLE_AUTOMATION) |
| if (command_line.HasSwitch(switches::kAutomationClientChannelID)) { |
| std::string automation_channel_id = command_line.GetSwitchValueASCII( |
| switches::kAutomationClientChannelID); |
| @@ -1785,6 +1788,7 @@ bool BrowserInit::ProcessCmdLineImpl( |
| return false; |
| } |
| } |
| +#endif // defined(ENABLE_AUTOMATION) |
| // If we have been invoked to display a desktop notification on behalf of |
| // the service process, we do not want to open any browser windows. |
| @@ -1905,6 +1909,7 @@ template <class AutomationProviderClass> |
| bool BrowserInit::CreateAutomationProvider(const std::string& channel_id, |
| Profile* profile, |
| size_t expected_tabs) { |
| +#if defined(ENABLE_AUTOMATION) |
| scoped_refptr<AutomationProviderClass> automation = |
| new AutomationProviderClass(profile); |
| #if defined(OS_CHROMEOS) |
| @@ -1918,6 +1923,7 @@ bool BrowserInit::CreateAutomationProvider(const std::string& channel_id, |
| AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); |
| DCHECK(list); |
| list->AddProvider(automation); |
| +#endif // defined(ENABLE_AUTOMATION) |
| return true; |
| } |