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

Unified Diff: chrome/browser/speech/chrome_speech_recognition_preferences.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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/speech/chrome_speech_recognition_preferences.cc
diff --git a/chrome/browser/speech/chrome_speech_recognition_preferences.cc b/chrome/browser/speech/chrome_speech_recognition_preferences.cc
index f5ef511ceada6f1a641923e2f1f7e7fb96818fb1..fc057fe6aff632b0a2fdf646dabde4bcfc1c39b6 100644
--- a/chrome/browser/speech/chrome_speech_recognition_preferences.cc
+++ b/chrome/browser/speech/chrome_speech_recognition_preferences.cc
@@ -141,14 +141,11 @@ void ChromeSpeechRecognitionPreferences::DetachFromProfile() {
profile_ = NULL;
}
-void ChromeSpeechRecognitionPreferences::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+void ChromeSpeechRecognitionPreferences::OnPreferenceChanged(
+ PrefServiceBase* service,
+ const std::string& pref_name) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(type, chrome::NOTIFICATION_PREF_CHANGED);
- std::string* pref_name = content::Details<std::string>(details).ptr();
- ReloadPreference(*pref_name);
+ ReloadPreference(pref_name);
}
bool ChromeSpeechRecognitionPreferences::FilterProfanities() const {
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_preferences.h ('k') | chrome/browser/spellchecker/spellcheck_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698