| 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..1ca510d37aba4423eeec5de2d92ae397c4c2b8df 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
|
| @@ -53,9 +53,11 @@ class GalleryWatchStateTracker
|
| // |has_permission| is set to true if the user granted permission to
|
| // access the gallery associated with the |gallery_id| and is set to false
|
| // if the user revoked the gallery permission.
|
| - void OnGalleryPermissionChanged(const std::string& extension_id,
|
| - chrome::MediaGalleryPrefId gallery_id,
|
| - bool has_permission);
|
| + void OnGalleryPermissionChanged(
|
| + const std::string& extension_id,
|
| + chrome::MediaGalleryPrefId gallery_id,
|
| + bool has_permission,
|
| + chrome::MediaGalleriesPreferences* preferences);
|
|
|
| // Returns a set of watched gallery identifiers for the extension specified
|
| // by the |extension_id|.
|
| @@ -64,7 +66,9 @@ class GalleryWatchStateTracker
|
|
|
| // Removes all the gallery watchers associated with the extension specified
|
| // by the |extension_id|.
|
| - void RemoveAllGalleryWatchersForExtension(const std::string& extension_id);
|
| + void RemoveAllGalleryWatchersForExtension(
|
| + const std::string& extension_id,
|
| + chrome::MediaGalleriesPreferences* preferences);
|
|
|
| private:
|
| // Key: Gallery identifier.
|
| @@ -77,6 +81,10 @@ class GalleryWatchStateTracker
|
| // Value: Map of watched gallery information.
|
| typedef std::map<std::string, WatchedGalleriesMap> WatchedExtensionsMap;
|
|
|
| + // Bottom half of constructor. Called once the storage monitor is initialized,
|
| + // and sets up notification observer.
|
| + void OnStorageMonitorInitialized();
|
| +
|
| // content::NotificationObserver implementation.
|
| virtual void Observe(int type,
|
| const content::NotificationSource& source,
|
| @@ -91,12 +99,14 @@ class GalleryWatchStateTracker
|
| // Sets up the gallery watcher on the receipt of granted gallery permission
|
| // event.
|
| void SetupGalleryWatch(const std::string& extension_id,
|
| - chrome::MediaGalleryPrefId gallery_id);
|
| + chrome::MediaGalleryPrefId gallery_id,
|
| + chrome::MediaGalleriesPreferences* preferences);
|
|
|
| // Removes the gallery watcher on the receipt of revoked gallery permission
|
| // event.
|
| void RemoveGalleryWatch(const std::string& extension_id,
|
| - chrome::MediaGalleryPrefId gallery_id);
|
| + chrome::MediaGalleryPrefId gallery_id,
|
| + chrome::MediaGalleriesPreferences* preferences);
|
|
|
| // Returns true if a gallery watcher exists for the extension.
|
| // Set |has_active_watcher| to true to find if the gallery watcher is active.
|
|
|