browsercookie

package
v0.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 33 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package browsercookie reads cookies out of the local user's own browser profiles so an operator — or a coding agent driving one — can hand a live session to Playwright, curl, or vigolium's authenticated scan phases without copying values out of devtools by hand.

It is a read-only view of stores that already exist on this machine, for the user running the process. Nothing here reaches another user's home directory, another machine, or the network.

Three things about the underlying stores shape this API, and every one of them is a way the naive version of this package lies to its caller:

  • A cookie store is encrypted with a key held by the OS keyring. When that key cannot be read — the user denied the prompt, there is no desktop session — the decrypt fails per row and the rows are skipped. "Access denied" therefore looks exactly like "this domain has no cookies" unless the read errors are captured, which is what Result.Problem is for.
  • Chrome 127+ on Windows wraps the key in App-Bound Encryption, which only Chrome's own elevation service can unwrap. Those stores are unreadable by design and are reported as such rather than returned empty.
  • Chrome keeps recent writes in a WAL sidecar that the reader does not consult, so a cookie set moments ago may legitimately be missing.

Cookie values are credentials. This package never logs them; callers are expected to be equally careful about where they put them.

Index

Constants

View Source
const (
	StatusOK   = "ok"
	StatusWarn = "warn"
	StatusFail = "fail"
	StatusSkip = "skip"
)

Check status values.

View Source
const (
	FamilyChromium = "chromium"
	FamilyFirefox  = "firefox"
	FamilySafari   = "safari"
)

Browser families, which decide how a store is located and labelled.

View Source
const CGOEnabled = true

CGOEnabled reports whether this binary was built with cgo.

It is not a curiosity. On macOS the upstream reader has two keychain paths selected by exactly this tag: with cgo it calls the Keychain API in-process, so macOS attributes the request to the vigolium binary; without cgo it shells out to /usr/bin/security, so the request is that Apple-signed binary's. Which one a release was built with decides whose access list a standing "Always Allow" grant would widen, which is why every hint asks for a one-time "Allow" instead, and `doctor` names the path.

View Source
const DefaultSameSite = "Lax"

DefaultSameSite is what an exported cookie claims when the store did not record the attribute.

Lax is Chrome's own default for a cookie that arrived without a SameSite attribute, so it is the honest guess. It is still a guess: a cookie that was really set SameSite=None — any cookie meant to survive a cross-site request, which includes most SSO and embedded-widget sessions — will not work when replayed as Lax. That is what RenderOptions.SameSite is for, and why the result carries a warning whenever a Secure cookie is exported.

View Source
const PlaywrightSessionExpiry = -1

PlaywrightSessionExpiry is the Expires value Playwright reads as "session cookie": it is not a timestamp, and writing 0 there instead creates a cookie that expired in 1970 and is dropped on load.

View Source
const SameSiteUnknown = ""

SameSiteUnknown is the SameSite value for a cookie whose attribute the store reader did not report. It is not a valid cookie attribute; the exporters resolve it to a concrete one and say so.

Variables

This section is empty.

Functions

func CloneOriginSummary

func CloneOriginSummary(res CloneResult) string

CloneOriginSummary renders the clone's scope for a one-line report.

func DistinctDomains

func DistinctDomains(cookies []Cookie) []string

DistinctDomains returns the distinct domain attributes present, sorted. The Cookie-header export uses it to tell the caller when it has flattened cookies from more than one host into a header that can only serve one.

func FormatCarriesStorage

func FormatCarriesStorage(f Format) bool

FormatCarriesStorage reports whether f can represent local storage.

func FormatList

func FormatList() string

FormatList renders the supported formats as a comma-separated list, for help text and errors.

Built from Formats() rather than written out: hand-written copies had already gone stale — they omitted playwright-init, a real format with its own renderer, and that incomplete list reached the generated agent reference.

func KeyringViaDescription

func KeyringViaDescription() (via, detail string)

KeyringViaDescription explains the consequence of the build's keyring path, for the diagnosis output.

func PartitionedOrigins

func PartitionedOrigins(origins []Origin) int

PartitionedOrigins counts the origins an export must hold back because they are third-party partitioned storage.

func Redact

func Redact(value string) string

Redact masks a cookie value for display, keeping a short tail so two cookies can be told apart without exposing either.

The mask is a fixed width rather than the value's own length. Session cookies run to hundreds of characters — a Google NID is over 600 — and a mask that tracked the length turned every listing into one unreadable line per cookie. The length is worth knowing (it distinguishes a JWT from a flag), so it is reported as a number in its own column instead of being drawn.

A value shorter than redactTailMinLen keeps no tail at all: four characters of a six-character PIN or short token are most of the secret, so a short value is the bare mask.

func Render

func Render(w io.Writer, cookies []Cookie, format Format, opts RenderOptions) error

Render writes the cookies to w in the given format.

func SameSiteNoneWithheld

func SameSiteNoneWithheld(cookies []Cookie, opts RenderOptions) int

SameSiteNoneWithheld counts the cookies a "none" override cannot be applied to because they are not Secure, so a caller can say so rather than let the export look uniform.

func SessionStorageItems

func SessionStorageItems(origins []Origin) int

SessionStorageItems counts the sessionStorage entries across origins.

func SupportedBrowsers

func SupportedBrowsers() []string

SupportedBrowsers returns the browsers this package can read, sorted.

func ValidateSameSite

func ValidateSameSite(s string) error

ValidateSameSite checks a caller-supplied SameSite override.

Types

type Check

type Check struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Detail string `json:"detail,omitempty"`
	// Hint is what the operator should do about it. Present only when there is
	// something to do.
	Hint string `json:"hint,omitempty"`
}

Check is one diagnostic result.

type CloneResult

type CloneResult struct {
	// Dir is the user-data directory to pass to launchPersistentContext.
	Dir string `json:"dir"`
	// Origins are the origins the clone was scoped to.
	Origins []string `json:"origins"`
	// Cookies is how many cookie rows survived pruning.
	Cookies int `json:"cookies"`
	// LocalStorageKeys and SessionStorageKeys are how many storage keys
	// survived pruning.
	LocalStorageKeys   int `json:"local_storage_keys"`
	SessionStorageKeys int `json:"session_storage_keys"`
	// IndexedDBOrigins is how many per-origin IndexedDB stores were copied —
	// the whole point of cloning rather than exporting.
	IndexedDBOrigins int `json:"indexeddb_origins"`
	// SessionCookiesMadePersistent counts the session cookies the clone had to
	// give an expiry so the browser would not discard them on startup.
	SessionCookiesMadePersistent int `json:"session_cookies_made_persistent"`
	// Bytes is the clone's size on disk.
	Bytes int64 `json:"bytes"`
	// Warnings are caveats about what the clone can and cannot do.
	Warnings []string `json:"warnings"`
}

CloneResult reports what a profile clone contains.

func CloneProfile

func CloneProfile(ctx context.Context, store StoreInfo, matcher *Matcher, cookies []Cookie, dir string) (res CloneResult, err error)

CloneProfile builds a scoped copy of one browser profile at dir.

The source store must be a Chromium-family profile: the clone's value is that Chromium can open it, which a Firefox or Safari store cannot provide.

The clone is built in a sibling staging directory (mode 0700, a dot-name beside dir) and renamed onto dir only once it is complete and pruned. Every failure — a store that will not prune, a full disk, an interrupt that cancels ctx — removes the staging directory, so what is left at dir is the finished clone or nothing. Built in place, a failed clone left every site's unpruned cookies and storage at the operator's path, under a name that invited pointing a browser at it.

type Cookie struct {
	Name     string    `json:"name"`
	Value    string    `json:"value"`
	Domain   string    `json:"domain"`
	Path     string    `json:"path"`
	Secure   bool      `json:"secure"`
	HTTPOnly bool      `json:"http_only"`
	SameSite string    `json:"same_site"`
	Expires  time.Time `json:"expires,omitzero"`
	Created  time.Time `json:"created,omitzero"`

	Browser      string `json:"browser"`
	Profile      string `json:"profile"`
	ProfileLabel string `json:"profile_label,omitempty"`
	StoreFile    string `json:"store_file"`
}

Cookie is one decrypted cookie plus where it came from.

SameSite is deliberately a string rather than an http.SameSite: the store reader does not report it (see SameSiteUnknown), and the exporters need to distinguish "the store said Lax" from "nobody knows" to avoid presenting a guess as a fact.

func (Cookie) Expired

func (c Cookie) Expired(now time.Time) bool

Expired reports whether the cookie's expiry has passed at now. A session cookie is never expired by this test — its lifetime is not expressed here.

func (Cookie) ProfileName

func (c Cookie) ProfileName() string

ProfileName is the best display name for the profile the cookie came from: the label the browser shows, else the directory name. Shared with StoreInfo.profileName so the fallback cannot differ between the two.

func (Cookie) Session

func (c Cookie) Session() bool

Session reports whether the cookie dies with the browser session (no expiry recorded), which means a consumer should not expect it to work tomorrow.

type Diagnosis

type Diagnosis struct {
	OS string `json:"os"`
	// KeyringVia names how the decryption key is fetched on this build, which
	// decides whether an approval granted once keeps working.
	KeyringVia string      `json:"keyring_via"`
	Stores     []StoreInfo `json:"stores"`
	Checks     []Check     `json:"checks"`
	// Ready reports that nothing blocking was found.
	Ready bool `json:"ready"`
}

Diagnosis is the answer to "will reading cookies work on this machine, and if not, why".

It exists because every failure mode of a cookie read is indistinguishable from an empty result at the call site. An agent that runs this first learns whether to bother, and a human learns which approval to grant — rather than both concluding the domain simply has no cookies.

func Diagnose

func Diagnose(ctx context.Context, q Query, probeKeyring bool) (Diagnosis, error)

Diagnose inspects the machine and reports whether a cookie read can work.

probeKeyring decides whether the OS keyring is actually exercised. Doing so is what raises the approval prompt on macOS, so it is opt-in: `doctor` asks for it deliberately, because granting the approval is the point of running it, while an ordinary read must never prompt for a domain the browser has never seen.

type Format

type Format string

Format names an output encoding.

const (
	// FormatJSON is this package's own cookie shape, one object per cookie.
	FormatJSON Format = "json"
	// FormatJSONL is the same, one cookie per line.
	FormatJSONL Format = "jsonl"
	// FormatPlaywright is a Playwright storageState document, ready for
	// browser.newContext({storageState}) or context.addCookies().
	FormatPlaywright Format = "playwright"
	// FormatNetscape is the Netscape cookie-file format curl reads with -b.
	FormatNetscape Format = "netscape"
	// FormatHeader is a single Cookie request-header value.
	FormatHeader Format = "header"
	// FormatPlaywrightInit is a JavaScript snippet that restores
	// sessionStorage, which a storageState document cannot carry.
	FormatPlaywrightInit Format = "playwright-init"
)

func Formats

func Formats() []Format

Formats returns every supported format, in a stable order.

func ParseFormat

func ParseFormat(s string) (Format, error)

ParseFormat maps a CLI spelling to a Format.

func StorageCapableFormats

func StorageCapableFormats() []Format

StorageCapableFormats are the formats with somewhere to put local storage. Everything else is a cookie-only wire format.

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher decides whether a cookie's domain attribute is in scope.

func NewMatcher

func NewMatcher(domains []string, scope Scope) (*Matcher, error)

NewMatcher builds a matcher for the requested domains. An empty domain list matches every cookie.

A domain may be written as a bare hostname, a URL, a host:port, `.example.com`, or `*.example.com`; the last two request the subtree regardless of scope, because that is unambiguously what the operator wrote.

func (*Matcher) Match

func (m *Matcher) Match(hostKey string) bool

Match reports whether a cookie whose domain attribute is hostKey is in scope.

hostKey is the stored form: a leading dot means the cookie is a domain cookie serving the whole subtree, and no leading dot means it is host-only.

func (*Matcher) Targets

func (m *Matcher) Targets() []string

Targets returns the hostnames the matcher resolved to, for display. Useful with ScopeApex, where what was asked for is not what is matched.

type Origin

type Origin struct {
	// Origin is the origin ("https://app.example.com"), which is the unit
	// local storage is isolated by.
	Origin       string        `json:"origin"`
	LocalStorage []StorageItem `json:"local_storage"`
	// SessionStorage is the origin's sessionStorage, merged across the tabs
	// that held it. Absent unless Query.WithStorage asked for it.
	SessionStorage []StorageItem `json:"session_storage,omitempty"`
	// SessionNamespaces is how many tabs' sessionStorage was merged into
	// SessionStorage, so the merge is visible rather than implied.
	SessionNamespaces int `json:"session_namespaces,omitempty"`

	// Partitioned reports that this is third-party storage keyed to a
	// top-level site: what the origin sees only while embedded in
	// TopLevelSite, not its own first-party store.
	//
	// It is reported rather than silently merged because a quarter of the
	// origins in a real profile are partitioned, and a storageState has no way
	// to express the partition — restoring one as a plain origin writes
	// another site's view of this origin into its first-party bucket.
	Partitioned  bool   `json:"partitioned,omitempty"`
	TopLevelSite string `json:"top_level_site,omitempty"`

	Browser      string `json:"browser"`
	Profile      string `json:"profile,omitempty"`
	ProfileLabel string `json:"profile_label,omitempty"`
}

Origin is one web origin's local storage, in the shape Playwright's storageState expects.

func (Origin) ItemCount

func (o Origin) ItemCount() int

ItemCount is how many local and session storage entries the origin holds.

type OriginStore

type OriginStore struct {
	// Origin is the origin the store belongs to.
	Origin string `json:"origin"`
	// Kind names the storage system ("indexeddb").
	Kind string `json:"kind"`
	// Bytes is the store's size on disk, as a proxy for whether it holds
	// anything worth caring about.
	Bytes int64 `json:"bytes"`
	// Path is the directory holding it.
	Path string `json:"path"`
}

OriginStore describes a per-origin store this reader can see but not parse.

type Problem

type Problem string

Problem classifies why a store yielded nothing, so a caller can branch without reading prose. It is the distinction between "look elsewhere for a session" and "ask the human to approve a keyring prompt".

const (
	// ProblemNone: the store was read.
	ProblemNone Problem = ""
	// ProblemKeyringDenied: the decryption key could not be read from the OS
	// keyring. On macOS this is the Keychain prompt being denied, dismissed, or
	// never shown because there is no desktop session.
	ProblemKeyringDenied Problem = "keyring_denied"
	// ProblemEncryptionUnsupported: the store uses an encryption scheme this
	// reader cannot undo — in practice Chrome 127+ App-Bound Encryption on
	// Windows, whose key only Chrome's elevation service can unwrap.
	//
	// The string matches apicontract.CodeBrowserEncryptionUnsupported verbatim,
	// as ProblemKeyringDenied matches CodeKeyringDenied: a driver reading
	// stores[].problem and error.code should not need a translation table to
	// see that they say the same thing.
	ProblemEncryptionUnsupported Problem = "browser_encryption_unsupported"
	// ProblemUnreadable: the store exists but could not be opened or parsed
	// (locked by a running browser in a way the reader cannot work around,
	// truncated file, permission denied on the file itself).
	ProblemUnreadable Problem = "unreadable"
	// ProblemDecryptFailed: rows were found and the key was available, but the
	// values did not decrypt. Usually a store written by a browser build whose
	// scheme has moved on.
	ProblemDecryptFailed Problem = "decrypt_failed"
)

type Query

type Query struct {
	// Domains to match, as hostnames. Empty matches every domain.
	Domains []string
	// Scope decides how a cookie's domain attribute is matched against Domains.
	Scope Scope
	// Names, when non-empty, keeps only cookies with one of these names.
	Names []string
	// Browsers, when non-empty, keeps only these browsers (lowercase, as
	// [SupportedBrowsers] reports them).
	Browsers []string
	// Profiles, when non-empty, keeps only stores whose profile directory or
	// human label matches one of these, case-insensitively.
	Profiles []string
	// UserDataDirs are extra Chromium user-data roots to read in addition to
	// the default install locations — the way to reach a Chrome for Testing,
	// Chrome Beta, or Playwright profile, none of which live where the
	// upstream finders look.
	UserDataDirs []string
	// WithStorage also reads each matching origin's local storage. It is
	// opt-in because it costs a staged copy of the profile's LevelDB store,
	// which the cookie read does not need.
	WithStorage bool
	// IncludeExpired keeps cookies whose expiry has already passed. They are
	// dropped by default: an expired cookie cannot authenticate anything, and
	// returning one invites a caller to believe it has a session when it does
	// not.
	IncludeExpired bool
	// Now is the clock for expiry decisions. Zero means time.Now().
	Now time.Time
	// NoPrompt refuses every cookie read that would ask the OS for approval
	// (on macOS: a store whose key is in the login keychain). Such a store is
	// reported as ProblemKeyringDenied without being opened, so an unattended
	// caller gets a coded answer instead of a dialog nobody will see. Local
	// and session storage need no key and are still read.
	NoPrompt bool
}

Query selects which cookies to read. A zero Query matches every cookie in every discoverable store, which is almost never what a caller wants; the CLI requires at least one domain.

type RenderOptions

type RenderOptions struct {
	// Origins is the local storage to include. Only the Playwright
	// storageState has a place for it; every other format drops it, which is
	// why --with-storage warns when paired with one of those.
	Origins []Origin
	// SameSite overrides the SameSite attribute written for every cookie.
	// Empty means [DefaultSameSite] is used wherever the store did not record
	// one — which, for Chromium stores, is everywhere.
	SameSite string
}

RenderOptions tunes an export.

type Result

type Result struct {
	Cookies []Cookie `json:"cookies"`
	// Origins is the local and session storage of each matching origin,
	// present only when Query.WithStorage was set.
	Origins []Origin `json:"origins"`
	// Unreadable lists per-origin stores that exist but that no export short
	// of a profile clone can carry — IndexedDB, in practice. Reported because
	// an app whose session lives there restores its cookies perfectly and
	// still shows a login page.
	Unreadable []OriginStore `json:"unreadable"`
	Stores     []StoreResult `json:"stores"`
	// Matcher is the domain matcher the read was scoped by, built once from
	// Query.Domains and Query.Scope. Exposed so a caller that scopes further
	// work to the same domains (a profile clone, the resolved target list)
	// reuses it rather than rebuilding it. Not serialized.
	Matcher *Matcher `json:"-"`
	// Warnings are caveats about what was returned — fidelity limits that do
	// not make the result wrong, but do make it incomplete in a way the caller
	// should know about before trusting it.
	Warnings []string `json:"warnings"`
}

Result is everything one Read produced.

func Read

func Read(ctx context.Context, q Query) (Result, error)

Read decrypts the cookies matching q from every store the query selects.

A store that cannot be read does not fail the call: its failure is recorded in the corresponding StoreResult and the remaining stores are still read, because one locked Firefox profile is no reason to withhold the Chrome session the caller asked for. Inspect Result.Problem to find out whether an empty result means "nothing matched" or "nothing could be read".

func (Result) Problem

func (r Result) Problem() Problem

Problem returns the most actionable problem across the stores read, or ProblemNone when every store was read cleanly.

Ordering is by what the caller can do about it: a denied keyring is a prompt away from working, so it outranks an unsupported scheme that no retry fixes.

func (Result) ProblemDetail

func (r Result) ProblemDetail() string

ProblemDetail returns the detail text of the first store carrying the result's governing problem, for an error message.

func (Result) StorageItems

func (r Result) StorageItems() int

StorageItems counts the local and session storage entries read, across every origin. One definition, because the quantity was summed in the package and then summed again by the caller — and the caller's copy counted only local storage while calling itself the total.

type Scope

type Scope int

Scope decides how a requested domain is matched against a cookie's domain attribute.

The distinction exists because a cookie's domain is not a string to compare but a scope rule: `.example.com` serves every host under example.com, while `example.com` with no leading dot serves that host alone. Comparing the two as strings is the single most common way a cookie export comes out either short or full of cookies the target would never receive.

const (
	// ScopeHost keeps the cookies a browser would actually send to the
	// requested hostname, per RFC 6265 domain-matching: its own host-only
	// cookies, plus the domain cookies of every parent domain. This is the
	// default because it answers the question a caller is really asking —
	// "what does a request to this host carry?"
	ScopeHost Scope = iota
	// ScopeSubdomains additionally keeps cookies belonging to hosts *below*
	// the requested domain, so asking for example.com also returns the cookies
	// scoped to app.example.com. Use it to collect a whole site's sessions.
	ScopeSubdomains
	// ScopeApex widens each requested domain to its registrable domain
	// (eTLD+1) and then applies ScopeSubdomains, so any host in the
	// organization's domain matches. "a.b.example.co.uk" becomes
	// "example.co.uk" — which needs the public suffix list, not a label count.
	ScopeApex
)

func ParseScope

func ParseScope(s string) (Scope, error)

ParseScope maps a CLI spelling to a Scope.

func (Scope) String

func (s Scope) String() string

String renders the scope as its CLI spelling.

type SelectorError

type SelectorError struct{ Err error }

SelectorError marks a query whose selectors cannot be satisfied — an unknown browser name, an unusable --user-data-dir — as opposed to a failure of the work itself.

It is a type rather than a sentinel so the CLI can exit 2 (usage) instead of 1 (failed): the caller's fix is to correct the command line, and a driver that retries a usage error forever is the behaviour this prevents.

func (SelectorError) Error

func (e SelectorError) Error() string

func (SelectorError) Unwrap

func (e SelectorError) Unwrap() error

type StorageItem

type StorageItem struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

StorageItem is one local-storage entry.

type StoreInfo

type StoreInfo struct {
	// Browser is the lowercase browser name, as [SupportedBrowsers] reports it.
	Browser string `json:"browser"`
	// Family groups browsers that share a store format and key source.
	Family string `json:"family"`
	// Profile is the on-disk profile directory name ("Default", "Profile 3").
	Profile string `json:"profile,omitempty"`
	// Label is the name the user sees in the browser ("Work"), read from the
	// browser's own profile metadata. The whole point of reading it: nobody
	// knows which of their profiles is "Profile 3".
	Label string `json:"label,omitempty"`
	// Account is the signed-in account for the profile, when the browser
	// records one.
	Account string `json:"account,omitempty"`
	// Default reports whether this is the browser's default profile.
	Default bool `json:"default"`
	// File is the path to the cookie store.
	File string `json:"file"`
	// Root is the user-data directory the profile lives in (Chromium only).
	Root string `json:"root,omitempty"`
	// Explicit reports whether this store came from a caller-supplied
	// --user-data-dir rather than a default install location.
	Explicit bool `json:"explicit,omitempty"`
	// WAL reports that a write-ahead log sits beside the store with content in
	// it. The reader does not consult it, so recent writes may be invisible.
	WAL bool `json:"wal,omitempty"`
	// AppBound reports that the profile's key is held under Chrome's
	// App-Bound Encryption, which makes the store unreadable here.
	AppBound bool `json:"app_bound,omitempty"`
	// SafeStorage names the OS keyring item holding the decryption key, for
	// diagnostics. Empty for stores that need no key.
	SafeStorage string `json:"safe_storage,omitempty"`
	// KeyringAccount is the keyring item's account attribute.
	KeyringAccount string `json:"keyring_account,omitempty"`
}

StoreInfo describes one cookie store on disk. It is a value, not a handle: discovery holds nothing open, and a store is reopened by path when it is actually read, so enumerating profiles costs no file locks and no keyring access.

func Discover

func Discover(ctx context.Context, q Query) ([]StoreInfo, error)

Discover enumerates the cookie stores q selects, newest-looking first within each browser.

Stores are found in two ways: the browser packages' knowledge of default install locations, and any roots the caller named in Query.UserDataDirs. The second exists because the interesting profiles often are not in the first — Chrome for Testing, Chrome Beta and Dev, and the throwaway profiles Playwright and Puppeteer create all live wherever the launcher put them.

func (StoreInfo) Describe

func (s StoreInfo) Describe() string

Describe renders the store as one short human identifier.

func (StoreInfo) NeedsKeyring

func (s StoreInfo) NeedsKeyring() bool

NeedsKeyring reports whether reading this store requires a secret from the OS keyring, and so may raise an approval prompt.

type StoreResult

type StoreResult struct {
	Store StoreInfo `json:"store"`
	Count int       `json:"count"`
	// StorageOrigins and StorageItems count what the local-storage read found
	// in this store, when one was asked for.
	StorageOrigins int `json:"storage_origins,omitempty"`
	StorageItems   int `json:"storage_items,omitempty"`
	// StorageProblem is why local storage could not be read, when it could
	// not. It is separate from Problem: a locked LevelDB store says nothing
	// about the cookies, which may have been read perfectly.
	StorageProblem string  `json:"storage_problem,omitempty"`
	Problem        Problem `json:"problem,omitempty"`
	// Detail is the underlying error text, for a human. Machine consumers
	// branch on Problem.
	Detail string `json:"detail,omitempty"`
}

StoreResult is the outcome for a single cookie store.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL