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

Issue 2851453004: [webnfc] Cancel nfc.push operation when timeout expires (Closed)

Created:
3 years, 7 months ago by shalamov
Modified:
3 years, 7 months ago
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[webnfc] Cancel nfc.push operation when timeout expires This CL adds missing timeout handling functionality [1]. When user provides timeout value for the push operation, and NFC tag is not in proximity for the duration of timeout value, operation must be rejected with timeout error. Unit test is added to test new functionality. https://w3c.github.io/web-nfc/#the-push-method (Step 14). BUG=714037 Review-Url: https://codereview.chromium.org/2851453004 Cr-Commit-Position: refs/heads/master@{#469294} Committed: https://chromium.googlesource.com/chromium/src/+/b49d34931454bc1fdffdba99d6a0b344430746b5

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix for review comments #

Total comments: 1

Patch Set 3 : Add more tests, fix for comment. #

Total comments: 1

Patch Set 4 : Don't check return value from postDelayed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -12 lines) Patch
M device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java View 1 2 3 7 chunks +63 lines, -11 lines 0 comments Download
M device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java View 1 2 2 chunks +247 lines, -1 line 0 comments Download

Messages

Total messages: 35 (24 generated)
shalamov
Reilly, could you please take a look? Thanks.
3 years, 7 months ago (2017-04-28 12:36:47 UTC) #6
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2851453004/diff/1/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java File device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java (right): https://codereview.chromium.org/2851453004/diff/1/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java#newcode183 device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java:183: mPendingPushOperation.complete(createError(NfcErrorType.OPERATION_CANCELLED)); Call cancelPushTimeoutTask() here so that we can assert ...
3 years, 7 months ago (2017-04-28 16:10:28 UTC) #7
shalamov
https://codereview.chromium.org/2851453004/diff/1/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java File device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java (right): https://codereview.chromium.org/2851453004/diff/1/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java#newcode183 device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java:183: mPendingPushOperation.complete(createError(NfcErrorType.OPERATION_CANCELLED)); On 2017/04/28 16:10:28, Reilly Grant wrote: > Call ...
3 years, 7 months ago (2017-05-02 09:51:22 UTC) #10
shalamov
On 2017/04/28 16:10:28, Reilly Grant wrote: > Call cancelPushTimeoutTask() here so that we can assert ...
3 years, 7 months ago (2017-05-02 09:53:03 UTC) #11
Reilly Grant (use Gerrit)
On 2017/05/02 09:53:03, shalamov wrote: > On 2017/04/28 16:10:28, Reilly Grant wrote: > > Call ...
3 years, 7 months ago (2017-05-02 15:41:23 UTC) #17
Alexander Shalamov
On 2017/05/02 15:41:23, Reilly Grant wrote: > On 2017/05/02 09:53:03, shalamov wrote: > > On ...
3 years, 7 months ago (2017-05-02 17:03:54 UTC) #18
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2851453004/diff/40001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java File device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java (right): https://codereview.chromium.org/2851453004/diff/40001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java#newcode183 device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java:183: completePendingPushOperation(createError(NfcErrorType.OPERATION_CANCELLED)); The reason I suggested calling cancelPushTimeoutTask instead of ...
3 years, 7 months ago (2017-05-02 17:52:12 UTC) #19
shalamov
On 2017/05/02 17:52:12, Reilly Grant wrote: > https://codereview.chromium.org/2851453004/diff/40001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java > File device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java (right): > > https://codereview.chromium.org/2851453004/diff/40001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java#newcode183 ...
3 years, 7 months ago (2017-05-03 11:49:00 UTC) #22
Reilly Grant (use Gerrit)
lgtm with nit https://codereview.chromium.org/2851453004/diff/60001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java File device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java (right): https://codereview.chromium.org/2851453004/diff/60001/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java#newcode647 device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java:647: return mPushTimeoutHandler.postDelayed(mPushTimeoutRunnable, (long) options.timeout); Since tasks ...
3 years, 7 months ago (2017-05-03 20:54:03 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2851453004/80001
3 years, 7 months ago (2017-05-04 08:40:28 UTC) #32
commit-bot: I haz the power
3 years, 7 months ago (2017-05-04 08:45:12 UTC) #35
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/b49d34931454bc1fdffdba99d6a0...

Powered by Google App Engine
This is Rietveld 408576698