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

Unified Diff: chrome/browser/resources/print_preview/data/destination_store.js

Issue 2927703004: Print Preview: Check capabilities before sending info ready (Closed)
Patch Set: Add notation 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/destination_store.js
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index 19499638cd577b7a46a0f850f0cfd48baaa9da5c..6cf15de709e1319f6bedeedfabb571821a621c95 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -697,6 +697,7 @@ cr.define('print_preview', function() {
* destination.
* @param {string} extensionName Extension name associated with this
* destination.
+ * @return {boolean} Whether capabilities fetch was successfully started.
* @private
*/
fetchPreselectedDestination_: function(
@@ -735,11 +736,15 @@ cr.define('print_preview', function() {
name,
false /*isRecent*/,
print_preview.DestinationConnectionStatus.ONLINE);
- this.selectedDestination_.capabilities = capabilities;
- cr.dispatchSimpleEvent(
- this,
- DestinationStore.EventType.CACHED_SELECTED_DESTINATION_INFO_READY);
+ if (capabilities) {
+ this.selectedDestination_.capabilities = capabilities;
+
+ cr.dispatchSimpleEvent(
+ this,
+ DestinationStore.EventType
+ .CACHED_SELECTED_DESTINATION_INFO_READY);
+ }
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698