Index: chrome/browser/ui/content_settings/content_setting_image_model.h |
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.h b/chrome/browser/ui/content_settings/content_setting_image_model.h |
index ded59c1681d84d78ee254c8a83433136f2e908d3..8db43357afda75df66aa7f02594cc892dd9fdb4c 100644 |
--- a/chrome/browser/ui/content_settings/content_setting_image_model.h |
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.h |
@@ -64,6 +64,10 @@ class ContentSettingImageModel { |
int explanatory_string_id() const { return explanatory_string_id_; } |
const base::string16& get_tooltip() const { return tooltip_; } |
+ // For testing only. If this image model has a content type, it is returned |
+ // here. Otherwise, CONTENT_SETTINGS_TYPE_DEFAULT is returned. |
+ virtual ContentSettingsType GetContentType(); |
tapted
2017/02/03 00:35:39
This is adding a lot of plumbing. (and we generall
kylix_rd
2017/02/03 18:55:03
This seems a little overly complicated for merely
|
+ |
protected: |
ContentSettingImageModel(); |
@@ -102,13 +106,12 @@ class ContentSettingSimpleImageModel : public ContentSettingImageModel { |
bool ShouldRunAnimation(content::WebContents* web_contents) override; |
void SetAnimationHasRun(content::WebContents* web_contents) override; |
+ ContentSettingsType GetContentType() override; |
+ |
// Factory method. Used only for testing. |
static std::unique_ptr<ContentSettingImageModel> |
CreateForContentTypeForTesting(ContentSettingsType content_type); |
- protected: |
- ContentSettingsType content_type() { return content_type_; } |
- |
private: |
ContentSettingsType content_type_; |