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

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

Issue 10690006: Upstream changes needed by Android auto-login. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove blank line Created 8 years, 6 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/ui/auto_login_info_bar_delegate.h
diff --git a/chrome/browser/ui/auto_login_info_bar_delegate.h b/chrome/browser/ui/auto_login_info_bar_delegate.h
index 6ec846a0ed3490c33bf144c0c1066caba120195f..51e9b6ad64f9676a85c876afea1c67119c0f8a60 100644
--- a/chrome/browser/ui/auto_login_info_bar_delegate.h
+++ b/chrome/browser/ui/auto_login_info_bar_delegate.h
@@ -19,12 +19,16 @@ class NavigationController;
class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
AutoLoginInfoBarDelegate(InfoBarTabHelper* owner,
- const std::string& username,
- const std::string& args);
+ const std::string& realm,
+ const std::string& account,
+ const std::string& args,
+ const std::string& username);
virtual ~AutoLoginInfoBarDelegate();
- private:
- // ConfirmInfoBarDelegate overrides.
+ // InfoBarDelegate:
+ virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() OVERRIDE;
+
+ // ConfirmInfoBarDelegate:
virtual void InfoBarDismissed() OVERRIDE;
virtual gfx::Image* GetIcon() const OVERRIDE;
virtual Type GetInfoBarType() const OVERRIDE;
@@ -33,15 +37,37 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
+ string16 GetMessageText(const string16& username) const;
+
+ const std::string& realm() const {
+ return realm_;
+ }
+
+ const std::string& account() const {
+ return account_;
+ }
+
+ const std::string& args() const {
+ return args_;
+ }
+
+ private:
void RecordHistogramAction(int action);
- // Username to display in the infobar indicating user to be logged in as.
- std::string username_;
+ // "realm" string from x-auto-login (e.g. "com.google").
+ std::string realm_;
+
+ // "account" string from x-auto-login.
+ std::string account_;
- // "args" string from x-auto-login to be passed to MergeSession. This
- // string should be considered opaque and not be cracked open to look inside.
+ // "args" string from x-auto-login to be passed to MergeSession. This string
+ // should be considered opaque and not be cracked open to look inside.
std::string args_;
+ // Username to display in the infobar indicating user to be logged in as. This
+ // was initially fetched from sync on non-Android platforms.
+ std::string username_;
Nico 2012/06/27 15:14:33 Nit: This probably isn't always ascii. In that cas
Philippe 2012/06/27 16:52:02 Indeed it seems possible to have non-ASCII charact
Nico 2012/06/27 16:54:51 That's fine (if it works, adding a test would be n
+
// Whether any UI controls in the infobar were pressed or not.
bool button_pressed_;

Powered by Google App Engine
This is Rietveld 408576698