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

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

Issue 10873097: Merge 153342 - Print preview: Use an ID instead of memory pointer string in WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 years, 4 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/preview_generator.js
===================================================================
--- chrome/browser/resources/print_preview/preview_generator.js (revision 153583)
+++ chrome/browser/resources/print_preview/preview_generator.js (working copy)
@@ -207,22 +207,21 @@
* @param {number} pageNumber Number of the page with respect to the
* document. A value of 3 means it's the third page of the original
* document.
- * @param {string} previewUid Unique identifier of the preview.
+ * @param {number} previewUid Unique identifier of the preview.
* @private
*/
dispatchPageReadyEvent_: function(previewIndex, pageNumber, previewUid) {
var pageGenEvent = new cr.Event(PreviewGenerator.EventType.PAGE_READY);
pageGenEvent.previewIndex = previewIndex;
- pageGenEvent.previewUrl =
- 'chrome://print/' + previewUid + '/' + (pageNumber - 1) +
- '/print.pdf';
+ pageGenEvent.previewUrl = 'chrome://print/' + previewUid.toString() +
+ '/' + (pageNumber - 1) + '/print.pdf';
this.dispatchEvent(pageGenEvent);
},
/**
* Dispatches a PREVIEW_START event. Signals that the preview should be
* reloaded.
- * @param {string} previewUid Unique identifier of the preview.
+ * @param {number} previewUid Unique identifier of the preview.
* @param {number} index Index of the first page of the preview.
* @private
*/
@@ -232,8 +231,8 @@
if (!this.printTicketStore_.isDocumentModifiable) {
index = -1;
}
- previewStartEvent.previewUrl =
- 'chrome://print/' + previewUid + '/' + index + '/print.pdf';
+ previewStartEvent.previewUrl = 'chrome://print/' +
+ previewUid.toString() + '/' + index + '/print.pdf';
this.dispatchEvent(previewStartEvent);
},

Powered by Google App Engine
This is Rietveld 408576698