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

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

Issue 10826129: Media galleries: configuration dialog controller and GTK impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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_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))
Evan Stade 2012/08/02 23:18:13 ignore changes in this file.
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)

Powered by Google App Engine
This is Rietveld 408576698