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 #ifndef CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ |
6 #define CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 PrefService* pref_service, | 37 PrefService* pref_service, |
38 NotificationObserver* observer); | 38 NotificationObserver* observer); |
39 | 39 |
40 // Create a pref set observer for all preferences relevant to default search. | 40 // Create a pref set observer for all preferences relevant to default search. |
41 static PrefSetObserver* CreateDefaultSearchPrefSetObserver( | 41 static PrefSetObserver* CreateDefaultSearchPrefSetObserver( |
42 PrefService* pref_service, | 42 PrefService* pref_service, |
43 NotificationObserver* observer); | 43 NotificationObserver* observer); |
44 | 44 |
45 private: | 45 private: |
46 // Overridden from NotificationObserver. | 46 // Overridden from NotificationObserver. |
47 virtual void Observe(NotificationType type, | 47 virtual void Observe(int type, |
48 const NotificationSource& source, | 48 const NotificationSource& source, |
49 const NotificationDetails& details); | 49 const NotificationDetails& details); |
50 | 50 |
51 typedef std::set<std::string> PrefSet; | 51 typedef std::set<std::string> PrefSet; |
52 PrefSet prefs_; | 52 PrefSet prefs_; |
53 | 53 |
54 PrefService* pref_service_; | 54 PrefService* pref_service_; |
55 PrefChangeRegistrar registrar_; | 55 PrefChangeRegistrar registrar_; |
56 NotificationObserver* observer_; | 56 NotificationObserver* observer_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(PrefSetObserver); | 58 DISALLOW_COPY_AND_ASSIGN(PrefSetObserver); |
59 }; | 59 }; |
60 | 60 |
61 #endif // CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ | 61 #endif // CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ |
OLD | NEW |