-
Charles Harrison authored
This patch does a few things: 1. Beef up the TestSafeBrowsingDatabaseHelper, so callers can optionally, pass in a custom TestV4GetHashProtocolManagerFactory. If this is null, then the helper will not mock the v4 hash protocol manager. This causes real API requests to go out to the network. 2. Make TestV4Store::MarkPrefixAsBad support multiple prefixes per prefix size. 3. Minor cleanups of names and std::make_unique 4. Add a new browser test suite for subresource_filter which uses the v4 embedded_test_server request handler, combined with the new TestSafeBrowsingDatabaseHelper, to mock out v4 API responses for the subresource filter list. This tests enforcement and warning variants. Bug: 775530,737201 Change-Id: Id26b676194fd33c28737bcb693e47ca75145f82f Reviewed-on: https://chromium-review.googlesource.com/730405 Reviewed-by: Shivani Sharma <shivanisha@chromium.org> Reviewed-by: Varun Khaneja <vakh@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#512567}
a9f882c7