summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/reset_page/reset_profile_banner.js
blob: 441279b76c7195690eacc4316b74f87efa8f6358 (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
// Copyright 2015 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
 * 'settings-reset-profile-banner' is the banner shown for prompting the user to
 * clear profile settings.
 */
Polymer({
  // TODO(dpapad): Rename to settings-reset-warning-dialog.
  is: 'settings-reset-profile-banner',

  listeners: {
    'cancel': 'onCancel_',
  },

  /** @override */
  attached: function() {
    this.$.dialog.showModal();
  },

  /** @private */
  onOkTap_: function() {
    this.$.dialog.cancel();
  },

  /** @private */
  onCancel_: function() {
    settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner();
  },

  /** @private */
  onResetTap_: function() {
    this.$.dialog.close();
    settings.navigateTo(settings.routes.RESET_DIALOG);
  },
});