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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 9696049: Add enable_automation build switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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;
}
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698