| 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 ||
|
| + 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
|
|
|