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

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 ToT where both previous parts are committed. Created 9 years, 1 month 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/user_cros_settings_provider.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/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 00cd210e1d896607086871bd9307ee8884338fd3..41550f5a61e0f03a0dd48c9f7b992e36b012ddf6 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,10 @@ 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));
+
+ scoped_ptr<base::StringValue> canonical_email(
+ base::Value::CreateStringValue(Authenticator::Canonicalize(email)));
+ CrosSettings::Get()->AppendToList(kAccountsPrefUsers, canonical_email.get());
}
void AccountsOptionsHandler::UnwhitelistUser(const base::ListValue* args) {
@@ -93,8 +95,11 @@ 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));
+
+ scoped_ptr<base::StringValue> canonical_email(
+ base::Value::CreateStringValue(Authenticator::Canonicalize(email)));
+ CrosSettings::Get()->RemoveFromList(kAccountsPrefUsers,
+ canonical_email.get());
UserManager::Get()->RemoveUser(email, NULL);
}
« no previous file with comments | « chrome/browser/chromeos/user_cros_settings_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698