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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 9568002: Renamed speech input implementation from to speech_recognition_*. The namespace has been renamed fr… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 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/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index f22ee873ddae6ccf09cf99d1e9e34cafd53d97d3..7c60b72119d1382e7cfe1fa16da5aadb52ff8800 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -71,7 +71,7 @@
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/signin/token_service.h"
-#include "chrome/browser/speech/chrome_speech_input_preferences.h"
+#include "chrome/browser/speech/chrome_speech_recognition_preferences.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/transport_security_persister.h"
#include "chrome/browser/ui/browser_init.h"
@@ -283,7 +283,7 @@ ProfileImpl::ProfileImpl(const FilePath& path,
void ProfileImpl::DoFinalInit() {
PrefService* prefs = GetPrefs();
pref_change_registrar_.Init(prefs);
- pref_change_registrar_.Add(prefs::kSpeechInputFilterProfanities, this);
+ pref_change_registrar_.Add(prefs::kSpeechRecognitionFilterProfanities, this);
pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this);
pref_change_registrar_.Add(prefs::kGoogleServicesUsername, this);
pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this);
@@ -563,7 +563,7 @@ ProfileImpl::~ProfileImpl() {
if (session_restore_enabled_)
BrowserContext::SaveSessionState(this);
} else if (clear_local_state_on_exit_) {
- BrowserContext::ClearLocalOnDestruction(this);
+ BrowserContext::ClearLocalOnDestruction(this);
}
StopCreateSessionServiceTimer();
@@ -891,12 +891,14 @@ content::GeolocationPermissionContext*
return geolocation_permission_context_.get();
}
-content::SpeechInputPreferences* ProfileImpl::GetSpeechInputPreferences() {
+content::SpeechRecognitionPreferences*
+ ProfileImpl::GetSpeechRecognitionPreferences() {
#if defined(ENABLE_INPUT_SPEECH)
- if (!speech_input_preferences_.get()) {
- speech_input_preferences_ = new ChromeSpeechInputPreferences(GetPrefs());
+ if (!speech_recognition_preferences_.get()) {
+ speech_recognition_preferences_ =
+ new ChromeSpeechRecognitionPreferences(GetPrefs());
}
- return speech_input_preferences_.get();
+ return speech_recognition_preferences_.get();
#else
return NULL;
#endif
@@ -1184,12 +1186,12 @@ void ProfileImpl::Observe(int type,
std::string* pref_name_in = content::Details<std::string>(details).ptr();
PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(pref_name_in && prefs);
- if (*pref_name_in == prefs::kSpeechInputFilterProfanities) {
- content::SpeechInputPreferences* speech_prefs =
- GetSpeechInputPreferences();
+ if (*pref_name_in == prefs::kSpeechRecognitionFilterProfanities) {
+ content::SpeechRecognitionPreferences* speech_prefs =
+ GetSpeechRecognitionPreferences();
if (speech_prefs) {
speech_prefs->SetFilterProfanities(prefs->GetBoolean(
- prefs::kSpeechInputFilterProfanities));
+ prefs::kSpeechRecognitionFilterProfanities));
}
} else if (*pref_name_in == prefs::kClearSiteDataOnExit) {
clear_local_state_on_exit_ =

Powered by Google App Engine
This is Rietveld 408576698