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

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

Issue 595153003: Compile print_preview, part 5: reduce down to 104 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_4
Patch Set: Created 6 years, 3 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/cloud_print_interface.js
diff --git a/chrome/browser/resources/print_preview/cloud_print_interface.js b/chrome/browser/resources/print_preview/cloud_print_interface.js
index e918cda7d67f7e8f5ca0ad4a20ab429b90493fb0..275dd1e162ee9f6d24f466efbd70e081412ee1de 100644
--- a/chrome/browser/resources/print_preview/cloud_print_interface.js
+++ b/chrome/browser/resources/print_preview/cloud_print_interface.js
@@ -67,14 +67,14 @@ cr.define('cloudprint', function() {
/**
* Pending requests delayed until we get access token.
- * @type {!Array.<!CloudPrintRequest>}
+ * @type {!Array.<!cloudprint.CloudPrintRequest>}
* @private
*/
this.requestQueue_ = [];
/**
* Outstanding cloud destination search requests.
- * @type {!Array.<!CloudPrintRequest>}
+ * @type {!Array.<!cloudprint.CloudPrintRequest>}
* @private
*/
this.outstandingCloudSearchRequests_ = [];
@@ -317,7 +317,7 @@ cr.define('cloudprint', function() {
* Sends a Google Cloud Print printer API request.
* @param {string} printerId ID of the printer to lookup.
* @param {!print_preview.Destination.Origin} origin Origin of the printer.
- * @param {string=} account Account this printer is registered for. When
+ * @param {?string} account Account this printer is registered for. When
* provided for COOKIES {@code origin}, and users sessions are still not
* known, will be checked against the response (both success and failure
* to get printer) and, if the active user account is not the one
@@ -382,12 +382,13 @@ cr.define('cloudprint', function() {
* is sent on behalf of the primary user.
* @param {function(number, Object, !print_preview.Destination.Origin)}
* callback Callback to invoke when request completes.
- * @return {!CloudPrintRequest} Partially prepared request.
+ * @return {!cloudprint.CloudPrintRequest} Partially prepared request.
* @private
*/
buildRequest_: function(method, action, params, origin, account, callback) {
var url = this.baseUrl_ + '/' + action + '?xsrf=';
if (origin == print_preview.Destination.Origin.COOKIES) {
+ account = assert(account);
var xsrfToken = this.xsrfTokens_[account];
if (!xsrfToken) {
// TODO(rltoscano): Should throw an error if not a read-only action or
@@ -829,7 +830,7 @@ cr.define('cloudprint', function() {
/**
* Data structure that represents an HTTP parameter.
* @param {string} name Name of the parameter.
- * @param {string} value Value of the parameter.
+ * @param {print_preview.ValueType} value Value of the parameter.
* @constructor
*/
function HttpParam(name, value) {
@@ -848,6 +849,7 @@ cr.define('cloudprint', function() {
// Export
return {
- CloudPrintInterface: CloudPrintInterface
+ CloudPrintInterface: CloudPrintInterface,
+ CloudPrintRequest: CloudPrintRequest
Aleksey Shlyapnikov 2014/09/24 17:54:43 Why are you exporting it? It's not used anywhere o
Vitaly Pavlenko 2014/09/24 20:39:49 Right now that's the only way to use the type clou
Aleksey Shlyapnikov 2014/09/24 21:13:17 If we have no workaround, then yes. Let's add a co
Vitaly Pavlenko 2014/09/24 22:37:57 Done.
};
});

Powered by Google App Engine
This is Rietveld 408576698