Last Comment Bug 767905 - device storage - Move editable flag into DeviceStorageFile
: device storage - Move editable flag into DeviceStorageFile
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla16
Assigned To: Doug Turner (:dougt)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 761930 773798
  Show dependency treegraph
 
Reported: 2012-06-25 02:39 PDT by Doug Turner (:dougt)
Modified: 2012-07-13 14:33 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.1 (12.23 KB, patch)
2012-06-25 02:47 PDT, Doug Turner (:dougt)
bent.mozilla: review+
Details | Diff | Splinter Review

Description Doug Turner (:dougt) 2012-06-25 02:39:16 PDT
Current we are passing around a 'editable' flag in prep for 757724.  Everywhere we use this flag, we also have a DeviceStorageFile.  Lets move the flag there so that we have less to pass around.
Comment 1 Doug Turner (:dougt) 2012-06-25 02:47:52 PDT
Created attachment 636259 [details] [diff] [review]
patch v.1
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-25 02:52:09 PDT
Comment on attachment 636259 [details] [diff] [review]
patch v.1

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

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +27,5 @@
>  public:
>  
>    nsCOMPtr<nsIFile> mFile;
>    nsString mPath;
> +  bool mEditable;

Huh, these are all public?

@@ +59,5 @@
>      NormalizeFilePath();
>    }
>  
> +  void
> +  setEditable(bool aEditable) {

Hm, everywhere you call this you do so right after constructing the object. Does it make more sense to just make this a constructor arg?

@@ +391,5 @@
>    {
>      BuildErrorString(aMessage, aFile);
>    }
>  
> +  PostErrorEvent(DOMRequest* aRequest, const nsAString& aErrorMessage)

This change looks unrelated?
Comment 3 Doug Turner (:dougt) 2012-06-25 02:54:43 PDT
> Huh, these are all public?

yes. 

> Hm, everywhere you call this you do so right after constructing the object. Does it make more sense to just make this a constructor arg?

not everywhere.  the default is not editable.

> This change looks unrelated?

removed locally.
Comment 4 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-25 02:56:03 PDT
Comment on attachment 636259 [details] [diff] [review]
patch v.1

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

Ok.
Comment 7 Doug Turner (:dougt) 2012-06-27 13:52:15 PDT
again:
  https://hg.mozilla.org/integration/mozilla-inbound/rev/2830e6de596c
Comment 8 Ed Morley [:emorley] 2012-06-28 01:09:02 PDT
https://hg.mozilla.org/mozilla-central/rev/2830e6de596c

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