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

Unified Diff: chrome/browser/ui/auto_login_info_bar_delegate.h

Issue 14312005: auto_login_info_bar_delegate.* -> auto_login_infobar_delegate.*, for consistency with rest of codeb… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/auto_login_info_bar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/auto_login_info_bar_delegate.h
===================================================================
--- chrome/browser/ui/auto_login_info_bar_delegate.h (revision 194516)
+++ chrome/browser/ui/auto_login_info_bar_delegate.h (working copy)
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_AUTO_LOGIN_INFO_BAR_DELEGATE_H_
-#define CHROME_BROWSER_UI_AUTO_LOGIN_INFO_BAR_DELEGATE_H_
-
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
-#include "components/auto_login_parser/auto_login_parser.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-
-class PrefService;
-class TokenService;
-
-namespace content {
-class NavigationController;
-} // namespace content
-
-// This is the actual infobar displayed to prompt the user to auto-login.
-class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
- public content::NotificationObserver {
- public:
- struct Params {
- Params();
- ~Params();
-
- // Information from a parsed header.
- components::auto_login::HeaderData header;
-
- // Username to display in the infobar indicating user to be logged in as.
- // This is initially fetched from sign-in on non-Android platforms. Note
- // that on Android this field is not used.
- std::string username;
- };
-
- // Creates an autologin delegate and adds it to |infobar_service|.
- static void Create(InfoBarService* infobar_service, const Params& params);
-
- // ConfirmInfoBarDelegate:
- virtual void InfoBarDismissed() OVERRIDE;
- virtual gfx::Image* GetIcon() const OVERRIDE;
- virtual Type GetInfoBarType() const OVERRIDE;
- virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() OVERRIDE;
- virtual string16 GetMessageText() const OVERRIDE;
- virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
- virtual bool Accept() OVERRIDE;
- virtual bool Cancel() OVERRIDE;
-
- // content::NotificationObserver overrides.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- // All the methods below are used by the Android implementation of the
- // AutoLogin bar on the app side.
- string16 GetMessageText(const std::string& username) const;
-
- const std::string& realm() const { return params_.header.realm; }
- const std::string& account() const { return params_.header.account; }
- const std::string& args() const { return params_.header.args; }
-
- private:
- AutoLoginInfoBarDelegate(InfoBarService* owner, const Params& params);
- virtual ~AutoLoginInfoBarDelegate();
-
- void RecordHistogramAction(int action);
-
- const Params params_;
-
- // Whether any UI controls in the infobar were pressed or not.
- bool button_pressed_;
-
- // For listening to the user signing out.
- content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate);
-};
-
-#endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFO_BAR_DELEGATE_H_
« no previous file with comments | « no previous file | chrome/browser/ui/auto_login_info_bar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698