1*6777b538SAndroid Build Coastguard Worker // Copyright 2011 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker #ifndef COMPONENTS_PREFS_PREF_NOTIFIER_H_ 6*6777b538SAndroid Build Coastguard Worker #define COMPONENTS_PREFS_PREF_NOTIFIER_H_ 7*6777b538SAndroid Build Coastguard Worker 8*6777b538SAndroid Build Coastguard Worker #include <string> 9*6777b538SAndroid Build Coastguard Worker 10*6777b538SAndroid Build Coastguard Worker // Delegate interface used by PrefValueStore to notify its owner about changes 11*6777b538SAndroid Build Coastguard Worker // to the preference values. 12*6777b538SAndroid Build Coastguard Worker // TODO(mnissler, danno): Move this declaration to pref_value_store.h once we've 13*6777b538SAndroid Build Coastguard Worker // cleaned up all public uses of this interface. 14*6777b538SAndroid Build Coastguard Worker class PrefNotifier { 15*6777b538SAndroid Build Coastguard Worker public: ~PrefNotifier()16*6777b538SAndroid Build Coastguard Worker virtual ~PrefNotifier() {} 17*6777b538SAndroid Build Coastguard Worker 18*6777b538SAndroid Build Coastguard Worker // Sends out a change notification for the preference identified by 19*6777b538SAndroid Build Coastguard Worker // |pref_name|. 20*6777b538SAndroid Build Coastguard Worker virtual void OnPreferenceChanged(const std::string& pref_name) = 0; 21*6777b538SAndroid Build Coastguard Worker 22*6777b538SAndroid Build Coastguard Worker // Broadcasts the intialization completed notification. 23*6777b538SAndroid Build Coastguard Worker virtual void OnInitializationCompleted(bool succeeded) = 0; 24*6777b538SAndroid Build Coastguard Worker }; 25*6777b538SAndroid Build Coastguard Worker 26*6777b538SAndroid Build Coastguard Worker #endif // COMPONENTS_PREFS_PREF_NOTIFIER_H_ 27