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

Unified Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc

Issue 657923003: Owner is allowed as a secondary user. chrome://settings honors profile now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6ec310938293fa24072390256193a1c1548c16db..771fdeccd918394017ff15e9c17bf671005e0cae 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
@@ -16,6 +16,8 @@
#include "base/sys_info.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
+#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/proxy_cros_settings_parser.h"
@@ -223,7 +225,14 @@ void CoreChromeOSOptionsHandler::SetPref(const std::string& pref_name,
}
if (!CrosSettings::IsCrosSettings(pref_name))
return ::options::CoreOptionsHandler::SetPref(pref_name, value, metric);
- CrosSettings::Get()->Set(pref_name, *value);
+ Profile* profile = Profile::FromWebUI(web_ui());
+ OwnerSettingsServiceChromeOS* service =
+ profile ? OwnerSettingsServiceChromeOSFactory::GetForProfile(profile)
+ : nullptr;
+ if (service && service->HandlesSetting(pref_name))
+ service->Set(pref_name, *value);
+ else
+ CrosSettings::Get()->Set(pref_name, *value);
Nikita (slow) 2014/10/27 16:44:38 Which settings still go through CrosSettings?
ygorshenin1 2014/10/27 18:29:21 Not so many: https://code.google.com/p/chromium/co
ProcessUserMetric(value, metric);
}
« no previous file with comments | « chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698