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

Unified Diff: chrome/browser/ui/webui/options/media_galleries_handler.cc

Issue 11304022: [Media Gallery] Add existing attached devices to the prefs in time for media galleries dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 years, 2 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/ui/webui/options/media_galleries_handler.cc
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.cc b/chrome/browser/ui/webui/options/media_galleries_handler.cc
index 243a88bc682931caf069283dc417cbd52870a8fa..db981a3437e7056c1d37270d02b99fffb66d3045 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.cc
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.cc
@@ -6,8 +6,8 @@
#include "base/bind.h"
#include "base/string_number_conversions.h"
+#include "chrome/browser/media_gallery/media_file_system_registry.h"
#include "chrome/browser/media_gallery/media_galleries_preferences.h"
-#include "chrome/browser/media_gallery/media_galleries_preferences_factory.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
@@ -72,7 +72,8 @@ void MediaGalleriesHandler::RegisterMessages() {
void MediaGalleriesHandler::OnGalleriesChanged() {
Profile* profile = Profile::FromWebUI(web_ui());
chrome::MediaGalleriesPreferences* preferences =
- MediaGalleriesPreferencesFactory::GetForProfile(profile);
+ chrome::MediaFileSystemRegistry::GetInstance()->GetProfilePreferences(
+ profile);
ListValue list;
const MediaGalleriesPrefInfoMap& galleries = preferences->known_galleries();
@@ -117,7 +118,7 @@ void MediaGalleriesHandler::HandleForgetGallery(const base::ListValue* args) {
}
chrome::MediaGalleriesPreferences* prefs =
- MediaGalleriesPreferencesFactory::GetForProfile(
+ chrome::MediaFileSystemRegistry::GetInstance()->GetProfilePreferences(
Profile::FromWebUI(web_ui()));
prefs->ForgetGalleryById(id);
}
@@ -125,7 +126,7 @@ void MediaGalleriesHandler::HandleForgetGallery(const base::ListValue* args) {
void MediaGalleriesHandler::FileSelected(
const FilePath& path, int index, void* params) {
chrome::MediaGalleriesPreferences* prefs =
- MediaGalleriesPreferencesFactory::GetForProfile(
+ chrome::MediaFileSystemRegistry::GetInstance()->GetProfilePreferences(
Profile::FromWebUI(web_ui()));
prefs->AddGalleryByPath(path);
}

Powered by Google App Engine
This is Rietveld 408576698