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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 135843004: Flag-flip of app-list-voice-search (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/app_list/app_list_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/app_list/app_list_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698