Index: chrome/browser/media_galleries/media_galleries_preferences.cc |
diff --git a/chrome/browser/media_galleries/media_galleries_preferences.cc b/chrome/browser/media_galleries/media_galleries_preferences.cc |
index 741d0a20dcf68021e0e365c6423362d3a2157261..05ae16a44fd993e8f98430eaa77ad33f64b8c1e1 100644 |
--- a/chrome/browser/media_galleries/media_galleries_preferences.cc |
+++ b/chrome/browser/media_galleries/media_galleries_preferences.cc |
@@ -252,9 +252,12 @@ base::DictionaryValue* CreateGalleryPrefInfoDictionary( |
dict->SetString(kMediaGalleriesDisplayNameKey, gallery.display_name); |
} |
- dict->SetInteger(kMediaGalleriesScanAudioCountKey, gallery.audio_count); |
- dict->SetInteger(kMediaGalleriesScanImageCountKey, gallery.image_count); |
- dict->SetInteger(kMediaGalleriesScanVideoCountKey, gallery.video_count); |
+ if (gallery.IsBlackListedType() || gallery.audio_count || |
tommycli
2014/02/10 18:45:53
Should this be all blacklisted galleries, or only
Lei Zhang
2014/02/10 19:55:22
Can you add a comment to explain why we are checki
vandebo (ex-Chrome)
2014/02/11 19:19:31
Blacklisted galleries in general shouldn't have th
Lei Zhang
2014/02/13 22:08:04
But the code says:
if (gallery.IsBlackListedType(
vandebo (ex-Chrome)
2014/02/13 22:10:02
This is at a lower level - when we mark a gallery
Lei Zhang
2014/02/14 07:34:02
So you are trying to zero them out if the type is
vandebo (ex-Chrome)
2014/02/14 19:11:54
Indeed you are correct - EraseOrBlacklistGalleryBy
|
+ gallery.image_count || gallery.video_count) { |
+ dict->SetInteger(kMediaGalleriesScanAudioCountKey, gallery.audio_count); |
+ dict->SetInteger(kMediaGalleriesScanImageCountKey, gallery.image_count); |
+ dict->SetInteger(kMediaGalleriesScanVideoCountKey, gallery.video_count); |
+ } |
// Version 0 of the prefs format was that the display_name was always |
// used to show the user-visible name of the gallery. Version 1 means |