Index: chrome/browser/ui/app_list/start_page_service.cc |
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc |
index c64708642ee9c033d118f8f737ea755206a29420..151bd658cc2eb1ab06793d1e7805fbc9cc6b5ec8 100644 |
--- a/chrome/browser/ui/app_list/start_page_service.cc |
+++ b/chrome/browser/ui/app_list/start_page_service.cc |
@@ -34,9 +34,9 @@ namespace app_list { |
class StartPageService::Factory : public BrowserContextKeyedServiceFactory { |
public: |
static StartPageService* GetForProfile(Profile* profile) { |
- CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- if (!command_line->HasSwitch(::switches::kShowAppListStartPage) && |
- !command_line->HasSwitch(app_list::switches::kEnableVoiceSearch)) { |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ ::switches::kShowAppListStartPage) && |
+ !app_list::switches::IsVoiceSearchEnabled()) { |
return NULL; |
} |
@@ -165,9 +165,7 @@ content::WebContents* StartPageService::GetStartPageContents() { |
} |
content::WebContents* StartPageService::GetSpeechRecognitionContents() { |
- // Speech recognition is available if either of start-page or voice-search |
- // is enabled. |
- return contents_.get(); |
+ return app_list::switches::IsVoiceSearchEnabled() ? contents_.get() : NULL; |
} |
void StartPageService::OnSpeechResult( |