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

Unified Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 10700074: Do not add 'cloudPrintID' in print preview settings, if the print destination is local. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/native_layer.js
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index 712bf420df5185690ca6f905ab7136bbbad92b55..c297cdf5c965d5927b5f68f0594f44e0882e8463 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -149,7 +149,6 @@ cr.define('print_preview', function() {
print_preview.Destination.GooglePromotedId.SAVE_AS_PDF,
'printWithCloudPrint': destination != null && !destination.isLocal,
'deviceName': destination == null ? 'foo' : destination.id,
- 'cloudPrintID': destination == null ? 'foo' : destination.id,
'generateDraftData': printTicketStore.isDocumentModifiable,
'fitToPageEnabled': printTicketStore.isFitToPageEnabled(),
@@ -161,6 +160,10 @@ cr.define('print_preview', function() {
'collate': printTicketStore.isCollateEnabled()
};
+ // Set 'cloudPrintID' only if the destination is not local.
+ if (!destination.isLocal)
+ ticket['cloudPrintID'] = destination.id;
+
if (printTicketStore.hasMarginsCapability() &&
printTicketStore.getMarginsType() ==
print_preview.ticket_items.MarginsType.Value.CUSTOM) {
« 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