Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index be393ae5584660f493534d0b4795260d80a4604d..f3844d70178b68fc788ca4c8832099641d5e4158 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -101,6 +101,7 @@ |
| #include "content/browser/in_process_webkit/webkit_context.h" |
| #include "content/browser/renderer_host/render_process_host.h" |
| #include "content/browser/speech/speech_input_manager.h" |
| +#include "content/browser/speech/speech_input_preferences.h" |
| #include "content/browser/ssl/ssl_host_state.h" |
| #include "content/browser/user_metrics.h" |
| #include "content/common/notification_service.h" |
| @@ -451,9 +452,6 @@ void ProfileImpl::DoFinalInit() { |
| GetSpellCheckProfile()->StartRecordingMetrics( |
| GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); |
| - speech_input::ChromeSpeechInputManager::GetInstance()->set_censor_results( |
| - prefs->GetBoolean(prefs::kSpeechInputCensorResults)); |
| - |
| FilePath cookie_path = GetPath(); |
| cookie_path = cookie_path.Append(chrome::kCookieFilename); |
| FilePath origin_bound_cert_path = GetPath(); |
| @@ -1144,6 +1142,13 @@ GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() { |
| return geolocation_permission_context_.get(); |
| } |
| +SpeechInputPreferences* ProfileImpl::GetSpeechInputPreferences() { |
| + if (!speech_input_preferences_.get()) |
|
Satish
2011/09/23 16:31:54
suggest using braces for multi-line if blocks like
allanwoj
2011/09/26 13:05:15
Done.
|
| + speech_input_preferences_ = new SpeechInputPreferences( |
| + GetPrefs()->GetBoolean(prefs::kSpeechInputCensorResults)); |
| + return speech_input_preferences_.get(); |
| +} |
| + |
| UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { |
| if (!user_style_sheet_watcher_.get()) { |
| user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath()); |
| @@ -1549,9 +1554,8 @@ void ProfileImpl::Observe(int type, |
| process->Send(new SpellCheckMsg_EnableAutoSpellCorrect(enabled)); |
| } |
| } else if (*pref_name_in == prefs::kSpeechInputCensorResults) { |
| - speech_input::ChromeSpeechInputManager::GetInstance()-> |
| - set_censor_results(prefs->GetBoolean( |
| - prefs::kSpeechInputCensorResults)); |
| + GetSpeechInputPreferences()->set_censor_results(prefs->GetBoolean( |
| + prefs::kSpeechInputCensorResults)); |
| } else if (*pref_name_in == prefs::kClearSiteDataOnExit) { |
| clear_local_state_on_exit_ = |
| prefs->GetBoolean(prefs::kClearSiteDataOnExit); |