Chromium Code Reviews| Index: chrome/browser/media_galleries/media_file_system_registry.h |
| diff --git a/chrome/browser/media_galleries/media_file_system_registry.h b/chrome/browser/media_galleries/media_file_system_registry.h |
| index 6843c3a0f87826bfbae243f8c4512987ddb54626..eba34b5720dcc918d1e51e832d9118bdfa2bc402 100644 |
| --- a/chrome/browser/media_galleries/media_file_system_registry.h |
| +++ b/chrome/browser/media_galleries/media_file_system_registry.h |
| @@ -85,9 +85,16 @@ class MediaFileSystemRegistry : public RemovableStorageObserver { |
| // |profile|. This method should be used instead of calling |
| // MediaGalleriesPreferences directly because this method also ensures that |
| // currently attached removable devices are added to the preferences. |
| - // Called on the UI thread. |
| + // Called on the UI thread. Do not call from outside this class. |
|
vandebo (ex-Chrome)
2013/05/10 21:20:39
If it should only be called from within this class
Greg Billock
2013/05/13 21:20:38
It should be. I was going to wait, but I'll just t
|
| MediaGalleriesPreferences* GetPreferences(Profile* profile); |
| + // Call the given callback with preferences. This is asynchronous so that |
|
Lei Zhang
2013/05/11 02:12:23
If GetPreferences() is going to be private, you ma
Greg Billock
2013/05/13 21:20:38
Done.
|
| + // StorageMonitor may be initialized lazily in order to set up the returned |
| + // preferences. |
| + void GetPreferencesAsync( |
| + Profile* profile, |
| + base::Callback<void(MediaGalleriesPreferences*)> callback); |
| + |
| // RemovableStorageObserver implementation. |
| virtual void OnRemovableStorageDetached(const StorageInfo& info) OVERRIDE; |
| @@ -100,6 +107,19 @@ class MediaFileSystemRegistry : public RemovableStorageObserver { |
| friend class TestMediaFileSystemContext; |
| class MediaFileSystemContextImpl; |
| + // Bottom half of |GetMediaFileSystemsForExtensions|, called after the |
| + // StorageMonitor is initialized. |
| + void GetMediaFileSystemsPostStorageMonitorInit( |
| + const content::RenderViewHost* rvh, |
| + const extensions::Extension* extension, |
| + const MediaFileSystemsCallback& callback, |
| + MediaGalleriesPreferences* preferences); |
| + |
| + // Notify the registry when the storage monitor has been initialized. |
| + void OnStorageMonitorInitialized( |
| + Profile* profile, |
| + base::Callback<void(MediaGalleriesPreferences*)> callback); |
| + |
| // Map an extension to the ExtensionGalleriesHost. |
| typedef std::map<std::string /*extension_id*/, |
| scoped_refptr<ExtensionGalleriesHost> > ExtensionHostMap; |