Closed Bug 908701 Opened 11 years ago Closed 11 years ago

DeviceStorage: Cleanup apps directory determination

Categories

(Core :: DOM: Device Interfaces, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dhylands, Assigned: fabrice)

References

Details

Attachments

(1 file, 1 obsolete file)

The determination of root directories is currently split between InitDirs and DeviceStorageFile::GetRootDirectoryForType

The intention of this split was that directories which don't depend on a volume should be calculated once in InitDirs. Directories which depend on the root directory of a volume should be calculated in DeviceStorageFile::GetRootDirectoryForType

Point 1 - There should be some comments which make this distinction clear

Point 2 - Apps has some initialization in both places. Since the apps are not volume based, everything should be done in InitDirs.

While looking at this I also saw one occurrence of "apps" which should be replaced with DEVICESTORAGE_APPS (in the nsDOMDeviceStorage::Init function).
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → fabrice
Attachment #794738 - Flags: review?(dhylands)
Attached patch patch v2Splinter Review
Forgot to qref my last change... This one actually compiles ;)
Attachment #794738 - Attachment is obsolete: true
Attachment #794738 - Flags: review?(dhylands)
Attachment #794741 - Flags: review?(dhylands)
Comment on attachment 794741 [details] [diff] [review]
patch v2

Review of attachment 794741 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with nit addressed

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +629,5 @@
>  
> +#ifdef MOZ_WIDGET_GONK
> +    NS_NewLocalFile(NS_LITERAL_STRING("/data"),
> +                    false,
> +                    getter_AddRefs(sDirs->apps));

nit: this seems to indented 2 spaces too many
Attachment #794741 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/mozilla-central/rev/0c0ff91aa963
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Depends on: 909537
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: