Index: chrome/browser/cookies_tree_model.cc |
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc |
index 24e3c9a36b5f9f92e1788340e43329d63625241a..ed3c8b45cffe06de4b07522c6cb6b4bc7406bcf0 100644 |
--- a/chrome/browser/cookies_tree_model.cc |
+++ b/chrome/browser/cookies_tree_model.cc |
@@ -51,6 +51,8 @@ CookieTreeCookieNode::CookieTreeCookieNode( |
cookie_(cookie) { |
} |
+CookieTreeCookieNode::~CookieTreeCookieNode() {} |
+ |
void CookieTreeCookieNode::DeleteStoredObjects() { |
// notify CookieMonster that we should delete this cookie |
// We have stored a copy of all the cookies in the model, and our model is |
@@ -62,6 +64,12 @@ void CookieTreeCookieNode::DeleteStoredObjects() { |
GetModel()->cookie_monster_->DeleteCanonicalCookie(*cookie_); |
} |
+CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_COOKIE, |
+ cookie_, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
namespace { |
// comparison functor, for use in CookieTreeRootNode |
class OriginNodeComparator { |
@@ -136,6 +144,12 @@ void CookieTreeAppCacheNode::DeleteStoredObjects() { |
appcache_info_->manifest_url); |
} |
+CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_APPCACHE, |
+ NULL, NULL, NULL, NULL, appcache_info_, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeDatabaseNode, public: |
@@ -147,11 +161,19 @@ CookieTreeDatabaseNode::CookieTreeDatabaseNode( |
database_info_(database_info) { |
} |
+CookieTreeDatabaseNode::~CookieTreeDatabaseNode() {} |
+ |
void CookieTreeDatabaseNode::DeleteStoredObjects() { |
GetModel()->database_helper_->DeleteDatabase( |
database_info_->origin_identifier, database_info_->database_name); |
} |
+CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_DATABASE, |
+ NULL, database_info_, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeLocalStorageNode, public: |
@@ -164,11 +186,20 @@ CookieTreeLocalStorageNode::CookieTreeLocalStorageNode( |
local_storage_info_(local_storage_info) { |
} |
+CookieTreeLocalStorageNode::~CookieTreeLocalStorageNode() {} |
+ |
void CookieTreeLocalStorageNode::DeleteStoredObjects() { |
GetModel()->local_storage_helper_->DeleteLocalStorageFile( |
local_storage_info_->file_path); |
} |
+CookieTreeNode::DetailedInfo |
+CookieTreeLocalStorageNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_LOCAL_STORAGE, |
+ NULL, NULL, local_storage_info_, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeSessionStorageNode, public: |
@@ -181,6 +212,15 @@ CookieTreeSessionStorageNode::CookieTreeSessionStorageNode( |
session_storage_info_(session_storage_info) { |
} |
+CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {} |
+ |
+CookieTreeNode::DetailedInfo |
+CookieTreeSessionStorageNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_SESSION_STORAGE, |
+ NULL, NULL, NULL, session_storage_info_, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeIndexedDBNode, public: |
@@ -193,14 +233,28 @@ CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( |
indexed_db_info_(indexed_db_info) { |
} |
+CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {} |
+ |
void CookieTreeIndexedDBNode::DeleteStoredObjects() { |
GetModel()->indexed_db_helper_->DeleteIndexedDBFile( |
indexed_db_info_->file_path); |
} |
+CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_INDEXED_DB, |
+ NULL, NULL, NULL, NULL, NULL, indexed_db_info_); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeRootNode, public: |
+CookieTreeRootNode::CookieTreeRootNode(CookiesTreeModel* model) |
+ : model_(model) { |
+} |
+ |
+CookieTreeRootNode::~CookieTreeRootNode() {} |
+ |
CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode( |
const GURL& url) { |
CookieTreeOriginNode origin_node(url); |
@@ -224,6 +278,16 @@ CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode( |
return retval; |
} |
+CookiesTreeModel* CookieTreeRootNode::GetModel() const { |
+ return model_; |
+} |
+ |
+CookieTreeNode::DetailedInfo CookieTreeRootNode::GetDetailedInfo() const { |
+ return DetailedInfo(string16(), |
+ DetailedInfo::TYPE_ROOT, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeOriginNode, public: |
@@ -322,6 +386,15 @@ CookieTreeCookiesNode::CookieTreeCookiesNode() |
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIES)) { |
} |
+CookieTreeCookiesNode::~CookieTreeCookiesNode() { |
+} |
+ |
+CookieTreeNode::DetailedInfo CookieTreeCookiesNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_COOKIES, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeAppCachesNode, public: |
@@ -330,6 +403,14 @@ CookieTreeAppCachesNode::CookieTreeAppCachesNode() |
IDS_COOKIES_APPLICATION_CACHES)) { |
} |
+CookieTreeAppCachesNode::~CookieTreeAppCachesNode() {} |
+ |
+CookieTreeNode::DetailedInfo CookieTreeAppCachesNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_APPCACHES, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeDatabasesNode, public: |
@@ -337,6 +418,14 @@ CookieTreeDatabasesNode::CookieTreeDatabasesNode() |
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASES)) { |
} |
+CookieTreeDatabasesNode::~CookieTreeDatabasesNode() {} |
+ |
+CookieTreeNode::DetailedInfo CookieTreeDatabasesNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_DATABASES, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeLocalStoragesNode, public: |
@@ -344,6 +433,15 @@ CookieTreeLocalStoragesNode::CookieTreeLocalStoragesNode() |
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE)) { |
} |
+CookieTreeLocalStoragesNode::~CookieTreeLocalStoragesNode() {} |
+ |
+CookieTreeNode::DetailedInfo |
+CookieTreeLocalStoragesNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_LOCAL_STORAGES, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeSessionStoragesNode, public: |
@@ -351,6 +449,15 @@ CookieTreeSessionStoragesNode::CookieTreeSessionStoragesNode() |
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_SESSION_STORAGE)) { |
} |
+CookieTreeSessionStoragesNode::~CookieTreeSessionStoragesNode() {} |
+ |
+CookieTreeNode::DetailedInfo |
+CookieTreeSessionStoragesNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_SESSION_STORAGES, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeIndexedDBsNode, public: |
@@ -358,6 +465,15 @@ CookieTreeIndexedDBsNode::CookieTreeIndexedDBsNode() |
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_INDEXED_DB)) { |
} |
+CookieTreeIndexedDBsNode::~CookieTreeIndexedDBsNode() {} |
+ |
+CookieTreeNode::DetailedInfo |
+CookieTreeIndexedDBsNode::GetDetailedInfo() const { |
+ return DetailedInfo(GetParent()->GetTitle(), |
+ DetailedInfo::TYPE_INDEXED_DBS, |
+ NULL, NULL, NULL, NULL, NULL, NULL); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// CookieTreeNode, protected |