Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1479)

Unified Diff: chrome/browser/media_galleries/media_galleries_preferences.cc

Issue 148063006: Put all scan results in the media galleries scan result dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 006fee9410088ea74cb195a5892b0868a3e82893..3f16c98215de46dd837b6fadaebd4d474ad5251c 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences.cc
+++ b/chrome/browser/media_galleries/media_galleries_preferences.cc
@@ -252,9 +252,11 @@ 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.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

Powered by Google App Engine
This is Rietveld 408576698