| Index: chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
|
| diff --git a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
|
| index de86c6353ed0053014e66b788ffe31514f6072bd..1a30689308a3715057a40e7f86036d7ed1f0518d 100644
|
| --- a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
|
| @@ -177,6 +177,9 @@ void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) {
|
| }
|
|
|
| void CookiesViewHandler::RemoveAll(const base::ListValue* args) {
|
| + CHECK_EQ(1U, args->GetSize());
|
| + CHECK(args->GetString(0, &callback_id_));
|
| +
|
| EnsureCookiesTreeModelCreated();
|
| cookies_tree_model_->DeleteAllStoredObjects();
|
| }
|
| @@ -195,8 +198,11 @@ void CookiesViewHandler::Remove(const base::ListValue* args) {
|
| }
|
|
|
| void CookiesViewHandler::LoadChildren(const base::ListValue* args) {
|
| + CHECK_LT(0U, args->GetSize());
|
| + CHECK(args->GetString(0, &callback_id_));
|
| +
|
| std::string node_path;
|
| - if (!args->GetString(0, &node_path))
|
| + if (!args->GetString(1, &node_path))
|
| return;
|
|
|
| EnsureCookiesTreeModelCreated();
|
| @@ -221,12 +227,14 @@ void CookiesViewHandler::SendChildren(const CookieTreeNode* parent) {
|
| args.AppendString(model_util_->GetTreeNodeId(parent));
|
| args.Append(std::move(children));
|
|
|
| - CallJavascriptFunction("cr.webUIListenerCallback",
|
| - base::StringValue("loadChildren"),
|
| - args);
|
| + ResolveJavascriptCallback(base::StringValue(callback_id_), args);
|
| + callback_id_ = "";
|
| }
|
|
|
| void CookiesViewHandler::ReloadCookies(const base::ListValue* args) {
|
| + CHECK_EQ(1U, args->GetSize());
|
| + CHECK(args->GetString(0, &callback_id_));
|
| +
|
| cookies_tree_model_.reset();
|
|
|
| EnsureCookiesTreeModelCreated();
|
|
|