Chromium Code Reviews| 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; |