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

Unified Diff: chrome/browser/resources/print_preview/data/destination.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/print_preview/data/destination.js
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js
index c8595eb0a61f4fb2a271a3d08cf7ad7b018e8b6f..37f25bec8b1cd755e6fe63197125cebf6a2da01a 100644
--- a/chrome/browser/resources/print_preview/data/destination.js
+++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -122,8 +122,8 @@ cr.define('print_preview', function() {
* for the destination.
* @constructor
*/
- function Destination(id, type, origin, displayName, isRecent,
- connectionStatus, opt_params) {
+ function Destination(
+ id, type, origin, displayName, isRecent, connectionStatus, opt_params) {
/**
* ID of the destination.
* @private {string}
@@ -208,8 +208,8 @@ cr.define('print_preview', function() {
* accessed.
* @private {number}
*/
- this.lastAccessTime_ = (opt_params && opt_params.lastAccessTime) ||
- Date.now();
+ this.lastAccessTime_ =
+ (opt_params && opt_params.lastAccessTime) || Date.now();
/**
* Cloud ID for Privet printers.
@@ -240,12 +240,13 @@ cr.define('print_preview', function() {
* @private {print_preview.DestinationProvisionalType}
*/
this.provisionalType_ = (opt_params && opt_params.provisionalType) ||
- print_preview.DestinationProvisionalType.NONE;
+ print_preview.DestinationProvisionalType.NONE;
- assert(this.provisionalType_ !=
- print_preview.DestinationProvisionalType.NEEDS_USB_PERMISSION ||
- this.isExtension,
- 'Provisional USB destination only supprted with extension origin.');
+ assert(
+ this.provisionalType_ !=
+ print_preview.DestinationProvisionalType.NEEDS_USB_PERMISSION ||
+ this.isExtension,
+ 'Provisional USB destination only supprted with extension origin.');
}
/**
@@ -253,10 +254,8 @@ cr.define('print_preview', function() {
* @type {!Array<string>}
* @const
*/
- Destination.LOCATION_TAG_PREFIXES = [
- '__cp__location=',
- '__cp__printer-location='
- ];
+ Destination.LOCATION_TAG_PREFIXES =
+ ['__cp__location=', '__cp__printer-location='];
/**
* Enumeration of Google-promoted destination IDs.
@@ -337,11 +336,11 @@ cr.define('print_preview', function() {
/** @return {boolean} Whether the destination is local or cloud-based. */
get isLocal() {
return this.origin_ == print_preview.DestinationOrigin.LOCAL ||
- this.origin_ == print_preview.DestinationOrigin.EXTENSION ||
- this.origin_ == print_preview.DestinationOrigin.CROS ||
- (this.origin_ == print_preview.DestinationOrigin.PRIVET &&
- this.connectionStatus_ !=
- print_preview.DestinationConnectionStatus.UNREGISTERED);
+ this.origin_ == print_preview.DestinationOrigin.EXTENSION ||
+ this.origin_ == print_preview.DestinationOrigin.CROS ||
+ (this.origin_ == print_preview.DestinationOrigin.PRIVET &&
+ this.connectionStatus_ !=
+ print_preview.DestinationConnectionStatus.UNREGISTERED);
},
/** @return {boolean} Whether the destination is a Privet local printer */
@@ -452,9 +451,12 @@ cr.define('print_preview', function() {
/** @return {boolean} Whether the destination is considered offline. */
get isOffline() {
- return arrayContains([print_preview.DestinationConnectionStatus.OFFLINE,
- print_preview.DestinationConnectionStatus.DORMANT],
- this.connectionStatus_);
+ return arrayContains(
+ [
+ print_preview.DestinationConnectionStatus.OFFLINE,
+ print_preview.DestinationConnectionStatus.DORMANT
+ ],
+ this.connectionStatus_);
},
/** @return {string} Human readable status for offline destination. */
@@ -498,8 +500,7 @@ cr.define('print_preview', function() {
if (this.isLocal) {
return Destination.IconUrl_.LOCAL;
}
- if (this.type_ == print_preview.DestinationType.MOBILE &&
- this.isOwned_) {
+ if (this.type_ == print_preview.DestinationType.MOBILE && this.isOwned_) {
return Destination.IconUrl_.MOBILE;
}
if (this.type_ == print_preview.DestinationType.MOBILE) {
@@ -547,7 +548,7 @@ cr.define('print_preview', function() {
*/
get isProvisional() {
return this.provisionalType_ !=
- print_preview.DestinationProvisionalType.NONE;
+ print_preview.DestinationProvisionalType.NONE;
},
/**

Powered by Google App Engine
This is Rietveld 408576698