Chromium Code Reviews| Index: chrome/browser/chromeos/cros_settings.cc |
| diff --git a/chrome/browser/chromeos/cros_settings.cc b/chrome/browser/chromeos/cros_settings.cc |
| index bde3c314b96288302f55f26c8a0c51515974d155..ce7b0da2fe707e6d497285a2f94494444579568c 100644 |
| --- a/chrome/browser/chromeos/cros_settings.cc |
| +++ b/chrome/browser/chromeos/cros_settings.cc |
| @@ -8,7 +8,7 @@ |
| #include "base/stl_util.h" |
| #include "base/string_util.h" |
| #include "base/values.h" |
| -#include "chrome/browser/chromeos/user_cros_settings_provider.h" |
| +#include "chrome/browser/chromeos/device_settings_provider.h" |
| #include "chrome/browser/ui/webui/options/chromeos/system_settings_provider.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "content/public/browser/notification_details.h" |
| @@ -104,8 +104,8 @@ bool CrosSettings::FindEmailInList(const std::string& path, |
| const std::string& email) const { |
| DCHECK(CalledOnValidThread()); |
| base::StringValue email_value(email); |
| - const base::ListValue* value = |
| - static_cast<const base::ListValue*>(GetPref(path)); |
| + const base::ListValue* value( |
| + static_cast<const base::ListValue*>(GetPref(path))); |
| if (value) { |
| if (value->Find(email_value) != value->end()) |
| return true; |
| @@ -195,6 +195,12 @@ CrosSettingsProvider* CrosSettings::GetProvider( |
| return NULL; |
| } |
| +void CrosSettings::ReloadProviders() const { |
| + for (size_t i = 0; i < providers_.size(); ++i) { |
|
Denis Lagno
2011/12/01 00:38:12
nit: no curly braces for one-liner loops
pastarmovj
2011/12/01 10:07:17
Done.
|
| + providers_[i]->Reload(); |
| + } |
| +} |
| + |
| const base::Value* CrosSettings::GetPref(const std::string& path) const { |
| DCHECK(CalledOnValidThread()); |
| CrosSettingsProvider* provider = GetProvider(path); |
| @@ -261,7 +267,7 @@ bool CrosSettings::GetList(const std::string& path, |
| CrosSettings::CrosSettings() { |
| AddSettingsProvider(new SystemSettingsProvider()); |
| - AddSettingsProvider(new UserCrosSettingsProvider()); |
| + AddSettingsProvider(new DeviceSettingsProvider()); |
| } |
| CrosSettings::~CrosSettings() { |