fla...@chromium.org
unread,Feb 6, 2013, 10:30:46 AM2/6/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bs...@chromium.org, chromium...@chromium.org, a...@chromium.org, stevenj...@chromium.org, nkostyl...@chromium.org, oshima...@chromium.org
This looks good, I just have a reservation about two classes controlling the
same xhr. Either progress manager should create the xhr, or take ownership
of
the xhr, or just observe the xhr (i.e. not abort it, just stop listening).
https://codereview.chromium.org/12042095/diff/13001/chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js
File
chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js
(right):
https://codereview.chromium.org/12042095/diff/13001/chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js#newcode32
chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js:32:
this.xhr_.abort();
Sounds good, just wanted to be sure.
On 2013/02/05 17:33:10, bshe wrote:
> the abort will issue an 'abort' event. And the event handler seems
synchronous.
> I also stepped into the abort function using dev tool. And it seems it
calls
> onDownloadAbort_ before return. So it is probably OK here?
> On 2013/02/05 01:24:20, flackr wrote:
> > this seems potentially dangerous if it runs. Will calling
this.xhr_.abort
> issue
> > an 'abort' event? If the event callback is asynchronous it could
unset
> this.xhr_
> > after the new xhr has been registered.
https://codereview.chromium.org/12042095/diff/13001/chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js#newcode49
chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js:49:
* Removes the progress bar in |selectedGridItem| if any. May called
Sorry, the space was intentional, s/Maybe/May be
On 2013/02/05 17:33:10, bshe wrote:
> On 2013/02/05 01:24:20, flackr wrote:
> > s/May/May be
> Done.
https://codereview.chromium.org/12042095/diff/26001/chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js
File
chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js
(right):
https://codereview.chromium.org/12042095/diff/26001/chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js#newcode21
chrome/browser/resources/chromeos/wallpaper_manager/js/progress_manager.js:21:
* loadstart event.
The semantics of passing the XHR in and controlling some aspects of it
here but others in wallpaper_manager seems a little tricky. This should
either strictly observe the XHR (i.e. not cancel them, and unregister on
XHR's it's no longer interested in) or take control of the XHR (i.e.
this method calls send, perhaps even construct the XHR here and you just
pass in the request URL and add a listener on progress manager for
completion.)
https://codereview.chromium.org/12042095/