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

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

Issue 10709006: Show apps protecting local data in chrome://settings/cookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: argh Created 8 years, 5 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 cce123f71992c7ffe517050b7e0e031695047aee..7607c98fd0865dd39dde44da30b41802742b3d96 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -27,6 +27,7 @@ const char kKeyHasChildren[] = "hasChildren";
const char kKeyAppId[] = "appId";
+const char kKeyAppsProtectingThis[] = "appsProtectingThis";
const char kKeyName[] = "name";
const char kKeyContent[] = "content";
const char kKeyDomain[] = "domain";
@@ -94,7 +95,7 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
dict->SetBoolean(kKeyHasChildren, !node.empty());
switch (node.GetDetailedInfo().node_type) {
- case CookieTreeNode::DetailedInfo::TYPE_ORIGIN: {
+ case CookieTreeNode::DetailedInfo::TYPE_HOST: {
dict->SetString(kKeyType, "origin");
dict->SetString(kKeyAppId, node.GetDetailedInfo().app_id);
#if defined(OS_MACOSX)
@@ -259,6 +260,21 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
#endif
break;
}
+
+ const ExtensionSet* protecting_apps =
+ node.GetModel()->ExtensionsProtectingNode(node);
+ if (protecting_apps && !protecting_apps->is_empty()) {
+ base::ListValue* app_infos = new base::ListValue;
+ for (ExtensionSet::const_iterator it = protecting_apps->begin();
+ it != protecting_apps->end(); ++it) {
+ base::DictionaryValue* app_info = new base::DictionaryValue();
+ app_info->SetString(kKeyId, (*it)->id());
+ app_info->SetString(kKeyName, (*it)->name());
+ app_infos->Append(app_info);
+ }
+ dict->Set(kKeyAppsProtectingThis, app_infos);
+ }
+
return true;
}
« no previous file with comments | « chrome/browser/ui/views/collected_cookies_views.cc ('k') | chrome/browser/ui/webui/options2/cookies_view_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698