Minor fixes to chrome_cleaner to prepare for refactor
This fixes some errors I noticed while doing a refactor. Keeping them to their own patch will make the refactor more clear: * Remove an unused include. * ChromePromptImpl::PromptUser should never be called twice. If this assertion is violated, on_prompt_user_ (a OnceCallback) will be null the second time. This case was handled incorrectly: the result callback would never be called, which is a runtime error in mojo. Better to just DCHECK. * Add a PromptUser call to NotInstalledExtensionTest, to ensure that DisableExtensions returns false because the extension is not installed and not just because the user was never prompted. * Add a missed early return on an invalidated WeakPtr. * Simplify the MockChromeCleanerProcess setup to reduce repeated code. R=olivierli Bug: 969139 Change-Id: I6ad47831d02487309dc35aa5c67d7533178ae386 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1641994Reviewed-by:proberge <proberge@chromium.org> Commit-Queue: Joe Mason <joenotcharles@google.com> Cr-Commit-Position: refs/heads/master@{#666351}
Showing
Please register or sign in to comment