summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/site_settings/site_data_entry.js
blob: 0c5e30c27e7b772721d3fc49d5f830ab15f144d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2018 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.

/**
 * @fileoverview
 * 'site-data-entry' handles showing the local storage summary for a site.
 */

Polymer({
  is: 'site-data-entry',

  behaviors: [
    cr.ui.FocusRowBehavior,
    I18nBehavior,
  ],

  properties: {
    /** @type {!CookieDataSummaryItem} */
    model: Object,
  },

  /** @private {settings.LocalDataBrowserProxy} */
  browserProxy_: null,

  /** @override */
  ready: function() {
    this.browserProxy_ = settings.LocalDataBrowserProxyImpl.getInstance();
  },

  /**
   * Deletes all site data for this site.
   * @param {!Event} e
   * @private
   */
  onRemove_: function(e) {
    e.stopPropagation();
    this.browserProxy_.removeItem(this.model.site);
  },
});