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

Unified Diff: chrome/browser/resources/settings/site_settings/cookie_info.js

Issue 2115833003: Site Settings Desktop: Implement the cookies list and details dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing file Created 4 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/resources/settings/site_settings/cookie_info.js
diff --git a/chrome/browser/resources/settings/site_settings/cookie_info.js b/chrome/browser/resources/settings/site_settings/cookie_info.js
new file mode 100644
index 0000000000000000000000000000000000000000..e78751399db895d0bb7e9439f974422e3fb83d97
--- /dev/null
+++ b/chrome/browser/resources/settings/site_settings/cookie_info.js
@@ -0,0 +1,48 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This structure maps the various cookie type names from C++ (hence the
dschuyler 2016/07/06 17:19:38 Instead of having any mapping like this, could the
Finnur 2016/07/07 10:54:00 I'm sure it would be an improvement, even though I
+// underscores) to arrays of the different types of data each has, along with
dschuyler 2016/07/06 17:19:38 Are the underscore labels passed from c++ to JS? I
Finnur 2016/07/07 10:54:00 This comment refers to the keys in this structure,
+// the i18n name for the description of that data type.
+// This structure serves three purposes:
+// 1) to list what subset of the cookie data we want to show in the UI.
+// 2) What order to show it in.
+// 3) What user friendly label to prefix the data with.
+/** @const */ var cookieInfo = {
+ 'cookie': [['name', 'label_cookie_name'],
dschuyler 2016/07/06 17:19:38 Having 'label_' on each is not informative imo. :)
Finnur 2016/07/07 10:54:00 Done.
+ ['content', 'label_cookie_content'],
+ ['domain', 'label_cookie_domain'],
+ ['path', 'label_cookie_path'],
+ ['sendfor', 'label_cookie_send_for'],
+ ['accessibleToScript', 'label_cookie_accessible_to_script'],
+ ['created', 'label_cookie_created'],
+ ['expires', 'label_cookie_expires']],
+ 'app_cache': [['manifest', 'label_app_cache_manifest'],
+ ['size', 'label_local_storage_size'],
+ ['created', 'label_cookie_created'],
+ ['accessed', 'label_cookie_last_accessed']],
+ 'database': [['name', 'label_cookie_name'],
+ ['desc', 'label_webdb_desc'],
+ ['size', 'label_local_storage_size'],
+ ['modified', 'label_local_storage_last_modified']],
+ 'local_storage': [['origin', 'label_local_storage_origin'],
+ ['size', 'label_local_storage_size'],
+ ['modified', 'label_local_storage_last_modified']],
+ 'indexed_db': [['origin', 'label_indexed_db_origin'],
+ ['size', 'label_indexed_db_size'],
+ ['modified', 'label_indexed_db_last_modified']],
+ 'file_system': [['origin', 'label_file_system_origin'],
+ ['persistent', 'label_file_system_persistent_usage'],
+ ['temporary', 'label_file_system_temporary_usage']],
+ 'channel_id': [['serverId', 'label_channel_id_server_id'],
+ ['certType', 'label_channel_id_type'],
+ ['created', 'label_channel_id_created']],
+ 'service_worker': [['origin', 'label_service_worker_origin'],
+ ['size', 'label_service_worker_size'],
+ ['scopes', 'label_service_worker_scopes']],
+ 'cache_storage': [['origin', 'label_cache_storage_origin'],
+ ['size', 'label_cache_storage_size'],
+ ['modified', 'label_cache_storage_last_modified']],
dschuyler 2016/07/06 17:19:38 The indent looks off here.
Finnur 2016/07/07 10:54:01 Done.
+ 'flash_lso': [['domain', 'label_cookie_domain']],
+};

Powered by Google App Engine
This is Rietveld 408576698