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

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

Issue 10836199: Clean up media gallery preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/media_gallery/media_galleries_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_gallery/media_galleries_preferences.h
diff --git a/chrome/browser/media_gallery/media_galleries_preferences.h b/chrome/browser/media_gallery/media_galleries_preferences.h
index 20aa036ef0ffc1fad79c7a8cac233268fc03841e..85417976d467bf8bd996970270d799c76d551223 100644
--- a/chrome/browser/media_gallery/media_galleries_preferences.h
+++ b/chrome/browser/media_gallery/media_galleries_preferences.h
@@ -65,6 +65,7 @@ struct MediaGalleryPrefInfo {
typedef std::map<MediaGalleryPrefId, MediaGalleryPrefInfo>
MediaGalleriesPrefInfoMap;
+typedef std::set<MediaGalleryPrefId> MediaGalleryPrefIdSet;
// A class to manage the media gallery preferences. There is one instance per
// user profile.
@@ -85,6 +86,9 @@ class MediaGalleriesPreferences : public ProfileKeyedService {
bool LookUpGalleryByPath(const FilePath& path,
MediaGalleryPrefInfo* gallery) const;
+ MediaGalleryPrefIdSet LookUpGalleriesByDeviceId(
+ const std::string& device_id) const;
+
// Teaches the registry about a new gallery.
MediaGalleryPrefId AddGallery(const std::string& device_id,
const string16& display_name,
@@ -99,7 +103,7 @@ class MediaGalleriesPreferences : public ProfileKeyedService {
// Removes the gallery identified by |id| from the store.
void ForgetGalleryById(MediaGalleryPrefId id);
- std::set<MediaGalleryPrefId> GalleriesForExtension(
+ MediaGalleryPrefIdSet GalleriesForExtension(
Evan Stade 2012/08/11 00:07:14 you should update the controller to use this new t
vandebo (ex-Chrome) 2012/08/11 00:45:34 Done.
const extensions::Extension& extension) const;
void SetGalleryPermissionForExtension(const extensions::Extension& extension,
@@ -123,11 +127,15 @@ class MediaGalleriesPreferences : public ProfileKeyedService {
static string16 ComputeDisplayName(const FilePath& path);
private:
+ typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet>
Evan Stade 2012/08/11 00:07:14 spaces inside *
vandebo (ex-Chrome) 2012/08/11 00:45:34 Actually, I tried changing this, but it looked fun
+ DeviceIdPrefIdsMap;
+
// The profile that owns |this|.
Profile* profile_;
// An in-memory cache of known galleries.
MediaGalleriesPrefInfoMap known_galleries_;
+ DeviceIdPrefIdsMap device_map_;
Evan Stade 2012/08/11 00:07:14 docs
vandebo (ex-Chrome) 2012/08/11 00:45:34 Done.
extensions::ExtensionPrefs* GetExtensionPrefs() const;
« no previous file with comments | « no previous file | chrome/browser/media_gallery/media_galleries_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698