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

Side by Side Diff: base/prefs/pref_notifier_impl.h

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/prefs/mock_pref_change_callback.cc ('k') | base/prefs/pref_notifier_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_NOTIFIER_IMPL_H_ 5 #ifndef BASE_PREFS_PREF_NOTIFIER_IMPL_H_
6 #define CHROME_BROWSER_PREFS_PREF_NOTIFIER_IMPL_H_ 6 #define BASE_PREFS_PREF_NOTIFIER_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/hash_tables.h" 12 #include "base/hash_tables.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/prefs/base_prefs_export.h"
Mattias Nissler (ping if slow) 2013/02/11 11:42:56 That file seems to be missing?
14 #include "base/prefs/pref_notifier.h" 15 #include "base/prefs/pref_notifier.h"
15 #include "base/prefs/pref_observer.h" 16 #include "base/prefs/pref_observer.h"
16 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
17 18
18 class PrefService; 19 class PrefService;
19 20
20 // The PrefNotifier implementation used by the PrefService. 21 // The PrefNotifier implementation used by the PrefService.
21 class PrefNotifierImpl : public PrefNotifier, 22 class BASE_PREFS_EXPORT PrefNotifierImpl : public PrefNotifier,
22 public base::NonThreadSafe { 23 public base::NonThreadSafe {
23 public: 24 public:
24 PrefNotifierImpl(); 25 PrefNotifierImpl();
25 explicit PrefNotifierImpl(PrefService* pref_service); 26 explicit PrefNotifierImpl(PrefService* pref_service);
26 virtual ~PrefNotifierImpl(); 27 virtual ~PrefNotifierImpl();
27 28
28 // If the pref at the given path changes, we call the observer's 29 // If the pref at the given path changes, we call the observer's
29 // OnPreferenceChanged method. 30 // OnPreferenceChanged method.
30 void AddPrefObserver(const char* path, PrefObserver* observer); 31 void AddPrefObserver(const char* path, PrefObserver* observer);
31 void RemovePrefObserver(const char* path, PrefObserver* observer); 32 void RemovePrefObserver(const char* path, PrefObserver* observer);
32 33
(...skipping 26 matching lines...) Expand all
59 60
60 // Weak reference; the notifier is owned by the PrefService. 61 // Weak reference; the notifier is owned by the PrefService.
61 PrefService* pref_service_; 62 PrefService* pref_service_;
62 63
63 PrefObserverMap pref_observers_; 64 PrefObserverMap pref_observers_;
64 PrefInitObserverList init_observers_; 65 PrefInitObserverList init_observers_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(PrefNotifierImpl); 67 DISALLOW_COPY_AND_ASSIGN(PrefNotifierImpl);
67 }; 68 };
68 69
69 #endif // CHROME_BROWSER_PREFS_PREF_NOTIFIER_IMPL_H_ 70 #endif // BASE_PREFS_PREF_NOTIFIER_IMPL_H_
OLDNEW
« no previous file with comments | « base/prefs/mock_pref_change_callback.cc ('k') | base/prefs/pref_notifier_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698