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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/share_dialog.js

Issue 1010163002: Files.app: Fix closure error which will raised by the updated compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define FakeEntry record type and use it. Created 5 years, 9 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: ui/file_manager/file_manager/foreground/js/ui/share_dialog.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js b/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js
index a65ee0c1a1ffceb3008dd0d01b906542758a6af0..dffac6050e31cc1c1ef26373407a331fa65ecdd5 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js
@@ -46,7 +46,7 @@ Object.freeze(ShareDialog.Result);
/**
* Wraps a Web View element and adds authorization headers to it.
* @param {string} urlPattern Pattern of urls to be authorized.
- * @param {Element} webView Web View element to be wrapped.
+ * @param {WebView} webView Web View element to be wrapped.
* @constructor
*/
ShareDialog.WebViewAuthorizer = function(urlPattern, webView) {
@@ -71,7 +71,7 @@ ShareDialog.WebViewAuthorizer.prototype.initialize = function(callback) {
this.webView_.removeEventListener('loadstop', registerInjectionHooks);
this.webView_.request.onBeforeSendHeaders.addListener(
this.authorizeRequest_.bind(this),
- {urls: [this.urlPattern_]},
+ /** @type {!RequestFilter} */ ({urls: [this.urlPattern_]}),
['blocking', 'requestHeaders']);
this.initialized_ = true;
callback();
@@ -97,7 +97,7 @@ ShareDialog.WebViewAuthorizer.prototype.authorize = function(callback) {
/**
* Injects headers into the passed request.
* @param {!Object} e Request event.
- * @return {!{requestHeaders: Array.<!HttpHeader>}} Modified headers.
+ * @return {!BlockingResponse} Modified headers.
* @private
*/
ShareDialog.WebViewAuthorizer.prototype.authorizeRequest_ = function(e) {
@@ -105,7 +105,7 @@ ShareDialog.WebViewAuthorizer.prototype.authorizeRequest_ = function(e) {
name: 'Authorization',
value: 'Bearer ' + this.accessToken_
});
- return {requestHeaders: e.requestHeaders};
+ return /** @type {!BlockingResponse} */ ({requestHeaders: e.requestHeaders});
};
ShareDialog.prototype = {
@@ -254,8 +254,8 @@ ShareDialog.prototype.showEntry = function(entry, callback) {
// TODO(mtomasz): Move to initDom_() once and reuse <webview> once it gets
// fixed. See: crbug.com/260622.
- this.webView_ = util.createChild(
- this.webViewWrapper_, 'share-dialog-webview', 'webview');
+ this.webView_ = /** @type {WebView} */ (util.createChild(
+ this.webViewWrapper_, 'share-dialog-webview', 'webview'));
this.webView_.setAttribute('tabIndex', '-1');
this.webViewAuthorizer_ = new ShareDialog.WebViewAuthorizer(
!window.IN_TEST ? (ShareClient.SHARE_TARGET + '/*') : '<all_urls>',

Powered by Google App Engine
This is Rietveld 408576698