| Index: chrome/browser/media_gallery/media_galleries_preferences.cc
|
| diff --git a/chrome/browser/media_gallery/media_galleries_preferences.cc b/chrome/browser/media_gallery/media_galleries_preferences.cc
|
| index 5fa8f663773332e549b3710fb77d50e4494dbfbe..613215f715459e34ade1dcc139f278f479a75a92 100644
|
| --- a/chrome/browser/media_gallery/media_galleries_preferences.cc
|
| +++ b/chrome/browser/media_gallery/media_galleries_preferences.cc
|
| @@ -47,7 +47,7 @@ bool GetPrefId(const DictionaryValue* dict, MediaGalleryPrefId* value) {
|
|
|
| bool GetType(const DictionaryValue* dict, MediaGalleryPrefInfo::Type* type) {
|
| std::string string_type;
|
| - if (!dict->GetString(kMediaGalleriesPrefIdKey, &string_type))
|
| + if (!dict->GetString(kMediaGalleriesTypeKey, &string_type))
|
| return false;
|
|
|
| if (string_type.compare(kMediaGalleriesTypeAutoDetectedValue) == 0) {
|
| @@ -146,6 +146,7 @@ MediaGalleriesPreferences::MediaGalleriesPreferences(Profile* profile)
|
| if (current_id == MediaGalleryPrefInfo::kInvalidPrefId + 1) {
|
| FilePath pictures_path;
|
| if (PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path)) {
|
| +
|
| std::string device_id = MediaFileSystemRegistry::GetInstance()->
|
| GetDeviceIdFromPath(pictures_path);
|
| string16 display_name = ComputeDisplayName(pictures_path);
|
| @@ -236,6 +237,7 @@ MediaGalleryPrefId MediaGalleriesPreferences::AddGallery(
|
| gallery_info.pref_id = prefs->GetUint64(prefs::kMediaGalleriesUniqueId);
|
| prefs->SetUint64(prefs::kMediaGalleriesUniqueId, gallery_info.pref_id + 1);
|
| gallery_info.display_name = display_name;
|
| + gallery_info.device_id = device_id;
|
| gallery_info.path = path;
|
| gallery_info.type = MediaGalleryPrefInfo::kAutoDetected;
|
| if (user_added)
|
|
|