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

Unified Diff: ui/webui/resources/js/cr/ui/array_data_model.js

Issue 1855393006: [Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Making ExceptionsList.allowEdit_ a private member. Created 4 years, 8 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/options/content_settings_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/array_data_model.js
diff --git a/ui/webui/resources/js/cr/ui/array_data_model.js b/ui/webui/resources/js/cr/ui/array_data_model.js
index 969f9484ff8a295571d2c87f12929e24b71bfde3..f594d205dc4890c5d2f3a72f177329b98d8d833f 100644
--- a/ui/webui/resources/js/cr/ui/array_data_model.js
+++ b/ui/webui/resources/js/cr/ui/array_data_model.js
@@ -222,6 +222,17 @@ cr.define('cr.ui', function() {
},
/**
+ * Removes and returns the last item of the model.
+ *
+ * This dispatches a splice event.
+ *
+ * @return {*} The last item, or undefined if model has no more items.
+ */
+ pop: function() {
+ return this.splice(this.array_.length - 1, 1)[0];
+ },
+
+ /**
* Updates the existing item with the new item.
*
* The existing item and the new item are regarded as the same item and the
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698