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

Unified Diff: chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js

Issue 2862203002: Print Preview: Fix data/ errors (Closed)
Patch Set: Fix destination resolver Created 3 years, 7 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/ticket_items/ticket_item.js
diff --git a/chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js b/chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js
index 4e51aaa8fdf04c3ad28257844e6eb8505a1767af..f2ea4dc80a0ffc9f544f37080b1b8823fd9b24f9 100644
--- a/chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js
+++ b/chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js
@@ -16,7 +16,7 @@ cr.define('print_preview.ticket_items', function() {
* if other ticket item constraints are not met.
* @param {?print_preview.AppState} appState Application state model to update
* when ticket items update.
- * @param {?print_preview.AppState.Field} field Field of the app state to
+ * @param {?print_preview.AppStateField} field Field of the app state to
* update when ticket item is updated.
* @param {?print_preview.DestinationStore} destinationStore Used listen for
* changes in the currently selected destination's capabilities. Since
@@ -40,7 +40,7 @@ cr.define('print_preview.ticket_items', function() {
/**
* Field of the app state to update when ticket item is updated.
- * @type {?print_preview.AppState.Field}
+ * @type {?print_preview.AppStateField}
* @private
*/
this.field_ = field || null;
@@ -75,7 +75,7 @@ cr.define('print_preview.ticket_items', function() {
this.tracker_ = new EventTracker();
this.addEventHandlers_();
- };
+ }
/**
* Event types dispatched by this class.
@@ -147,7 +147,7 @@ cr.define('print_preview.ticket_items', function() {
var sendUpdateEvent = !this.isValueEqual(value);
// Don't lose requested value if capability is not available.
this.updateValueInternal(value);
- if (this.appState_) {
+ if (this.appState_ && (this.field_ != null)) {
this.appState_.persistField(this.field_, value);
}
if (sendUpdateEvent)
@@ -157,6 +157,7 @@ cr.define('print_preview.ticket_items', function() {
/**
* @return {?} Default value of the ticket item if no value was set by
* the user.
+ * @abstract
* @protected
*/
getDefaultValueInternal: function() {
@@ -166,6 +167,7 @@ cr.define('print_preview.ticket_items', function() {
/**
* @return {?} Default value of the ticket item if the capability is
* not available.
+ * @abstract
* @protected
*/
getCapabilityNotAvailableValueInternal: function() {

Powered by Google App Engine
This is Rietveld 408576698