Skip to content

Conversation

@CDRussell
Copy link
Member

@CDRussell CDRussell commented Jun 17, 2019

Task/Issue URL: https://app.asana.com/0/414730916066338/1126987722969423
Tech Design URL:
CC:

Description:
Performs cleanup on remaining files after the data has been cleared using the 🔥 button

Steps to test this PR:
ℹ️ Can only replicate the non-empty Cookie-journal file on Marshmallow and Lollipop, so ensure you use one of these emulators for your testing.

on develop, run these steps to ensure you can replicate the problem (to confirm the problem is definitely fixed):

  1. Perform a clean install
  2. Browse to a site which uses cookies (e.g., cnn.com, and accept cookies)
  3. Delete the data using the 🔥 button
  4. Pull the webview data directory
    • adb pull data/data/com.duckduckgo.mobile.android/app_webview
  5. Inspect the Cookies-journal file; verify you can see cnn.com cookies

now, checkout this branch, and repeat the steps above. this time, on the final step above, verify that the Cookies-journal no longer exists (it will be re-created when the WebView next accepts a cookie)

Additionally, check the general cookie handling works as you'd expect:

  1. DDG SERP settings are not cleared when using the 🔥 functionality
  2. Third party sites still have their cookies cleaned as expected

Internal references:

Software Engineering Expectations
Technical Design Template

This is partly to ensure that the cookies DB journal file is also cleared up upon data clearing, and helps ensure no sensitive browsing data is retained on the device after the data has been cleared
We are implementing the deletion in the same way as Firefox Focus here, who don't touch this directory or its contents as they observed disk caching would be disabled altogether if you do modify it.
@CDRussell CDRussell requested a review from subsymbolic as a code owner June 17, 2019 11:27
Copy link
Contributor

@subsymbolic subsymbolic left a comment

Choose a reason for hiding this comment

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

Great work. I have one comment, however given the importance of this I don't want to block a release. I'm happy to proceed provided the feedback is addressed today too.

@CDRussell CDRussell merged commit a58dc65 into develop Jun 17, 2019
@CDRussell CDRussell deleted the feature/webview_file_deletion_on_data_clear branch June 17, 2019 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants