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

Side by Side Diff: chrome/browser/ui/startup/bad_flags_prompt.cc

Issue 209393004: Only enable speech dispatcher on Linux with an explicit switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 5 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 switches::kReduceSecurityForTesting, 58 switches::kReduceSecurityForTesting,
59 switches::kSyncAllowInsecureXmppConnection, 59 switches::kSyncAllowInsecureXmppConnection,
60 60
61 // These flags change the URLs that handle PII. 61 // These flags change the URLs that handle PII.
62 autofill::switches::kWalletSecureServiceUrl, 62 autofill::switches::kWalletSecureServiceUrl,
63 switches::kGaiaUrl, 63 switches::kGaiaUrl,
64 translate::switches::kTranslateScriptURL, 64 translate::switches::kTranslateScriptURL,
65 65
66 // This flag gives extensions more powers. 66 // This flag gives extensions more powers.
67 extensions::switches::kExtensionsOnChromeURLs, 67 extensions::switches::kExtensionsOnChromeURLs,
68
69 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
msw 2014/03/24 17:11:00 nit: these should have no indentation.
dmazzoni 2014/03/24 22:08:42 Fixed. I was being consistent with another define
70 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
msw 2014/03/24 17:11:00 nit: this should be a TODO with an associated bug
dmazzoni 2014/03/24 22:08:42 I added the bug, but no TODO for now since it's no
71 switches::kEnableSpeechDispatcher,
72 #endif
68 NULL 73 NULL
69 }; 74 };
70 75
71 for (const char** flag = kBadFlags; *flag; ++flag) { 76 for (const char** flag = kBadFlags; *flag; ++flag) {
72 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { 77 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) {
73 SimpleAlertInfoBarDelegate::Create( 78 SimpleAlertInfoBarDelegate::Create(
74 InfoBarService::FromWebContents(web_contents), 79 InfoBarService::FromWebContents(web_contents),
75 InfoBarDelegate::kNoIconID, 80 InfoBarDelegate::kNoIconID,
76 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, 81 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE,
77 base::UTF8ToUTF16( 82 base::UTF8ToUTF16(
(...skipping 29 matching lines...) Expand all
107 user_data_dir.LossyDisplayName()); 112 user_data_dir.LossyDisplayName());
108 113
109 if (cleanup_resource_bundle) 114 if (cleanup_resource_bundle)
110 ResourceBundle::CleanupSharedInstance(); 115 ResourceBundle::CleanupSharedInstance();
111 116
112 // More complex dialogs cannot be shown before the earliest calls here. 117 // More complex dialogs cannot be shown before the earliest calls here.
113 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); 118 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING);
114 } 119 }
115 120
116 } // namespace chrome 121 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698