Commit 2268a1dc authored by Thiemo Nagel's avatar Thiemo Nagel Committed by Commit Bot

Remove special-casing for AUE'ed boards

We'll never ship an update to x86-{alex, mario, zgb} again thus there's
no use in keeping the special cases around.

Bug: none
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I150a4b50d3347767f94dbc0e01019cef979a134f
Reviewed-on: https://chromium-review.googlesource.com/581188Reviewed-by: default avatarValery Arkhangorodsky <varkha@chromium.org>
Reviewed-by: default avatarDaichi Hirono <hirono@chromium.org>
Commit-Queue: Thiemo Nagel <tnagel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491974}
parent be5214ee
...@@ -497,17 +497,11 @@ void LockStateController::PreLockAnimationFinished(bool request_lock) { ...@@ -497,17 +497,11 @@ void LockStateController::PreLockAnimationFinished(bool request_lock) {
base::TimeDelta timeout = base::TimeDelta timeout =
base::TimeDelta::FromMilliseconds(kLockFailTimeoutMs); base::TimeDelta::FromMilliseconds(kLockFailTimeoutMs);
// Increase lock timeout for slower hardware, see http://crbug.com/350628 // Increase lock timeout for "daisy", see http://crbug.com/350628. (The boards
// The devices with boards "x86-mario", "daisy", "x86-alex" and "x86-zgb" have // "daisy_spring" and "daisy_skate" are fast thus using an exact string match
// slower hardware. For "x86-alex" and "x86-zgb" there are some modifications // instead of base::StartsWith().)
// like "x86-alex-he". Also there's "daisy", "daisy_spring" and "daisy_skate", if (base::SysInfo::GetStrippedReleaseBoard() == "daisy")
// but they are all different devices and only "daisy" has slower hardware.
const std::string board = base::SysInfo::GetStrippedReleaseBoard();
if (board == "x86-mario" || board == "daisy" ||
base::StartsWith(board, "x86-alex", base::CompareCase::SENSITIVE) ||
base::StartsWith(board, "x86-zgb", base::CompareCase::SENSITIVE)) {
timeout *= 2; timeout *= 2;
}
lock_fail_timer_.Start(FROM_HERE, timeout, this, lock_fail_timer_.Start(FROM_HERE, timeout, this,
&LockStateController::OnLockFailTimeout); &LockStateController::OnLockFailTimeout);
......
...@@ -517,10 +517,13 @@ util.AppCache.cleanup_ = function(map) { ...@@ -517,10 +517,13 @@ util.AppCache.cleanup_ = function(map) {
}; };
/** /**
* Returns true if the board of the device matches the given prefix. * Returns true if the board of the device matches the given prefix. Caution:
* @param {string} boardPrefix The board prefix to match against. * There are cases in which the name of one board is a prefix for a different
* (ex. "x86-mario". Prefix is used as the actual board name comes with * (only slightly related) board: E.g. daisy and daisy-spring, peach-pi and
* suffix like "x86-mario-something". * peach-pit, and maybe others. See also base::GetLsbReleaseBoard().
* @param {string} boardPrefix The board prefix to match against. (ex.
* "x86-mario". Prefix is used as the actual board name comes with suffix
* like "x86-mario-something".
* @return {boolean} True if the board of the device matches the given prefix. * @return {boolean} True if the board of the device matches the given prefix.
*/ */
util.boardIs = function(boardPrefix) { util.boardIs = function(boardPrefix) {
......
...@@ -22,7 +22,7 @@ function Banners( ...@@ -22,7 +22,7 @@ function Banners(
this.showWelcome_ = showWelcome; this.showWelcome_ = showWelcome;
this.driveEnabled_ = false; this.driveEnabled_ = false;
this.initializeWelcomeBanner_(); this.usePromoWelcomeBanner_ = true;
this.privateOnDirectoryChangedBound_ = this.privateOnDirectoryChangedBound_ =
this.privateOnDirectoryChanged_.bind(this); this.privateOnDirectoryChanged_.bind(this);
...@@ -144,18 +144,6 @@ var DOWNLOADS_SPACE_WARNING_THRESHOLD_SIZE = 1 * 1024 * 1024 * 1024; ...@@ -144,18 +144,6 @@ var DOWNLOADS_SPACE_WARNING_THRESHOLD_SIZE = 1 * 1024 * 1024 * 1024;
*/ */
var DOWNLOADS_SPACE_WARNING_DISMISS_DURATION = 36 * 60 * 60 * 1000; var DOWNLOADS_SPACE_WARNING_DISMISS_DURATION = 36 * 60 * 60 * 1000;
/**
* Initializes the banner to promote DRIVE.
* This method must be called before any of showing banner functions, and
* also before registering them as callbacks.
* @private
*/
Banners.prototype.initializeWelcomeBanner_ = function() {
this.usePromoWelcomeBanner_ = !util.boardIs('x86-mario') &&
!util.boardIs('x86-zgb') &&
!util.boardIs('x86-alex');
};
/** /**
* @param {number} value How many times the Drive Welcome header banner * @param {number} value How many times the Drive Welcome header banner
* has shown. * has shown.
......
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