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

Unified Diff: chrome/browser/signin/signin_promo.cc

Issue 1413533009: Make the new Gaia password separated signin flow modal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 5 years 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/signin/signin_promo.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_promo.cc
diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
index 9db75c826cf8fbd6ad0365ea3f98560e8645899e..1377d70564f02a2d40db29ba534d689a17b31f3c 100644
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
+#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/webui/options/core_options_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
@@ -221,6 +222,33 @@ GURL GetSigninPartitionURL() {
return GURL("chrome-guest://chrome-signin/?");
}
+GURL GetSigninURLFromBubbleViewMode(Profile* profile,
+ profiles::BubbleViewMode mode) {
+ switch (mode) {
+ case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN:
+ return GetPromoURL(signin_metrics::SOURCE_AVATAR_BUBBLE_SIGN_IN,
+ false /* auto_close */,
+ true /* is_constrained */);
+ break;
+ case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT:
+ return GetPromoURL(signin_metrics::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT,
+ false /* auto_close */,
+ true /* is_constrained */);
+ break;
+ case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: {
+ const SigninErrorController* error_controller =
+ SigninErrorControllerFactory::GetForProfile(profile);
+ CHECK(error_controller);
+ DCHECK(error_controller->HasError());
+ return GetReauthURL(profile, error_controller->error_account_id());
+ break;
+ }
+ default:
+ NOTREACHED() << "Called with invalid mode=" << mode;
+ return GURL();
+ }
+}
+
signin_metrics::Source GetSourceForPromoURL(const GURL& url) {
std::string value;
if (net::GetValueForKeyInQuery(url, kSignInPromoQueryKeySource, &value)) {
« no previous file with comments | « chrome/browser/signin/signin_promo.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698