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

Side by Side Diff: chrome/browser/chromeos/settings/cros_settings.h

Issue 2793393002: CrOS settings/metrics: Correctly store Subscriptions (Closed)
Patch Set: . Created 3 years, 8 months 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
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_services_manager_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_services_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698