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

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

Issue 16158004: iTunes file util and data provider for media galleries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo incorrect fix Created 7 years, 6 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 574d052ed9a5371249342b12c1ba215e0b080822..b89d518d7b1d0117f666864bb61b9a9d0d8ab924 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences.cc
+++ b/chrome/browser/media_galleries/media_galleries_preferences.cc
@@ -216,15 +216,10 @@ MediaGalleriesPreferences::MediaGalleriesPreferences(Profile* profile)
profile_(profile) {
AddDefaultGalleriesIfFreshProfile();
- // TODO(vandebo) Turn this back on when the iTunes code is ready.
- // Temporarily turned off because it adds an extra user-visible entry to the
- // preferences that does not quite work.
-#if 0
// Look for optional default galleries every time.
itunes::ITunesFinder::FindITunesLibrary(
base::Bind(&MediaGalleriesPreferences::OnITunesDeviceID,
weak_factory_.GetWeakPtr()));
-#endif
// TODO(tommycli): Turn on when Picasa code is ready.
#if 0
@@ -271,6 +266,10 @@ void MediaGalleriesPreferences::AddDefaultGalleriesIfFreshProfile() {
void MediaGalleriesPreferences::OnITunesDeviceID(const std::string& device_id) {
DCHECK(!device_id.empty());
+ // TODO(vandebo): Since we only want to support one iTunes location (and
+ // it is possible for it to move), but we want to preserve the user's
+ // permissions for "the" iTunes gallery, we need to Amend any existing
+ // iTunes galleries instead of adding a new one.
AddGalleryWithName(device_id, ASCIIToUTF16(kITunesGalleryName),
base::FilePath(), false /*not user added*/);
}

Powered by Google App Engine
This is Rietveld 408576698