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

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

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate overriden methods in profile_impl.h Created 9 years, 3 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/profiles/profile_impl.h ('k') | chrome/browser/speech/chrome_speech_input_preferences.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 11fd5c04e7418d9679dcfeace8ca733519ef4543..d694ae3d09490473b4a887f3daa41c1951a02d66 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -67,6 +67,7 @@
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/speech/chrome_speech_input_manager.h"
+#include "chrome/browser/speech/chrome_speech_input_preferences.h"
#include "chrome/browser/spellchecker/spellcheck_profile.h"
#include "chrome/browser/sync/profile_sync_factory_impl.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -494,9 +495,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();
@@ -1158,12 +1156,20 @@ HostZoomMap* ProfileImpl::GetHostZoomMap() {
}
GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() {
- if (!geolocation_permission_context_.get())
+ if (!geolocation_permission_context_.get()) {
geolocation_permission_context_ =
new ChromeGeolocationPermissionContext(this);
+ }
return geolocation_permission_context_.get();
}
+SpeechInputPreferences* ProfileImpl::GetSpeechInputPreferences() {
+ if (!speech_input_preferences_.get()) {
+ speech_input_preferences_ = new ChromeSpeechInputPreferences(GetPrefs());
+ }
+ return speech_input_preferences_.get();
+}
+
UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() {
if (!user_style_sheet_watcher_.get()) {
user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath());
@@ -1561,9 +1567,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);
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/speech/chrome_speech_input_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698