|
|
DescriptionFix UMA metric to not count multiple image/ tags as generic.
BUG=699536
Review-Url: https://codereview.chromium.org/2737843004
Cr-Commit-Position: refs/heads/master@{#455771}
Committed: https://chromium.googlesource.com/chromium/src/+/384e24962ca4e9f0b9c8b821f5c021db93693d2a
Patch Set 1 #
Total comments: 1
Patch Set 2 : Address review feedback #Patch Set 3 : Update to take extensions into account #Patch Set 4 : Sync #Patch Set 5 : Remove one redundant test #
Total comments: 1
Messages
Total messages: 31 (21 generated)
The CQ bit was checked by finnur@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
finnur@chromium.org changed reviewers: + peter@chromium.org
lgtm https://codereview.chromium.org/2737843004/diff/1/ui/android/java/src/org/chr... File ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java (right): https://codereview.chromium.org/2737843004/diff/1/ui/android/java/src/org/chr... ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java:444: private int acceptSpecificType(String accept) { nit: maybe name this countAcceptTypesFor? It'd read as follows, which is fairly clear: countAcceptTypesFor(IMAGE_TYPE)
miguelg@chromium.org changed reviewers: + miguelg@chromium.org
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by finnur@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from peter@chromium.org, miguelg@chromium.org Link to the patchset: https://codereview.chromium.org/2737843004/#ps20001 (title: "Address review feedback")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1489075411924200, "parent_rev": "c182846fcda260cc3d11dbac775b1b7a666729c8", "commit_rev": "384e24962ca4e9f0b9c8b821f5c021db93693d2a"}
Message was sent while issue was closed.
Description was changed from ========== Fix UMA metric to not count multiple image/ tags as generic. BUG=699536 ========== to ========== Fix UMA metric to not count multiple image/ tags as generic. BUG=699536 Review-Url: https://codereview.chromium.org/2737843004 Cr-Commit-Position: refs/heads/master@{#455771} Committed: https://chromium.googlesource.com/chromium/src/+/384e24962ca4e9f0b9c8b821f5c0... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/384e24962ca4e9f0b9c8b821f5c0...
Message was sent while issue was closed.
Description was changed from ========== Fix UMA metric to not count multiple image/ tags as generic. BUG=699536 Review-Url: https://codereview.chromium.org/2737843004 Cr-Commit-Position: refs/heads/master@{#455771} Committed: https://chromium.googlesource.com/chromium/src/+/384e24962ca4e9f0b9c8b821f5c0... ========== to ========== Fix UMA metric to not count multiple image/ tags as generic. BUG=699536 Review-Url: https://codereview.chromium.org/2737843004 Cr-Commit-Position: refs/heads/master@{#455771} Committed: https://chromium.googlesource.com/chromium/src/+/384e24962ca4e9f0b9c8b821f5c0... ==========
The CQ bit was checked by finnur@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Can you take another look?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by finnur@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by finnur@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
nit: please create a new CL for a new commit, we only occasionally reuse CLs for relands following a revert. https://codereview.chromium.org/2737843004/diff/80001/ui/android/java/src/org... File ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java (right): https://codereview.chromium.org/2737843004/diff/80001/ui/android/java/src/org... ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java:65: ".divx", ".flv", ".mov", ".mp4", ".mpeg", ".mpg", ".swf", ".wmv", ".webm", ".mkv"}; Are you trying to compensate for developers who provide an @accept attribute whose syntax does not conform to the specification? Do you have an example of a site that does this? |mFileType| should contain a list of *mime* types (it's a bit of a misnomer), not file extensions. For example, the mime type of a JPEG image would be "image/jpeg". At a higher level, maintaining our own list of types doesn't seem maintainable. For example, the image extensions include various types that our own image decoders aren't able to handle (PDF, TIF(F), XCF).
Just to close the loop: > Are you trying to compensate for developers who provide an @accept attribute > whose syntax does not conform to the specification? Extensions are not just allowed under the spec, they're encouraged (in addition to mime types). https://html.spec.whatwg.org/multipage/forms.html#attr-input-accept > Do you have an example of a site that does this? Imgur. > At a higher level, maintaining our own list of types doesn't seem maintainable. I didn't see us maintaining this list at all, it was supposed to go away as soon as we got an answer to the metrics question. > |mFileType| should contain a list of *mime* types (it's a bit of a misnomer), > not file extensions. For example, the mime type of a JPEG image would be > "image/jpeg". You raise a good point here. Further testing indicates that if you provide only extensions then mFileType will be blank, which means we should abandon this update to the CL. I still don't have a good understanding of why the extensions are ignored -- but we seem to catch that case with a generic picker.
Sorry, my testing erroneously specified *.gif, not .gif, so I was not following spec. So, the file extensions actually do reach the Java side (all the way to mFileTypes), so I think this metrics still makes sense. I'll spin another CL.
> I'll spin another CL. Done: https://codereview.chromium.org/2746143002/ |