summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 01:01:05 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 01:01:05 +0000
commitfc40879ebe49890956fb26a697c13f81ecb7bf7e (patch)
tree1294e0399009591c976cff4e4d0224d741a7cd5d
parent886f38b51797f03e1c9344b6b8e6e424b4417166 (diff)
downloadchromium_src-fc40879ebe49890956fb26a697c13f81ecb7bf7e.zip
chromium_src-fc40879ebe49890956fb26a697c13f81ecb7bf7e.tar.gz
chromium_src-fc40879ebe49890956fb26a697c13f81ecb7bf7e.tar.bz2
Cleanup some cruft from LoginView.
Review URL: https://codereview.chromium.org/136393011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249570 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/login_view.cc10
-rw-r--r--chrome/browser/ui/views/login_view.h8
2 files changed, 6 insertions, 12 deletions
diff --git a/chrome/browser/ui/views/login_view.cc b/chrome/browser/ui/views/login_view.cc
index 0551d3a..60a192a7 100644
--- a/chrome/browser/ui/views/login_view.cc
+++ b/chrome/browser/ui/views/login_view.cc
@@ -4,18 +4,12 @@
#include "chrome/browser/ui/views/login_view.h"
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_constants.h"
-#include "ui/views/widget/root_view.h"
static const int kMessageWidth = 320;
static const int kTextfieldStackHorizontalSpacing = 30;
@@ -89,11 +83,11 @@ LoginView::~LoginView() {
login_model_->RemoveObserver(this);
}
-base::string16 LoginView::GetUsername() {
+const base::string16& LoginView::GetUsername() const {
return username_field_->text();
}
-base::string16 LoginView::GetPassword() {
+const base::string16& LoginView::GetPassword() const {
return password_field_->text();
}
diff --git a/chrome/browser/ui/views/login_view.h b/chrome/browser/ui/views/login_view.h
index 13f0641..e875139 100644
--- a/chrome/browser/ui/views/login_view.h
+++ b/chrome/browser/ui/views/login_view.h
@@ -5,14 +5,14 @@
#ifndef CHROME_BROWSER_UI_VIEWS_LOGIN_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_LOGIN_VIEW_H_
+#include "base/compiler_specific.h"
#include "chrome/browser/ui/login/login_model.h"
#include "ui/views/view.h"
namespace views {
class Label;
class Textfield;
-class LoginModel;
-} // namespace views
+}
// This class is responsible for displaying the contents of a login window
// for HTTP/FTP authentication.
@@ -24,8 +24,8 @@ class LoginView : public views::View, public LoginModelObserver {
virtual ~LoginView();
// Access the data in the username/password text fields.
- base::string16 GetUsername();
- base::string16 GetPassword();
+ const base::string16& GetUsername() const;
+ const base::string16& GetPassword() const;
// LoginModelObserver implementation.
virtual void OnAutofillDataAvailable(const base::string16& username,