Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions chrome-session-dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const (
kCommandSetTabGroup = 25
kCommandSetTabGroupMetadata2 = 27
kCommandSetSelectedNavigationIndex = 7
kCommandSetWindowUserTitle = 31
kCommandTabClosed = 16
kCommandWindowClosed = 17
kCommandSetTabIndexInWindow = 2
Expand All @@ -66,6 +67,7 @@ type window struct {
id uint32
deleted bool
tabs []*tab
userTitle string
}

type histItem struct {
Expand Down Expand Up @@ -232,9 +234,10 @@ type Tab struct {
}

type Window struct {
Tabs []*Tab `json:"tabs"`
Active bool `json:"active"`
Deleted bool `json:"deleted"`
Tabs []*Tab `json:"tabs"`
Active bool `json:"active"`
Deleted bool `json:"deleted"`
UserTitle string `json:"userTitle"`
}

type HistoryItem struct {
Expand Down Expand Up @@ -350,6 +353,12 @@ func parse(path string) Result {
id := readUint32(data)

getTab(id).win = win
case kCommandSetWindowUserTitle:
readUint32(data) //size of the data (again)
id := readUint32(data)
title := readString(data)

getWindow(id).userTitle = title
case kCommandWindowClosed:
id := readUint32(data)

Expand Down Expand Up @@ -398,7 +407,7 @@ func parse(path string) Result {
var Windows []*Window

for _, w := range windows {
W := &Window{Active: w == activeWindow, Deleted: w.deleted}
W := &Window{Active: w == activeWindow, Deleted: w.deleted, UserTitle: w.userTitle}

idx := 0
for _, t := range w.tabs {
Expand Down