Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Prompt to restart browser when cookies are cleared
Browse files Browse the repository at this point in the history
Temp workaround for #4157

Auditors: @bbondy

Test Plan: Click 'clear cookie', browser should prompt to restart
  • Loading branch information
diracdeltas committed Sep 22, 2016
1 parent 2350448 commit 9f7073c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/components/clearBrowsingDataPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const Button = require('./button')
const SwitchControl = require('./switchControl')
const windowActions = require('../actions/windowActions')
const appActions = require('../actions/appActions')
const ipc = global.require('electron').ipcRenderer
const messages = require('../constants/messages')

class ClearBrowsingDataPanel extends ImmutableComponent {
constructor () {
Expand All @@ -28,6 +30,9 @@ class ClearBrowsingDataPanel extends ImmutableComponent {
onClear () {
appActions.clearAppData(this.props.clearBrowsingDataDetail)
this.props.onHide()
if (this.props.clearBrowsingDataDetail.get('allSiteCookies')) {
ipc.send(messages.PREFS_RESTART)
}
}
render () {
return <Dialog onHide={this.props.onHide} className='clearBrowsingDataPanel' isClickDismiss>
Expand Down

4 comments on commit 9f7073c

@bbondy
Copy link
Member

@bbondy bbondy commented on 9f7073c Sep 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know how long we'll have this, I'd be pretty sad if I thought I had to restart browser for clearing cookies in general.

@diracdeltas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i could change it to call this only if cookies, history, and cache are being cleared at once

@bbondy
Copy link
Member

@bbondy bbondy commented on 9f7073c Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @bradleyrichter for his thoughts.
I think most people clearing this data has no idea abut webRTC device IDs and just want to unbreak a non working site.

@bradleyrichter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't restart, what happens?

How about a recommended restart using the alert bar?

Please sign in to comment.