brettw | 58cd1f1 | 2016-01-30 05:56:05 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
brettw | 06650868 | 2016-02-03 08:22:02 | [diff] [blame] | 5 | #ifndef COMPONENTS_PREFS_PREF_NOTIFIER_H_ |
| 6 | #define COMPONENTS_PREFS_PREF_NOTIFIER_H_ |
brettw | 58cd1f1 | 2016-01-30 05:56:05 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | // Delegate interface used by PrefValueStore to notify its owner about changes |
| 11 | // to the preference values. |
| 12 | // TODO(mnissler, danno): Move this declaration to pref_value_store.h once we've |
| 13 | // cleaned up all public uses of this interface. |
| 14 | class PrefNotifier { |
| 15 | public: |
| 16 | virtual ~PrefNotifier() {} |
| 17 | |
| 18 | // Sends out a change notification for the preference identified by |
| 19 | // |pref_name|. |
| 20 | virtual void OnPreferenceChanged(const std::string& pref_name) = 0; |
| 21 | |
| 22 | // Broadcasts the intialization completed notification. |
| 23 | virtual void OnInitializationCompleted(bool succeeded) = 0; |
| 24 | }; |
| 25 | |
brettw | 06650868 | 2016-02-03 08:22:02 | [diff] [blame] | 26 | #endif // COMPONENTS_PREFS_PREF_NOTIFIER_H_ |