summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser/CookiesModel.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-10-20 16:38:20 +0100
committerLinus Groh <mail@linusgroh.de>2022-10-20 21:52:44 +0200
commit4d9c0c7b223a6398f8d06ddfb08b574a86d5b8d6 (patch)
tree8e750a8ec81c894520902563a913260d23acc0e3 /Userland/Applications/Browser/CookiesModel.cpp
parentc11462f40e4b0ee56c76877cc5d5baf143e987ff (diff)
downloadserenity-4d9c0c7b223a6398f8d06ddfb08b574a86d5b8d6.zip
Browser: Add ability to delete cookies from Storage Inspector
Adds actions to delete either a single cookie, or all of them. This looks weird, because the GUI doesn't update until you "Inspect > Open Storage Inspector", but it does function. :^)
Diffstat (limited to 'Userland/Applications/Browser/CookiesModel.cpp')
-rw-r--r--Userland/Applications/Browser/CookiesModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/CookiesModel.cpp b/Userland/Applications/Browser/CookiesModel.cpp
index facae3722b..bea2296509 100644
--- a/Userland/Applications/Browser/CookiesModel.cpp
+++ b/Userland/Applications/Browser/CookiesModel.cpp
@@ -97,4 +97,10 @@ TriState CookiesModel::data_matches(GUI::ModelIndex const& index, GUI::Variant c
return TriState::False;
}
+Web::Cookie::Cookie const& CookiesModel::get_cookie(GUI::ModelIndex const& index) const
+{
+ VERIFY(index.is_valid());
+ return m_cookies[index.row()];
+}
+
}