[dom_distiller] Cleanup extractor code to use new pointer functionality

The DOM Distiller ContentExtractor is a manual browsertest that enables
developers to test the DOM Distiller engine from the command line.
Instructions can be found here:
https://github.com/chromium/dom-distiller/blob/master/README.md#running-the-content-extractor

The class was written a long time ago, and still used a lot of raw
new-pointers, and even had a leak because of it.

This CL therefore updates the class to use new std::unique_ptr and
related functionality and fixes a leak of a test PrefService.
It allows blocking while writing the output, which had not been added
earlier (probably since it's a manual test).

Change-Id: I8a4adcc2164a8f2a62b01ca13fe6d48f3b83da80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535224
Commit-Queue: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643494}
1 file changed