Closed Bug 1711663 Opened 5 years ago Closed 5 years ago

IDB: Rename FileInfo/FileManager classes

Categories

(Core :: Storage: IndexedDB, task, P2)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: janv, Assigned: janv)

Details

Attachments

(6 files)

I want to add a new functionality to FileManager but I always keep forgetting how the new FileInfo/FileManager template classes and non-template classes work together. I think we should do some renaming to make it a bit easier to understand how they are connected.

Currently we have these classes:
template <FileManager> FileInfoT
template <FileManager> FileManagerBase
FileInfo
FileManager
TestFileManager

and these files:
FileInfo.cpp
FileInfoFwd.h
FileInfoT.h
FileInfoTImpl.h
FileManager.h
FileManagerBase.h
TestFileInfo.cpp

I think these classes would be easier to remember and understand:
template FileInfo
template FileInfoManager
DatabaseFileInfo
DatabaseFileManager
SimpleFileInfo
SimpleFileManager

and these files:
FileInfo.h
FileInfoImpl.h
FileInfoManager.h
DatabaseFileInfo.cpp
DatabaseFileInfo.h
DatabaseFileInfoFwd.h
DatabaseFileManager.h
TestSimpleFileInfo.cpp

Depends on D115357

Method arguments, member variables and method names were not renamed (on purpose), for example:
aFileInfo wasn't renamed to aDatabaseFileInfo or aSimpleFileInfo
mFileInfo wasn't renamed to mDatabaseFileInfo or mSimpleFileInfo
FileInfoPtr wasn't renamed to DatabaseFileInfoPtr or SimpleFileInfoPtr

Here's an explanation for that:
We know that there are no other FileInfo and FileManager based classes in ActorsParent.cpp, only DatabaseFileInfo and DatabaseFileManager, so we don't need to prefix method arguments, member variables and method names with Database. There are other similar types for which we use similar logic for naming like here or here

Keywords: leave-open
Attachment #9222385 - Attachment description: Bug 1711663 - Rename FileInfo to DatabaseFileInfo; r=#dom-storage → Bug 1711663 - Rename FileInfo to DatabaseFileInfo and TestFileInfo to SimpleFileInfo; r=#dom-storage
Attachment #9222386 - Attachment description: Bug 1711663 - Rename FileManager to DatabaseFileManager; r=#dom-storage → Bug 1711663 - Rename FileManager to DatabaseFileManager and TestFileManager to SimpleFileManager; r=#dom-storage
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcb9ea543b7c Rename FileInfo to DatabaseFileInfo and TestFileInfo to SimpleFileInfo; r=dom-storage-reviewers,jstutte
Keywords: leave-open
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a36c84e9269 Rename FileManager to DatabaseFileManager and TestFileManager to SimpleFileManager; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/28e04756a73d Rename FileInfoT to FileInfo; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/2b58a824285d Rename FileManagerBase to FileInfoManager; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/adb6539a1e6f Clean up includes related to FileInfo/FileInfoManager/DatabaseFileInfo/DatabaseFileManager; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/9f3260aaab11 Extract non-template stuff into base classes; r=dom-storage-reviewers,asuth

Backed out for causing build bustages on FileManager.

Push with failures

Failure log

Backout link

Flags: needinfo?(jvarga)
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c44bb6345c72 Rename FileManager to DatabaseFileManager and TestFileManager to SimpleFileManager; r=dom-storage-reviewers,jstutte
Flags: needinfo?(jvarga)
Keywords: leave-open
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e73ab0b24ecd Rename FileInfoT to FileInfo; r=dom-storage-reviewers,jstutte
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/030c75a42520 Rename FileManagerBase to FileInfoManager; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/42aca39d8ed6 Clean up includes related to FileInfo/FileInfoManager/DatabaseFileInfo/DatabaseFileManager; r=dom-storage-reviewers,jstutte https://hg.mozilla.org/integration/autoland/rev/ab53d4ba1edf Extract non-template stuff into base classes; r=dom-storage-reviewers,asuth
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

This change from comment 9 also landed on central (only the push from comment 10 was backed out):
https://hg.mozilla.org/mozilla-central/rev/dcb9ea543b7c

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

Attachment

General

Created:
Updated:
Size: