Chromium Code Reviews| Index: chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h |
| diff --git a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h |
| index 559497abfb7a2ff409dd2aee3dcb8061b3b8872e..edd7afb4df4fffe678e615e0dea9d61d7721ef4a 100644 |
| --- a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h |
| +++ b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h |
| @@ -25,6 +25,10 @@ namespace base { |
| class Value; |
| } |
| +namespace chrome { |
| +class MediaGalleriesPreferences; |
| +} |
| + |
| namespace extensions { |
| class GalleryWatchStateTracker |
| @@ -66,6 +70,9 @@ class GalleryWatchStateTracker |
| // by the |extension_id|. |
| void RemoveAllGalleryWatchersForExtension(const std::string& extension_id); |
| + // Once we learn the preferences, set them in the tracker. |
| + void SetPreferences(chrome::MediaGalleriesPreferences* preferences); |
| + |
| private: |
| // Key: Gallery identifier. |
| // Value: True if the watcher is active. Watcher will be active only if |
| @@ -87,6 +94,10 @@ class GalleryWatchStateTracker |
| void WriteToStorage(const std::string& extension_id); |
| void ReadFromStorage(const std::string& extension_id, |
| scoped_ptr<base::Value> value); |
| + void ReadFromStorageWithPreferences( |
| + const std::string& extension_id, |
| + chrome::MediaGalleryPrefIdSet gallery_ids, |
| + chrome::MediaGalleriesPreferences* preferences); |
| // Sets up the gallery watcher on the receipt of granted gallery permission |
| // event. |
| @@ -122,6 +133,9 @@ class GalleryWatchStateTracker |
| // Current profile. |
| Profile* profile_; |
| + // The preferences object from which we get gallery information. |
|
vandebo (ex-Chrome)
2013/05/16 18:56:27
I assume the lifetime of this class is such that w
Greg Billock
2013/05/16 23:27:55
Both are effectively profile scoped, but there may
|
| + chrome::MediaGalleriesPreferences* preferences_; |
| + |
| // Used to listen for NOTIFICATION_EXTENSION_LOADED and |
| // NOTIFICATION_EXTENSION_UNLOADED events. |
| content::NotificationRegistrar registrar_; |