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

Issue 1003433002: Updated remoting.xhr API to use promises. Removed access to the native (Closed)

Created:
5 years, 9 months ago by John Williams
Modified:
5 years, 9 months ago
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@spy-promise
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updated remoting.xhr API to use promises. Removed access to the native XHR object used by the API. This is a larger change than one might expect for two reasons: First, because the native XHR object only allows the response content to be retrieved while the onreadystatechange handler is executing, and second, because the unit test for dns_blackhole_checker.js relied on synchronous semantics which cannot be duplicated with promises because when a promise is resolved, its "then" handlers are not called until the next event cycle. Committed: https://crrev.com/5b7c9e08d4e50f577eb7e058c21ef2f897cfbef1 Cr-Commit-Position: refs/heads/master@{#321608}

Patch Set 1 #

Total comments: 16

Patch Set 2 : #

Total comments: 5

Patch Set 3 : #

Patch Set 4 : #

Total comments: 13

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Total comments: 18

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+541 lines, -425 lines) Patch
M remoting/webapp/app_remoting/js/app_remoting.js View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -11 lines 0 comments Download
M remoting/webapp/app_remoting/js/feedback_consent.js View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -6 lines 0 comments Download
M remoting/webapp/crd/js/dns_blackhole_checker.js View 1 2 3 4 5 6 4 chunks +12 lines, -11 lines 0 comments Download
M remoting/webapp/crd/js/dns_blackhole_checker_unittest.js View 1 2 3 4 5 6 3 chunks +91 lines, -66 lines 0 comments Download
M remoting/webapp/crd/js/host_controller.js View 1 2 3 4 5 6 3 chunks +8 lines, -9 lines 0 comments Download
M remoting/webapp/crd/js/host_list_api_impl.js View 1 2 3 4 5 6 7 8 9 6 chunks +16 lines, -20 lines 0 comments Download
M remoting/webapp/crd/js/it2me_connect_flow.js View 1 2 3 4 5 6 3 chunks +16 lines, -17 lines 0 comments Download
M remoting/webapp/crd/js/oauth2.js View 1 5 6 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/crd/js/oauth2_api_impl.js View 1 2 3 4 5 6 6 chunks +36 lines, -40 lines 0 comments Download
M remoting/webapp/crd/js/session_connector_impl.js View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M remoting/webapp/crd/js/third_party_token_fetcher.js View 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/crd/js/xhr.js View 1 2 3 4 5 6 7 8 6 chunks +195 lines, -116 lines 0 comments Download
M remoting/webapp/crd/js/xhr_unittest.js View 1 2 3 4 5 6 3 chunks +114 lines, -124 lines 0 comments Download
M remoting/webapp/js_proto/qunit_proto.js View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/js_proto/sinon_proto.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (11 generated)
John Williams
5 years, 9 months ago (2015-03-11 18:24:35 UTC) #2
Jamie
https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/dns_blackhole_checker.js File remoting/webapp/crd/js/dns_blackhole_checker.js (right): https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/dns_blackhole_checker.js#newcode156 remoting/webapp/crd/js/dns_blackhole_checker.js:156: * @param {remoting.Xhr.Response} xhrr This name looks like a ...
5 years, 9 months ago (2015-03-12 20:15:43 UTC) #3
John Williams
https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/dns_blackhole_checker.js File remoting/webapp/crd/js/dns_blackhole_checker.js (right): https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/dns_blackhole_checker.js#newcode156 remoting/webapp/crd/js/dns_blackhole_checker.js:156: * @param {remoting.Xhr.Response} xhrr On 2015/03/12 20:15:43, Jamie wrote: ...
5 years, 9 months ago (2015-03-14 03:35:33 UTC) #4
Jamie
https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/session_connector_impl.js File remoting/webapp/crd/js/session_connector_impl.js (right): https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/session_connector_impl.js#newcode334 remoting/webapp/crd/js/session_connector_impl.js:334: this.pendingXhr_.then(this.onIT2MeHostInfo_.bind(this, hostId)); Why has this been deleted entirely? https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/xhr.js ...
5 years, 9 months ago (2015-03-16 18:06:34 UTC) #5
John Williams
https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/session_connector_impl.js File remoting/webapp/crd/js/session_connector_impl.js (right): https://codereview.chromium.org/1003433002/diff/1/remoting/webapp/crd/js/session_connector_impl.js#newcode334 remoting/webapp/crd/js/session_connector_impl.js:334: this.pendingXhr_.then(this.onIT2MeHostInfo_.bind(this, hostId)); On 2015/03/16 18:06:34, Jamie wrote: > Why ...
5 years, 9 months ago (2015-03-16 23:15:00 UTC) #6
John Williams
https://codereview.chromium.org/1003433002/diff/20001/remoting/webapp/crd/js/it2me_connect_flow.js File remoting/webapp/crd/js/it2me_connect_flow.js (right): https://codereview.chromium.org/1003433002/diff/20001/remoting/webapp/crd/js/it2me_connect_flow.js#newcode96 remoting/webapp/crd/js/it2me_connect_flow.js:96: new remoting.Xhr({ On 2015/03/16 23:15:00, John Williams wrote: > ...
5 years, 9 months ago (2015-03-16 23:16:23 UTC) #7
kelvinp
I like the idea :) Just a few comments. https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js File remoting/webapp/app_remoting/js/app_remoting.js (right): https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js#newcode199 remoting/webapp/app_remoting/js/app_remoting.js:199: ...
5 years, 9 months ago (2015-03-17 01:32:46 UTC) #9
John Williams
https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js File remoting/webapp/app_remoting/js/app_remoting.js (right): https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js#newcode199 remoting/webapp/app_remoting/js/app_remoting.js:199: // XXX return manifest.name; On 2015/03/17 01:32:46, kelvinp wrote: ...
5 years, 9 months ago (2015-03-17 17:39:38 UTC) #10
kelvinp
https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js File remoting/webapp/app_remoting/js/app_remoting.js (right): https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/app_remoting/js/app_remoting.js#newcode199 remoting/webapp/app_remoting/js/app_remoting.js:199: // XXX return manifest.name; On 2015/03/17 17:39:38, John Williams ...
5 years, 9 months ago (2015-03-17 22:06:21 UTC) #11
John Williams
https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/crd/js/it2me_connect_flow.js File remoting/webapp/crd/js/it2me_connect_flow.js (right): https://codereview.chromium.org/1003433002/diff/60001/remoting/webapp/crd/js/it2me_connect_flow.js#newcode111 remoting/webapp/crd/js/it2me_connect_flow.js:111: remoting.It2MeConnectFlow.prototype.onHostInfo_ = function(xhr) { On 2015/03/17 22:06:20, kelvinp wrote: ...
5 years, 9 months ago (2015-03-18 20:07:23 UTC) #12
Jamie
My remaining comments are all trivial, so I'll remove myself from the review process. It ...
5 years, 9 months ago (2015-03-18 22:16:17 UTC) #13
John Williams
https://codereview.chromium.org/1003433002/diff/140001/remoting/webapp/app_remoting/js/feedback_consent.js File remoting/webapp/app_remoting/js/feedback_consent.js (right): https://codereview.chromium.org/1003433002/diff/140001/remoting/webapp/app_remoting/js/feedback_consent.js#newcode130 remoting/webapp/app_remoting/js/feedback_consent.js:130: /** @param {!remoting.Xhr.Response} response */ On 2015/03/18 22:16:16, Jamie ...
5 years, 9 months ago (2015-03-19 20:19:43 UTC) #14
kelvinp
lgtm
5 years, 9 months ago (2015-03-19 20:47:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1003433002/160001
5 years, 9 months ago (2015-03-19 23:05:18 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/35119)
5 years, 9 months ago (2015-03-19 23:29:27 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1003433002/180001
5 years, 9 months ago (2015-03-19 23:49:51 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/50923)
5 years, 9 months ago (2015-03-19 23:58:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1003433002/200001
5 years, 9 months ago (2015-03-19 23:58:21 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/50928)
5 years, 9 months ago (2015-03-20 00:07:20 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1003433002/220001
5 years, 9 months ago (2015-03-20 18:02:18 UTC) #31
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 9 months ago (2015-03-20 19:01:28 UTC) #32
commit-bot: I haz the power
5 years, 9 months ago (2015-03-20 19:02:19 UTC) #33
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/5b7c9e08d4e50f577eb7e058c21ef2f897cfbef1
Cr-Commit-Position: refs/heads/master@{#321608}

Powered by Google App Engine
This is Rietveld 408576698