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

Side by Side Diff: ui/file_manager/image_loader/request.js

Issue 550863003: Rename fileBrowserPrivate to fileManagerPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Creates and starts downloading and then resizing of the image. Finally, 8 * Creates and starts downloading and then resizing of the image. Finally,
9 * returns the image using the callback. 9 * returns the image using the callback.
10 * 10 *
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 onSuccess(contentType, response); 246 onSuccess(contentType, response);
247 }.bind(this); 247 }.bind(this);
248 var onMaybeFailure = function(opt_code) { 248 var onMaybeFailure = function(opt_code) {
249 if (!this.aborted_) 249 if (!this.aborted_)
250 onFailure(); 250 onFailure();
251 }.bind(this); 251 }.bind(this);
252 252
253 // Fetches the access token and makes an authorized call. If refresh is true, 253 // Fetches the access token and makes an authorized call. If refresh is true,
254 // then forces refreshing the access token. 254 // then forces refreshing the access token.
255 var requestTokenAndCall = function(refresh, onInnerSuccess, onInnerFailure) { 255 var requestTokenAndCall = function(refresh, onInnerSuccess, onInnerFailure) {
256 chrome.fileBrowserPrivate.requestAccessToken(refresh, function(token) { 256 chrome.fileManagerPrivate.requestAccessToken(refresh, function(token) {
257 if (this.aborted_) 257 if (this.aborted_)
258 return; 258 return;
259 if (!token) { 259 if (!token) {
260 onInnerFailure(); 260 onInnerFailure();
261 return; 261 return;
262 } 262 }
263 this.xhr_ = AuthorizedXHR.load_( 263 this.xhr_ = AuthorizedXHR.load_(
264 token, url, onInnerSuccess, onInnerFailure); 264 token, url, onInnerSuccess, onInnerFailure);
265 }.bind(this)); 265 }.bind(this));
266 }.bind(this); 266 }.bind(this);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 this.image_.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAA' + 436 this.image_.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAA' +
437 'ABAAEAAAICTAEAOw=='; 437 'ABAAEAAAICTAEAOw==';
438 438
439 this.xhr_.onload = function() {}; 439 this.xhr_.onload = function() {};
440 this.xhr_.abort(); 440 this.xhr_.abort();
441 441
442 // Dispose memory allocated by Canvas. 442 // Dispose memory allocated by Canvas.
443 this.canvas_.width = 0; 443 this.canvas_.width = 0;
444 this.canvas_.height = 0; 444 this.canvas_.height = 0;
445 }; 445 };
OLDNEW
« no previous file with comments | « ui/file_manager/image_loader/manifest.json ('k') | ui/file_manager/video_player/js/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698