OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/prefs/pref_notifier_impl.h" | 5 #include "chrome/browser/prefs/pref_notifier_impl.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "content/common/notification_observer.h" | 10 #include "content/common/notification_observer.h" |
11 #include "content/common/notification_service.h" | 11 #include "content/common/notification_service.h" |
12 | 12 |
13 PrefNotifierImpl::PrefNotifierImpl(PrefService* service) | 13 PrefNotifierImpl::PrefNotifierImpl(PrefService* service) |
14 : pref_service_(service) { | 14 : pref_service_(service) { |
15 } | 15 } |
16 | 16 |
17 PrefNotifierImpl::~PrefNotifierImpl() { | 17 PrefNotifierImpl::~PrefNotifierImpl() { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 return; | 97 return; |
98 | 98 |
99 NotificationObserverList::Iterator it(*(observer_iterator->second)); | 99 NotificationObserverList::Iterator it(*(observer_iterator->second)); |
100 NotificationObserver* observer; | 100 NotificationObserver* observer; |
101 while ((observer = it.GetNext()) != NULL) { | 101 while ((observer = it.GetNext()) != NULL) { |
102 observer->Observe(chrome::NOTIFICATION_PREF_CHANGED, | 102 observer->Observe(chrome::NOTIFICATION_PREF_CHANGED, |
103 Source<PrefService>(pref_service_), | 103 Source<PrefService>(pref_service_), |
104 Details<const std::string>(&path)); | 104 Details<const std::string>(&path)); |
105 } | 105 } |
106 } | 106 } |
OLD | NEW |