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

Unified Diff: chrome/browser/chromeos/cros_settings.cc

Issue 9289017: Apply individual policies for the various parts of device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Julian's comments. Created 8 years, 11 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 | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/chromeos/cros_settings_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros_settings.cc
diff --git a/chrome/browser/chromeos/cros_settings.cc b/chrome/browser/chromeos/cros_settings.cc
index d2bb5c96b87179e2905c609767af85258d6330e6..c4e88521d6a5c3ca49714b0bc06041295acb2faf 100644
--- a/chrome/browser/chromeos/cros_settings.cc
+++ b/chrome/browser/chromeos/cros_settings.cc
@@ -124,6 +124,14 @@ bool CrosSettings::FindEmailInList(const std::string& path,
bool CrosSettings::AddSettingsProvider(CrosSettingsProvider* provider) {
DCHECK(CalledOnValidThread());
providers_.push_back(provider);
+
+ // Allow the provider to notify this object when settings have changed.
+ // Providers instantiated inside this class will have the same callback
+ // passed to their constructor, but doing it here allows for providers
+ // to be instantiated outside this class.
+ CrosSettingsProvider::NotifyObserversCallback notify_cb(
+ base::Bind(&CrosSettings::FireObservers, base::Unretained(this)));
+ provider->SetNotifyObserversCallback(notify_cb);
return true;
}
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/chromeos/cros_settings_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698