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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 8199010: Fixing misleading name a in speech input setting and related variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 04f5240f35f960f32e0420688b857c3fa38558cd..8022aee30c2d93f2bc19527f55531079627e0105 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -945,9 +945,9 @@ void RenderViewContextMenu::AppendSpellcheckOptionsSubMenu() {
void RenderViewContextMenu::AppendSpeechInputOptionsSubMenu() {
if (params_.speech_input_enabled) {
speech_input_submenu_model_.AddCheckItem(
- IDC_CONTENT_CONTEXT_SPEECH_INPUT_CENSOR_RESULTS,
+ IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES,
l10n_util::GetStringUTF16(
- IDS_CONTENT_CONTEXT_SPEECH_INPUT_CENSOR_RESULTS));
+ IDS_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES));
speech_input_submenu_model_.AddItemWithStringId(
IDC_CONTENT_CONTEXT_SPEECH_INPUT_ABOUT,
@@ -1311,7 +1311,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_SPELLCHECK_MENU:
return true;
- case IDC_CONTENT_CONTEXT_SPEECH_INPUT_CENSOR_RESULTS:
+ case IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES:
case IDC_CONTENT_CONTEXT_SPEECH_INPUT_ABOUT:
case IDC_SPEECH_INPUT_MENU:
return true;
@@ -1377,8 +1377,9 @@ bool RenderViewContextMenu::IsCommandIdChecked(int id) const {
}
// Check box for menu item 'Block offensive words'.
- if (id == IDC_CONTENT_CONTEXT_SPEECH_INPUT_CENSOR_RESULTS) {
- return profile_->GetPrefs()->GetBoolean(prefs::kSpeechInputCensorResults);
+ if (id == IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES) {
+ return profile_->GetPrefs()->GetBoolean(
+ prefs::kSpeechInputFilterProfanities);
}
// Don't bother getting the display language vector if this isn't a spellcheck
@@ -1832,11 +1833,12 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
break;
}
- case IDC_CONTENT_CONTEXT_SPEECH_INPUT_CENSOR_RESULTS: {
+ case IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES: {
PrefService* prefs = profile_->GetPrefs();
- const bool censor = !prefs->GetBoolean(prefs::kSpeechInputCensorResults);
- prefs->SetBoolean(prefs::kSpeechInputCensorResults, censor);
- profile_->GetSpeechInputPreferences()->set_censor_results(censor);
+ const bool filter = !prefs->GetBoolean(
+ prefs::kSpeechInputFilterProfanities);
+ prefs->SetBoolean(prefs::kSpeechInputFilterProfanities, filter);
+ profile_->GetSpeechInputPreferences()->set_filter_profanities(filter);
break;
}

Powered by Google App Engine
This is Rietveld 408576698