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

Unified Diff: chrome/browser/ui/webui/inline_login_ui.cc

Issue 66403006: Use embedded sign in UI for inline sign in flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add util function for appending param # Created 7 years, 1 month 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/views/profile_chooser_view.cc ('k') | google_apis/gaia/gaia_urls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/inline_login_ui.cc
diff --git a/chrome/browser/ui/webui/inline_login_ui.cc b/chrome/browser/ui/webui/inline_login_ui.cc
index cc7be52394a57634b4a1254aafe9ac5ff24d70c3..12e04ea64f29ca0e966ef9acc3e693850e893671 100644
--- a/chrome/browser/ui/webui/inline_login_ui.cc
+++ b/chrome/browser/ui/webui/inline_login_ui.cc
@@ -151,17 +151,19 @@ class InlineLoginUIHandler : public content::WebUIMessageHandler {
const GURL& current_url = web_ui()->GetWebContents()->GetURL();
signin::Source source = signin::GetSourceForPromoURL(current_url);
- // TODO(guohui): switch to the embedded gaia endpoint for avatar flows
- // when available.
DCHECK(source != signin::SOURCE_UNKNOWN);
- if (source != signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT &&
- source != signin::SOURCE_AVATAR_BUBBLE_SIGN_IN) {
- params.SetString("service", "chromiumsync");
- base::StringAppendF(
- &encoded_continue_params, "&%s=%d", "source",
- static_cast<int>(source));
+ if (source == signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT ||
+ source == signin::SOURCE_AVATAR_BUBBLE_SIGN_IN) {
+ // Drop the leading slash in the path.
+ params.SetString("gaiaPath",
+ gaiaUrls->embedded_signin_url().path().substr(1));
}
+ params.SetString("service", "chromiumsync");
+ base::StringAppendF(
+ &encoded_continue_params, "&%s=%d", "source",
+ static_cast<int>(source));
+
params.SetString("continueUrl",
gaiaUrls->client_login_to_oauth2_url().Resolve(
encoded_continue_params).spec());
« no previous file with comments | « chrome/browser/ui/views/profile_chooser_view.cc ('k') | google_apis/gaia/gaia_urls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698