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

Unified Diff: chrome/browser/resources/bluetooth_internals/snackbar.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/bluetooth_internals/snackbar.js
diff --git a/chrome/browser/resources/bluetooth_internals/snackbar.js b/chrome/browser/resources/bluetooth_internals/snackbar.js
index 54db660f0556f363c2d14dd43551805b874861be..c074ac88c4f7ee2d9cce44d7933425bb53a67a25 100644
--- a/chrome/browser/resources/bluetooth_internals/snackbar.js
+++ b/chrome/browser/resources/bluetooth_internals/snackbar.js
@@ -72,7 +72,8 @@ cr.define('snackbar', function() {
this.actionLink_.textContent = options.actionText || 'Dismiss';
this.actionLink_.addEventListener('click', function() {
- if (options.action) options.action();
+ if (options.action)
+ options.action();
this.dismiss();
}.bind(this));
},
@@ -82,8 +83,10 @@ cr.define('snackbar', function() {
*/
show: function() {
this.classList.add('open');
- if (Snackbar.hasContentFocus_) this.startTimeout_();
- else this.stopTimeout_();
+ if (Snackbar.hasContentFocus_)
+ this.startTimeout_();
+ else
+ this.stopTimeout_();
document.addEventListener('contentfocus', this.boundStartTimeout_);
document.addEventListener('contentblur', this.boundStopTimeout_);
@@ -224,8 +227,10 @@ cr.define('snackbar', function() {
* dismissing.
*/
Snackbar.dismiss = function(clearQueue) {
- if (clearQueue) Snackbar.queue_ = [];
- if (Snackbar.current_) return Snackbar.current_.dismiss();
+ if (clearQueue)
+ Snackbar.queue_ = [];
+ if (Snackbar.current_)
+ return Snackbar.current_.dismiss();
return Promise.resolve();
};

Powered by Google App Engine
This is Rietveld 408576698