Commit ffc852c3 authored by merkulova's avatar merkulova Committed by Commit bot

Renaming MinuteMaid to NewGaiaFlow.

BUG=0

Review URL: https://codereview.chromium.org/1031833005

Cr-Commit-Position: refs/heads/master@{#322004}
parent c9de6f7a
...@@ -21,8 +21,8 @@ cr.define('login', function() { ...@@ -21,8 +21,8 @@ cr.define('login', function() {
// Whether guest button should be shown when header bar is in normal mode. // Whether guest button should be shown when header bar is in normal mode.
showGuest_: false, showGuest_: false,
// Whehter MinuteMaid flow is active. // Whether new Gaia flow is active.
isMinuteMaid_: false, isNewGaiaFlow_: false,
// Whether the reboot button should be shown the when header bar is in // Whether the reboot button should be shown the when header bar is in
// normal mode. // normal mode.
...@@ -241,8 +241,8 @@ cr.define('login', function() { ...@@ -241,8 +241,8 @@ cr.define('login', function() {
this.updateUI_(); this.updateUI_();
}, },
set minuteMaid(value) { set newGaiaFlow(value) {
this.isMinuteMaid_ = value; this.isNewGaiaFlow_ = value;
this.updateUI_(); this.updateUI_();
}, },
...@@ -330,17 +330,17 @@ cr.define('login', function() { ...@@ -330,17 +330,17 @@ cr.define('login', function() {
$('add-user-button').hidden = $('add-user-button').hidden =
!accountPickerIsActive || isMultiProfilesUI || isLockScreen; !accountPickerIsActive || isMultiProfilesUI || isLockScreen;
$('more-settings-header-bar-item').hidden = !this.isMinuteMaid_ || $('more-settings-header-bar-item').hidden = !this.isNewGaiaFlow_ ||
!this.showCreateSupervised_ || !this.showCreateSupervised_ ||
!accountPickerIsActive; !accountPickerIsActive;
$('cancel-add-user-button').hidden = $('cancel-add-user-button').hidden =
(gaiaIsActive && this.isMinuteMaid_) || (gaiaIsActive && this.isNewGaiaFlow_) ||
accountPickerIsActive || accountPickerIsActive ||
!this.allowCancel_ || !this.allowCancel_ ||
wrongHWIDWarningIsActive || wrongHWIDWarningIsActive ||
isMultiProfilesUI; isMultiProfilesUI;
$('guest-user-header-bar-item').hidden = $('guest-user-header-bar-item').hidden =
(gaiaIsActive && !this.isMinuteMaid_) || (gaiaIsActive && !this.isNewGaiaFlow_) ||
supervisedUserCreationDialogIsActive || supervisedUserCreationDialogIsActive ||
!this.showGuest_ || !this.showGuest_ ||
wrongHWIDWarningIsActive || wrongHWIDWarningIsActive ||
......
...@@ -47,10 +47,10 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -47,10 +47,10 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
isLocal_: false, isLocal_: false,
/** /**
* Whether MinuteMaid flow is active. * Whether new Gaia flow is active.
* @type {boolean} * @type {boolean}
*/ */
isMinuteMaid: false, isNewGaiaFlow: false,
/** /**
* Email of the user, which is logging in using offline mode. * Email of the user, which is logging in using offline mode.
...@@ -299,7 +299,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -299,7 +299,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
loadAuthExtension: function(data) { loadAuthExtension: function(data) {
this.isLocal = data.isLocal; this.isLocal = data.isLocal;
this.email = ''; this.email = '';
this.isMinuteMaid = data.useMinuteMaid; this.isNewGaiaFlow = data.useNewGaiaFlow;
// Reset SAML // Reset SAML
this.classList.toggle('full-width', false); this.classList.toggle('full-width', false);
...@@ -317,20 +317,20 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -317,20 +317,20 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
if (data.localizedStrings) if (data.localizedStrings)
params.localizedStrings = data.localizedStrings; params.localizedStrings = data.localizedStrings;
if (this.isMinuteMaid) { if (this.isNewGaiaFlow) {
$('inner-container').classList.add('minute-maid'); $('inner-container').classList.add('minute-maid');
$('progress-dots').hidden = true; $('progress-dots').hidden = true;
if (data.enterpriseDomain) if (data.enterpriseDomain)
params.enterpriseDomain = data.enterpriseDomain; params.enterpriseDomain = data.enterpriseDomain;
params.chromeType = data.chromeType; params.chromeType = data.chromeType;
params.isMinuteMaidChromeOS = true; params.isNewGaiaFlowChromeOS = true;
$('login-header-bar').showGuestButton = true; $('login-header-bar').showGuestButton = true;
} }
if (data.gaiaEndpoint) if (data.gaiaEndpoint)
params.gaiaPath = data.gaiaEndpoint; params.gaiaPath = data.gaiaEndpoint;
$('login-header-bar').minuteMaid = this.isMinuteMaid; $('login-header-bar').newGaiaFlow = this.isNewGaiaFlow;
if (data.forceReload || if (data.forceReload ||
JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) { JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) {
...@@ -368,7 +368,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -368,7 +368,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
reasonLabel.hidden = true; reasonLabel.hidden = true;
} }
if (this.isMinuteMaid) { if (this.isNewGaiaFlow) {
$('login-header-bar').showCreateSupervisedButton = $('login-header-bar').showCreateSupervisedButton =
data.supervisedUsersCanCreate; data.supervisedUsersCanCreate;
} else { } else {
...@@ -411,7 +411,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -411,7 +411,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
updateCancelButtonState: function() { updateCancelButtonState: function() {
this.cancelAllowed_ = this.isShowUsers_ && $('pod-row').pods.length; this.cancelAllowed_ = this.isShowUsers_ && $('pod-row').pods.length;
$('login-header-bar').allowCancel = this.cancelAllowed_; $('login-header-bar').allowCancel = this.cancelAllowed_;
if (this.isMinuteMaid) if (this.isNewGaiaFlow)
$('close-button-item').hidden = !this.cancelAllowed_; $('close-button-item').hidden = !this.cancelAllowed_;
}, },
...@@ -443,7 +443,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -443,7 +443,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
if (Oobe.getInstance().currentScreen === this) { if (Oobe.getInstance().currentScreen === this) {
Oobe.getInstance().updateScreenSize(this); Oobe.getInstance().updateScreenSize(this);
$('login-header-bar').allowCancel = isSAML || this.cancelAllowed_; $('login-header-bar').allowCancel = isSAML || this.cancelAllowed_;
if (this.isMinuteMaid) if (this.isNewGaiaFlow)
$('close-button-item').hidden = !(isSAML || this.cancelAllowed_); $('close-button-item').hidden = !(isSAML || this.cancelAllowed_);
} }
}, },
......
...@@ -175,7 +175,7 @@ cr.define('cr.login', function() { ...@@ -175,7 +175,7 @@ cr.define('cr.login', function() {
this.continueUrl_.substring(0, this.continueUrl_.indexOf('?')) || this.continueUrl_.substring(0, this.continueUrl_.indexOf('?')) ||
this.continueUrl_; this.continueUrl_;
this.isConstrainedWindow_ = data.constrained == '1'; this.isConstrainedWindow_ = data.constrained == '1';
this.isMinuteMaidChromeOS = data.isMinuteMaidChromeOS; this.isNewGaiaFlowChromeOS = data.isNewGaiaFlowChromeOS;
this.initialFrameUrl_ = this.constructInitialFrameUrl_(data); this.initialFrameUrl_ = this.constructInitialFrameUrl_(data);
this.reloadUrl_ = data.frameUrl || this.initialFrameUrl_; this.reloadUrl_ = data.frameUrl || this.initialFrameUrl_;
...@@ -198,7 +198,7 @@ cr.define('cr.login', function() { ...@@ -198,7 +198,7 @@ cr.define('cr.login', function() {
Authenticator.prototype.constructInitialFrameUrl_ = function(data) { Authenticator.prototype.constructInitialFrameUrl_ = function(data) {
var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH); var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH);
if (this.isMinuteMaidChromeOS) { if (this.isNewGaiaFlowChromeOS) {
if (data.chromeType) if (data.chromeType)
url = appendParam(url, 'chrometype', data.chromeType); url = appendParam(url, 'chrometype', data.chromeType);
if (data.clientId) if (data.clientId)
...@@ -321,7 +321,8 @@ cr.define('cr.login', function() { ...@@ -321,7 +321,8 @@ cr.define('cr.login', function() {
// URL will contain a source=3 field. // URL will contain a source=3 field.
var location = decodeURIComponent(header.value); var location = decodeURIComponent(header.value);
this.chooseWhatToSync_ = !!location.match(/(\?|&)source=3($|&)/); this.chooseWhatToSync_ = !!location.match(/(\?|&)source=3($|&)/);
} else if (this.isMinuteMaidChromeOS && headerName == SET_COOKIE_HEADER) { } else if (
this.isNewGaiaFlowChromeOS && headerName == SET_COOKIE_HEADER) {
var headerValue = header.value; var headerValue = header.value;
if (headerValue.indexOf(OAUTH_CODE_COOKIE + '=', 0) == 0) { if (headerValue.indexOf(OAUTH_CODE_COOKIE + '=', 0) == 0) {
this.oauth_code_ = this.oauth_code_ =
......
...@@ -232,7 +232,7 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) { ...@@ -232,7 +232,7 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (StartupUtils::IsWebviewSigninEnabled()) { if (StartupUtils::IsWebviewSigninEnabled()) {
params.SetBoolean("useMinuteMaid", true); params.SetBoolean("useNewGaiaFlow", true);
policy::BrowserPolicyConnectorChromeOS* connector = policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos(); g_browser_process->platform_part()->browser_policy_connector_chromeos();
...@@ -248,7 +248,7 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) { ...@@ -248,7 +248,7 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) {
kNewGaiaFlowPath); kNewGaiaFlowPath);
} }
} else { } else {
params.SetBoolean("useMinuteMaid", false); params.SetBoolean("useNewGaiaFlow", false);
} }
if (!command_line->HasSwitch(::switches::kGaiaUrl) && if (!command_line->HasSwitch(::switches::kGaiaUrl) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment