Closed Bug 1153330 Opened 9 years ago Closed 9 years ago

Move tabs/sessions to profile

Categories

(Firefox for iOS :: Data Storage, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wesj, Unassigned)

References

Details

Attachments

(1 file)

I've been needing access to the TabsManager for Clear Private data lately. I think we'll also need it in about:home for "Switch to tab". I wind up passing references to it around a lot. We do the same thing with Profile a lot. I wonder if tabs should just be a part of the Profile?

I'm thinking something like:

Profile
  - Sessions: [Session]
    -- currentSession: Session

where Session looks something like:

Session
  - subscript[int] -> Browser
  - subscript[webview] -> Browser
  - count: Int
  - selectedTab: Browser
  - restore() // For session restore?
  - writeToDisk(file: String)

Not a v1 thing, but looking for feedback.
Not a bad idea.

James will be looking to expand the Session in his current work from just storing it to an iOS provided "bundle" to saving to disk in the profile, mainly for crash restoration.
Flags: needinfo?(jhugman)
We also need access to your tabs for Sync: every open tab, its URL history (back stack), when it was last used, and the current page title.

That sounds like:

  Session[...] ->
    Browser
      Title
      URLs

layered into Comment 0.

I'll need this very very soon -- Monday, ideally -- for tab sync. If it's not ready by then, that's OK: we'll just have one-directional tab syncing.

This needs to be an interface in Storage, not in Client, so that Sync can read from it.
Blocks: 1141847
No longer blocks: 1141847
Some refactoring in here that actually doesn't need to be. Just me finding my footing. Happy to take feedback if you have time, but otherwise I'll send it for review tomorrow hopefully.
Flags: needinfo?(jhugman)
Attachment #8596264 - Flags: feedback?(rnewman)
Attachment #8596264 - Flags: feedback?(nalexander)
Comment on attachment 8596264 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/367

nits, comments, and questions added to ticket.
Attachment #8596264 - Flags: feedback?(nalexander) → feedback+
Comment on attachment 8596264 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/367

Back to you nick.
Attachment #8596264 - Flags: feedback+ → review?(nalexander)
Comment on attachment 8596264 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/367

Comments on GH, but nothing major.  Sorry for the slow turnaround.
Attachment #8596264 - Flags: review?(nalexander) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8596264 - Flags: feedback?(rnewman)
Component: General → Data Storage
OS: Mac OS X → iOS
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: