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

Unified Diff: chrome/browser/resources/print_preview/search/destination_search.js

Issue 2838603004: Re-enable Cloud printers for ChromeOS kiosks. (Closed)
Patch Set: Created 3 years, 8 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 | chrome/test/data/webui/print_preview_destination_search_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/search/destination_search.js
diff --git a/chrome/browser/resources/print_preview/search/destination_search.js b/chrome/browser/resources/print_preview/search/destination_search.js
index c9531b014aeff7d0d37cc3891d3c9e10a5e80b7c..58e0a12d3ead98dbc60f04d24598633d643e9b89 100644
--- a/chrome/browser/resources/print_preview/search/destination_search.js
+++ b/chrome/browser/resources/print_preview/search/destination_search.js
@@ -585,9 +585,15 @@ cr.define('print_preview', function() {
*/
onDestinationConfigureRequest_: function(event) {
var destination = event.detail.destination;
- var destinationItem = destination.isLocal ?
- this.localList_.getDestinationItem(destination.id) :
- this.cloudList_.getDestinationItem(destination.id);
+ var destinationItem;
Lei Zhang 2017/04/25 00:42:36 Looking at renderDestinations_() above, should thi
skau 2017/04/25 00:58:05 Hmm. Looks like somebody needs to think about how
+ if (!destination.isLocal) {
+ destinationItem = this.cloudList_.getDestinationItem(destination.id);
+ }
+ // Non-local destinations can be in the local list for Cloud Printers
+ // in Kiosk apps. crbug.com/713831
+ if (destinationItem == null) {
+ destinationItem = this.localList_.getDestinationItem(destination.id);
+ }
assert(destinationItem != null,
'User does not select a valid destination item.');
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview_destination_search_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698