OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_PREF_BACKED_BOOLEAN_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_PREF_BACKED_BOOLEAN_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/settings/utils/observable_boolean.h" |
| 11 |
| 12 class PrefService; |
| 13 |
| 14 // An observable boolean backed by a pref from a PrefService. |
| 15 @interface PrefBackedBoolean : NSObject<ObservableBoolean> |
| 16 |
| 17 // Returns a PrefBackedBoolean backed by |prefName| from |prefs|. |
| 18 - (instancetype)initWithPrefService:(PrefService*)prefs |
| 19 prefName:(const char*)prefName |
| 20 NS_DESIGNATED_INITIALIZER; |
| 21 - (instancetype)init NS_UNAVAILABLE; |
| 22 |
| 23 @end |
| 24 |
| 25 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_PREF_BACKED_BOOLEAN_H_ |
OLD | NEW |