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

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

Issue 8163011: PART3: Removed whitelist special ops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on the new PART2. (I think it should be 100% the same but I'd rather upload it) Created 9 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
Index: chrome/browser/ui/webui/options/chromeos/accounts_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/accounts_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/accounts_options_handler.cc
index a84771ca507a06442974c2e65d0470e972ff104b..ee024023e2a1786089d86816edc3d02702cfc0aa 100644
--- a/chrome/browser/ui/webui/options/chromeos/accounts_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/accounts_options_handler.cc
@@ -84,8 +84,9 @@ void AccountsOptionsHandler::WhitelistUser(const base::ListValue* args) {
if (!args->GetString(0, &email)) {
return;
}
- // TODO(pastarmovj): Those will change to CrosSettings ops in phase 2.
- UserCrosSettingsProvider::WhitelistUser(Authenticator::Canonicalize(email));
+
+ base::StringValue canonical_email(Authenticator::Canonicalize(email));
+ CrosSettings::Get()->AppendToList(kAccountsPrefUsers, canonical_email);
}
void AccountsOptionsHandler::UnwhitelistUser(const base::ListValue* args) {
@@ -93,8 +94,9 @@ void AccountsOptionsHandler::UnwhitelistUser(const base::ListValue* args) {
if (!args->GetString(0, &email)) {
return;
}
- // TODO(pastarmovj): Those will change to CrosSettings ops in phase 2.
- UserCrosSettingsProvider::UnwhitelistUser(Authenticator::Canonicalize(email));
+
+ base::StringValue canonical_email(Authenticator::Canonicalize(email));
+ CrosSettings::Get()->RemoveFromList(kAccountsPrefUsers, canonical_email);
UserManager::Get()->RemoveUser(email, NULL);
}

Powered by Google App Engine
This is Rietveld 408576698