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

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

Issue 6821075: Chrome-side lockbox bindings (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed Ken's nits. Created 9 years, 8 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/chromeos/login/enterprise_enrollment_view.cc
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
index 44c7de5a9810528baeca7234cbffbbf6c6fab88c..ba2652dd5aad3992e984884505a73a1e2a16514d 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
@@ -82,7 +82,8 @@ class EnrollmentDomView : public WebPageDomView,
EnterpriseEnrollmentView::EnterpriseEnrollmentView(
EnterpriseEnrollmentController* controller)
- : controller_(controller) {}
+ : controller_(controller),
+ editable_user_(true) {}
EnterpriseEnrollmentView::~EnterpriseEnrollmentView() {}
@@ -122,7 +123,7 @@ void EnterpriseEnrollmentView::ShowAuthError(
const GoogleServiceAuthError& error) {
DictionaryValue args;
args.SetInteger("error", error.state());
- args.SetBoolean("editable_user", true);
+ args.SetBoolean("editable_user", editable_user_);
args.SetString("captchaUrl", error.captcha().image_url.spec());
UpdateGaiaLogin(args);
}
@@ -158,6 +159,10 @@ void EnterpriseEnrollmentView::OnConfirmationClosed() {
controller_->CloseConfirmation();
}
+bool EnterpriseEnrollmentView::GetInitialUser(std::string* user) {
+ return controller_->GetInitialUser(user);
+}
+
void EnterpriseEnrollmentView::UpdateGaiaLogin(const DictionaryValue& args) {
std::string json;
base::JSONWriter::Write(&args, false, &json);
@@ -172,7 +177,7 @@ void EnterpriseEnrollmentView::UpdateGaiaLogin(const DictionaryValue& args) {
void EnterpriseEnrollmentView::ShowError(int message_id) {
DictionaryValue args;
args.SetInteger("error", GoogleServiceAuthError::NONE);
- args.SetBoolean("editable_user", true);
+ args.SetBoolean("editable_user", editable_user_);
args.SetString("error_message", l10n_util::GetStringUTF16(message_id));
UpdateGaiaLogin(args);
}
@@ -181,4 +186,8 @@ void EnterpriseEnrollmentView::Layout() {
enrollment_page_view_->SetBoundsRect(GetContentsBounds());
}
+void EnterpriseEnrollmentView::set_editable_user(bool editable) {
+ editable_user_ = editable;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698