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

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 Nico'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..3e063ea3bb0fde8732ef7a796610a46a78368040 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;
Peter Kasting 2012/06/27 17:39:05 Nit: AutoLoginInfoBarDelegate doesn't inherit dire
Philippe 2012/06/28 09:24:00 Done.
+
+ // 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 std::string& username) const;
Peter Kasting 2012/06/27 17:39:05 Similar to my question about the downcast routine:
Philippe 2012/06/28 09:24:00 We use that in the Android implementation of the a
+
+ const std::string& realm() const {
Peter Kasting 2012/06/27 17:39:05 Nit: All on one line (3 places)
Philippe 2012/06/28 09:24:00 Done.
+ return realm_;
+ }
+
Peter Kasting 2012/06/27 17:39:05 Nit: Remove blank lines between getters
Philippe 2012/06/28 09:24:00 Done.
+ 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_;
+
// Whether any UI controls in the infobar were pressed or not.
bool button_pressed_;

Powered by Google App Engine
This is Rietveld 408576698