diff options
author | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 11:42:53 +0000 |
---|---|---|
committer | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 11:42:53 +0000 |
commit | 4a188ca7f4aeb5b84187029bc2b61dcbee1797a8 (patch) | |
tree | 170c653c2ee1c83cd474e0084779dd731ba6af5c /chrome | |
parent | c919cf685fbadda56179e71ff0f389f3b0a03e0e (diff) | |
download | chromium_src-4a188ca7f4aeb5b84187029bc2b61dcbee1797a8.zip chromium_src-4a188ca7f4aeb5b84187029bc2b61dcbee1797a8.tar.gz chromium_src-4a188ca7f4aeb5b84187029bc2b61dcbee1797a8.tar.bz2 |
Removed "New User" label for New user pod in case this pod is the only existing pod.
Removed "Cant authorize?" link on new user pod because this functionality has moved into a bubble prompt.
BUG=http://crosbug.org/5756
TEST=Manual
Review URL: http://codereview.chromium.org/3243013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
4 files changed, 8 insertions, 14 deletions
diff --git a/chrome/browser/chromeos/login/login_screen_browsertest.cc b/chrome/browser/chromeos/login/login_screen_browsertest.cc index 8353268..c9ca694 100644 --- a/chrome/browser/chromeos/login/login_screen_browsertest.cc +++ b/chrome/browser/chromeos/login/login_screen_browsertest.cc @@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(LoginScreenTest, TestBasic) { // NOTE: When adding new controls check RecreateNativeControls() // that |sign_in_button_| is added with correct index. // See kSignInButtonFocusOrderIndex constant. - EXPECT_EQ(9, login->GetChildViewCount()); + EXPECT_EQ(8, login->GetChildViewCount()); login->SetUsername(kUsername); login->SetPassword(kPassword); diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc index f8c2963..c3599e0 100644 --- a/chrome/browser/chromeos/login/new_user_view.cc +++ b/chrome/browser/chromeos/login/new_user_view.cc @@ -80,7 +80,6 @@ NewUserView::NewUserView(Delegate* delegate, title_label_(NULL), sign_in_button_(NULL), create_account_link_(NULL), - cant_access_account_link_(NULL), browse_without_signin_link_(NULL), languages_menubutton_(NULL), throbber_(NULL), @@ -129,7 +128,6 @@ void NewUserView::Init() { AddChildView(throbber_); InitLink(&create_account_link_); - InitLink(&cant_access_account_link_); if (need_browse_without_signin_) { InitLink(&browse_without_signin_link_); } @@ -191,8 +189,6 @@ void NewUserView::UpdateLocalizedStrings() { sign_in_button_->SetLabel(l10n_util::GetString(IDS_LOGIN_BUTTON)); create_account_link_->SetText( l10n_util::GetString(IDS_CREATE_ACCOUNT_BUTTON)); - cant_access_account_link_->SetText( - l10n_util::GetString(IDS_CANT_ACCESS_ACCOUNT_BUTTON)); if (need_browse_without_signin_) { browse_without_signin_link_->SetText( l10n_util::GetString(IDS_BROWSE_WITHOUT_SIGNING_IN_BUTTON)); @@ -289,7 +285,6 @@ void NewUserView::Layout() { password_field_->GetPreferredSize().height() + sign_in_button_->GetPreferredSize().height() + create_account_link_->GetPreferredSize().height() + - cant_access_account_link_->GetPreferredSize().height() + browse_without_signin_link_height + 4 * kRowPad; y = (this->height() - height) / 2; @@ -306,7 +301,6 @@ void NewUserView::Layout() { width, false); y += setViewBounds(create_account_link_, x, y, max_width, false); - y += setViewBounds(cant_access_account_link_, x, y, max_width, false); if (need_browse_without_signin_) { y += setViewBounds(browse_without_signin_link_, x, y, max_width, false); @@ -357,11 +351,6 @@ void NewUserView::LinkActivated(views::Link* source, int event_flags) { delegate_->OnCreateAccount(); } else if (source == browse_without_signin_link_) { delegate_->OnLoginOffTheRecord(); - } else if (source == cant_access_account_link_) { - // TODO(nkostylev): Display offline help when network is not connected. - // http://crosbug.com/3874 - delegate_->AddStartUrl(GetAccountRecoveryHelpUrl()); - delegate_->OnLoginOffTheRecord(); } } @@ -422,7 +411,6 @@ void NewUserView::EnableInputControls(bool enabled) { password_field_->SetEnabled(enabled); sign_in_button_->SetEnabled(enabled); create_account_link_->SetEnabled(enabled); - cant_access_account_link_->SetEnabled(enabled); if (need_browse_without_signin_) { browse_without_signin_link_->SetEnabled(enabled); } diff --git a/chrome/browser/chromeos/login/new_user_view.h b/chrome/browser/chromeos/login/new_user_view.h index b744e9e..bc065bd 100644 --- a/chrome/browser/chromeos/login/new_user_view.h +++ b/chrome/browser/chromeos/login/new_user_view.h @@ -141,7 +141,6 @@ class NewUserView : public views::View, views::Label* title_label_; views::NativeButton* sign_in_button_; views::Link* create_account_link_; - views::Link* cant_access_account_link_; views::Link* browse_without_signin_link_; views::MenuButton* languages_menubutton_; views::Throbber* throbber_; diff --git a/chrome/browser/chromeos/login/user_controller.cc b/chrome/browser/chromeos/login/user_controller.cc index d59519b..80cb08d 100644 --- a/chrome/browser/chromeos/login/user_controller.cc +++ b/chrome/browser/chromeos/login/user_controller.cc @@ -373,6 +373,13 @@ WidgetGtk* UserController::CreateLabelWindow(int index, rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD); std::wstring text = is_guest_ ? l10n_util::GetString(IDS_GUEST) : UTF8ToWide(user_.GetDisplayName()); + if (index == 0 && is_guest_) { + // This is single guest login without any existing users around because + // non-single guest login is rightmost in current screen arrangement and + // hence indexed above zero. + // Such a single guest login should not be labelled. + text = std::wstring(); + } views::Label* label = new views::Label(text); label->SetColor(kTextColor); label->SetFont(font); |