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

Unified Diff: Source/core/fileapi/File.h

Issue 423283003: Fix userVisibility() for files dragged into the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed 2nd round of feedback. Created 6 years, 5 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/core/core.gypi ('k') | Source/core/html/forms/FileInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/File.h
diff --git a/Source/core/fileapi/File.h b/Source/core/fileapi/File.h
index ea288d891e5d38461a4525be925796d8b64524af..2d37c736133b2cb5aa378fff6ef699e20dadca94 100644
--- a/Source/core/fileapi/File.h
+++ b/Source/core/fileapi/File.h
@@ -89,11 +89,11 @@ public:
KURL fileSystemURL() const { ASSERT(hasValidFileSystemURL()); return m_fileSystemURL; }
// Create a file with a name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
- static PassRefPtrWillBeRawPtr<File> createWithName(const String& path, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes)
+ static PassRefPtrWillBeRawPtr<File> createForUserProvidedFile(const String& path, const String& displayName)
{
- if (name.isEmpty())
- return adoptRefWillBeNoop(new File(path, policy, File::IsNotUserVisible));
- return adoptRefWillBeNoop(new File(path, name, policy, File::IsNotUserVisible));
+ if (displayName.isEmpty())
+ return adoptRefWillBeNoop(new File(path, File::AllContentTypes, File::IsUserVisible));
+ return adoptRefWillBeNoop(new File(path, displayName, File::AllContentTypes, File::IsUserVisible));
}
static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& path, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes)
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/forms/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698