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

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: Address Peter's comments 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..bcdd117d216f3498d7efbace08675105d02c468b 100644
--- a/chrome/browser/ui/auto_login_info_bar_delegate.h
+++ b/chrome/browser/ui/auto_login_info_bar_delegate.h
@@ -19,29 +19,47 @@ 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.
+ // 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;
+ // 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 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_;
Roger Tawa OOO till Jul 10th 2012/06/28 14:39:56 why not replace all the members here with a params
Philippe 2012/06/28 15:18:27 I wanted to avoid making AutoLoginInfoBarDelegate
Roger Tawa OOO till Jul 10th 2012/06/28 15:31:51 If you move the declaration of struct Params to he
Philippe 2012/06/28 16:37:34 Indeed.
+
// Whether any UI controls in the infobar were pressed or not.
bool button_pressed_;

Powered by Google App Engine
This is Rietveld 408576698