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

Unified Diff: chrome/browser/ui/auto_login_prompter.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
« no previous file with comments | « chrome/browser/ui/auto_login_info_bar_delegate.cc ('k') | chrome/browser/ui/auto_login_prompter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/auto_login_prompter.h
diff --git a/chrome/browser/ui/auto_login_prompter.h b/chrome/browser/ui/auto_login_prompter.h
index 7dd9d9deede56056ad229ee42dffd49e1f6fd78f..2ce2be4c107ffc7f2a9a0664f99edfa984da5393 100644
--- a/chrome/browser/ui/auto_login_prompter.h
+++ b/chrome/browser/ui/auto_login_prompter.h
@@ -6,7 +6,9 @@
#define CHROME_BROWSER_UI_AUTO_LOGIN_PROMPTER_H_
#include <string>
+
#include "base/compiler_specific.h"
+#include "chrome/browser/ui/auto_login_info_bar_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -26,6 +28,8 @@ class URLRequest;
// tokens that would allow a one-click login.
class AutoLoginPrompter : public content::NotificationObserver {
public:
+ typedef AutoLoginInfoBarDelegate::Params Params;
+
// Looks for the X-Auto-Login response header in the request, and if found,
// tries to display an infobar in the tab contents identified by the
// child/route id.
@@ -34,16 +38,14 @@ class AutoLoginPrompter : public content::NotificationObserver {
int route_id);
private:
- AutoLoginPrompter(content::WebContents* web_contents,
- const std::string& username,
- const std::string& args);
+ friend class AutoLoginPrompterTest;
+
+ AutoLoginPrompter(content::WebContents* web_contents, const Params& params);
virtual ~AutoLoginPrompter();
- // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread.
- static void ShowInfoBarUIThread(const std::string& account,
- const std::string& args,
- const GURL& original_url,
+ static void ShowInfoBarUIThread(Params params,
+ const GURL& url,
int child_id,
int route_id);
@@ -52,9 +54,11 @@ class AutoLoginPrompter : public content::NotificationObserver {
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // Returns whether parsing succeeded.
+ static bool ParseAutoLoginHeader(const std::string& input, Params* output);
+
content::WebContents* web_contents_;
- const std::string username_;
- const std::string args_;
+ const Params params_;
content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AutoLoginPrompter);
« no previous file with comments | « chrome/browser/ui/auto_login_info_bar_delegate.cc ('k') | chrome/browser/ui/auto_login_prompter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698