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

Unified Diff: chrome/browser/ui/webui/options/cookies_view_handler.cc

Issue 1297093002: Cache Storage API: Hook up to chrome://settings/cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto https://codereview.chromium.org/1297023004 Created 5 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
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/cookies_view_handler.cc
diff --git a/chrome/browser/ui/webui/options/cookies_view_handler.cc b/chrome/browser/ui/webui/options/cookies_view_handler.cc
index c817343842aa0e3d62fca3d831511fcbfb5e60ff..9567b422ef2a5cfa1404f5973c938bcb177c0851 100644
--- a/chrome/browser/ui/webui/options/cookies_view_handler.cc
+++ b/chrome/browser/ui/webui/options/cookies_view_handler.cc
@@ -11,6 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browsing_data/browsing_data_appcache_helper.h"
+#include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h"
#include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
#include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
#include "chrome/browser/browsing_data/browsing_data_database_helper.h"
@@ -48,63 +49,65 @@ void CookiesViewHandler::GetLocalizedValues(
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
- { "label_cookie_name", IDS_COOKIES_COOKIE_NAME_LABEL },
- { "label_cookie_content", IDS_COOKIES_COOKIE_CONTENT_LABEL },
- { "label_cookie_domain", IDS_COOKIES_COOKIE_DOMAIN_LABEL },
- { "label_cookie_path", IDS_COOKIES_COOKIE_PATH_LABEL },
- { "label_cookie_send_for", IDS_COOKIES_COOKIE_SENDFOR_LABEL },
- { "label_cookie_accessible_to_script",
- IDS_COOKIES_COOKIE_ACCESSIBLE_TO_SCRIPT_LABEL },
- { "label_cookie_created", IDS_COOKIES_COOKIE_CREATED_LABEL },
- { "label_cookie_expires", IDS_COOKIES_COOKIE_EXPIRES_LABEL },
- { "label_webdb_desc", IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL },
- { "label_local_storage_size",
- IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL },
- { "label_local_storage_last_modified",
- IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL },
- { "label_local_storage_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL },
- { "label_indexed_db_size", IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL },
- { "label_indexed_db_last_modified",
- IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL },
- { "label_indexed_db_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL },
- { "label_service_worker_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL },
- { "label_service_worker_size",
- IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL },
- { "label_service_worker_scopes", IDS_COOKIES_SERVICE_WORKER_SCOPES_LABEL },
- { "label_app_cache_manifest",
- IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL },
- { "label_cookie_last_accessed", IDS_COOKIES_LAST_ACCESSED_LABEL },
- { "cookie_domain", IDS_COOKIES_DOMAIN_COLUMN_HEADER },
- { "cookie_local_data", IDS_COOKIES_DATA_COLUMN_HEADER },
- { "cookie_singular", IDS_COOKIES_SINGLE_COOKIE },
- { "cookie_plural", IDS_COOKIES_PLURAL_COOKIES },
- { "cookie_database_storage", IDS_COOKIES_DATABASE_STORAGE },
- { "cookie_indexed_db", IDS_COOKIES_INDEXED_DB },
- { "cookie_local_storage", IDS_COOKIES_LOCAL_STORAGE },
- { "cookie_app_cache", IDS_COOKIES_APPLICATION_CACHE },
- { "cookie_service_worker", IDS_COOKIES_SERVICE_WORKER },
- { "cookie_flash_lso", IDS_COOKIES_FLASH_LSO },
- { "search_cookies", IDS_COOKIES_SEARCH_COOKIES },
- { "remove_cookie", IDS_COOKIES_REMOVE_LABEL },
- { "remove_all_cookie", IDS_COOKIES_REMOVE_ALL_LABEL },
- { "remove_all_shown_cookie", IDS_COOKIES_REMOVE_ALL_SHOWN_LABEL },
- { "cookie_file_system", IDS_COOKIES_FILE_SYSTEM },
- { "label_file_system_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL },
- { "label_file_system_temporary_usage",
- IDS_COOKIES_FILE_SYSTEM_TEMPORARY_USAGE_LABEL },
- { "label_file_system_persistent_usage",
- IDS_COOKIES_FILE_SYSTEM_PERSISTENT_USAGE_LABEL },
- { "cookie_channel_id", IDS_COOKIES_CHANNEL_ID },
- { "label_channel_id_server_id",
- IDS_COOKIES_CHANNEL_ID_ORIGIN_LABEL },
- { "label_channel_id_type",
- IDS_COOKIES_CHANNEL_ID_TYPE_LABEL },
- { "label_channel_id_created",
- IDS_COOKIES_CHANNEL_ID_CREATED_LABEL },
- { "label_channel_id_expires",
- IDS_COOKIES_CHANNEL_ID_EXPIRES_LABEL },
- { "label_protected_by_apps",
- IDS_GEOLOCATION_SET_BY_HOVER }, // TODO(bauerb): Use a better string
+ {"label_cookie_name", IDS_COOKIES_COOKIE_NAME_LABEL},
+ {"label_cookie_content", IDS_COOKIES_COOKIE_CONTENT_LABEL},
+ {"label_cookie_domain", IDS_COOKIES_COOKIE_DOMAIN_LABEL},
+ {"label_cookie_path", IDS_COOKIES_COOKIE_PATH_LABEL},
+ {"label_cookie_send_for", IDS_COOKIES_COOKIE_SENDFOR_LABEL},
+ {"label_cookie_accessible_to_script",
+ IDS_COOKIES_COOKIE_ACCESSIBLE_TO_SCRIPT_LABEL},
+ {"label_cookie_created", IDS_COOKIES_COOKIE_CREATED_LABEL},
+ {"label_cookie_expires", IDS_COOKIES_COOKIE_EXPIRES_LABEL},
+ {"label_webdb_desc", IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL},
+ {"label_local_storage_size",
+ IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL},
+ {"label_local_storage_last_modified",
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL},
+ {"label_local_storage_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL},
+ {"label_indexed_db_size", IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL},
+ {"label_indexed_db_last_modified",
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL},
+ {"label_indexed_db_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL},
+ {"label_service_worker_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL},
+ {"label_service_worker_size",
+ IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL},
+ {"label_service_worker_scopes", IDS_COOKIES_SERVICE_WORKER_SCOPES_LABEL},
+ {"label_cache_storage_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL},
+ {"label_cache_storage_size",
+ IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL},
+ {"label_cache_storage_last_modified",
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL},
+ {"label_app_cache_manifest",
+ IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL},
+ {"label_cookie_last_accessed", IDS_COOKIES_LAST_ACCESSED_LABEL},
+ {"cookie_domain", IDS_COOKIES_DOMAIN_COLUMN_HEADER},
+ {"cookie_local_data", IDS_COOKIES_DATA_COLUMN_HEADER},
+ {"cookie_singular", IDS_COOKIES_SINGLE_COOKIE},
+ {"cookie_plural", IDS_COOKIES_PLURAL_COOKIES},
+ {"cookie_database_storage", IDS_COOKIES_DATABASE_STORAGE},
+ {"cookie_indexed_db", IDS_COOKIES_INDEXED_DB},
+ {"cookie_local_storage", IDS_COOKIES_LOCAL_STORAGE},
+ {"cookie_app_cache", IDS_COOKIES_APPLICATION_CACHE},
+ {"cookie_service_worker", IDS_COOKIES_SERVICE_WORKER},
+ {"cookie_cache_storage", IDS_COOKIES_CACHE_STORAGE},
+ {"cookie_flash_lso", IDS_COOKIES_FLASH_LSO},
+ {"search_cookies", IDS_COOKIES_SEARCH_COOKIES},
+ {"remove_cookie", IDS_COOKIES_REMOVE_LABEL},
+ {"remove_all_cookie", IDS_COOKIES_REMOVE_ALL_LABEL},
+ {"remove_all_shown_cookie", IDS_COOKIES_REMOVE_ALL_SHOWN_LABEL},
+ {"cookie_file_system", IDS_COOKIES_FILE_SYSTEM},
+ {"label_file_system_origin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL},
+ {"label_file_system_temporary_usage",
+ IDS_COOKIES_FILE_SYSTEM_TEMPORARY_USAGE_LABEL},
+ {"label_file_system_persistent_usage",
+ IDS_COOKIES_FILE_SYSTEM_PERSISTENT_USAGE_LABEL},
+ {"cookie_channel_id", IDS_COOKIES_CHANNEL_ID},
+ {"label_channel_id_server_id", IDS_COOKIES_CHANNEL_ID_ORIGIN_LABEL},
+ {"label_channel_id_type", IDS_COOKIES_CHANNEL_ID_TYPE_LABEL},
+ {"label_channel_id_created", IDS_COOKIES_CHANNEL_ID_CREATED_LABEL},
+ {"label_channel_id_expires", IDS_COOKIES_CHANNEL_ID_EXPIRES_LABEL},
+ {"label_protected_by_apps",
+ IDS_GEOLOCATION_SET_BY_HOVER}, // TODO(bauerb): Use a better string
};
RegisterStrings(localized_strings, resources, arraysize(resources));
@@ -195,19 +198,21 @@ void CookiesViewHandler::EnsureCookiesTreeModelCreated() {
storage_partition->GetIndexedDBContext();
content::ServiceWorkerContext* service_worker_context =
storage_partition->GetServiceWorkerContext();
+ content::CacheStorageContext* cache_storage_context =
+ storage_partition->GetCacheStorageContext();
storage::FileSystemContext* file_system_context =
storage_partition->GetFileSystemContext();
LocalDataContainer* container = new LocalDataContainer(
new BrowsingDataCookieHelper(profile->GetRequestContext()),
new BrowsingDataDatabaseHelper(profile),
- new BrowsingDataLocalStorageHelper(profile),
- NULL,
+ new BrowsingDataLocalStorageHelper(profile), NULL,
new BrowsingDataAppCacheHelper(profile),
new BrowsingDataIndexedDBHelper(indexed_db_context),
BrowsingDataFileSystemHelper::Create(file_system_context),
BrowsingDataQuotaHelper::Create(profile),
BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()),
new BrowsingDataServiceWorkerHelper(service_worker_context),
+ new BrowsingDataCacheStorageHelper(cache_storage_context),
BrowsingDataFlashLSOHelper::Create(profile));
cookies_tree_model_.reset(
new CookiesTreeModel(container,
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698