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

Issue 2557513003: ShapeDetection: Eliminate DetectorType enum in ShapeDetector.cpp (Closed)

Created:
4 years ago by xianglu
Modified:
4 years ago
CC:
Reilly Grant (use Gerrit), blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This CL includes only code refactoring. Eliminate DetectorType enum in ShapeDetector.cpp. The real work (calling through mojo interface Detect()) is moved to FaceDetector and BarcodeDetector respectively, so that ShapeDetector only does the shared work of processing image source. BUG=646083, 659139 Committed: https://crrev.com/cf153f33a517e34fdc48026c45a87bd3314b9400 Cr-Commit-Position: refs/heads/master@{#436856}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove state info from parent class, add doDetect() pure virtual method. #

Total comments: 16

Patch Set 3 : reillyg@ comments #

Patch Set 4 : Add utility function: getSharedBufferOnData() #

Total comments: 5

Patch Set 5 : Move tainting logic into detect() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -259 lines) Patch
M third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp View 1 2 2 chunks +55 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/FaceDetector.h View 1 2 2 chunks +15 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp View 1 2 2 chunks +54 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h View 1 2 3 4 2 chunks +11 lines, -44 lines 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp View 1 2 3 4 8 chunks +54 lines, -202 lines 0 comments Download

Messages

Total messages: 70 (54 generated)
xianglu
PTAL.
4 years ago (2016-12-06 01:23:48 UTC) #12
mcasas
Looking good, but still some more moving things around needed. https://codereview.chromium.org/2557513003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode146 ...
4 years ago (2016-12-06 04:40:20 UTC) #15
xianglu
PTAL. https://codereview.chromium.org/2557513003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/20001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode146 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:146: m_imageHeight = img->naturalHeight(); On 2016/12/06 04:40:20, mcasas wrote: ...
4 years ago (2016-12-06 20:20:10 UTC) #21
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2557513003/diff/60001/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/60001/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp#newcode22 third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp:22: DCHECK(!m_barcodeService.is_bound()); Just DCHECK(!m_barcodeService), though in the constructor it seems ...
4 years ago (2016-12-06 20:40:13 UTC) #25
xianglu
PTAL. https://codereview.chromium.org/2557513003/diff/60001/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/60001/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp#newcode22 third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp:22: DCHECK(!m_barcodeService.is_bound()); On 2016/12/06 20:40:12, Reilly Grant wrote: > ...
4 years ago (2016-12-06 22:31:56 UTC) #41
mcasas
lgtm with the comment addressed. https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode61 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:61: return detectShapesOnImageElement(scriptState, resolver, Hmm ...
4 years ago (2016-12-06 22:50:12 UTC) #42
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp File third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp#newcode45 third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp:45: m_faceDetectorOptions.Clone(), Just a note for the future, we could ...
4 years ago (2016-12-06 22:58:38 UTC) #43
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode61 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:61: return detectShapesOnImageElement(scriptState, resolver, On 2016/12/06 at 22:50:12, mcasas wrote: ...
4 years ago (2016-12-06 23:03:42 UTC) #44
mcasas
https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2557513003/diff/190001/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp#newcode61 third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:61: return detectShapesOnImageElement(scriptState, resolver, On 2016/12/06 23:03:42, Reilly Grant wrote: ...
4 years ago (2016-12-06 23:10:05 UTC) #45
xianglu
reillyg@ PTAL.
4 years ago (2016-12-07 00:12:20 UTC) #56
Reilly Grant (use Gerrit)
lgtm
4 years ago (2016-12-07 01:18:54 UTC) #59
xianglu
haraken@ PTAL.
4 years ago (2016-12-07 01:23:50 UTC) #61
haraken
LGTM
4 years ago (2016-12-07 01:27:13 UTC) #62
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/2557513003/240001
4 years ago (2016-12-07 01:30:28 UTC) #65
commit-bot: I haz the power
Committed patchset #5 (id:240001)
4 years ago (2016-12-07 04:12:11 UTC) #68
commit-bot: I haz the power
4 years ago (2016-12-07 04:15:44 UTC) #70
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/cf153f33a517e34fdc48026c45a87bd3314b9400
Cr-Commit-Position: refs/heads/master@{#436856}

Powered by Google App Engine
This is Rietveld 408576698