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

Unified Diff: chrome/browser/net/http_server_properties_manager.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
« no previous file with comments | « chrome/browser/net/http_server_properties_manager.h ('k') | chrome/browser/net/net_pref_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/http_server_properties_manager.cc
diff --git a/chrome/browser/net/http_server_properties_manager.cc b/chrome/browser/net/http_server_properties_manager.cc
index 94e4e02598363a8525aa7fcc3bcd5c377ef2c8e1..02a173fab5ab6869ec21a7ab2285af792beaa6aa 100644
--- a/chrome/browser/net/http_server_properties_manager.cc
+++ b/chrome/browser/net/http_server_properties_manager.cc
@@ -636,16 +636,12 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI(
setting_prefs_ = false;
}
-void HttpServerPropertiesManager::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+void HttpServerPropertiesManager::OnPreferenceChanged(
+ PrefServiceBase* prefs,
+ const std::string& pref_name) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED);
- PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(prefs == pref_service_);
- std::string* pref_name = content::Details<std::string>(details).ptr();
- if (*pref_name == prefs::kHttpServerProperties) {
+ if (pref_name == prefs::kHttpServerProperties) {
if (!setting_prefs_)
ScheduleUpdateCacheOnUI();
} else {
« no previous file with comments | « chrome/browser/net/http_server_properties_manager.h ('k') | chrome/browser/net/net_pref_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698