Closed
Bug 814376
Opened 12 years ago
Closed 12 years ago
[b2g-bluetooth] follow-up to bug 812412
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: echou, Assigned: echou)
Details
Attachments
(1 file, 2 obsolete files)
2.50 KB,
patch
|
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Jonas provided some useful suggestion in bug 812412, which is about how to retrieve and compose file name for bluetooth file-sharing. I think this bug is bb- because bluetooth file sharing should work well on the latest build.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → echou
Whiteboard: [LOE:S]
Actually, won't it fail for anyone that uses a "share" WebActivity and provides a Blob (not a File)? Since that falls back to using the name "unknown" which appears to be rejected by many clients?
Assignee: echou → nobody
Whiteboard: [LOE:S]
Assignee | ||
Comment 2•12 years ago
|
||
This is an interoperability issue with some devices. According to Bluetooth Object Push spec, senders don't need to send a file with the extension, and the remote Bluetooth device (called Push Server in Object Push Profile) has power to decide if they are going to accept the request or not. I think we should try our best to make the transfer done, such as sending a file with the extension or with setting the blob's content type in the "Type" header, but we don't need to feel bad if we really can't get these information.
Ok. Marking per that.
blocking-basecamp: --- → -
Assignee | ||
Comment 4•12 years ago
|
||
* Based on discussion of Bug 812412, try to get file extension by using nsIMimeService.getPrimaryExtension()
Assignee: nobody → echou
Attachment #685030 -
Flags: review?(jonas)
Comment on attachment 685030 [details] [diff] [review] patch 1: v1: get file extension Review of attachment 685030 [details] [diff] [review]: ----------------------------------------------------------------- This doesn't quite match what I had in mind. This won't use the mime service if we can't find a filename or if we have a filename that doesn't have an extension. I think we should do something like: name = "" if (blob is File) name = ((file)blob).name; // This part is correct in the patch if (name.IsEmpty()) name = "unknown" if (name.Contains("/")) name = getLeafName(name) if (!name.Contains(".")) name = name + "." + getExtension(blob.type)
Attachment #685030 -
Flags: review?(jonas) → review-
Assignee | ||
Comment 6•12 years ago
|
||
* Revise the logic of previous patch. Thanks for reminding, Jonas.
Attachment #685030 -
Attachment is obsolete: true
Attachment #685068 -
Flags: review?(jonas)
Comment on attachment 685068 [details] [diff] [review] patch 1: v2: get file extension Review of attachment 685068 [details] [diff] [review]: ----------------------------------------------------------------- r=me with that fixed. The checkin comment needs some improvement too :) ::: dom/bluetooth/BluetoothOppManager.cpp @@ +321,5 @@ > + EmptyCString(), > + extension); > + if (NS_SUCCEEDED(rv)) { > + sFileName.AppendLiteral("."); > + sFileName.Append(NS_ConvertUTF8toUTF16(extension)); AppendUTF8toUTF16(extension, sFileName); That will append and copy as a single step.
Attachment #685068 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 8•12 years ago
|
||
* Nit picked and commit message modified.
Attachment #685068 -
Attachment is obsolete: true
Assignee | ||
Comment 9•12 years ago
|
||
try: https://tbpl.mozilla.org/?tree=Try&rev=f818244324e9 https://tbpl.mozilla.org/?tree=Try&rev=0041b72d7c4f
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0da6d7fb2dd3
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0da6d7fb2dd3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 685080 [details] [diff] [review] patch 1: final: Improve the mechanism for setting file extension of a blob, r=sicking [Approval Request Comment] Bug caused by (feature/regressing bug #): Follow-up of bug 812412 User impact if declined: It would be more likely for remote devices to reject the file sharing request sent by b2g devices because of missing file extension. Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): Fairly low. It's only used on sharing files, and the logic just slightly changed. For platforms other than FOS, the risk should be very low as well since the Bluetooth module will not be built. String or UUID changes made by this patch: No
Attachment #685080 -
Flags: approval-mozilla-beta?
Attachment #685080 -
Flags: approval-mozilla-aurora?
Comment 13•12 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] from comment #12) > User impact if declined: It would be more likely for remote devices to > reject the file sharing request sent by b2g devices because of missing file > extension. Since this isn't b-b+, I need to ask - have we run through the bluetooth smoketests with this change? It would be a shame to regress the build for a bug that wasn't a strict requirement for v1.
Assignee | ||
Comment 14•12 years ago
|
||
> Since this isn't b-b+, I need to ask - have we run through the bluetooth
> smoketests with this change? It would be a shame to regress the build for a
> bug that wasn't a strict requirement for v1.
Hi Alex,
Speaking of Bluetooth smoke test, currently we rely on QA's smoke test report
to see if regression happened. As far as I can tell, I've tested this patch on
my b2g device and it worked well.
If you need any further information that I can provide to verify the correctness
of this patch, please let me know. Thank you.
Eric
Comment 15•12 years ago
|
||
Comment on attachment 685080 [details] [diff] [review] patch 1: final: Improve the mechanism for setting file extension of a blob, r=sicking Engineering needs to test all patches for the possibility of regression at this point in the cycle - relying on QA is not enough to prevent new regressions. Sounds like Eric has done due diligence here.
Attachment #685080 -
Flags: approval-mozilla-beta?
Attachment #685080 -
Flags: approval-mozilla-beta+
Attachment #685080 -
Flags: approval-mozilla-aurora?
Attachment #685080 -
Flags: approval-mozilla-aurora+
Comment 16•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/5e1bebbff5fb https://hg.mozilla.org/releases/mozilla-beta/rev/9ef7a0de9aba
You need to log in
before you can comment on or make changes to this bug.
Description
•