Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetDetails duplicate definitions #15

Open
Zekfad opened this issue Nov 25, 2023 · 2 comments
Open

SetDetails duplicate definitions #15

Zekfad opened this issue Nov 25, 2023 · 2 comments

Comments

@Zekfad
Copy link

Zekfad commented Nov 25, 2023

cookies.dart, types.dart and content_settings.dart defines same type.

It should be a generic usage instead, see #14

@xvrh
Copy link
Owner

xvrh commented Nov 26, 2023

They have the same name but they have different properties. Why do you think they should be the same? And what do you mean by generic? Can you provide an example?

@Zekfad
Copy link
Author

Zekfad commented Nov 26, 2023

SetDetails in each of this duplicates is a generic that passed to of ChromeSetting.set details parameter.
I believe it should be a sealed type hierarchy, e.g. sealed ChromeSettingDetails -> ProxyChromeSettingDetails, CookiesChromeSettingDetails and so on.

Ref: https://developer.chrome.com/docs/extensions/reference/cookies/#type-CookieDetails
Ref: https://developer.chrome.com/docs/extensions/reference/cookies/#method-set
Ref: https://developer.chrome.com/docs/extensions/reference/proxy/#type-ProxyConfig

It seems that cookies are not fully implementing ChromeSetting though, so they probably should be a different API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants