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

Clear state if clear autofill data when shutdown. #4827

Merged
merged 1 commit into from
Oct 15, 2016
Merged

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Oct 15, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

because we won't receive personal-data-changed on shutdown

fix #4818

Auditors: @bridiver

Test Plan:

  1. Add autofill data entries in about:autofill
  2. Turn on clear "Autofill data" when closing brave in about:preferences#security
  3. Restart brave
  4. There shouldn't be anything left in about:autofill

because we won't receive personal-data-changed on shutdown

fix brave#4818

Auditors: @bridiver

Test Plan:
1. Add autofill data entries in about:autofill
2. Turn on clear "Autofill data" when closing brave in about:preferences#security
3. Restart brave
4. There shouldn't be anything left in about:autofill
@darkdh darkdh added this to the 0.12.6dev milestone Oct 15, 2016
@@ -252,6 +252,11 @@ module.exports.cleanAppData = (data, isShutdown) => {
const clearAutofillData = isShutdown && getSetting(settings.SHUTDOWN_CLEAR_AUTOFILL_DATA) === true
if (clearAutofillData) {
autofill.clearAutofillData()
const date = new Date().getTime()
Copy link
Collaborator

Choose a reason for hiding this comment

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

this works, but fyi you can just delete it because it will be-readded from the default session data

@bridiver bridiver merged commit 89d287f into brave:master Oct 15, 2016
@bridiver
Copy link
Collaborator

++

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autofill entry cannot be deleted on restart with Private data option
5 participants