Last Comment Bug 776764 - Allow permissionDB parent directory to not be the default profile directory
: Allow permissionDB parent directory to not be the default profile directory
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: Gregor Wagner [:gwagner]
:
Mentors:
Depends on:
Blocks: 774716
  Show dependency treegraph
 
Reported: 2012-07-23 17:08 PDT by Gregor Wagner [:gwagner]
Modified: 2012-07-25 08:11 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
patch (1.66 KB, patch)
2012-07-23 17:19 PDT, Gregor Wagner [:gwagner]
no flags Details | Diff | Review
patch (1.81 KB, patch)
2012-07-23 17:56 PDT, Gregor Wagner [:gwagner]
no flags Details | Diff | Review
patch (2.72 KB, patch)
2012-07-23 18:09 PDT, Gregor Wagner [:gwagner]
fabrice: review+
Details | Diff | Review

Description Gregor Wagner [:gwagner] 2012-07-23 17:08:08 PDT

    
Comment 1 Gregor Wagner [:gwagner] 2012-07-23 17:19:23 PDT
Created attachment 645131 [details] [diff] [review]
patch
Comment 2 Gregor Wagner [:gwagner] 2012-07-23 17:56:46 PDT
Created attachment 645154 [details] [diff] [review]
patch
Comment 3 Gregor Wagner [:gwagner] 2012-07-23 18:09:58 PDT
Created attachment 645159 [details] [diff] [review]
patch

Also update the directoryProvider
Comment 4 [:fabrice] Fabrice Desré 2012-07-24 10:54:19 PDT
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')
Comment 6 Ed Morley [:emorley] 2012-07-25 08:11:47 PDT
https://hg.mozilla.org/mozilla-central/rev/d9419716db6f

Note You need to log in before you can comment on or make changes to this bug.