OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PREF_SET_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ |
6 #define CHROME_BROWSER_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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/common/notification_observer.h" | 13 #include "chrome/common/notification_observer.h" |
14 | 14 |
15 // Observes the state of a set of preferences and allows to query their combined | 15 // Observes the state of a set of preferences and allows to query their combined |
16 // managed bits. | 16 // managed bits. |
17 class PrefSetObserver : public NotificationObserver { | 17 class PrefSetObserver : public NotificationObserver { |
18 public: | 18 public: |
19 // Initialize with an empty set of preferences. | 19 // Initialize with an empty set of preferences. |
20 PrefSetObserver(PrefService* pref_service, | 20 PrefSetObserver(PrefService* pref_service, |
21 NotificationObserver* observer); | 21 NotificationObserver* observer); |
22 virtual ~PrefSetObserver(); | 22 virtual ~PrefSetObserver(); |
(...skipping 21 matching lines...) Expand all Loading... |
44 | 44 |
45 typedef std::set<std::string> PrefSet; | 45 typedef std::set<std::string> PrefSet; |
46 PrefSet prefs_; | 46 PrefSet prefs_; |
47 | 47 |
48 PrefService* pref_service_; | 48 PrefService* pref_service_; |
49 NotificationObserver* observer_; | 49 NotificationObserver* observer_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(PrefSetObserver); | 51 DISALLOW_COPY_AND_ASSIGN(PrefSetObserver); |
52 }; | 52 }; |
53 | 53 |
54 #endif // CHROME_BROWSER_PREF_SET_OBSERVER_H_ | 54 #endif // CHROME_BROWSER_PREFS_PREF_SET_OBSERVER_H_ |
OLD | NEW |