Chromium Code Reviews| Index: chrome/browser/media_gallery/media_file_system_registry.cc |
| diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc |
| index c8194df038d2ebf706d2a3fdb61d6cbca2382645..af58831199594d5f585984c1c58d7a93d9d1d2b5 100644 |
| --- a/chrome/browser/media_gallery/media_file_system_registry.cc |
| +++ b/chrome/browser/media_gallery/media_file_system_registry.cc |
| @@ -17,6 +17,13 @@ |
| #include "content/public/browser/render_process_host.h" |
| #include "webkit/fileapi/file_system_types.h" |
| #include "webkit/fileapi/isolated_context.h" |
| +#include "webkit/fileapi/media/media_file_system_config.h" |
| + |
| +#if defined(SUPPORT_MEDIA_FILESYSTEM) |
| +#include "webkit/fileapi/media/media_device_map_service.h" |
|
kinuko
2012/07/28 02:29:59
nit: maybe you could add the ifdef inside the head
kmadhusu
2012/07/28 23:15:30
As we discussed, this is a temporary code. Therefo
|
| + |
| +using fileapi::MediaDeviceMapService; |
| +#endif |
| namespace chrome { |
| @@ -81,12 +88,19 @@ MediaFileSystemRegistry::GetMediaFileSystems( |
| return results; |
| } |
| -void MediaFileSystemRegistry::OnMediaDeviceDetached(const std::string& id) { |
| +void MediaFileSystemRegistry::OnMediaDeviceDetached( |
| + const std::string& id, |
| + const FilePath::StringType& location) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| DeviceIdToMediaPathMap::iterator it = device_id_map_.find(id); |
| if (it == device_id_map_.end()) |
| return; |
| + |
| +#if defined(SUPPORT_MEDIA_FILESYSTEM) |
| + MediaDeviceMapService::GetInstance()->RemoveMediaDevice(location); |
| +#endif |
| + |
| RevokeMediaFileSystem(it->second); |
| device_id_map_.erase(it); |
| } |