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

Unified Diff: chrome/browser/chromeos/login/signed_settings.cc

Issue 6151001: [Chrome OS] Canonicalize username before checking against whitelist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test failures Created 9 years, 11 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 | « no previous file | chrome/browser/chromeos/login/signed_settings_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/signed_settings.cc
diff --git a/chrome/browser/chromeos/login/signed_settings.cc b/chrome/browser/chromeos/login/signed_settings.cc
index 8e400e4ae910ff466f12232a62fe18cff548ce38..58bce4bc0d401fb8a25d7792fa3e3289ae44bd76 100644
--- a/chrome/browser/chromeos/login/signed_settings.cc
+++ b/chrome/browser/chromeos/login/signed_settings.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/login_library.h"
+#include "chrome/browser/chromeos/login/authenticator.h"
#include "chrome/browser/chromeos/login/ownership_service.h"
#include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
@@ -108,7 +109,7 @@ SignedSettings* SignedSettings::CreateCheckWhitelistOp(
const std::string& email,
SignedSettings::Delegate<bool>* d) {
DCHECK(d != NULL);
- return new CheckWhitelistOp(email, d);
+ return new CheckWhitelistOp(Authenticator::Canonicalize(email), d);
}
// static
@@ -117,7 +118,9 @@ SignedSettings* SignedSettings::CreateWhitelistOp(
bool add_to_whitelist,
SignedSettings::Delegate<bool>* d) {
DCHECK(d != NULL);
- return new WhitelistOp(email, add_to_whitelist, d);
+ return new WhitelistOp(Authenticator::Canonicalize(email),
+ add_to_whitelist,
+ d);
}
// static
@@ -169,8 +172,10 @@ void CheckWhitelistOp::OnKeyOpComplete(
return;
}
if (return_code == OwnerManager::SUCCESS) {
+ VLOG(2) << "Whitelist check was successful.";
d_->OnSettingsOpCompleted(SUCCESS, true);
} else {
+ VLOG(2) << "Whitelist check failed.";
d_->OnSettingsOpCompleted(SignedSettings::MapKeyOpCode(return_code), false);
}
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/signed_settings_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698