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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_event_router.h

Issue 2742663002: MD Settings: defer sending pref updates until all synchronous operations finish (Closed)
Patch Set: damn 's' Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/settings_private/settings_private_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/settings_private/settings_private_event_router.h
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_event_router.h b/chrome/browser/extensions/api/settings_private/settings_private_event_router.h
index 75fef8f2c4505e238e79f4ce4dc2898b422ba363..4c2f16667435be57c29fba7e99da71b20bd964d2 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_event_router.h
+++ b/chrome/browser/extensions/api/settings_private/settings_private_event_router.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/extensions/api/settings_private/prefs_util.h"
#include "components/keyed_service/core/keyed_service.h"
@@ -55,6 +56,9 @@ class SettingsPrivateEventRouter : public KeyedService,
void OnPreferenceChanged(const std::string& pref_name);
+ // Sends a pref change to any listeners (if they exist; no-ops otherwise).
+ void SendPrefChange(const std::string& pref_name);
+
PrefChangeRegistrar* FindRegistrarForPref(const std::string& pref_name);
using SubscriptionMap =
@@ -67,6 +71,8 @@ class SettingsPrivateEventRouter : public KeyedService,
std::unique_ptr<PrefsUtil> prefs_util_;
+ base::WeakPtrFactory<SettingsPrivateEventRouter> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateEventRouter);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/api/settings_private/settings_private_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698