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

Unified Diff: chrome/browser/cookies_tree_model.h

Issue 7491085: Revert 95607 - Adding usage entry to chrome://settings/cookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/cookies_tree_model.h
===================================================================
--- chrome/browser/cookies_tree_model.h (revision 95777)
+++ chrome/browser/cookies_tree_model.h (working copy)
@@ -21,7 +21,6 @@
#include "chrome/browser/browsing_data_file_system_helper.h"
#include "chrome/browser/browsing_data_indexed_db_helper.h"
#include "chrome/browser/browsing_data_local_storage_helper.h"
-#include "chrome/browser/browsing_data_quota_helper.h"
#include "chrome/common/content_settings.h"
#include "net/base/cookie_monster.h"
#include "ui/base/models/tree_node_model.h"
@@ -37,7 +36,6 @@
class CookieTreeFileSystemNode;
class CookieTreeLocalStorageNode;
class CookieTreeLocalStoragesNode;
-class CookieTreeQuotaNode;
class CookieTreeSessionStorageNode;
class CookieTreeSessionStoragesNode;
class CookieTreeIndexedDBNode;
@@ -71,9 +69,8 @@
TYPE_APPCACHE, // This is used for CookieTreeAppCacheNode.
TYPE_INDEXED_DBS, // This is used for CookieTreeIndexedDBsNode.
TYPE_INDEXED_DB, // This is used for CookieTreeIndexedDBNode.
- TYPE_FILE_SYSTEMS, // This is used for CookieTreeFileSystemsNode.
- TYPE_FILE_SYSTEM, // This is used for CookieTreeFileSystemNode.
- TYPE_QUOTA, // This is used for CookieTreeQuotaNode.
+ TYPE_FILE_SYSTEMS, // This is used for CookieTreeFileSystemsNode.
+ TYPE_FILE_SYSTEM, // This is used for CookieTreeFileSystemNode.
};
// TODO(viettrungluu): Figure out whether we want to store |origin| as a
@@ -88,8 +85,7 @@
session_storage_info,
const appcache::AppCacheInfo* appcache_info,
const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info,
- const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info,
- const BrowsingDataQuotaHelper::QuotaInfo* quota_info)
+ const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info)
: origin(UTF16ToWideHack(origin)),
node_type(node_type),
cookie(cookie),
@@ -98,15 +94,13 @@
session_storage_info(session_storage_info),
appcache_info(appcache_info),
indexed_db_info(indexed_db_info),
- file_system_info(file_system_info),
- quota_info(quota_info) {
+ file_system_info(file_system_info) {
DCHECK((node_type != TYPE_DATABASE) || database_info);
DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info);
DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info);
DCHECK((node_type != TYPE_APPCACHE) || appcache_info);
DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info);
DCHECK((node_type != TYPE_FILE_SYSTEM) || file_system_info);
- DCHECK((node_type != TYPE_QUOTA) || quota_info);
}
#if !defined(WCHAR_T_IS_UTF16)
DetailedInfo(const std::wstring& origin, NodeType node_type,
@@ -118,8 +112,7 @@
session_storage_info,
const appcache::AppCacheInfo* appcache_info,
const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info,
- const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info,
- const BrowsingDataQuotaHelper::QuotaInfo* quota_info)
+ const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info)
: origin(origin),
node_type(node_type),
cookie(cookie),
@@ -128,15 +121,13 @@
session_storage_info(session_storage_info),
appcache_info(appcache_info),
indexed_db_info(indexed_db_info),
- file_system_info(file_system_info),
- quota_info(quota_info) {
+ file_system_info(file_system_info) {
DCHECK((node_type != TYPE_DATABASE) || database_info);
DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info);
DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info);
DCHECK((node_type != TYPE_APPCACHE) || appcache_info);
DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info);
DCHECK((node_type != TYPE_FILE_SYSTEM) || file_system_info);
- DCHECK((node_type != TYPE_QUOTA) || quota_info);
}
#endif
@@ -150,7 +141,6 @@
const appcache::AppCacheInfo* appcache_info;
const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info;
const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info;
- const BrowsingDataQuotaHelper::QuotaInfo* quota_info;
};
CookieTreeNode() {}
@@ -221,8 +211,6 @@
CookieTreeAppCachesNode* GetOrCreateAppCachesNode();
CookieTreeIndexedDBsNode* GetOrCreateIndexedDBsNode();
CookieTreeFileSystemsNode* GetOrCreateFileSystemsNode();
- CookieTreeQuotaNode* UpdateOrCreateQuotaNode(
- BrowsingDataQuotaHelper::QuotaInfo* quota_info);
// Creates an content exception for this origin of type
// CONTENT_SETTINGS_TYPE_COOKIES.
@@ -245,7 +233,6 @@
CookieTreeAppCachesNode* appcaches_child_;
CookieTreeIndexedDBsNode* indexed_dbs_child_;
CookieTreeFileSystemsNode* file_systems_child_;
- CookieTreeQuotaNode* quota_child_;
// The URL for which this node was initially created.
GURL url_;
@@ -511,25 +498,7 @@
DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBsNode);
};
-// CookieTreeQuotaNode --------------------------------------------------
-class CookieTreeQuotaNode : public CookieTreeNode {
- public:
- // Does not take ownership of quota_info, and quota_info should remain valid
- // at least as long as the CookieTreeQuotaNode is valid.
- explicit CookieTreeQuotaNode(BrowsingDataQuotaHelper::QuotaInfo* quota_info);
- virtual ~CookieTreeQuotaNode();
- virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const;
-
- private:
- // quota_info_ is not owned by the node, and is expected to remain valid as
- // long as the CookieTreeQuotaNode is valid.
- BrowsingDataQuotaHelper::QuotaInfo* quota_info_;
-
- DISALLOW_COPY_AND_ASSIGN(CookieTreeQuotaNode);
-};
-
// CookiesTreeModel -----------------------------------------------------------
class CookiesTreeModel : public ui::TreeNodeModel<CookieTreeNode> {
public:
@@ -552,7 +521,6 @@
BrowsingDataAppCacheHelper* appcache_helper,
BrowsingDataIndexedDBHelper* indexed_db_helper,
BrowsingDataFileSystemHelper* file_system_helper,
- BrowsingDataQuotaHelper* quota_helper,
bool use_cookie_source);
virtual ~CookiesTreeModel();
@@ -597,7 +565,6 @@
IndexedDBInfoList;
typedef std::vector<BrowsingDataFileSystemHelper::FileSystemInfo>
FileSystemInfoList;
- typedef std::vector<BrowsingDataQuotaHelper::QuotaInfo> QuotaInfoArray;
void LoadCookies();
void LoadCookiesWithFilter(const std::wstring& filter);
@@ -612,7 +579,6 @@
const IndexedDBInfoList& indexed_db_info);
void OnFileSystemModelInfoLoaded(
const FileSystemInfoList& file_system_info);
- void OnQuotaModelInfoLoaded(const QuotaInfoArray& quota_info);
void PopulateAppCacheInfoWithFilter(const std::wstring& filter);
void PopulateDatabaseInfoWithFilter(const std::wstring& filter);
@@ -620,7 +586,6 @@
void PopulateSessionStorageInfoWithFilter(const std::wstring& filter);
void PopulateIndexedDBInfoWithFilter(const std::wstring& filter);
void PopulateFileSystemInfoWithFilter(const std::wstring& filter);
- void PopulateQuotaInfoWithFilter(const std::wstring& filter);
void NotifyObserverBeginBatch();
void NotifyObserverEndBatch();
@@ -637,12 +602,10 @@
scoped_refptr<BrowsingDataLocalStorageHelper> session_storage_helper_;
scoped_refptr<BrowsingDataIndexedDBHelper> indexed_db_helper_;
scoped_refptr<BrowsingDataFileSystemHelper> file_system_helper_;
- scoped_refptr<BrowsingDataQuotaHelper> quota_helper_;
LocalStorageInfoList local_storage_info_list_;
LocalStorageInfoList session_storage_info_list_;
IndexedDBInfoList indexed_db_info_list_;
FileSystemInfoList file_system_info_list_;
- QuotaInfoArray quota_info_list_;
// The CookiesTreeModel maintains a separate list of observers that are
// specifically of the type CookiesTreeModel::Observer.
@@ -663,7 +626,6 @@
friend class CookieTreeLocalStorageNode;
friend class CookieTreeIndexedDBNode;
friend class CookieTreeFileSystemNode;
- friend class CookieTreeQuotaNode;
DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel);
};
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698