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

Unified Diff: Source/modules/filesystem/DraggedIsolatedFileSystem.cpp

Issue 256103007: Remove modules/filesystem/DraggedIsolatedFileSystem.h dependency from core/DEPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months 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
« no previous file with comments | « Source/modules/filesystem/DraggedIsolatedFileSystem.h ('k') | Source/web/WebDragData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/DraggedIsolatedFileSystem.cpp
diff --git a/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp b/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp
index e0abfdc218bcb1dd7bec7faf75867095425e387a..7f0e01cc7e2055b74f283c447e9837eceb74ba46 100644
--- a/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp
+++ b/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp
@@ -43,12 +43,14 @@ DraggedIsolatedFileSystem::~DraggedIsolatedFileSystem()
{
}
-DOMFileSystem* DraggedIsolatedFileSystem::getDOMFileSystem(ExecutionContext* executionContext)
+DOMFileSystem* DraggedIsolatedFileSystem::getDOMFileSystem(DataObject* host, ExecutionContext* executionContext)
{
- ASSERT(!m_filesystemId.isEmpty());
- if (!m_filesystem)
- m_filesystem = DOMFileSystem::createIsolatedFileSystem(executionContext, m_filesystemId);
- return m_filesystem.get();
+ DraggedIsolatedFileSystem* draggedIsolatedFileSystem = from(host);
+ if (!draggedIsolatedFileSystem)
+ return 0;
+ if (!draggedIsolatedFileSystem->m_filesystem)
+ draggedIsolatedFileSystem->m_filesystem = DOMFileSystem::createIsolatedFileSystem(executionContext, host->filesystemId());
+ return draggedIsolatedFileSystem->m_filesystem.get();
}
// static
@@ -63,9 +65,9 @@ DraggedIsolatedFileSystem* DraggedIsolatedFileSystem::from(DataObject* dataObjec
return static_cast<DraggedIsolatedFileSystem*>(WillBeHeapSupplement<DataObject>::from(dataObject, supplementName()));
}
-DraggedIsolatedFileSystem::DraggedIsolatedFileSystem(const String& filesystemId)
- : m_filesystemId(filesystemId)
+DraggedIsolatedFileSystem::DraggedIsolatedFileSystem(DataObject& host, const String& filesystemId)
{
+ host.setFilesystemId(filesystemId);
}
void DraggedIsolatedFileSystem::trace(Visitor* visitor)
« no previous file with comments | « Source/modules/filesystem/DraggedIsolatedFileSystem.h ('k') | Source/web/WebDragData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698