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

Unified Diff: chrome/browser/resources/cryptotoken/countdowntimer.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/resources/cryptotoken/countdowntimer.js
diff --git a/chrome/browser/resources/cryptotoken/countdowntimer.js b/chrome/browser/resources/cryptotoken/countdowntimer.js
index 4e07ddbc24d548ded7b9a2a45a73bc798798323b..63175c14cfe2c1588663da9aad3bcd181dded982 100644
--- a/chrome/browser/resources/cryptotoken/countdowntimer.js
+++ b/chrome/browser/resources/cryptotoken/countdowntimer.js
@@ -43,14 +43,12 @@ CountdownTimer.prototype.setTimeout = function(timeoutMillis, cb) {
this.remainingMillis = timeoutMillis;
this.cb = cb;
if (this.remainingMillis > CountdownTimer.TIMER_INTERVAL_MILLIS) {
- this.timeoutId =
- this.sysTimer_.setInterval(this.timerTick.bind(this),
- CountdownTimer.TIMER_INTERVAL_MILLIS);
+ this.timeoutId = this.sysTimer_.setInterval(
+ this.timerTick.bind(this), CountdownTimer.TIMER_INTERVAL_MILLIS);
} else {
// Set a one-shot timer for the last interval.
- this.timeoutId =
- this.sysTimer_.setTimeout(
- this.timerTick.bind(this), this.remainingMillis);
+ this.timeoutId = this.sysTimer_.setTimeout(
+ this.timerTick.bind(this), this.remainingMillis);
}
return true;
};
@@ -114,8 +112,7 @@ function CountdownTimerFactory(sysTimer) {
* @param {function()=} opt_cb Called back when the countdown expires.
* @return {!Countdown} The timer.
*/
-CountdownTimerFactory.prototype.createTimer =
- function(timeoutMillis, opt_cb) {
+CountdownTimerFactory.prototype.createTimer = function(timeoutMillis, opt_cb) {
return new CountdownTimer(this.sysTimer_, timeoutMillis, opt_cb);
};
@@ -177,9 +174,9 @@ function getTimeoutValueFromRequest(request, opt_defaultTimeoutSeconds) {
* @param {number=} opt_attenuationSeconds Attenuation value in seconds.
* @return {!Countdown} A countdown timer.
*/
-function createAttenuatedTimer(timerFactory, timeoutValueSeconds,
- opt_attenuationSeconds) {
- timeoutValueSeconds = attenuateTimeoutInSeconds(timeoutValueSeconds,
- opt_attenuationSeconds);
+function createAttenuatedTimer(
+ timerFactory, timeoutValueSeconds, opt_attenuationSeconds) {
+ timeoutValueSeconds =
+ attenuateTimeoutInSeconds(timeoutValueSeconds, opt_attenuationSeconds);
return timerFactory.createTimer(timeoutValueSeconds * 1000);
}

Powered by Google App Engine
This is Rietveld 408576698