Commit bd0233a5 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

Fix CFI bad cast errors involving OfflinePageModelImpl.

Make the class StubOfflinePageModel derive from
OfflinePageModelImpl. This fixes several test failures where code
in offline_page_model_factory.cc expects to be able to cast these
objects to type OfflinePageModelImpl.

Bug: 469376
Change-Id: I67b2d84cd2e2c549ceaa2bc8708bff478af30bd0
Reviewed-on: https://chromium-review.googlesource.com/812493
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: default avatarCathy Li <chili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522288}
parent fff8932f
......@@ -9,16 +9,15 @@
#include <string>
#include <vector>
#include "components/keyed_service/core/keyed_service.h"
#include "components/offline_pages/core/client_policy_controller.h"
#include "components/offline_pages/core/offline_page_model.h"
#include "components/offline_pages/core/offline_page_model_impl.h"
namespace offline_pages {
// Stub implementation of OfflinePageModel interface for testing. Besides using
// as a stub for tests, it may also be subclassed to mock specific methods
// needed for a set of tests.
class StubOfflinePageModel : public OfflinePageModel, public KeyedService {
class StubOfflinePageModel : public OfflinePageModelImpl {
public:
StubOfflinePageModel();
~StubOfflinePageModel() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment