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