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

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: Removed empty changes. 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..4544be1081edbeac5a6776a20dfb1f97c508312c 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
@@ -75,6 +75,7 @@ class EnrollmentDomView : public WebPageDomView,
}
private:
+
Mattias Nissler (ping if slow) 2011/04/15 18:17:58 no need for newline.
pastarmovj 2011/04/15 18:44:49 Done.
DISALLOW_COPY_AND_ASSIGN(EnrollmentDomView);
};
@@ -82,7 +83,8 @@ class EnrollmentDomView : public WebPageDomView,
EnterpriseEnrollmentView::EnterpriseEnrollmentView(
EnterpriseEnrollmentController* controller)
- : controller_(controller) {}
+ : controller_(controller),
+ editable_user_(true) {}
EnterpriseEnrollmentView::~EnterpriseEnrollmentView() {}
@@ -122,7 +124,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 +160,10 @@ void EnterpriseEnrollmentView::OnConfirmationClosed() {
controller_->CloseConfirmation();
}
+bool EnterpriseEnrollmentView::SetInitialUser(std::string* user) {
+ return controller_->GetInitialUser(user);
+}
+
void EnterpriseEnrollmentView::UpdateGaiaLogin(const DictionaryValue& args) {
std::string json;
base::JSONWriter::Write(&args, false, &json);
@@ -172,7 +178,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 +187,8 @@ void EnterpriseEnrollmentView::Layout() {
enrollment_page_view_->SetBoundsRect(GetContentsBounds());
}
+void EnterpriseEnrollmentView::editable_user(bool editable) {
+ editable_user_ = editable;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698