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

Side by Side Diff: chrome/common/pref_store_base.h

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Danno's feedback. Created 10 years 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 | « chrome/common/pref_store.h ('k') | chrome/common/pref_store_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_PREF_STORE_BASE_H_
6 #define CHROME_COMMON_PREF_STORE_BASE_H_
7 #pragma once
8
9 #include "base/observer_list.h"
10 #include "chrome/common/pref_store.h"
11
12 // Implements the observer-related bits of the PrefStore interface. This is
13 // provided as a convenience for PrefStore implementations to derive from.
14 class PrefStoreBase : public PrefStore {
15 public:
16 virtual ~PrefStoreBase() {}
17
18 // Overriden from PrefStore.
19 virtual void AddObserver(ObserverInterface* observer);
20 virtual void RemoveObserver(ObserverInterface* observer);
21
22 protected:
23 // Send a notification about a changed preference value.
24 void NotifyPrefValueChanged(const std::string& key);
danno 2010/12/06 14:17:53 These should be virtual too.
25
26 // Notify observers about initialization being complete.
27 void NotifyInitializationCompleted();
28
29 private:
30 ObserverList<ObserverInterface, true> observers_;
31 };
32
33 #endif // CHROME_COMMON_PREF_STORE_BASE_H_
OLDNEW
« no previous file with comments | « chrome/common/pref_store.h ('k') | chrome/common/pref_store_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698