Allow permissionDB parent directory to not be the default profile directory

RESOLVED FIXED in mozilla17

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gwagner, Assigned: gwagner)

Tracking

(Blocks: 1 bug)

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
Assignee: nobody → anygregor
(Assignee)

Comment 1

5 years ago
Created attachment 645131 [details] [diff] [review]
patch
(Assignee)

Comment 2

5 years ago
Created attachment 645154 [details] [diff] [review]
patch
Attachment #645131 - Attachment is obsolete: true
(Assignee)

Comment 3

5 years ago
Created attachment 645159 [details] [diff] [review]
patch

Also update the directoryProvider
Attachment #645154 - Attachment is obsolete: true
Attachment #645159 - Flags: review?(bent.mozilla)
(Assignee)

Updated

5 years ago
Blocks: 774716
(Assignee)

Updated

5 years ago
blocking-basecamp: --- → ?
Comment on attachment 645159 [details] [diff] [review]
patch

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

r=me with the nits addressed.

::: b2g/components/DirectoryProvider.js
@@ +21,5 @@
>    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider]),
>  
>    getFile: function dp_getFile(prop, persistent) {
>  #ifdef MOZ_WIDGET_GONK
> +    let localProps = ["cachePDir", "webappsDir", "PrefD", "indexedDBPDir", "permisionDBDir"];

Ditto: 'permissionDBPDir

::: extensions/cookie/nsPermissionManager.cpp
@@ +306,5 @@
> +  nsresult rv = NS_GetSpecialDirectory(NS_APP_PERMISSION_PARENT_DIR, getter_AddRefs(permissionsFile));
> +  if (NS_FAILED(rv)) {
> +    rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(permissionsFile));
> +  }
> +  NS_ENSURE_SUCCESS(rv, nsnull);

why nsnull and not NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED) ?

::: xpcom/io/nsAppDirectoryServiceDefs.h
@@ +88,5 @@
>  #define NS_APP_STORAGE_50_FILE                  "UStor" // sqlite database used as mozStorage profile db
>  
>  #define NS_APP_INDEXEDDB_PARENT_DIR             "indexedDBPDir"
> +
> +#define NS_APP_PERMISSION_PARENT_DIR            "permisionDBDir"

I would use permissionDBPDir ('P' for parent, and also you have a typo with a missing 's')
Attachment #645159 - Flags: review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9419716db6f
blocking-basecamp: ? → +
(Assignee)

Updated

5 years ago
Attachment #645159 - Flags: review?(bent.mozilla)

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d9419716db6f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.