Closed Bug 767905 Opened 12 years ago Closed 12 years ago

device storage - Move editable flag into DeviceStorageFile

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: dougt, Assigned: dougt)

References

Details

Attachments

(1 file)

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.
Attached patch patch v.1Splinter Review
Assignee: nobody → doug.turner
Attachment #636259 - Flags: review?(bent.mozilla)
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?
> 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 on attachment 636259 [details] [diff] [review]
patch v.1

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

Ok.
Attachment #636259 - Flags: review?(bent.mozilla) → review+
Blocks: 761930
https://hg.mozilla.org/mozilla-central/rev/2830e6de596c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Blocks: 773798
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: