Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3402)

Unified Diff: chrome/browser/media_gallery/media_file_system_registry_unittest.cc

Issue 11358243: Redesigned and refactored ScopedMTPDeviceMapEntry, MTPDeviceMapService & MTPDeviceDelegate classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_gallery/media_file_system_registry_unittest.cc
diff --git a/chrome/browser/media_gallery/media_file_system_registry_unittest.cc b/chrome/browser/media_gallery/media_file_system_registry_unittest.cc
index d81a63cbd005b34c0e70f253d892cb7a40b7d795..dde70bd28b2efac33e723cdc561d4dab6a5a1e27 100644
--- a/chrome/browser/media_gallery/media_file_system_registry_unittest.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry_unittest.cc
@@ -62,7 +62,11 @@ class TestMediaFileSystemContext : public MediaFileSystemContext {
#if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
virtual std::string RegisterFileSystemForMTPDevice(
const std::string& device_id, const FilePath& path,
- scoped_refptr<ScopedMTPDeviceMapEntry>* entry) OVERRIDE;
+ const ExtensionGalleriesHost* galleries_host) OVERRIDE;
+
+ virtual void RemoveMTPDeviceReferenceForHost(
+ const std::string& device_location,
+ const chrome::ExtensionGalleriesHost* galleries_host) OVERRIDE;
#endif
virtual void RevokeFileSystem(const std::string& fsid) OVERRIDE;
@@ -111,12 +115,19 @@ std::string TestMediaFileSystemContext::RegisterFileSystemForMassStorage(
#if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
std::string TestMediaFileSystemContext::RegisterFileSystemForMTPDevice(
const std::string& device_id, const FilePath& path,
- scoped_refptr<ScopedMTPDeviceMapEntry>* entry) {
+ const ExtensionGalleriesHost* galleries_host) {
CHECK(!MediaStorageUtil::IsMassStorageDevice(device_id));
- DCHECK(entry);
- *entry = registry_->GetOrCreateScopedMTPDeviceMapEntry(path.value());
+ registry_->AddGalleriesHostReferenceForMTPDevice(path.value(),
+ galleries_host);
return AddFSEntry(device_id, path);
}
+
+void TestMediaFileSystemContext::RemoveMTPDeviceReferenceForHost(
+ const std::string& device_location,
+ const chrome::ExtensionGalleriesHost* galleries_host) {
+ registry_->RemoveGalleriesHostReferenceForMTPDevice(device_location,
+ galleries_host);
+}
#endif
void TestMediaFileSystemContext::RevokeFileSystem(const std::string& fsid) {

Powered by Google App Engine
This is Rietveld 408576698