| Index: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| index 5a8807e19c8de134932e5ff96edee6c850504d8f..c77c99a4b446c9fb92fd6ee39b79fa964df0a8fb 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| @@ -43,9 +43,9 @@ base::Value* CreateSettingsValue(base::Value *value,
|
|
|
| // This function decorates the bare list of emails with some more information
|
| // needed by the UI to properly display the Accounts page.
|
| -base::Value* CreateUsersWhitelist(const base::Value *pref_value) {
|
| - const base::ListValue *list_value =
|
| - static_cast<const base::ListValue*>(pref_value);
|
| +base::Value* CreateUsersWhitelist(base::Value *pref_value) {
|
| + scoped_ptr<base::ListValue> list_value(
|
| + static_cast<base::ListValue*>(pref_value));
|
| base::ListValue *user_list = new base::ListValue();
|
|
|
| const User& self = UserManager::Get()->logged_in_user();
|
| @@ -118,7 +118,7 @@ base::Value* CoreChromeOSOptionsHandler::FetchPref(
|
| return ::CoreOptionsHandler::FetchPref(pref_name);
|
| }
|
|
|
| - const base::Value* pref_value =
|
| + base::Value* pref_value =
|
| CrosSettings::Get()->GetPref(pref_name);
|
| if (!pref_value)
|
| return base::Value::CreateNullValue();
|
| @@ -127,11 +127,11 @@ base::Value* CoreChromeOSOptionsHandler::FetchPref(
|
| if (pref_value->GetType() == base::Value::TYPE_LIST) {
|
| if (pref_name == kAccountsPrefUsers)
|
| return CreateUsersWhitelist(pref_value);
|
| - return pref_value->DeepCopy();
|
| + return pref_value;
|
| }
|
| // All other prefs are decorated the same way.
|
| return CreateSettingsValue(
|
| - pref_value->DeepCopy(),
|
| + pref_value,
|
| g_browser_process->browser_policy_connector()->IsEnterpriseManaged(),
|
| !UserManager::Get()->current_user_is_owner());
|
| }
|
|
|