Closed Bug 780691 Opened 14 years ago Closed 14 years ago

DeviceStorage - Add onchange notifications for volume state changes

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17
blocking-basecamp +

People

(Reporter: dougt, Assigned: dougt)

References

Details

Attachments

(2 files)

No description provided.
Attached patch patch v.1 — — Splinter Review
Attachment #649365 - Flags: review?(jonas)
Depends on: 780693
Comment on attachment 649365 [details] [diff] [review] patch v.1 Review of attachment 649365 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/devicestorage/nsDeviceStorage.cpp @@ +1563,5 @@ > + nsCOMPtr<nsIDOMEvent> event; > + NS_NewDOMDeviceStorageChangeEvent(getter_AddRefs(event), nullptr, nullptr); > + > + nsCOMPtr<nsIDOMDeviceStorageChangeEvent> ce = do_QueryInterface(event); > + nsresult rv = ce->InitDeviceStorageChangeEvent(NS_LITERAL_STRING("change"), I actually tend to prefer to fire different events for enabled/disabled-like things, so here separate events for "mounted" and "unmounted". But I think this is fine for now. @@ +1608,5 @@ > + NS_NewLocalFile(filepath, false, getter_AddRefs(f)); > + > + nsCString creason; > + creason.AssignWithConversion(reason); > + CopyUTF16toUTF8(reason, creason); You're assigning twice. Remove the .AssignWithConversion line.
Attachment #649365 - Flags: review?(jonas) → review+
blocking-basecamp: --- → +
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: