Closed Bug 660743 Opened 9 years ago Closed 9 years ago

storage should use mozilla::Preferences

Categories

(Toolkit :: Storage, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v1.0 (obsolete) — Splinter Review
No description provided.
Attachment #536226 - Flags: review?(roc)
Comment on attachment 536226 [details] [diff] [review]
Patch v1.0

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

::: storage/src/VacuumManager.cpp
@@ +271,4 @@
>    // Check interval from last vacuum.
>    PRInt32 now = static_cast<PRInt32>(PR_Now() / PR_USEC_PER_SEC);
>    PRInt32 lastVacuum;
> +  nsPrintfCString prefName("%s%s", PREF_VACUUM_BRANCH, mDBFilename.get());

nsPrintfCString says
   * This class is intended to be useful for numbers and short
   * strings, not arbitrary formatting of other strings (e.g., with %s).

I think you should use an nsAutoCString and Append.
Attached patch Patch v1.1Splinter Review
Attachment #536226 - Attachment is obsolete: true
Attachment #536226 - Flags: review?(roc)
Attachment #536237 - Flags: review?(roc)
Comment on attachment 536237 [details] [diff] [review]
Patch v1.1

Review of attachment 536237 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #536237 - Flags: review?(roc) → review+
Attachment #536237 - Flags: review?(sdwilsh)
Comment on attachment 536237 [details] [diff] [review]
Patch v1.1

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

r=sdwilsh with comments addressed.

::: storage/src/VacuumManager.cpp
@@ +444,1 @@
>  VacuumManager::initialize()

There is no longer a need for this method, so it can disappear.  Please make it so.

@@ +484,1 @@
>        NS_ENSURE_STATE(vacuum);

nix this check since you are here; new is infallible now.
Attachment #536237 - Flags: review?(sdwilsh) → review+
http://hg.mozilla.org/mozilla-central/rev/82a5618aa8c6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in before you can comment on or make changes to this bug.