| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 bool FindEmailInList(const std::string& path, | 105 bool FindEmailInList(const std::string& path, |
| 106 const std::string& email, | 106 const std::string& email, |
| 107 bool* wildcard_match) const; | 107 bool* wildcard_match) const; |
| 108 | 108 |
| 109 // Adding/removing of providers. | 109 // Adding/removing of providers. |
| 110 bool AddSettingsProvider(std::unique_ptr<CrosSettingsProvider> provider); | 110 bool AddSettingsProvider(std::unique_ptr<CrosSettingsProvider> provider); |
| 111 std::unique_ptr<CrosSettingsProvider> RemoveSettingsProvider( | 111 std::unique_ptr<CrosSettingsProvider> RemoveSettingsProvider( |
| 112 CrosSettingsProvider* provider); | 112 CrosSettingsProvider* provider); |
| 113 | 113 |
| 114 // Add an observer Callback for changes for the given |path|. | 114 // Add an observer Callback for changes for the given |path|. |
| 115 typedef base::CallbackList<void(void)>::Subscription ObserverSubscription; | 115 using ObserverSubscription = base::CallbackList<void(void)>::Subscription; |
| 116 std::unique_ptr<ObserverSubscription> AddSettingsObserver( | 116 std::unique_ptr<ObserverSubscription> AddSettingsObserver( |
| 117 const std::string& path, | 117 const std::string& path, |
| 118 const base::Closure& callback); | 118 const base::Closure& callback) WARN_UNUSED_RESULT; |
| 119 | 119 |
| 120 // Returns the provider that handles settings with the |path| or prefix. | 120 // Returns the provider that handles settings with the |path| or prefix. |
| 121 CrosSettingsProvider* GetProvider(const std::string& path) const; | 121 CrosSettingsProvider* GetProvider(const std::string& path) const; |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 friend class CrosSettingsTest; | 124 friend class CrosSettingsTest; |
| 125 | 125 |
| 126 // Fires system setting change callback. | 126 // Fires system setting change callback. |
| 127 void FireObservers(const std::string& path); | 127 void FireObservers(const std::string& path); |
| 128 | 128 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 144 ScopedTestCrosSettings(); | 144 ScopedTestCrosSettings(); |
| 145 ~ScopedTestCrosSettings(); | 145 ~ScopedTestCrosSettings(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(ScopedTestCrosSettings); | 148 DISALLOW_COPY_AND_ASSIGN(ScopedTestCrosSettings); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace chromeos | 151 } // namespace chromeos |
| 152 | 152 |
| 153 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ | 153 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ |
| OLD | NEW |