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

Unified Diff: chrome/browser/ui/webui/cookies_tree_model_util.cc

Issue 2395883003: Not For Review - using dom-repeat (Closed)
Patch Set: Created 4 years, 2 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/cookies_tree_model_util.cc
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc
index afacc2b1d394351d7d76f73b44aaa34950097365..82611ad3bf9832f29ba7f00dff0e65a348b00a21 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -90,6 +90,7 @@ std::string CookiesTreeModelUtil::GetTreeNodeId(const CookieTreeNode* node) {
bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
const CookieTreeNode& node,
+ bool include_quota_nodes,
base::DictionaryValue* dict) {
// Use node's address as an id for WebUI to look it up.
dict->SetString(kKeyId, GetTreeNodeId(&node));
@@ -216,6 +217,9 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
break;
}
case CookieTreeNode::DetailedInfo::TYPE_QUOTA: {
+ if (!include_quota_nodes)
+ return false;
+
dict->SetString(kKeyType, "quota");
dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON");
@@ -325,11 +329,12 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
void CookiesTreeModelUtil::GetChildNodeList(const CookieTreeNode* parent,
int start,
int count,
+ bool include_quota_nodes,
base::ListValue* nodes) {
for (int i = 0; i < count; ++i) {
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
const CookieTreeNode* child = parent->GetChild(start + i);
- if (GetCookieTreeNodeDictionary(*child, dict.get()))
+ if (GetCookieTreeNodeDictionary(*child, include_quota_nodes, dict.get()))
nodes->Append(std::move(dict));
}
}
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.h ('k') | chrome/browser/ui/webui/options/cookies_view_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698