Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: chrome/browser/ui/webui/options2/cookies_view_handler.cc

Issue 10830221: Ensure that cookies dialog is populated with new cookies on reload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options2/cookies_view_handler.cc
diff --git a/chrome/browser/ui/webui/options2/cookies_view_handler.cc b/chrome/browser/ui/webui/options2/cookies_view_handler.cc
index 2a7c3c2f8792c8d735317646cf7f52f0c555ebd8..82ef5bb5ea953c442eae4f3932c9c9bfa6299c5d 100644
--- a/chrome/browser/ui/webui/options2/cookies_view_handler.cc
+++ b/chrome/browser/ui/webui/options2/cookies_view_handler.cc
@@ -120,6 +120,9 @@ void CookiesViewHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback("setViewContext",
base::Bind(&CookiesViewHandler::SetViewContext,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback("reloadCookies",
+ base::Bind(&CookiesViewHandler::ReloadCookies,
+ base::Unretained(this)));
}
void CookiesViewHandler::TreeNodesAdded(ui::TreeModel* model,
@@ -295,6 +298,13 @@ void CookiesViewHandler::SetViewContext(const base::ListValue* args) {
app_context_ = app_context;
}
+void CookiesViewHandler::ReloadCookies(const base::ListValue* args) {
+ cookies_tree_model_.reset();
+ app_cookies_tree_model_.reset();
+
+ EnsureCookiesTreeModelCreated();
+}
+
CookiesTreeModel* CookiesViewHandler::GetTreeModel() {
CookiesTreeModel* model = app_context_ ?
app_cookies_tree_model_.get() : cookies_tree_model_.get();

Powered by Google App Engine
This is Rietveld 408576698