Add enable_automation build switch.
It's only disabled on Android to exclude automation from Android build.
enable_automation=0 still doesn't work on platforms other than Android.
BUG=117407
TEST=none
Review URL: http://codereview.chromium.org/9696049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127004 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 0fb1a30d..b1e0199 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -160,6 +160,7 @@
}
void BrowserProcessImpl::StartTearDown() {
+#if defined(ENABLE_AUTOMATION)
// Delete the AutomationProviderList before NotificationService,
// since it may try to unregister notifications
// Both NotificationService and AutomationProvider are singleton instances in
@@ -168,6 +169,7 @@
// NotificationService. NotificationService won't be destroyed until after
// this destructor is run.
automation_provider_list_.reset();
+#endif
// We need to shutdown the SdchDictionaryFetcher as it regularly holds
// a pointer to a URLFetcher, and that URLFetcher (upon destruction) will do
@@ -435,9 +437,13 @@
AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() {
DCHECK(CalledOnValidThread());
+#if defined(ENABLE_AUTOMATION)
if (automation_provider_list_.get() == NULL)
automation_provider_list_.reset(new AutomationProviderList());
return automation_provider_list_.get();
+#else
+ return NULL;
+#endif
}
void BrowserProcessImpl::InitDevToolsHttpProtocolHandler(