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

Unified Diff: chrome/browser/ui/views/one_click_signin_dialog_views.cc

Issue 9592015: Added multi-login support to one-click signin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix member init order in ctor" Created 8 years, 9 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/sync/one_click_signin_sync_starter.cc ('k') | chrome/common/net/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/one_click_signin_dialog_views.cc
diff --git a/chrome/browser/ui/views/one_click_signin_dialog_views.cc b/chrome/browser/ui/views/one_click_signin_dialog_views.cc
index 68f757ee5f349770d7055404e73dc1ac0ca9de43..fc44e014fa685357cbf8c1398b953dd715b944ac 100644
--- a/chrome/browser/ui/views/one_click_signin_dialog_views.cc
+++ b/chrome/browser/ui/views/one_click_signin_dialog_views.cc
@@ -33,6 +33,7 @@ const int kMinColumnWidth = 320;
class OneClickSigninDialogView : public views::DialogDelegateView {
public:
OneClickSigninDialogView(Profile* profile,
+ const std::string& session_index,
const std::string& email,
const std::string& password);
virtual ~OneClickSigninDialogView();
@@ -52,7 +53,8 @@ class OneClickSigninDialogView : public views::DialogDelegateView {
Profile* profile_;
views::Checkbox* checkbox_;
- // Email address and password of the account that has just logged in.
+ // Information about the account that has just logged in.
+ std::string session_index_;
std::string email_;
std::string password_;
@@ -61,10 +63,12 @@ class OneClickSigninDialogView : public views::DialogDelegateView {
OneClickSigninDialogView::OneClickSigninDialogView(
Profile* profile,
+ const std::string& session_index,
const std::string& email,
const std::string& password)
: profile_(profile),
checkbox_(NULL),
+ session_index_(session_index),
email_(email),
password_(password) {
views::GridLayout* layout = views::GridLayout::CreatePanel(this);
@@ -131,7 +135,7 @@ bool OneClickSigninDialogView::Cancel() {
bool OneClickSigninDialogView::Accept() {
// The starter deletes itself once its done.
OneClickSigninSyncStarter* starter =
- new OneClickSigninSyncStarter(email_, password_, profile_,
+ new OneClickSigninSyncStarter(session_index_, email_, password_, profile_,
checkbox_->checked());
return true;
}
@@ -152,6 +156,7 @@ views::View* OneClickSigninDialogView::GetContentsView() {
void ShowOneClickSigninDialog(Profile* profile,
+ const std::string& session_index,
const std::string& email,
const std::string& password) {
Browser* browser = BrowserList::GetLastActiveWithProfile(profile);
@@ -163,7 +168,7 @@ void ShowOneClickSigninDialog(Profile* profile,
return;
OneClickSigninDialogView* dialog = new OneClickSigninDialogView(
- profile, email, password);
+ profile, session_index, email, password);
views::Widget* window = browser::CreateViewsWindow(
browser_window->GetNativeHandle(), dialog, STYLE_GENERIC);
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/common/net/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698