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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 196783002: Export a private webstore API to call into the new inline sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mostly functional Created 6 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
Index: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index 8b41c80df6fe9bb590e53291392c01e76b4aa360..988abfac20ba31406cb69dff30be8384a787535e 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -62,6 +62,8 @@ void InlineLoginHandlerImpl::SetExtraInitParams(base::DictionaryValue& params) {
GaiaUrls::GetInstance()->embedded_signin_url().path().substr(1));
}
+ // TODO(isherman): Should the continue URL be passed on to GAIA? When I try
+ // to pass it on, the tab crashes... I'm not exactly sure why.
Ilya Sherman 2014/03/14 05:42:56 ^^^
guohui 2014/03/14 22:09:44 nope gaia does not need to know the continue url.
params.SetString("service", "chromiumsync");
params.SetString("continueUrl",
signin::GetLandingURL("source", static_cast<int>(source)).spec());
@@ -319,6 +321,8 @@ void InlineLoginHandlerImpl::SyncStarterCallback(
signin::Source source = signin::GetSourceForPromoURL(current_url);
DCHECK(source != signin::SOURCE_UNKNOWN);
bool auto_close = signin::IsAutoCloseEnabledInURL(current_url);
+ std::string continue_url;
+ net::GetValueForKeyInQuery(current_url, "continueUrl", &continue_url);
if (result == OneClickSigninSyncStarter::SYNC_SETUP_FAILURE) {
OneClickSigninHelper::RedirectToNtpOrAppsPage(contents, source);
@@ -327,6 +331,13 @@ void InlineLoginHandlerImpl::SyncStarterCallback(
FROM_HERE,
base::Bind(&InlineLoginHandlerImpl::CloseTab,
weak_factory_.GetWeakPtr()));
+ } else if (!continue_url.empty()) {
+ // TODO(isherman): If the user opts to choose what is synced, this code is
+ // reached, but then the tab is hijacked by chrome://settings/syncSetup.
Ilya Sherman 2014/03/14 05:42:56 I'm not sure what to do about this. Conceptually,
guohui 2014/03/14 22:09:44 yup sync setup should open in the current tab, and
+ contents->GetController().LoadURL(GURL(continue_url),
+ content::Referrer(),
+ content::PAGE_TRANSITION_AUTO_TOPLEVEL,
+ std::string());
} else {
OneClickSigninHelper::RedirectToNtpOrAppsPageIfNecessary(contents, source);
}

Powered by Google App Engine
This is Rietveld 408576698