Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
☠☠ backed out by 47a1219c6324 ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 07 Oct 2014 15:20:55 +0100
changeset 209188 18830d07884c13f1d7af36fbad444c4578859630
parent 209187 e087289ccfbb9db1a0b471b6baa665810d95edaf
child 209189 c199f1057d7efc897cabb123ca9dd349c94eb33f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersehsan
bugs1047483
milestone35.0a1
Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
b2g/components/FilePicker.js
b2g/components/test/mochitest/test_filepicker_path.html
content/base/public/File.h
content/base/public/moz.build
content/base/public/nsDOMFile.h
content/base/src/File.cpp
content/base/src/FileIOObject.cpp
content/base/src/WebSocket.cpp
content/base/src/WebSocket.h
content/base/src/moz.build
content/base/src/nsContentUtils.cpp
content/base/src/nsDOMBlobBuilder.cpp
content/base/src/nsDOMBlobBuilder.h
content/base/src/nsDOMDataChannel.cpp
content/base/src/nsDOMDataChannel.h
content/base/src/nsDOMFile.cpp
content/base/src/nsDOMFileReader.cpp
content/base/src/nsDOMFileReader.h
content/base/src/nsFormData.cpp
content/base/src/nsFormData.h
content/base/src/nsFrameMessageManager.cpp
content/base/src/nsHostObjectProtocolHandler.cpp
content/base/src/nsXMLHttpRequest.cpp
content/base/src/nsXMLHttpRequest.h
content/base/test/chrome/test_bug914381.html
content/html/content/public/HTMLCanvasElement.h
content/html/content/src/HTMLCanvasElement.cpp
content/html/content/src/HTMLInputElement.cpp
content/html/content/src/HTMLInputElement.h
content/media/EncodedBufferCache.cpp
content/media/EncodedBufferCache.h
content/media/MediaRecorder.cpp
content/media/imagecapture/CaptureTask.cpp
content/media/imagecapture/CaptureTask.h
content/media/imagecapture/ImageCapture.cpp
content/media/imagecapture/ImageCapture.h
content/media/webrtc/MediaEngine.h
content/media/webrtc/MediaEngineDefault.cpp
content/media/webrtc/MediaEngineWebRTC.h
content/media/webrtc/MediaEngineWebRTCVideo.cpp
dom/archivereader/ArchiveEvent.cpp
dom/archivereader/ArchiveEvent.h
dom/archivereader/ArchiveReader.cpp
dom/archivereader/ArchiveReader.h
dom/archivereader/ArchiveZipEvent.cpp
dom/archivereader/ArchiveZipEvent.h
dom/archivereader/ArchiveZipFile.cpp
dom/archivereader/ArchiveZipFile.h
dom/base/ImageEncoder.cpp
dom/base/ImageEncoder.h
dom/base/MessagePort.cpp
dom/base/Navigator.cpp
dom/base/URL.cpp
dom/base/URL.h
dom/base/nsDOMWindowUtils.cpp
dom/base/nsGlobalWindow.cpp
dom/bindings/Bindings.conf
dom/bluetooth/BluetoothAdapter.cpp
dom/bluetooth/BluetoothAdapter.h
dom/bluetooth/bluedroid/BluetoothOppManager.cpp
dom/bluetooth/bluez/BluetoothOppManager.cpp
dom/camera/DOMCameraControl.cpp
dom/camera/DOMCameraControlListener.cpp
dom/contacts/tests/test_contacts_blobs.html
dom/devicestorage/DeviceStorageRequestChild.cpp
dom/devicestorage/DeviceStorageRequestParent.cpp
dom/devicestorage/nsDeviceStorage.cpp
dom/events/DataTransfer.cpp
dom/events/DataTransfer.h
dom/filehandle/FileHandle.cpp
dom/filehandle/FileHandle.h
dom/filesystem/CreateFileTask.cpp
dom/filesystem/CreateFileTask.h
dom/filesystem/DeviceStorageFileSystem.cpp
dom/filesystem/DeviceStorageFileSystem.h
dom/filesystem/Directory.cpp
dom/filesystem/Directory.h
dom/filesystem/FileSystemBase.h
dom/filesystem/FileSystemTaskBase.cpp
dom/filesystem/GetFileOrDirectoryTask.cpp
dom/filesystem/GetFileOrDirectoryTask.h
dom/filesystem/RemoveTask.cpp
dom/filesystem/RemoveTask.h
dom/indexedDB/ActorsChild.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/FileSnapshot.cpp
dom/indexedDB/FileSnapshot.h
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBDatabase.h
dom/indexedDB/IDBMutableFile.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IndexedDatabase.h
dom/indexedDB/IndexedDatabaseInlines.h
dom/indexedDB/IndexedDatabaseManager.h
dom/ipc/Blob.cpp
dom/ipc/BlobChild.h
dom/ipc/BlobParent.h
dom/ipc/ContentBridgeChild.cpp
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/FilePickerParent.cpp
dom/ipc/StructuredCloneUtils.cpp
dom/ipc/StructuredCloneUtils.h
dom/ipc/nsIContentChild.cpp
dom/ipc/nsIContentChild.h
dom/ipc/nsIContentParent.cpp
dom/ipc/nsIContentParent.h
dom/media/MediaManager.cpp
dom/mobilemessage/MmsMessage.cpp
dom/mobilemessage/MmsMessage.h
dom/mobilemessage/ipc/SmsParent.cpp
dom/network/UDPSocket.cpp
dom/workers/FileReaderSync.cpp
dom/workers/FileReaderSync.h
dom/workers/URL.cpp
dom/workers/URL.h
dom/workers/WorkerPrivate.cpp
dom/workers/XMLHttpRequest.cpp
dom/workers/XMLHttpRequest.h
ipc/glue/BackgroundImpl.cpp
ipc/glue/BackgroundParent.h
ipc/glue/InputStreamUtils.cpp
js/xpconnect/src/ExportHelpers.cpp
parser/html/nsHtml5StreamParser.cpp
widget/nsIFilePicker.idl
widget/xpwidgets/nsBaseFilePicker.cpp
widget/xpwidgets/nsFilePickerProxy.cpp
--- a/b2g/components/FilePicker.js
+++ b/b2g/components/FilePicker.js
@@ -176,17 +176,17 @@ FilePicker.prototype = {
 
     let data = message.data;
     if (!data.success || !data.result.blob) {
       this.fireError();
       return;
     }
 
     // The name to be shown can be part of the message, or can be taken from
-    // the DOMFile (if the blob is a DOMFile).
+    // the File (if the blob is a File).
     let name = data.result.name;
     if (!name &&
         (data.result.blob instanceof this.mParent.File) &&
         data.result.blob.name) {
       name = data.result.blob.name;
     }
 
     // Let's try to remove the full path and take just the filename.
--- a/b2g/components/test/mochitest/test_filepicker_path.html
+++ b/b2g/components/test/mochitest/test_filepicker_path.html
@@ -62,17 +62,17 @@ var testCases = [
                               blob: new File(['1234567890'],
                                              'useless-name.txt',
                                              { type: 'text/plain' }),
                               name: 'test5.txt'
                             }
                 },
     fileName: 'test5.txt'},
   // case 6: returns file without name. This case may fail because we
-  //         need to make sure the DOMFile can be sent through
+  //         need to make sure the File can be sent through
   //         sendAsyncMessage API.
   { pickedResult: { success: true,
                     result: {
                               type: 'text/plain',
                               blob: new File(['1234567890'],
                                              'test6.txt',
                                              { type: 'text/plain' })
                             }
@@ -91,17 +91,17 @@ chromeScript.addMessageListener('file-pi
 function handleMessage(data) {
   var fileInput = document.getElementById('fileInput');
   switch (data.type) {
     case 'pick-result-updated':
       fileInput.click();
       break;
     case 'file-picked-posted':
       is(fileInput.value, activeTestCase.fileName,
-         'DOMFile should be able to send through message.');
+         'File should be able to send through message.');
       processTestCase();
       break;
   }
 }
 
 function processTestCase() {
   if (!testCases.length) {
     SimpleTest.finish();
@@ -122,9 +122,9 @@ function processTestCase() {
     expectedResult.result.name = name
   }
   chromeScript.sendAsyncMessage('update-pick-result', expectedResult);
 }
 
 </script>
 <input type="file" id="fileInput">
 </body>
-</html>
\ No newline at end of file
+</html>
rename from content/base/public/nsDOMFile.h
rename to content/base/public/File.h
--- a/content/base/public/nsDOMFile.h
+++ b/content/base/public/File.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_DOMFile_h
-#define mozilla_dom_DOMFile_h
+#ifndef mozilla_dom_File_h
+#define mozilla_dom_File_h
 
 #include "mozilla/Attributes.h"
 
 #include "mozilla/GuardObjects.h"
 #include "mozilla/LinkedList.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/dom/Date.h"
@@ -30,173 +30,172 @@
 #include "nsWrapperCache.h"
 #include "nsWeakReference.h"
 
 class nsDOMMultipartFile;
 class nsIFile;
 class nsIInputStream;
 class nsIClassInfo;
 
-#define PIDOMFILEIMPL_IID \
+#define PIFILEIMPL_IID \
   { 0x218ee173, 0xf44f, 0x4d30, \
     { 0xab, 0x0c, 0xd6, 0x66, 0xea, 0xc2, 0x84, 0x47 } }
 
-class PIDOMFileImpl : public nsISupports
+class PIFileImpl : public nsISupports
 {
 public:
-  NS_DECLARE_STATIC_IID_ACCESSOR(PIDOMFILEIMPL_IID)
+  NS_DECLARE_STATIC_IID_ACCESSOR(PIFILEIMPL_IID)
 };
 
-NS_DEFINE_STATIC_IID_ACCESSOR(PIDOMFileImpl, PIDOMFILEIMPL_IID)
+NS_DEFINE_STATIC_IID_ACCESSOR(PIFileImpl, PIFILEIMPL_IID)
 
 namespace mozilla {
 namespace dom {
 
 namespace indexedDB {
 class FileInfo;
 };
 
 struct BlobPropertyBag;
 struct FilePropertyBag;
-class DOMFileImpl;
+class FileImpl;
 
 /* FOLLOWUP TODO:
 1. remove nsDOMBlobBuilder.h
-2. rename nsDOMFile.h/cpp to DOMFile.h/cpp
 */
-class DOMFile MOZ_FINAL : public nsIDOMFile
-                        , public nsIXHRSendable
-                        , public nsIMutable
-                        , public nsSupportsWeakReference
-                        , public nsWrapperCache
+class File MOZ_FINAL : public nsIDOMFile
+                     , public nsIXHRSendable
+                     , public nsIMutable
+                     , public nsSupportsWeakReference
+                     , public nsWrapperCache
 {
 public:
   NS_DECL_NSIDOMBLOB
   NS_DECL_NSIDOMFILE
   NS_DECL_NSIXHRSENDABLE
   NS_DECL_NSIMUTABLE
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(DOMFile, nsIDOMFile)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(File, nsIDOMFile)
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Create(nsISupports* aParent, const nsAString& aName,
          const nsAString& aContentType, uint64_t aLength,
          uint64_t aLastModifiedDate);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Create(nsISupports* aParent, const nsAString& aName,
          const nsAString& aContentType, uint64_t aLength);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Create(nsISupports* aParent, const nsAString& aContentType,
          uint64_t aLength);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Create(nsISupports* aParent, const nsAString& aContentType, uint64_t aStart,
          uint64_t aLength);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength,
                    const nsAString& aName, const nsAString& aContentType,
                    uint64_t aLastModifiedDate);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength,
                    const nsAString& aContentType);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateTemporaryFileBlob(nsISupports* aParent, PRFileDesc* aFD,
                           uint64_t aStartPos, uint64_t aLength,
                           const nsAString& aContentType);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateFromFile(nsISupports* aParent, nsIFile* aFile);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateFromFile(nsISupports* aParent, const nsAString& aContentType,
                  uint64_t aLength, nsIFile* aFile,
                  indexedDB::FileInfo* aFileInfo);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateFromFile(nsISupports* aParent, const nsAString& aName,
                  const nsAString& aContentType, uint64_t aLength,
                  nsIFile* aFile, indexedDB::FileInfo* aFileInfo);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateFromFile(nsISupports* aParent, nsIFile* aFile,
                  indexedDB::FileInfo* aFileInfo);
 
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   CreateFromFile(nsISupports* aParent, nsIFile* aFile, const nsAString& aName,
                  const nsAString& aContentType);
 
-  DOMFile(nsISupports* aParent, DOMFileImpl* aImpl);
+  File(nsISupports* aParent, FileImpl* aImpl);
 
-  DOMFileImpl* Impl() const
+  FileImpl* Impl() const
   {
     return mImpl;
   }
 
-  const nsTArray<nsRefPtr<DOMFileImpl>>* GetSubBlobImpls() const;
+  const nsTArray<nsRefPtr<FileImpl>>* GetSubBlobImpls() const;
 
   bool IsSizeUnknown() const;
 
   bool IsDateUnknown() const;
 
   bool IsFile() const;
 
   void SetLazyData(const nsAString& aName, const nsAString& aContentType,
                    uint64_t aLength, uint64_t aLastModifiedDate);
 
-  already_AddRefed<DOMFile>
+  already_AddRefed<File>
   CreateSlice(uint64_t aStart, uint64_t aLength, const nsAString& aContentType,
               ErrorResult& aRv);
 
   // WebIDL methods
   nsISupports* GetParentObject() const
   {
     return mParent;
   }
 
   // Blob constructor
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
 
   // Blob constructor
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
               const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
               const BlobPropertyBag& aBag,
               ErrorResult& aRv);
 
   // File constructor
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
               const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
               const nsAString& aName,
               const FilePropertyBag& aBag,
               ErrorResult& aRv);
 
   // File constructor - ChromeOnly
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
-              DOMFile& aData,
+              File& aData,
               const FilePropertyBag& aBag,
               ErrorResult& aRv);
 
   // File constructor - ChromeOnly
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
               const nsAString& aData,
               const FilePropertyBag& aBag,
               ErrorResult& aRv);
 
   // File constructor - ChromeOnly
-  static already_AddRefed<DOMFile>
+  static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
               nsIFile* aData,
               const FilePropertyBag& aBag,
               ErrorResult& aRv);
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   uint64_t GetSize(ErrorResult& aRv);
@@ -206,65 +205,65 @@ public:
   // XPCOM GetName is OK
 
   int64_t GetLastModified(ErrorResult& aRv);
 
   Date GetLastModifiedDate(ErrorResult& aRv);
 
   void GetMozFullPath(nsAString& aFilename, ErrorResult& aRv);
 
-  already_AddRefed<DOMFile> Slice(const Optional<int64_t>& aStart,
-                                  const Optional<int64_t>& aEnd,
-                                  const nsAString& aContentType,
-                                  ErrorResult& aRv);
+  already_AddRefed<File> Slice(const Optional<int64_t>& aStart,
+                               const Optional<int64_t>& aEnd,
+                               const nsAString& aContentType,
+                               ErrorResult& aRv);
 
 private:
-  ~DOMFile() {};
+  ~File() {};
 
-  // The member is the real backend implementation of this DOMFile/DOMBlob.
+  // The member is the real backend implementation of this File/Blob.
   // It's thread-safe and not CC-able and it's the only element that is moved
   // between threads.
   // Note: we should not store any other state in this class!
-  const nsRefPtr<DOMFileImpl> mImpl;
+  const nsRefPtr<FileImpl> mImpl;
 
   nsCOMPtr<nsISupports> mParent;
 };
 
-// This is the abstract class for any DOMFile backend. It must be nsISupports
+// This is the abstract class for any File backend. It must be nsISupports
 // because this class must be ref-counted and it has to work with IPC.
-class DOMFileImpl : public PIDOMFileImpl
+class FileImpl : public PIFileImpl
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  DOMFileImpl() {}
+  FileImpl() {}
 
   virtual void GetName(nsAString& aName) = 0;
 
   virtual nsresult GetPath(nsAString& aName) = 0;
 
   virtual int64_t GetLastModified(ErrorResult& aRv) = 0;
 
   virtual void GetMozFullPath(nsAString& aName, ErrorResult& aRv) = 0;
 
   virtual void GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) = 0;
 
   virtual uint64_t GetSize(ErrorResult& aRv) = 0;
 
   virtual void GetType(nsAString& aType) = 0;
 
-  already_AddRefed<DOMFileImpl>
+  already_AddRefed<FileImpl>
   Slice(const Optional<int64_t>& aStart, const Optional<int64_t>& aEnd,
         const nsAString& aContentType, ErrorResult& aRv);
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) = 0;
 
-  virtual const nsTArray<nsRefPtr<DOMFileImpl>>*
+  virtual const nsTArray<nsRefPtr<FileImpl>>*
   GetSubBlobImpls() const = 0;
 
   virtual nsresult GetInternalStream(nsIInputStream** aStream) = 0;
 
   virtual int64_t GetFileId() = 0;
 
   virtual void AddFileInfo(indexedDB::FileInfo* aFileInfo) = 0;
 
@@ -298,64 +297,64 @@ public:
   virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) = 0;
 
   virtual bool IsCCed() const
   {
     return false;
   }
 
 protected:
-  virtual ~DOMFileImpl() {}
+  virtual ~FileImpl() {}
 };
 
-class DOMFileImplBase : public DOMFileImpl
+class FileImplBase : public FileImpl
 {
 public:
-  DOMFileImplBase(const nsAString& aName, const nsAString& aContentType,
-                  uint64_t aLength, uint64_t aLastModifiedDate)
+  FileImplBase(const nsAString& aName, const nsAString& aContentType,
+               uint64_t aLength, uint64_t aLastModifiedDate)
     : mIsFile(true)
     , mImmutable(false)
     , mContentType(aContentType)
     , mName(aName)
     , mStart(0)
     , mLength(aLength)
     , mLastModificationDate(aLastModifiedDate)
   {
     // Ensure non-null mContentType by default
     mContentType.SetIsVoid(false);
   }
 
-  DOMFileImplBase(const nsAString& aName, const nsAString& aContentType,
-                  uint64_t aLength)
+  FileImplBase(const nsAString& aName, const nsAString& aContentType,
+               uint64_t aLength)
     : mIsFile(true)
     , mImmutable(false)
     , mContentType(aContentType)
     , mName(aName)
     , mStart(0)
     , mLength(aLength)
     , mLastModificationDate(UINT64_MAX)
   {
     // Ensure non-null mContentType by default
     mContentType.SetIsVoid(false);
   }
 
-  DOMFileImplBase(const nsAString& aContentType, uint64_t aLength)
+  FileImplBase(const nsAString& aContentType, uint64_t aLength)
     : mIsFile(false)
     , mImmutable(false)
     , mContentType(aContentType)
     , mStart(0)
     , mLength(aLength)
     , mLastModificationDate(UINT64_MAX)
   {
     // Ensure non-null mContentType by default
     mContentType.SetIsVoid(false);
   }
 
-  DOMFileImplBase(const nsAString& aContentType, uint64_t aStart,
-                  uint64_t aLength)
+  FileImplBase(const nsAString& aContentType, uint64_t aStart,
+               uint64_t aLength)
     : mIsFile(false)
     , mImmutable(false)
     , mContentType(aContentType)
     , mStart(aStart)
     , mLength(aLength)
     , mLastModificationDate(UINT64_MAX)
   {
     NS_ASSERTION(aLength != UINT64_MAX,
@@ -377,24 +376,24 @@ public:
 
   virtual uint64_t GetSize(ErrorResult& aRv) MOZ_OVERRIDE
   {
     return mLength;
   }
 
   virtual void GetType(nsAString& aType) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE
   {
     return nullptr;
   }
 
-  virtual const nsTArray<nsRefPtr<DOMFileImpl>>*
+  virtual const nsTArray<nsRefPtr<FileImpl>>*
   GetSubBlobImpls() const MOZ_OVERRIDE
   {
     return nullptr;
   }
 
   virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE
   {
     return NS_ERROR_NOT_IMPLEMENTED;
@@ -464,17 +463,17 @@ public:
   {
     return mLength == UINT64_MAX;
   }
 
   virtual void Unlink() {}
   virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) {}
 
 protected:
-  virtual ~DOMFileImplBase() {}
+  virtual ~FileImplBase() {}
 
   indexedDB::FileInfo* GetFileInfo() const
   {
     NS_ASSERTION(IsStoredFile(), "Should only be called on stored files!");
     NS_ASSERTION(!mFileInfos.IsEmpty(), "Must have at least one file info!");
 
     return mFileInfos.ElementAt(0);
   }
@@ -494,43 +493,40 @@ protected:
   // Protected by IndexedDatabaseManager::FileMutex()
   nsTArray<nsRefPtr<indexedDB::FileInfo>> mFileInfos;
 };
 
 /**
  * This class may be used off the main thread, and in particular, its
  * constructor and destructor may not run on the same thread.  Be careful!
  */
-class DOMFileImplMemory MOZ_FINAL : public DOMFileImplBase
+class FileImplMemory MOZ_FINAL : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  DOMFileImplMemory(void* aMemoryBuffer, uint64_t aLength,
-                    const nsAString& aName,
-                    const nsAString& aContentType,
-                    uint64_t aLastModifiedDate)
-    : DOMFileImplBase(aName, aContentType, aLength, aLastModifiedDate)
+  FileImplMemory(void* aMemoryBuffer, uint64_t aLength, const nsAString& aName,
+                 const nsAString& aContentType, uint64_t aLastModifiedDate)
+    : FileImplBase(aName, aContentType, aLength, aLastModifiedDate)
     , mDataOwner(new DataOwner(aMemoryBuffer, aLength))
   {
     NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
   }
 
-  DOMFileImplMemory(void* aMemoryBuffer,
-                    uint64_t aLength,
-                    const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, aLength)
+  FileImplMemory(void* aMemoryBuffer, uint64_t aLength,
+                 const nsAString& aContentType)
+    : FileImplBase(aContentType, aLength)
     , mDataOwner(new DataOwner(aMemoryBuffer, aLength))
   {
     NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
   }
 
   virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual bool IsMemoryFile() const MOZ_OVERRIDE
   {
     return true;
   }
 
@@ -575,168 +571,168 @@ public:
     static bool sMemoryReporterRegistered;
 
     void* mData;
     uint64_t mLength;
   };
 
 private:
   // Create slice
-  DOMFileImplMemory(const DOMFileImplMemory* aOther, uint64_t aStart,
-                    uint64_t aLength, const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, aOther->mStart + aStart, aLength)
+  FileImplMemory(const FileImplMemory* aOther, uint64_t aStart,
+                 uint64_t aLength, const nsAString& aContentType)
+    : FileImplBase(aContentType, aOther->mStart + aStart, aLength)
     , mDataOwner(aOther->mDataOwner)
   {
     NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
     mImmutable = aOther->mImmutable;
   }
 
-  ~DOMFileImplMemory() {}
+  ~FileImplMemory() {}
 
   // Used when backed by a memory store
   nsRefPtr<DataOwner> mDataOwner;
 };
 
-class DOMFileImplTemporaryFileBlob MOZ_FINAL : public DOMFileImplBase
+class FileImplTemporaryFileBlob MOZ_FINAL : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  DOMFileImplTemporaryFileBlob(PRFileDesc* aFD, uint64_t aStartPos,
-                               uint64_t aLength, const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, aLength)
+  FileImplTemporaryFileBlob(PRFileDesc* aFD, uint64_t aStartPos,
+                            uint64_t aLength, const nsAString& aContentType)
+    : FileImplBase(aContentType, aLength)
     , mLength(aLength)
     , mStartPos(aStartPos)
     , mContentType(aContentType)
   {
     mFileDescOwner = new nsTemporaryFileInputStream::FileDescOwner(aFD);
   }
 
   virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
 
 private:
-  DOMFileImplTemporaryFileBlob(const DOMFileImplTemporaryFileBlob* aOther,
-                               uint64_t aStart, uint64_t aLength,
-                               const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, aLength)
+  FileImplTemporaryFileBlob(const FileImplTemporaryFileBlob* aOther,
+                            uint64_t aStart, uint64_t aLength,
+                            const nsAString& aContentType)
+    : FileImplBase(aContentType, aLength)
     , mLength(aLength)
     , mStartPos(aStart)
     , mFileDescOwner(aOther->mFileDescOwner)
     , mContentType(aContentType) {}
 
-  ~DOMFileImplTemporaryFileBlob() {}
+  ~FileImplTemporaryFileBlob() {}
 
   uint64_t mLength;
   uint64_t mStartPos;
   nsRefPtr<nsTemporaryFileInputStream::FileDescOwner> mFileDescOwner;
   nsString mContentType;
 };
 
-class DOMFileImplFile : public DOMFileImplBase
+class FileImplFile : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // Create as a file
-  explicit DOMFileImplFile(nsIFile* aFile)
-    : DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
+  explicit FileImplFile(nsIFile* aFile)
+    : FileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(false)
   {
     NS_ASSERTION(mFile, "must have file");
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
     mFile->GetLeafName(mName);
   }
 
-  DOMFileImplFile(nsIFile* aFile, indexedDB::FileInfo* aFileInfo)
-    : DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
+  FileImplFile(nsIFile* aFile, indexedDB::FileInfo* aFileInfo)
+    : FileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(true)
   {
     NS_ASSERTION(mFile, "must have file");
     NS_ASSERTION(aFileInfo, "must have file info");
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
     mFile->GetLeafName(mName);
 
     mFileInfos.AppendElement(aFileInfo);
   }
 
   // Create as a file
-  DOMFileImplFile(const nsAString& aName, const nsAString& aContentType,
-                  uint64_t aLength, nsIFile* aFile)
-    : DOMFileImplBase(aName, aContentType, aLength, UINT64_MAX)
+  FileImplFile(const nsAString& aName, const nsAString& aContentType,
+               uint64_t aLength, nsIFile* aFile)
+    : FileImplBase(aName, aContentType, aLength, UINT64_MAX)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(false)
   {
     NS_ASSERTION(mFile, "must have file");
   }
 
-  DOMFileImplFile(const nsAString& aName, const nsAString& aContentType,
-                  uint64_t aLength, nsIFile* aFile,
-                  uint64_t aLastModificationDate)
-    : DOMFileImplBase(aName, aContentType, aLength, aLastModificationDate)
+  FileImplFile(const nsAString& aName, const nsAString& aContentType,
+               uint64_t aLength, nsIFile* aFile,
+               uint64_t aLastModificationDate)
+    : FileImplBase(aName, aContentType, aLength, aLastModificationDate)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(false)
   {
     NS_ASSERTION(mFile, "must have file");
   }
 
   // Create as a file with custom name
-  DOMFileImplFile(nsIFile* aFile, const nsAString& aName,
-                  const nsAString& aContentType)
-    : DOMFileImplBase(aName, aContentType, UINT64_MAX, UINT64_MAX)
+  FileImplFile(nsIFile* aFile, const nsAString& aName,
+               const nsAString& aContentType)
+    : FileImplBase(aName, aContentType, UINT64_MAX, UINT64_MAX)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(false)
   {
     NS_ASSERTION(mFile, "must have file");
     if (aContentType.IsEmpty()) {
       // Lazily get the content type and size
       mContentType.SetIsVoid(true);
     }
   }
 
   // Create as a stored file
-  DOMFileImplFile(const nsAString& aName, const nsAString& aContentType,
-                  uint64_t aLength, nsIFile* aFile,
-                  indexedDB::FileInfo* aFileInfo)
-    : DOMFileImplBase(aName, aContentType, aLength, UINT64_MAX)
+  FileImplFile(const nsAString& aName, const nsAString& aContentType,
+               uint64_t aLength, nsIFile* aFile,
+               indexedDB::FileInfo* aFileInfo)
+    : FileImplBase(aName, aContentType, aLength, UINT64_MAX)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(true)
   {
     NS_ASSERTION(mFile, "must have file");
     mFileInfos.AppendElement(aFileInfo);
   }
 
   // Create as a stored blob
-  DOMFileImplFile(const nsAString& aContentType, uint64_t aLength,
-                  nsIFile* aFile, indexedDB::FileInfo* aFileInfo)
-    : DOMFileImplBase(aContentType, aLength)
+  FileImplFile(const nsAString& aContentType, uint64_t aLength,
+               nsIFile* aFile, indexedDB::FileInfo* aFileInfo)
+    : FileImplBase(aContentType, aLength)
     , mFile(aFile)
     , mWholeFile(true)
     , mStoredFile(true)
   {
     NS_ASSERTION(mFile, "must have file");
     mFileInfos.AppendElement(aFileInfo);
   }
 
   // Create as a file to be later initialized
-  DOMFileImplFile()
-    : DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
+  FileImplFile()
+    : FileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
     , mWholeFile(true)
     , mStoredFile(false)
   {
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
     mName.SetIsVoid(true);
   }
 
@@ -746,23 +742,23 @@ public:
   virtual int64_t GetLastModified(ErrorResult& aRv) MOZ_OVERRIDE;
   virtual void GetMozFullPathInternal(nsAString& aFullPath,
                                       ErrorResult& aRv) MOZ_OVERRIDE;
   virtual nsresult GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
 
   void SetPath(const nsAString& aFullPath);
 
 protected:
-  virtual ~DOMFileImplFile() {}
+  virtual ~FileImplFile() {}
 
 private:
   // Create slice
-  DOMFileImplFile(const DOMFileImplFile* aOther, uint64_t aStart,
-                  uint64_t aLength, const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, aOther->mStart + aStart, aLength)
+  FileImplFile(const FileImplFile* aOther, uint64_t aStart,
+               uint64_t aLength, const nsAString& aContentType)
+    : FileImplBase(aContentType, aOther->mStart + aStart, aLength)
     , mFile(aOther->mFile)
     , mWholeFile(false)
     , mStoredFile(aOther->mStoredFile)
   {
     NS_ASSERTION(mFile, "must have file");
     mImmutable = aOther->mImmutable;
 
     if (mStoredFile) {
@@ -777,17 +773,17 @@ private:
         mozilla::MutexAutoLock lock(IndexedDatabaseManager::FileMutex());
         fileInfo = aOther->GetFileInfo();
       }
 
       mFileInfos.AppendElement(fileInfo);
     }
   }
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual bool IsStoredFile() const MOZ_OVERRIDE
   {
     return mStoredFile;
   }
 
@@ -823,17 +819,17 @@ public:
     return mParent;
   }
 
   void Disconnect()
   {
     mParent = nullptr;
   }
 
-  bool Append(DOMFile *aFile) { return mFiles.AppendElement(aFile); }
+  bool Append(File *aFile) { return mFiles.AppendElement(aFile); }
 
   bool Remove(uint32_t aIndex) {
     if (aIndex < mFiles.Length()) {
       mFiles.RemoveElementAt(aIndex);
       return true;
     }
 
     return false;
@@ -853,31 +849,31 @@ public:
       NS_ASSERTION(list_qi == static_cast<nsIDOMFileList*>(aSupports),
                    "Uh, fix QI!");
     }
 #endif
 
     return static_cast<FileList*>(aSupports);
   }
 
-  DOMFile* Item(uint32_t aIndex)
+  File* Item(uint32_t aIndex)
   {
     return mFiles.SafeElementAt(aIndex);
   }
-  DOMFile* IndexedGetter(uint32_t aIndex, bool& aFound)
+  File* IndexedGetter(uint32_t aIndex, bool& aFound)
   {
     aFound = aIndex < mFiles.Length();
     return aFound ? mFiles.ElementAt(aIndex) : nullptr;
   }
   uint32_t Length()
   {
     return mFiles.Length();
   }
 
 private:
-  nsTArray<nsRefPtr<DOMFile>> mFiles;
+  nsTArray<nsRefPtr<File>> mFiles;
   nsISupports *mParent;
 };
 
 } // dom namespace
 } // file namespace
 
-#endif // mozilla_dom_DOMFile_h
+#endif // mozilla_dom_File_h
--- a/content/base/public/moz.build
+++ b/content/base/public/moz.build
@@ -38,17 +38,16 @@ EXPORTS += [
     'nsContentCID.h',
     'nsContentCreatorFunctions.h',
     'nsContentPolicyUtils.h',
     'nsContentTypeParser.h',
     'nsContentUtils.h',
     'nsCopySupport.h',
     'nsDeprecatedOperationList.h',
     'nsDocElementCreatedNotificationRunner.h',
-    'nsDOMFile.h',
     'nsHostObjectProtocolHandler.h',
     'nsIAttribute.h',
     'nsIContent.h',
     'nsIContentInlines.h',
     'nsIContentIterator.h',
     'nsIContentSerializer.h',
     'nsIDocument.h',
     'nsIDocumentInlines.h',
@@ -65,16 +64,17 @@ EXPORTS += [
     'nsViewportInfo.h',
     'nsXMLNameSpaceMap.h',
 ]
 
 EXPORTS.mozilla.dom += [
     'DirectionalityUtils.h',
     'Element.h',
     'ElementInlines.h',
+    'File.h',
     'FragmentOrElement.h',
     'FromParser.h',
 ]
 
 EXPORTS.mozilla += [
     'CORSMode.h',
 ]
 
rename from content/base/src/nsDOMFile.cpp
rename to content/base/src/File.cpp
--- a/content/base/src/nsDOMFile.cpp
+++ b/content/base/src/File.cpp
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 
 #include "nsCExternalHandlerService.h"
 #include "nsContentCID.h"
 #include "nsContentUtils.h"
 #include "nsDOMBlobBuilder.h"
 #include "nsError.h"
 #include "nsICharsetDetector.h"
 #include "nsIConverterInputStream.h"
@@ -40,26 +40,26 @@
 #include "mozilla/dom/WorkerPrivate.h"
 #include "nsThreadUtils.h"
 
 #include "mozilla/dom/FileListBinding.h"
 
 namespace mozilla {
 namespace dom {
 
-// XXXkhuey the input stream that we pass out of a DOMFile
-// can outlive the actual DOMFile object.  Thus, we must
+// XXXkhuey the input stream that we pass out of a File
+// can outlive the actual File object.  Thus, we must
 // ensure that the buffer underlying the stream we get
 // from NS_NewByteInputStream is held alive as long as the
 // stream is.  We do that by passing back this class instead.
 class DataOwnerAdapter MOZ_FINAL : public nsIInputStream,
                                    public nsISeekableStream,
                                    public nsIIPCSerializableInputStream
 {
-  typedef DOMFileImplMemory::DataOwner DataOwner;
+  typedef FileImplMemory::DataOwner DataOwner;
 public:
   static nsresult Create(DataOwner* aDataOwner,
                          uint32_t aStart,
                          uint32_t aLength,
                          nsIInputStream** _retval);
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
@@ -118,325 +118,325 @@ nsresult DataOwnerAdapter::Create(DataOw
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ADDREF(*_retval = new DataOwnerAdapter(aDataOwner, stream));
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// mozilla::dom::DOMFile implementation
+// mozilla::dom::File implementation
 
-NS_IMPL_CYCLE_COLLECTION_CLASS(DOMFile)
+NS_IMPL_CYCLE_COLLECTION_CLASS(File)
 
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMFile)
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(File)
   MOZ_ASSERT(tmp->mImpl);
   tmp->mImpl->Unlink();
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(DOMFile)
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(File)
   MOZ_ASSERT(tmp->mImpl);
   tmp->mImpl->Traverse(cb);
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParent)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(DOMFile)
+NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(File)
   NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMFile)
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(File)
   // This class should not receive any nsIRemoteBlob QI!
   MOZ_ASSERT(!aIID.Equals(NS_GET_IID(nsIRemoteBlob)));
 
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFile)
   NS_INTERFACE_MAP_ENTRY(nsIDOMBlob)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIDOMFile, IsFile())
   NS_INTERFACE_MAP_ENTRY(nsIXHRSendable)
   NS_INTERFACE_MAP_ENTRY(nsIMutable)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMFile)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMFile)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(File)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(File)
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Create(nsISupports* aParent, const nsAString& aName,
-                const nsAString& aContentType, uint64_t aLength,
-                uint64_t aLastModifiedDate)
+/* static */ already_AddRefed<File>
+File::Create(nsISupports* aParent, const nsAString& aName,
+             const nsAString& aContentType, uint64_t aLength,
+             uint64_t aLastModifiedDate)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplBase(aName, aContentType, aLength, aLastModifiedDate));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplBase(aName, aContentType, aLength, aLastModifiedDate));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Create(nsISupports* aParent, const nsAString& aName,
-                const nsAString& aContentType, uint64_t aLength)
+/* static */ already_AddRefed<File>
+File::Create(nsISupports* aParent, const nsAString& aName,
+             const nsAString& aContentType, uint64_t aLength)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplBase(aName, aContentType, aLength));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplBase(aName, aContentType, aLength));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Create(nsISupports* aParent, const nsAString& aContentType,
-                uint64_t aLength)
+/* static */ already_AddRefed<File>
+File::Create(nsISupports* aParent, const nsAString& aContentType,
+             uint64_t aLength)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplBase(aContentType, aLength));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplBase(aContentType, aLength));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Create(nsISupports* aParent, const nsAString& aContentType,
-                uint64_t aStart, uint64_t aLength)
+/* static */ already_AddRefed<File>
+File::Create(nsISupports* aParent, const nsAString& aContentType,
+             uint64_t aStart, uint64_t aLength)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplBase(aContentType, aStart, aLength));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplBase(aContentType, aStart, aLength));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer,
-                          uint64_t aLength, const nsAString& aName,
-                          const nsAString& aContentType,
-                          uint64_t aLastModifiedDate)
+/* static */ already_AddRefed<File>
+File::CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer,
+                       uint64_t aLength, const nsAString& aName,
+                       const nsAString& aContentType,
+                       uint64_t aLastModifiedDate)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplMemory(aMemoryBuffer, aLength, aName,
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplMemory(aMemoryBuffer, aLength, aName,
                           aContentType, aLastModifiedDate));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer,
-                          uint64_t aLength, const nsAString& aContentType)
+/* static */ already_AddRefed<File>
+File::CreateMemoryFile(nsISupports* aParent, void* aMemoryBuffer,
+                       uint64_t aLength, const nsAString& aContentType)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplMemory(aMemoryBuffer, aLength, aContentType));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplMemory(aMemoryBuffer, aLength, aContentType));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateTemporaryFileBlob(nsISupports* aParent, PRFileDesc* aFD,
-                                 uint64_t aStartPos, uint64_t aLength,
-                                 const nsAString& aContentType)
+/* static */ already_AddRefed<File>
+File::CreateTemporaryFileBlob(nsISupports* aParent, PRFileDesc* aFD,
+                              uint64_t aStartPos, uint64_t aLength,
+                              const nsAString& aContentType)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplTemporaryFileBlob(aFD, aStartPos, aLength, aContentType));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplTemporaryFileBlob(aFD, aStartPos, aLength, aContentType));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateFromFile(nsISupports* aParent, nsIFile* aFile)
+/* static */ already_AddRefed<File>
+File::CreateFromFile(nsISupports* aParent, nsIFile* aFile)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent, new DOMFileImplFile(aFile));
+  nsRefPtr<File> file = new File(aParent, new FileImplFile(aFile));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateFromFile(nsISupports* aParent, const nsAString& aContentType,
-                        uint64_t aLength, nsIFile* aFile,
-                        indexedDB::FileInfo* aFileInfo)
+/* static */ already_AddRefed<File>
+File::CreateFromFile(nsISupports* aParent, const nsAString& aContentType,
+                     uint64_t aLength, nsIFile* aFile,
+                     indexedDB::FileInfo* aFileInfo)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplFile(aContentType, aLength, aFile, aFileInfo));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplFile(aContentType, aLength, aFile, aFileInfo));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateFromFile(nsISupports* aParent, const nsAString& aName,
-                        const nsAString& aContentType,
-                        uint64_t aLength, nsIFile* aFile,
-                        indexedDB::FileInfo* aFileInfo)
+/* static */ already_AddRefed<File>
+File::CreateFromFile(nsISupports* aParent, const nsAString& aName,
+                     const nsAString& aContentType,
+                     uint64_t aLength, nsIFile* aFile,
+                     indexedDB::FileInfo* aFileInfo)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplFile(aName, aContentType, aLength, aFile, aFileInfo));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplFile(aName, aContentType, aLength, aFile, aFileInfo));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateFromFile(nsISupports* aParent, nsIFile* aFile,
+/* static */ already_AddRefed<File>
+File::CreateFromFile(nsISupports* aParent, nsIFile* aFile,
                         indexedDB::FileInfo* aFileInfo)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplFile(aFile, aFileInfo));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplFile(aFile, aFileInfo));
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::CreateFromFile(nsISupports* aParent, nsIFile* aFile,
-                        const nsAString& aName, const nsAString& aContentType)
+/* static */ already_AddRefed<File>
+File::CreateFromFile(nsISupports* aParent, nsIFile* aFile,
+                     const nsAString& aName, const nsAString& aContentType)
 {
-  nsRefPtr<DOMFile> file = new DOMFile(aParent,
-    new DOMFileImplFile(aFile, aName, aContentType));
+  nsRefPtr<File> file = new File(aParent,
+    new FileImplFile(aFile, aName, aContentType));
   return file.forget();
 }
 
-DOMFile::DOMFile(nsISupports* aParent, DOMFileImpl* aImpl)
+File::File(nsISupports* aParent, FileImpl* aImpl)
   : mImpl(aImpl)
   , mParent(aParent)
 {
   MOZ_ASSERT(mImpl);
   SetIsDOMBinding();
 
 #ifdef DEBUG
   {
     nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aParent);
     if (win) {
       MOZ_ASSERT(win->IsInnerWindow());
     }
   }
 #endif
 }
 
-const nsTArray<nsRefPtr<DOMFileImpl>>*
-DOMFile::GetSubBlobImpls() const
+const nsTArray<nsRefPtr<FileImpl>>*
+File::GetSubBlobImpls() const
 {
   return mImpl->GetSubBlobImpls();
 }
 
 bool
-DOMFile::IsSizeUnknown() const
+File::IsSizeUnknown() const
 {
   return mImpl->IsSizeUnknown();
 }
 
 bool
-DOMFile::IsDateUnknown() const
+File::IsDateUnknown() const
 {
   return mImpl->IsDateUnknown();
 }
 
 bool
-DOMFile::IsFile() const
+File::IsFile() const
 {
   return mImpl->IsFile();
 }
 
 void
-DOMFile::SetLazyData(const nsAString& aName, const nsAString& aContentType,
-                     uint64_t aLength, uint64_t aLastModifiedDate)
+File::SetLazyData(const nsAString& aName, const nsAString& aContentType,
+                  uint64_t aLength, uint64_t aLastModifiedDate)
 {
   return mImpl->SetLazyData(aName, aContentType, aLength, aLastModifiedDate);
 }
 
-already_AddRefed<DOMFile>
-DOMFile::CreateSlice(uint64_t aStart, uint64_t aLength,
-                     const nsAString& aContentType,
-                     ErrorResult& aRv)
+already_AddRefed<File>
+File::CreateSlice(uint64_t aStart, uint64_t aLength,
+                  const nsAString& aContentType,
+                  ErrorResult& aRv)
 {
-  nsRefPtr<DOMFileImpl> impl = mImpl->CreateSlice(aStart, aLength,
-                                                  aContentType, aRv);
+  nsRefPtr<FileImpl> impl = mImpl->CreateSlice(aStart, aLength,
+                                               aContentType, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
-  nsRefPtr<DOMFile> file = new DOMFile(mParent, impl);
+  nsRefPtr<File> file = new File(mParent, impl);
   return file.forget();
 }
 
 NS_IMETHODIMP
-DOMFile::GetName(nsAString& aFileName)
+File::GetName(nsAString& aFileName)
 {
   mImpl->GetName(aFileName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-DOMFile::GetPath(nsAString& aPath)
+File::GetPath(nsAString& aPath)
 {
   return mImpl->GetPath(aPath);
 }
 
 NS_IMETHODIMP
-DOMFile::GetLastModifiedDate(JSContext* aCx,
+File::GetLastModifiedDate(JSContext* aCx,
                              JS::MutableHandle<JS::Value> aDate)
 {
   ErrorResult rv;
   Date value = GetLastModifiedDate(rv);
   if (rv.Failed()) {
     return rv.ErrorCode();
   }
 
   if (!value.ToDateObject(aCx, aDate)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   return NS_OK;
 }
 
 Date
-DOMFile::GetLastModifiedDate(ErrorResult& aRv)
+File::GetLastModifiedDate(ErrorResult& aRv)
 {
   int64_t value = GetLastModified(aRv);
   if (aRv.Failed()) {
     return Date();
   }
 
   return Date(value);
 }
 
 int64_t
-DOMFile::GetLastModified(ErrorResult& aRv)
+File::GetLastModified(ErrorResult& aRv)
 {
   return mImpl->GetLastModified(aRv);
 }
 
 NS_IMETHODIMP
-DOMFile::GetMozFullPath(nsAString& aFileName)
+File::GetMozFullPath(nsAString& aFileName)
 {
   ErrorResult rv;
   GetMozFullPath(aFileName, rv);
   return rv.ErrorCode();
 }
 
 void
-DOMFile::GetMozFullPath(nsAString& aFilename, ErrorResult& aRv)
+File::GetMozFullPath(nsAString& aFilename, ErrorResult& aRv)
 {
   mImpl->GetMozFullPath(aFilename, aRv);
 }
 
 NS_IMETHODIMP
-DOMFile::GetMozFullPathInternal(nsAString& aFileName)
+File::GetMozFullPathInternal(nsAString& aFileName)
 {
   ErrorResult rv;
   mImpl->GetMozFullPathInternal(aFileName, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
-DOMFile::GetSize(uint64_t* aSize)
+File::GetSize(uint64_t* aSize)
 {
   MOZ_ASSERT(aSize);
 
   ErrorResult rv;
   *aSize = GetSize(rv);
   return rv.ErrorCode();
 }
 
 uint64_t
-DOMFile::GetSize(ErrorResult& aRv)
+File::GetSize(ErrorResult& aRv)
 {
   return mImpl->GetSize(aRv);
 }
 
 NS_IMETHODIMP
-DOMFile::GetType(nsAString &aType)
+File::GetType(nsAString &aType)
 {
   mImpl->GetType(aType);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-DOMFile::GetMozLastModifiedDate(uint64_t* aDate)
+File::GetMozLastModifiedDate(uint64_t* aDate)
 {
   MOZ_ASSERT(aDate);
 
   ErrorResult rv;
   *aDate = GetLastModified(rv);
   return rv.ErrorCode();
 }
 
@@ -473,244 +473,244 @@ ParseSize(int64_t aSize, int64_t& aStart
   }
   else {
     aStart = newStartOffset.value();
     aEnd = newEndOffset.value();
   }
 }
 
 NS_IMETHODIMP
-DOMFile::Slice(int64_t aStart, int64_t aEnd,
-               const nsAString& aContentType, uint8_t aArgc,
-               nsIDOMBlob **aBlob)
+File::Slice(int64_t aStart, int64_t aEnd,
+            const nsAString& aContentType, uint8_t aArgc,
+            nsIDOMBlob **aBlob)
 {
   Optional<int64_t> start;
   if (aArgc > 0) {
     start.Construct(aStart);
   }
 
   Optional<int64_t> end;
   if (aArgc > 1) {
     end.Construct(aEnd);
   }
 
   ErrorResult rv;
-  nsRefPtr<DOMFile> file = Slice(start, end, aContentType, rv);
+  nsRefPtr<File> file = Slice(start, end, aContentType, rv);
   if (rv.Failed()) {
     return rv.ErrorCode();
   }
 
   file.forget(aBlob);
   return NS_OK;
 }
 
-already_AddRefed<DOMFile>
-DOMFile::Slice(const Optional<int64_t>& aStart,
-               const Optional<int64_t>& aEnd,
-               const nsAString& aContentType,
-               ErrorResult& aRv)
+already_AddRefed<File>
+File::Slice(const Optional<int64_t>& aStart,
+            const Optional<int64_t>& aEnd,
+            const nsAString& aContentType,
+            ErrorResult& aRv)
 {
-  nsRefPtr<DOMFileImpl> impl =
+  nsRefPtr<FileImpl> impl =
     mImpl->Slice(aStart, aEnd, aContentType, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
-  nsRefPtr<DOMFile> file = new DOMFile(mParent, impl);
+  nsRefPtr<File> file = new File(mParent, impl);
   return file.forget();
 }
 
 NS_IMETHODIMP
-DOMFile::GetInternalStream(nsIInputStream** aStream)
+File::GetInternalStream(nsIInputStream** aStream)
 {
- return mImpl->GetInternalStream(aStream);
+  return mImpl->GetInternalStream(aStream);
 }
 
 NS_IMETHODIMP_(int64_t)
-DOMFile::GetFileId()
+File::GetFileId()
 {
   return mImpl->GetFileId();
 }
 
 NS_IMETHODIMP_(void)
-DOMFile::AddFileInfo(indexedDB::FileInfo* aFileInfo)
+File::AddFileInfo(indexedDB::FileInfo* aFileInfo)
 {
   mImpl->AddFileInfo(aFileInfo);
 }
 
 indexedDB::FileInfo*
-DOMFile::GetFileInfo(indexedDB::FileManager* aFileManager)
+File::GetFileInfo(indexedDB::FileManager* aFileManager)
 {
   return mImpl->GetFileInfo(aFileManager);
 }
 
 NS_IMETHODIMP
-DOMFile::GetSendInfo(nsIInputStream** aBody,
-                     uint64_t* aContentLength,
-                     nsACString& aContentType,
-                     nsACString& aCharset)
+File::GetSendInfo(nsIInputStream** aBody,
+                  uint64_t* aContentLength,
+                  nsACString& aContentType,
+                  nsACString& aCharset)
 {
   return mImpl->GetSendInfo(aBody, aContentLength, aContentType, aCharset);
 }
 
 NS_IMETHODIMP
-DOMFile::GetMutable(bool* aMutable)
+File::GetMutable(bool* aMutable)
 {
   return mImpl->GetMutable(aMutable);
 }
 
 NS_IMETHODIMP
-DOMFile::SetMutable(bool aMutable)
+File::SetMutable(bool aMutable)
 {
   return mImpl->SetMutable(aMutable);
 }
 
 NS_IMETHODIMP_(bool)
-DOMFile::IsMemoryFile()
+File::IsMemoryFile()
 {
   return mImpl->IsMemoryFile();
 }
 
 JSObject*
-DOMFile::WrapObject(JSContext* aCx)
+File::WrapObject(JSContext* aCx)
 {
   return IsFile() ? FileBinding::Wrap(aCx, this)
                   : BlobBinding::Wrap(aCx, this);
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
+/* static */ already_AddRefed<File>
+File::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
 {
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl();
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl();
 
   impl->InitializeBlob();
   MOZ_ASSERT(!impl->IsFile());
 
-  nsRefPtr<DOMFile> file = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> file = new File(aGlobal.GetAsSupports(), impl);
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(
+/* static */ already_AddRefed<File>
+File::Constructor(
         const GlobalObject& aGlobal,
         const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
         const BlobPropertyBag& aBag,
         ErrorResult& aRv)
 {
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl();
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl();
 
   impl->InitializeBlob(aGlobal.Context(), aData, aBag.mType,
                        aBag.mEndings == EndingTypes::Native, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(!impl->IsFile());
 
-  nsRefPtr<DOMFile> file = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> file = new File(aGlobal.GetAsSupports(), impl);
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(
+/* static */ already_AddRefed<File>
+File::Constructor(
         const GlobalObject& aGlobal,
         const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
         const nsAString& aName,
         const FilePropertyBag& aBag,
         ErrorResult& aRv)
 {
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl(aName);
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl(aName);
 
   impl->InitializeBlob(aGlobal.Context(), aData, aBag.mType, false, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(impl->IsFile());
 
-  nsRefPtr<DOMFile> file = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> file = new File(aGlobal.GetAsSupports(), impl);
   return file.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(const GlobalObject& aGlobal,
-                     DOMFile& aData,
-                     const FilePropertyBag& aBag,
-                     ErrorResult& aRv)
+/* static */ already_AddRefed<File>
+File::Constructor(const GlobalObject& aGlobal,
+                  File& aData,
+                  const FilePropertyBag& aBag,
+                  ErrorResult& aRv)
 {
   if (!nsContentUtils::IsCallerChrome()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl(EmptyString());
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl(EmptyString());
   impl->InitializeChromeFile(aData, aBag, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(impl->IsFile());
 
-  nsRefPtr<DOMFile> domFile = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> domFile = new File(aGlobal.GetAsSupports(), impl);
   return domFile.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(const GlobalObject& aGlobal,
-                     nsIFile* aData,
-                     const FilePropertyBag& aBag,
-                     ErrorResult& aRv)
+/* static */ already_AddRefed<File>
+File::Constructor(const GlobalObject& aGlobal,
+                  nsIFile* aData,
+                  const FilePropertyBag& aBag,
+                  ErrorResult& aRv)
 {
   if (!nsContentUtils::IsCallerChrome()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
 
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl(EmptyString());
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl(EmptyString());
   impl->InitializeChromeFile(window, aData, aBag, true, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(impl->IsFile());
 
-  nsRefPtr<DOMFile> domFile = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> domFile = new File(aGlobal.GetAsSupports(), impl);
   return domFile.forget();
 }
 
-/* static */ already_AddRefed<DOMFile>
-DOMFile::Constructor(const GlobalObject& aGlobal,
-                     const nsAString& aData,
-                     const FilePropertyBag& aBag,
-                     ErrorResult& aRv)
+/* static */ already_AddRefed<File>
+File::Constructor(const GlobalObject& aGlobal,
+                  const nsAString& aData,
+                  const FilePropertyBag& aBag,
+                  ErrorResult& aRv)
 {
   if (!nsContentUtils::IsCallerChrome()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
 
-  nsRefPtr<DOMMultipartFileImpl> impl = new DOMMultipartFileImpl(EmptyString());
+  nsRefPtr<MultipartFileImpl> impl = new MultipartFileImpl(EmptyString());
   impl->InitializeChromeFile(window, aData, aBag, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
   MOZ_ASSERT(impl->IsFile());
 
-  nsRefPtr<DOMFile> domFile = new DOMFile(aGlobal.GetAsSupports(), impl);
+  nsRefPtr<File> domFile = new File(aGlobal.GetAsSupports(), impl);
   return domFile.forget();
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// mozilla::dom::DOMFileImpl implementation
+// mozilla::dom::FileImpl implementation
 
-already_AddRefed<DOMFileImpl>
-DOMFileImpl::Slice(const Optional<int64_t>& aStart,
-                   const Optional<int64_t>& aEnd,
-                   const nsAString& aContentType,
-                   ErrorResult& aRv)
+already_AddRefed<FileImpl>
+FileImpl::Slice(const Optional<int64_t>& aStart,
+                const Optional<int64_t>& aEnd,
+                const nsAString& aContentType,
+                ErrorResult& aRv)
 {
   // Truncate aStart and aEnd so that we stay within this file.
   uint64_t thisLength = GetSize(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   int64_t start = aStart.WasPassed() ? aStart.Value() : 0;
@@ -718,42 +718,42 @@ DOMFileImpl::Slice(const Optional<int64_
 
   ParseSize((int64_t)thisLength, start, end);
 
   return CreateSlice((uint64_t)start, (uint64_t)(end - start),
                      aContentType, aRv);
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// DOMFileImpl implementation
+// FileImpl implementation
 
-NS_IMPL_ISUPPORTS(DOMFileImpl, PIDOMFileImpl)
+NS_IMPL_ISUPPORTS(FileImpl, PIFileImpl)
 
 ////////////////////////////////////////////////////////////////////////////
-// DOMFileImplFile implementation
+// FileImplFile implementation
 
-NS_IMPL_ISUPPORTS_INHERITED0(DOMFileImplFile, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(FileImplFile, FileImpl)
 
 void
-DOMFileImplBase::GetName(nsAString& aName)
+FileImplBase::GetName(nsAString& aName)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
   aName = mName;
 }
 
 nsresult
-DOMFileImplBase::GetPath(nsAString& aPath)
+FileImplBase::GetPath(nsAString& aPath)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
   aPath = mPath;
   return NS_OK;
 }
 
 void
-DOMFileImplBase::GetMozFullPath(nsAString& aFileName, ErrorResult& aRv)
+FileImplBase::GetMozFullPath(nsAString& aFileName, ErrorResult& aRv)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
 
   aFileName.Truncate();
 
   if (NS_IsMainThread()) {
     if (nsContentUtils::IsCallerChrome()) {
       GetMozFullPathInternal(aFileName, aRv);
@@ -767,45 +767,45 @@ DOMFileImplBase::GetMozFullPath(nsAStrin
   MOZ_ASSERT(workerPrivate);
 
   if (workerPrivate->UsesSystemPrincipal()) {
     GetMozFullPathInternal(aFileName, aRv);
   }
 }
 
 void
-DOMFileImplBase::GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv)
+FileImplBase::GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv)
 {
   if (!mIsFile) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aFileName.Truncate();
 }
 
 void
-DOMFileImplBase::GetType(nsAString& aType)
+FileImplBase::GetType(nsAString& aType)
 {
   aType = mContentType;
 }
 
 int64_t
-DOMFileImplBase::GetLastModified(ErrorResult& aRv)
+FileImplBase::GetLastModified(ErrorResult& aRv)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
   if (IsDateUnknown()) {
     mLastModificationDate = PR_Now();
   }
 
   return mLastModificationDate / PR_USEC_PER_MSEC;
 }
 
 int64_t
-DOMFileImplBase::GetFileId()
+FileImplBase::GetFileId()
 {
   int64_t id = -1;
 
   if (IsStoredFile() && IsWholeFile() && !IsSnapshot()) {
     if (!indexedDB::IndexedDatabaseManager::IsClosed()) {
       indexedDB::IndexedDatabaseManager::FileMutex().Lock();
     }
 
@@ -821,17 +821,17 @@ DOMFileImplBase::GetFileId()
       indexedDB::IndexedDatabaseManager::FileMutex().Unlock();
     }
   }
 
   return id;
 }
 
 void
-DOMFileImplBase::AddFileInfo(indexedDB::FileInfo* aFileInfo)
+FileImplBase::AddFileInfo(indexedDB::FileInfo* aFileInfo)
 {
   if (indexedDB::IndexedDatabaseManager::IsClosed()) {
     NS_ERROR("Shouldn't be called after shutdown!");
     return;
   }
 
   nsRefPtr<indexedDB::FileInfo> fileInfo = aFileInfo;
 
@@ -840,17 +840,17 @@ DOMFileImplBase::AddFileInfo(indexedDB::
   NS_ASSERTION(!mFileInfos.Contains(aFileInfo),
                "Adding the same file info agan?!");
 
   nsRefPtr<indexedDB::FileInfo>* element = mFileInfos.AppendElement();
   element->swap(fileInfo);
 }
 
 indexedDB::FileInfo*
-DOMFileImplBase::GetFileInfo(indexedDB::FileManager* aFileManager)
+FileImplBase::GetFileInfo(indexedDB::FileManager* aFileManager)
 {
   if (indexedDB::IndexedDatabaseManager::IsClosed()) {
     NS_ERROR("Shouldn't be called after shutdown!");
     return nullptr;
   }
 
   // A slice created from a stored file must keep the file info alive.
   // However, we don't support sharing of slices yet, so the slice must be
@@ -872,20 +872,18 @@ DOMFileImplBase::GetFileInfo(indexedDB::
       return fileInfo;
     }
   }
 
   return nullptr;
 }
 
 nsresult
-DOMFileImplBase::GetSendInfo(nsIInputStream** aBody,
-                             uint64_t* aContentLength,
-                             nsACString& aContentType,
-                             nsACString& aCharset)
+FileImplBase::GetSendInfo(nsIInputStream** aBody, uint64_t* aContentLength,
+                          nsACString& aContentType, nsACString& aCharset)
 {
   MOZ_ASSERT(aContentLength);
 
   nsresult rv;
 
   nsCOMPtr<nsIInputStream> stream;
   rv = GetInternalStream(getter_AddRefs(stream));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -903,24 +901,24 @@ DOMFileImplBase::GetSendInfo(nsIInputStr
 
   aCharset.Truncate();
 
   stream.forget(aBody);
   return NS_OK;
 }
 
 nsresult
-DOMFileImplBase::GetMutable(bool* aMutable) const
+FileImplBase::GetMutable(bool* aMutable) const
 {
   *aMutable = !mImmutable;
   return NS_OK;
 }
 
 nsresult
-DOMFileImplBase::SetMutable(bool aMutable)
+FileImplBase::SetMutable(bool aMutable)
 {
   nsresult rv = NS_OK;
 
   NS_ENSURE_ARG(!mImmutable || !aMutable);
 
   if (!mImmutable && !aMutable) {
     // Force the content type and size to be cached
     nsAutoString dummyString;
@@ -933,37 +931,37 @@ DOMFileImplBase::SetMutable(bool aMutabl
     }
   }
 
   mImmutable = !aMutable;
   return rv;
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// DOMFileImplFile implementation
+// FileImplFile implementation
 
-already_AddRefed<DOMFileImpl>
-DOMFileImplFile::CreateSlice(uint64_t aStart, uint64_t aLength,
-                             const nsAString& aContentType,
-                             ErrorResult& aRv)
+already_AddRefed<FileImpl>
+FileImplFile::CreateSlice(uint64_t aStart, uint64_t aLength,
+                          const nsAString& aContentType,
+                          ErrorResult& aRv)
 {
-  nsRefPtr<DOMFileImpl> impl =
-    new DOMFileImplFile(this, aStart, aLength, aContentType);
+  nsRefPtr<FileImpl> impl =
+    new FileImplFile(this, aStart, aLength, aContentType);
   return impl.forget();
 }
 
 void
-DOMFileImplFile::GetMozFullPathInternal(nsAString& aFilename, ErrorResult& aRv)
+FileImplFile::GetMozFullPathInternal(nsAString& aFilename, ErrorResult& aRv)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
   aRv = mFile->GetPath(aFilename);
 }
 
 uint64_t
-DOMFileImplFile::GetSize(ErrorResult& aRv)
+FileImplFile::GetSize(ErrorResult& aRv)
 {
   if (IsSizeUnknown()) {
     NS_ASSERTION(mWholeFile,
                  "Should only use lazy size when using the whole file");
     int64_t fileSize;
     aRv = mFile->GetFileSize(&fileSize);
     if (NS_WARN_IF(aRv.Failed())) {
       return 0;
@@ -976,17 +974,17 @@ DOMFileImplFile::GetSize(ErrorResult& aR
 
     mLength = fileSize;
   }
 
   return mLength;
 }
 
 void
-DOMFileImplFile::GetType(nsAString& aType)
+FileImplFile::GetType(nsAString& aType)
 {
   if (mContentType.IsVoid()) {
     NS_ASSERTION(mWholeFile,
                  "Should only use lazy ContentType when using the whole file");
     nsresult rv;
     nsCOMPtr<nsIMIMEService> mimeService =
       do_GetService(NS_MIMESERVICE_CONTRACTID, &rv);
     if (NS_WARN_IF(NS_FAILED(rv))) {
@@ -1003,17 +1001,17 @@ DOMFileImplFile::GetType(nsAString& aTyp
     AppendUTF8toUTF16(mimeType, mContentType);
     mContentType.SetIsVoid(false);
   }
 
   aType = mContentType;
 }
 
 int64_t
-DOMFileImplFile::GetLastModified(ErrorResult& aRv)
+FileImplFile::GetLastModified(ErrorResult& aRv)
 {
   NS_ASSERTION(mIsFile, "Should only be called on files");
   if (IsDateUnknown()) {
     PRTime msecs;
     aRv = mFile->GetLastModifiedTime(&msecs);
     if (NS_WARN_IF(aRv.Failed())) {
       return 0;
     }
@@ -1026,94 +1024,94 @@ DOMFileImplFile::GetLastModified(ErrorRe
 
 const uint32_t sFileStreamFlags =
   nsIFileInputStream::CLOSE_ON_EOF |
   nsIFileInputStream::REOPEN_ON_REWIND |
   nsIFileInputStream::DEFER_OPEN |
   nsIFileInputStream::SHARE_DELETE;
 
 nsresult
-DOMFileImplFile::GetInternalStream(nsIInputStream** aStream)
+FileImplFile::GetInternalStream(nsIInputStream** aStream)
 {
   return mWholeFile ?
     NS_NewLocalFileInputStream(aStream, mFile, -1, -1, sFileStreamFlags) :
     NS_NewPartialLocalFileInputStream(aStream, mFile, mStart, mLength,
                                       -1, -1, sFileStreamFlags);
 }
 
 void
-DOMFileImplFile::SetPath(const nsAString& aPath)
+FileImplFile::SetPath(const nsAString& aPath)
 {
   MOZ_ASSERT(aPath.IsEmpty() ||
              aPath[aPath.Length() - 1] == char16_t('/'),
              "Path must end with a path separator");
   mPath = aPath;
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// DOMFileImplMemory implementation
+// FileImplMemory implementation
 
-NS_IMPL_ISUPPORTS_INHERITED0(DOMFileImplMemory, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(FileImplMemory, FileImpl)
 
-already_AddRefed<DOMFileImpl>
-DOMFileImplMemory::CreateSlice(uint64_t aStart, uint64_t aLength,
-                               const nsAString& aContentType,
-                               ErrorResult& aRv)
+already_AddRefed<FileImpl>
+FileImplMemory::CreateSlice(uint64_t aStart, uint64_t aLength,
+                            const nsAString& aContentType,
+                            ErrorResult& aRv)
 {
-  nsRefPtr<DOMFileImpl> impl =
-    new DOMFileImplMemory(this, aStart, aLength, aContentType);
+  nsRefPtr<FileImpl> impl =
+    new FileImplMemory(this, aStart, aLength, aContentType);
   return impl.forget();
 }
 
 nsresult
-DOMFileImplMemory::GetInternalStream(nsIInputStream** aStream)
+FileImplMemory::GetInternalStream(nsIInputStream** aStream)
 {
   if (mLength > INT32_MAX)
     return NS_ERROR_FAILURE;
 
   return DataOwnerAdapter::Create(mDataOwner, mStart, mLength, aStream);
 }
 
 /* static */ StaticMutex
-DOMFileImplMemory::DataOwner::sDataOwnerMutex;
+FileImplMemory::DataOwner::sDataOwnerMutex;
 
-/* static */ StaticAutoPtr<LinkedList<DOMFileImplMemory::DataOwner>>
-DOMFileImplMemory::DataOwner::sDataOwners;
+/* static */ StaticAutoPtr<LinkedList<FileImplMemory::DataOwner>>
+FileImplMemory::DataOwner::sDataOwners;
 
 /* static */ bool
-DOMFileImplMemory::DataOwner::sMemoryReporterRegistered = false;
+FileImplMemory::DataOwner::sMemoryReporterRegistered = false;
 
-MOZ_DEFINE_MALLOC_SIZE_OF(DOMMemoryFileDataOwnerMallocSizeOf)
+MOZ_DEFINE_MALLOC_SIZE_OF(MemoryFileDataOwnerMallocSizeOf)
 
-class DOMFileImplMemoryDataOwnerMemoryReporter MOZ_FINAL
+class FileImplMemoryDataOwnerMemoryReporter MOZ_FINAL
   : public nsIMemoryReporter
 {
-  ~DOMFileImplMemoryDataOwnerMemoryReporter() {}
+  ~FileImplMemoryDataOwnerMemoryReporter() {}
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback,
                             nsISupports *aClosure, bool aAnonymize)
   {
-    typedef DOMFileImplMemory::DataOwner DataOwner;
+    typedef FileImplMemory::DataOwner DataOwner;
 
     StaticMutexAutoLock lock(DataOwner::sDataOwnerMutex);
 
     if (!DataOwner::sDataOwners) {
       return NS_OK;
     }
 
     const size_t LARGE_OBJECT_MIN_SIZE = 8 * 1024;
     size_t smallObjectsTotal = 0;
 
     for (DataOwner *owner = DataOwner::sDataOwners->getFirst();
          owner; owner = owner->getNext()) {
 
-      size_t size = DOMMemoryFileDataOwnerMallocSizeOf(owner->mData);
+      size_t size = MemoryFileDataOwnerMallocSizeOf(owner->mData);
 
       if (size < LARGE_OBJECT_MIN_SIZE) {
         smallObjectsTotal += size;
       } else {
         SHA1Sum sha1;
         sha1.update(owner->mData, owner->mLength);
         uint8_t digest[SHA1Sum::kHashSize]; // SHA1 digests are 20 bytes long.
         sha1.finish(digest);
@@ -1154,54 +1152,54 @@ public:
         aClosure);
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
     return NS_OK;
   }
 };
 
-NS_IMPL_ISUPPORTS(DOMFileImplMemoryDataOwnerMemoryReporter, nsIMemoryReporter)
+NS_IMPL_ISUPPORTS(FileImplMemoryDataOwnerMemoryReporter, nsIMemoryReporter)
 
 /* static */ void
-DOMFileImplMemory::DataOwner::EnsureMemoryReporterRegistered()
+FileImplMemory::DataOwner::EnsureMemoryReporterRegistered()
 {
   sDataOwnerMutex.AssertCurrentThreadOwns();
   if (sMemoryReporterRegistered) {
     return;
   }
 
-  RegisterStrongMemoryReporter(new DOMFileImplMemoryDataOwnerMemoryReporter());
+  RegisterStrongMemoryReporter(new FileImplMemoryDataOwnerMemoryReporter());
 
   sMemoryReporterRegistered = true;
 }
 
 ////////////////////////////////////////////////////////////////////////////
-// DOMFileImplTemporaryFileBlob implementation
+// FileImplTemporaryFileBlob implementation
 
-NS_IMPL_ISUPPORTS_INHERITED0(DOMFileImplTemporaryFileBlob, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(FileImplTemporaryFileBlob, FileImpl)
 
-already_AddRefed<DOMFileImpl>
-DOMFileImplTemporaryFileBlob::CreateSlice(uint64_t aStart, uint64_t aLength,
-                                          const nsAString& aContentType,
-                                          ErrorResult& aRv)
+already_AddRefed<FileImpl>
+FileImplTemporaryFileBlob::CreateSlice(uint64_t aStart, uint64_t aLength,
+                                       const nsAString& aContentType,
+                                       ErrorResult& aRv)
 {
   if (aStart + aLength > mLength) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
 
-  nsRefPtr<DOMFileImpl> impl =
-    new DOMFileImplTemporaryFileBlob(this, aStart + mStartPos,
-                                     aLength, aContentType);
+  nsRefPtr<FileImpl> impl =
+    new FileImplTemporaryFileBlob(this, aStart + mStartPos,
+                                  aLength, aContentType);
   return impl.forget();
 }
 
 nsresult
-DOMFileImplTemporaryFileBlob::GetInternalStream(nsIInputStream** aStream)
+FileImplTemporaryFileBlob::GetInternalStream(nsIInputStream** aStream)
 {
   nsCOMPtr<nsIInputStream> stream =
     new nsTemporaryFileInputStream(mFileDescOwner, mStartPos, mStartPos + mLength);
   stream.forget(aStream);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////
@@ -1230,15 +1228,15 @@ FileList::GetLength(uint32_t* aLength)
   *aLength = Length();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FileList::Item(uint32_t aIndex, nsIDOMFile **aFile)
 {
-  nsRefPtr<DOMFile> file = Item(aIndex);
+  nsRefPtr<File> file = Item(aIndex);
   file.forget(aFile);
   return NS_OK;
 }
 
 } // dom namespace
 } // mozilla namespace
--- a/content/base/src/FileIOObject.cpp
+++ b/content/base/src/FileIOObject.cpp
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FileIOObject.h"
+#include "mozilla/dom/File.h"
+#include "mozilla/dom/ProgressEvent.h"
 #include "mozilla/EventDispatcher.h"
-#include "nsDOMFile.h"
+#include "nsComponentManagerUtils.h"
 #include "nsError.h"
 #include "nsIDOMEvent.h"
-#include "mozilla/dom/ProgressEvent.h"
-#include "nsComponentManagerUtils.h"
 
 #define ERROR_STR "error"
 #define ABORT_STR "abort"
 #define PROGRESS_STR "progress"
 
 namespace mozilla {
 namespace dom {
 
--- a/content/base/src/WebSocket.cpp
+++ b/content/base/src/WebSocket.cpp
@@ -6,16 +6,17 @@
 
 #include "WebSocket.h"
 #include "mozilla/dom/WebSocketBinding.h"
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "js/OldDebugAPI.h"
 #include "mozilla/DOMEventTargetHelper.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIDOMWindow.h"
 #include "nsIDocument.h"
 #include "nsXPCOM.h"
 #include "nsIXPConnect.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
@@ -33,17 +34,16 @@
 #include "nsICryptoHash.h"
 #include "nsJSUtils.h"
 #include "nsIScriptError.h"
 #include "nsNetUtil.h"
 #include "nsILoadGroup.h"
 #include "mozilla/Preferences.h"
 #include "xpcpublic.h"
 #include "nsContentPolicyUtils.h"
-#include "nsDOMFile.h"
 #include "nsWrapperCacheInlines.h"
 #include "nsIObserverService.h"
 #include "nsIWebSocketChannel.h"
 
 namespace mozilla {
 namespace dom {
 
 #define UTF_8_REPLACEMENT_CHAR    static_cast<char16_t>(0xFFFD)
@@ -1189,18 +1189,17 @@ WebSocket::Send(const nsAString& aData,
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
 
   NS_ConvertUTF16toUTF8 msgString(aData);
   Send(nullptr, msgString, msgString.Length(), false, aRv);
 }
 
 void
-WebSocket::Send(DOMFile& aData,
-                ErrorResult& aRv)
+WebSocket::Send(File& aData, ErrorResult& aRv)
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
 
   nsCOMPtr<nsIInputStream> msgStream;
   nsresult rv = aData.GetInternalStream(getter_AddRefs(msgStream));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
--- a/content/base/src/WebSocket.h
+++ b/content/base/src/WebSocket.h
@@ -27,17 +27,17 @@
 #include "nsWrapperCache.h"
 
 #define DEFAULT_WS_SCHEME_PORT  80
 #define DEFAULT_WSS_SCHEME_PORT 443
 
 namespace mozilla {
 namespace dom {
 
-class DOMFile;
+class File;
 
 class WebSocket MOZ_FINAL : public DOMEventTargetHelper,
                             public nsIInterfaceRequestor,
                             public nsIWebSocketListener,
                             public nsIObserver,
                             public nsSupportsWeakReference,
                             public nsIRequest
 {
@@ -128,17 +128,17 @@ public: // WebIDL interface:
 
   // webIDL: attribute DOMString binaryType;
   dom::BinaryType BinaryType() const { return mBinaryType; }
   void SetBinaryType(dom::BinaryType aData) { mBinaryType = aData; }
 
   // webIDL: void send(DOMString|Blob|ArrayBufferView data);
   void Send(const nsAString& aData,
             ErrorResult& aRv);
-  void Send(DOMFile& aData,
+  void Send(File& aData,
             ErrorResult& aRv);
   void Send(const ArrayBuffer& aData,
             ErrorResult& aRv);
   void Send(const ArrayBufferView& aData,
             ErrorResult& aRv);
 
 private: // constructor && distructor
   explicit WebSocket(nsPIDOMWindow* aOwnerWindow);
--- a/content/base/src/moz.build
+++ b/content/base/src/moz.build
@@ -94,16 +94,17 @@ UNIFIED_SOURCES += [
     'DOMMatrix.cpp',
     'DOMParser.cpp',
     'DOMPoint.cpp',
     'DOMQuad.cpp',
     'DOMRect.cpp',
     'DOMStringList.cpp',
     'Element.cpp',
     'EventSource.cpp',
+    'File.cpp',
     'FileIOObject.cpp',
     'FragmentOrElement.cpp',
     'ImportManager.cpp',
     'Link.cpp',
     'NodeIterator.cpp',
     'nsAtomListUtils.cpp',
     'nsAttrAndChildArray.cpp',
     'nsAttrValue.cpp',
@@ -121,17 +122,16 @@ UNIFIED_SOURCES += [
     'nsCSPParser.cpp',
     'nsCSPService.cpp',
     'nsCSPUtils.cpp',
     'nsDataDocumentContentPolicy.cpp',
     'nsDocumentEncoder.cpp',
     'nsDOMAttributeMap.cpp',
     'nsDOMBlobBuilder.cpp',
     'nsDOMCaretPosition.cpp',
-    'nsDOMFile.cpp',
     'nsDOMFileReader.cpp',
     'nsDOMMutationObserver.cpp',
     'nsDOMSerializer.cpp',
     'nsDOMSettableTokenList.cpp',
     'nsDOMTokenList.cpp',
     'nsElementFrameLoaderOwner.cpp',
     'nsFormData.cpp',
     'nsFrameLoader.cpp',
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -5994,21 +5994,21 @@ nsContentUtils::CreateArrayBuffer(JSCont
 nsresult
 nsContentUtils::CreateBlobBuffer(JSContext* aCx,
                                  nsISupports* aParent,
                                  const nsACString& aData,
                                  JS::MutableHandle<JS::Value> aBlob)
 {
   uint32_t blobLen = aData.Length();
   void* blobData = moz_malloc(blobLen);
-  nsRefPtr<DOMFile> blob;
+  nsRefPtr<File> blob;
   if (blobData) {
     memcpy(blobData, aData.BeginReading(), blobLen);
-    blob = mozilla::dom::DOMFile::CreateMemoryFile(aParent, blobData, blobLen,
-                                                   EmptyString());
+    blob = mozilla::dom::File::CreateMemoryFile(aParent, blobData, blobLen,
+                                                EmptyString());
   } else {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   if (!WrapNewBindingObject(aCx, blob, aBlob)) {
     return NS_ERROR_FAILURE;
   }
 
--- a/content/base/src/nsDOMBlobBuilder.cpp
+++ b/content/base/src/nsDOMBlobBuilder.cpp
@@ -15,138 +15,138 @@
 #include "nsContentUtils.h"
 #include "nsIScriptError.h"
 #include "nsIXPConnect.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-NS_IMPL_ISUPPORTS_INHERITED0(DOMMultipartFileImpl, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(MultipartFileImpl, FileImpl)
 
 nsresult
-DOMMultipartFileImpl::GetInternalStream(nsIInputStream** aStream)
+MultipartFileImpl::GetInternalStream(nsIInputStream** aStream)
 {
   nsresult rv;
   *aStream = nullptr;
 
   nsCOMPtr<nsIMultiplexInputStream> stream =
     do_CreateInstance("@mozilla.org/io/multiplex-input-stream;1");
   NS_ENSURE_TRUE(stream, NS_ERROR_FAILURE);
 
   uint32_t i;
   for (i = 0; i < mBlobImpls.Length(); i++) {
     nsCOMPtr<nsIInputStream> scratchStream;
-    DOMFileImpl* blobImpl = mBlobImpls.ElementAt(i).get();
+    FileImpl* blobImpl = mBlobImpls.ElementAt(i).get();
 
     rv = blobImpl->GetInternalStream(getter_AddRefs(scratchStream));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = stream->AppendStream(scratchStream);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return CallQueryInterface(stream, aStream);
 }
 
-already_AddRefed<DOMFileImpl>
-DOMMultipartFileImpl::CreateSlice(uint64_t aStart, uint64_t aLength,
-                                  const nsAString& aContentType,
-                                  ErrorResult& aRv)
+already_AddRefed<FileImpl>
+MultipartFileImpl::CreateSlice(uint64_t aStart, uint64_t aLength,
+                               const nsAString& aContentType,
+                               ErrorResult& aRv)
 {
   // If we clamped to nothing we create an empty blob
-  nsTArray<nsRefPtr<DOMFileImpl>> blobImpls;
+  nsTArray<nsRefPtr<FileImpl>> blobImpls;
 
   uint64_t length = aLength;
   uint64_t skipStart = aStart;
 
   // Prune the list of blobs if we can
   uint32_t i;
   for (i = 0; length && skipStart && i < mBlobImpls.Length(); i++) {
-    DOMFileImpl* blobImpl = mBlobImpls[i].get();
+    FileImpl* blobImpl = mBlobImpls[i].get();
 
     uint64_t l = blobImpl->GetSize(aRv);
     if (NS_WARN_IF(aRv.Failed())) {
       return nullptr;
     }
 
     if (skipStart < l) {
       uint64_t upperBound = std::min<uint64_t>(l - skipStart, length);
 
-      nsRefPtr<DOMFileImpl> firstBlobImpl =
+      nsRefPtr<FileImpl> firstBlobImpl =
         blobImpl->CreateSlice(skipStart, upperBound,
                               aContentType, aRv);
       if (NS_WARN_IF(aRv.Failed())) {
         return nullptr;
       }
 
-      // Avoid wrapping a single blob inside an DOMMultipartFileImpl
+      // Avoid wrapping a single blob inside an MultipartFileImpl
       if (length == upperBound) {
         return firstBlobImpl.forget();
       }
 
       blobImpls.AppendElement(firstBlobImpl);
       length -= upperBound;
       i++;
       break;
     }
     skipStart -= l;
   }
 
   // Now append enough blobs until we're done
   for (; length && i < mBlobImpls.Length(); i++) {
-    DOMFileImpl* blobImpl = mBlobImpls[i].get();
+    FileImpl* blobImpl = mBlobImpls[i].get();
 
     uint64_t l = blobImpl->GetSize(aRv);
     if (NS_WARN_IF(aRv.Failed())) {
       return nullptr;
     }
 
     if (length < l) {
-      nsRefPtr<DOMFileImpl> lastBlobImpl =
+      nsRefPtr<FileImpl> lastBlobImpl =
         blobImpl->CreateSlice(0, length, aContentType, aRv);
       if (NS_WARN_IF(aRv.Failed())) {
         return nullptr;
       }
 
       blobImpls.AppendElement(lastBlobImpl);
     } else {
       blobImpls.AppendElement(blobImpl);
     }
     length -= std::min<uint64_t>(l, length);
   }
 
   // we can create our blob now
-  nsRefPtr<DOMFileImpl> impl =
-    new DOMMultipartFileImpl(blobImpls, aContentType);
+  nsRefPtr<FileImpl> impl =
+    new MultipartFileImpl(blobImpls, aContentType);
   return impl.forget();
 }
 
 void
-DOMMultipartFileImpl::InitializeBlob()
+MultipartFileImpl::InitializeBlob()
 {
   SetLengthAndModifiedDate();
 }
 
 void
-DOMMultipartFileImpl::InitializeBlob(
+MultipartFileImpl::InitializeBlob(
        JSContext* aCx,
        const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
        const nsAString& aContentType,
        bool aNativeEOL,
        ErrorResult& aRv)
 {
   mContentType = aContentType;
   BlobSet blobSet;
 
   for (uint32_t i = 0, len = aData.Length(); i < len; ++i) {
     const OwningArrayBufferOrArrayBufferViewOrBlobOrString& data = aData[i];
 
     if (data.IsBlob()) {
-      nsRefPtr<DOMFile> file = data.GetAsBlob().get();
+      nsRefPtr<File> file = data.GetAsBlob().get();
       blobSet.AppendBlobImpl(file->Impl());
     }
 
     else if (data.IsString()) {
       aRv = blobSet.AppendString(data.GetAsString(), aNativeEOL, aCx);
       if (aRv.Failed()) {
         return;
       }
@@ -176,25 +176,25 @@ DOMMultipartFileImpl::InitializeBlob(
   }
 
 
   mBlobImpls = blobSet.GetBlobImpls();
   SetLengthAndModifiedDate();
 }
 
 void
-DOMMultipartFileImpl::SetLengthAndModifiedDate()
+MultipartFileImpl::SetLengthAndModifiedDate()
 {
   MOZ_ASSERT(mLength == UINT64_MAX);
   MOZ_ASSERT(mLastModificationDate == UINT64_MAX);
 
   uint64_t totalLength = 0;
 
   for (uint32_t index = 0, count = mBlobImpls.Length(); index < count; index++) {
-    nsRefPtr<DOMFileImpl>& blob = mBlobImpls[index];
+    nsRefPtr<FileImpl>& blob = mBlobImpls[index];
 
 #ifdef DEBUG
     MOZ_ASSERT(!blob->IsSizeUnknown());
     MOZ_ASSERT(!blob->IsDateUnknown());
 #endif
 
     ErrorResult error;
     uint64_t subBlobLength = blob->GetSize(error);
@@ -211,37 +211,37 @@ DOMMultipartFileImpl::SetLengthAndModifi
     //   var x = new Date(); var f = new File(...);
     //   x.getTime() < f.dateModified.getTime()
     // could fail.
     mLastModificationDate = JS_Now();
   }
 }
 
 void
-DOMMultipartFileImpl::GetMozFullPathInternal(nsAString& aFilename,
-                                             ErrorResult& aRv)
+MultipartFileImpl::GetMozFullPathInternal(nsAString& aFilename,
+                                          ErrorResult& aRv)
 {
   if (!mIsFromNsIFile || mBlobImpls.Length() == 0) {
-    DOMFileImplBase::GetMozFullPathInternal(aFilename, aRv);
+    FileImplBase::GetMozFullPathInternal(aFilename, aRv);
     return;
   }
 
-  DOMFileImpl* blobImpl = mBlobImpls.ElementAt(0).get();
+  FileImpl* blobImpl = mBlobImpls.ElementAt(0).get();
   if (!blobImpl) {
-    DOMFileImplBase::GetMozFullPathInternal(aFilename, aRv);
+    FileImplBase::GetMozFullPathInternal(aFilename, aRv);
     return;
   }
 
   blobImpl->GetMozFullPathInternal(aFilename, aRv);
 }
 
 void
-DOMMultipartFileImpl::InitializeChromeFile(DOMFile& aBlob,
-                                           const FilePropertyBag& aBag,
-                                           ErrorResult& aRv)
+MultipartFileImpl::InitializeChromeFile(File& aBlob,
+                                        const FilePropertyBag& aBag,
+                                        ErrorResult& aRv)
 {
   NS_ASSERTION(!mImmutable, "Something went wrong ...");
 
   if (mImmutable) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return;
   }
 
@@ -260,21 +260,21 @@ DOMMultipartFileImpl::InitializeChromeFi
   BlobSet blobSet;
   blobSet.AppendBlobImpl(aBlob.Impl());
   mBlobImpls = blobSet.GetBlobImpls();
 
   SetLengthAndModifiedDate();
 }
 
 void
-DOMMultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
-                                           nsIFile* aFile,
-                                           const FilePropertyBag& aBag,
-                                           bool aIsFromNsIFile,
-                                           ErrorResult& aRv)
+MultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
+                                        nsIFile* aFile,
+                                        const FilePropertyBag& aBag,
+                                        bool aIsFromNsIFile,
+                                        ErrorResult& aRv)
 {
   NS_ASSERTION(!mImmutable, "Something went wrong ...");
   if (mImmutable) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return;
   }
 
   MOZ_ASSERT(nsContentUtils::IsCallerChrome());
@@ -304,17 +304,17 @@ DOMMultipartFileImpl::InitializeChromeFi
     aRv.Throw(NS_ERROR_FILE_IS_DIRECTORY);
     return;
   }
 
   if (mName.IsEmpty()) {
     aFile->GetLeafName(mName);
   }
 
-  nsRefPtr<DOMFile> blob = DOMFile::CreateFromFile(aWindow, aFile);
+  nsRefPtr<File> blob = File::CreateFromFile(aWindow, aFile);
 
   // Pre-cache size.
   uint64_t unused;
   aRv = blob->GetSize(&unused);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
@@ -325,27 +325,27 @@ DOMMultipartFileImpl::InitializeChromeFi
   }
 
   // XXXkhuey this is terrible
   if (mContentType.IsEmpty()) {
     blob->GetType(mContentType);
   }
 
   BlobSet blobSet;
-  blobSet.AppendBlobImpl(static_cast<DOMFile*>(blob.get())->Impl());
+  blobSet.AppendBlobImpl(static_cast<File*>(blob.get())->Impl());
   mBlobImpls = blobSet.GetBlobImpls();
 
   SetLengthAndModifiedDate();
 }
 
 void
-DOMMultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
-                                           const nsAString& aData,
-                                           const FilePropertyBag& aBag,
-                                           ErrorResult& aRv)
+MultipartFileImpl::InitializeChromeFile(nsPIDOMWindow* aWindow,
+                                        const nsAString& aData,
+                                        const FilePropertyBag& aBag,
+                                        ErrorResult& aRv)
 {
   nsCOMPtr<nsIFile> file;
   aRv = NS_NewLocalFile(aData, false, getter_AddRefs(file));
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
   InitializeChromeFile(aWindow, file, aBag, false, aRv);
@@ -380,26 +380,26 @@ BlobSet::AppendString(const nsAString& a
 #endif
   }
 
   return AppendVoidPtr((void*)utf8Str.Data(),
                        utf8Str.Length());
 }
 
 nsresult
-BlobSet::AppendBlobImpl(DOMFileImpl* aBlobImpl)
+BlobSet::AppendBlobImpl(FileImpl* aBlobImpl)
 {
   NS_ENSURE_ARG_POINTER(aBlobImpl);
 
   Flush();
   mBlobImpls.AppendElement(aBlobImpl);
 
   return NS_OK;
 }
 
 nsresult
-BlobSet::AppendBlobImpls(const nsTArray<nsRefPtr<DOMFileImpl>>& aBlobImpls)
+BlobSet::AppendBlobImpls(const nsTArray<nsRefPtr<FileImpl>>& aBlobImpls)
 {
   Flush();
   mBlobImpls.AppendElements(aBlobImpls);
 
   return NS_OK;
 }
--- a/content/base/src/nsDOMBlobBuilder.h
+++ b/content/base/src/nsDOMBlobBuilder.h
@@ -1,105 +1,104 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDOMBlobBuilder_h
 #define nsDOMBlobBuilder_h
 
-#include "nsDOMFile.h"
-
 #include "mozilla/Attributes.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/ErrorResult.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/BlobBinding.h"
 #include "mozilla/dom/FileBinding.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-class DOMMultipartFileImpl MOZ_FINAL : public DOMFileImplBase
+class MultipartFileImpl MOZ_FINAL : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // Create as a file
-  DOMMultipartFileImpl(const nsTArray<nsRefPtr<DOMFileImpl>>& aBlobImpls,
-                       const nsAString& aName,
-                       const nsAString& aContentType)
-    : DOMFileImplBase(aName, aContentType, UINT64_MAX),
+  MultipartFileImpl(const nsTArray<nsRefPtr<FileImpl>>& aBlobImpls,
+                    const nsAString& aName,
+                    const nsAString& aContentType)
+    : FileImplBase(aName, aContentType, UINT64_MAX),
       mBlobImpls(aBlobImpls),
       mIsFromNsIFile(false)
   {
     SetLengthAndModifiedDate();
   }
 
   // Create as a blob
-  DOMMultipartFileImpl(const nsTArray<nsRefPtr<DOMFileImpl>>& aBlobImpls,
-                       const nsAString& aContentType)
-    : DOMFileImplBase(aContentType, UINT64_MAX),
+  MultipartFileImpl(const nsTArray<nsRefPtr<FileImpl>>& aBlobImpls,
+                    const nsAString& aContentType)
+    : FileImplBase(aContentType, UINT64_MAX),
       mBlobImpls(aBlobImpls),
       mIsFromNsIFile(false)
   {
     SetLengthAndModifiedDate();
   }
 
   // Create as a file to be later initialized
-  explicit DOMMultipartFileImpl(const nsAString& aName)
-    : DOMFileImplBase(aName, EmptyString(), UINT64_MAX),
+  explicit MultipartFileImpl(const nsAString& aName)
+    : FileImplBase(aName, EmptyString(), UINT64_MAX),
       mIsFromNsIFile(false)
   {
   }
 
   // Create as a blob to be later initialized
-  DOMMultipartFileImpl()
-    : DOMFileImplBase(EmptyString(), UINT64_MAX),
+  MultipartFileImpl()
+    : FileImplBase(EmptyString(), UINT64_MAX),
       mIsFromNsIFile(false)
   {
   }
 
   void InitializeBlob();
 
   void InitializeBlob(
        JSContext* aCx,
        const Sequence<OwningArrayBufferOrArrayBufferViewOrBlobOrString>& aData,
        const nsAString& aContentType,
        bool aNativeEOL,
        ErrorResult& aRv);
 
-  void InitializeChromeFile(DOMFile& aData,
+  void InitializeChromeFile(File& aData,
                             const FilePropertyBag& aBag,
                             ErrorResult& aRv);
 
   void InitializeChromeFile(nsPIDOMWindow* aWindow,
                             const nsAString& aData,
                             const FilePropertyBag& aBag,
                             ErrorResult& aRv);
 
   void InitializeChromeFile(nsPIDOMWindow* aWindow,
                             nsIFile* aData,
                             const FilePropertyBag& aBag,
                             bool aIsFromNsIFile,
                             ErrorResult& aRv);
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType,
               ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual uint64_t GetSize(ErrorResult& aRv) MOZ_OVERRIDE
   {
     return mLength;
   }
 
   virtual nsresult GetInternalStream(nsIInputStream** aInputStream) MOZ_OVERRIDE;
 
-  virtual const nsTArray<nsRefPtr<DOMFileImpl>>* GetSubBlobImpls() const MOZ_OVERRIDE
+  virtual const nsTArray<nsRefPtr<FileImpl>>* GetSubBlobImpls() const MOZ_OVERRIDE
   {
     return &mBlobImpls;
   }
 
   virtual void GetMozFullPathInternal(nsAString& aFullPath,
                                       ErrorResult& aRv) MOZ_OVERRIDE;
 
   void SetName(const nsAString& aName)
@@ -108,47 +107,47 @@ public:
   }
 
   void SetFromNsIFile(bool aValue)
   {
     mIsFromNsIFile = aValue;
   }
 
 protected:
-  virtual ~DOMMultipartFileImpl() {}
+  virtual ~MultipartFileImpl() {}
 
   void SetLengthAndModifiedDate();
 
-  nsTArray<nsRefPtr<DOMFileImpl>> mBlobImpls;
+  nsTArray<nsRefPtr<FileImpl>> mBlobImpls;
   bool mIsFromNsIFile;
 };
 
 class BlobSet {
 public:
   BlobSet()
     : mData(nullptr), mDataLen(0), mDataBufferLen(0)
   {}
 
   ~BlobSet()
   {
     moz_free(mData);
   }
 
   nsresult AppendVoidPtr(const void* aData, uint32_t aLength);
   nsresult AppendString(const nsAString& aString, bool nativeEOL, JSContext* aCx);
-  nsresult AppendBlobImpl(DOMFileImpl* aBlobImpl);
-  nsresult AppendBlobImpls(const nsTArray<nsRefPtr<DOMFileImpl>>& aBlobImpls);
+  nsresult AppendBlobImpl(FileImpl* aBlobImpl);
+  nsresult AppendBlobImpls(const nsTArray<nsRefPtr<FileImpl>>& aBlobImpls);
 
-  nsTArray<nsRefPtr<DOMFileImpl>>& GetBlobImpls() { Flush(); return mBlobImpls; }
+  nsTArray<nsRefPtr<FileImpl>>& GetBlobImpls() { Flush(); return mBlobImpls; }
 
-  already_AddRefed<DOMFile>
+  already_AddRefed<File>
   GetBlobInternal(nsISupports* aParent, const nsACString& aContentType)
   {
-    nsRefPtr<DOMFile> blob = new DOMFile(aParent,
-      new DOMMultipartFileImpl(GetBlobImpls(), NS_ConvertASCIItoUTF16(aContentType)));
+    nsRefPtr<File> blob = new File(aParent,
+      new MultipartFileImpl(GetBlobImpls(), NS_ConvertASCIItoUTF16(aContentType)));
     return blob.forget();
   }
 
 protected:
   bool ExpandBufferSize(uint64_t aSize)
   {
     using mozilla::CheckedUint32;
 
@@ -176,24 +175,24 @@ protected:
     return true;
   }
 
   void Flush() {
     if (mData) {
       // If we have some data, create a blob for it
       // and put it on the stack
 
-      nsRefPtr<DOMFileImpl> blobImpl =
-        new DOMFileImplMemory(mData, mDataLen, EmptyString());
+      nsRefPtr<FileImpl> blobImpl =
+        new FileImplMemory(mData, mDataLen, EmptyString());
       mBlobImpls.AppendElement(blobImpl);
-      mData = nullptr; // The nsDOMMemoryFile takes ownership of the buffer
+      mData = nullptr; // The FileImplMemory takes ownership of the buffer
       mDataLen = 0;
       mDataBufferLen = 0;
     }
   }
 
-  nsTArray<nsRefPtr<DOMFileImpl>> mBlobImpls;
+  nsTArray<nsRefPtr<FileImpl>> mBlobImpls;
   void* mData;
   uint64_t mDataLen;
   uint64_t mDataBufferLen;
 };
 
 #endif
--- a/content/base/src/nsDOMDataChannel.cpp
+++ b/content/base/src/nsDOMDataChannel.cpp
@@ -17,29 +17,28 @@
 extern PRLogModuleInfo* GetDataChannelLog();
 #endif
 #undef LOG
 #define LOG(args) PR_LOG(GetDataChannelLog(), PR_LOG_DEBUG, args)
 
 
 #include "nsDOMDataChannelDeclarations.h"
 #include "nsDOMDataChannel.h"
-#include "nsDOMFile.h"
 #include "nsIDOMDataChannel.h"
 #include "nsIDOMMessageEvent.h"
 #include "mozilla/DOMEventTargetHelper.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ScriptSettings.h"
 
 #include "nsError.h"
 #include "nsAutoPtr.h"
 #include "nsContentUtils.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIScriptObjectPrincipal.h"
 #include "nsNetUtil.h"
-#include "nsDOMFile.h"
 
 #include "DataChannel.h"
 
 // Since we've moved the windows.h include down here, we have to explicitly
 // undef GetBinaryType, otherwise we'll get really odd conflicts
 #ifdef GetBinaryType
 #undef GetBinaryType
 #endif
@@ -267,17 +266,17 @@ nsDOMDataChannel::Close()
 void
 nsDOMDataChannel::Send(const nsAString& aData, ErrorResult& aRv)
 {
   NS_ConvertUTF16toUTF8 msgString(aData);
   Send(nullptr, msgString, msgString.Length(), false, aRv);
 }
 
 void
-nsDOMDataChannel::Send(DOMFile& aData, ErrorResult& aRv)
+nsDOMDataChannel::Send(File& aData, ErrorResult& aRv)
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
 
   nsCOMPtr<nsIInputStream> msgStream;
   nsresult rv = aData.GetInternalStream(getter_AddRefs(msgStream));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
--- a/content/base/src/nsDOMDataChannel.h
+++ b/content/base/src/nsDOMDataChannel.h
@@ -13,17 +13,17 @@
 #include "mozilla/dom/TypedArray.h"
 #include "mozilla/net/DataChannelListener.h"
 #include "nsIDOMDataChannel.h"
 #include "nsIInputStream.h"
 
 
 namespace mozilla {
 namespace dom {
-class DOMFile;
+class File;
 }
 
 class DataChannel;
 };
 
 class nsDOMDataChannel : public mozilla::DOMEventTargetHelper,
                          public nsIDOMDataChannel,
                          public mozilla::DataChannelListener
@@ -65,17 +65,17 @@ public:
       static_cast<int>(mBinaryType));
   }
   void SetBinaryType(mozilla::dom::RTCDataChannelType aType)
   {
     mBinaryType = static_cast<DataChannelBinaryType>(
       static_cast<int>(aType));
   }
   void Send(const nsAString& aData, mozilla::ErrorResult& aRv);
-  void Send(mozilla::dom::DOMFile& aData, mozilla::ErrorResult& aRv);
+  void Send(mozilla::dom::File& aData, mozilla::ErrorResult& aRv);
   void Send(const mozilla::dom::ArrayBuffer& aData, mozilla::ErrorResult& aRv);
   void Send(const mozilla::dom::ArrayBufferView& aData,
             mozilla::ErrorResult& aRv);
 
   // Uses XPIDL GetProtocol.
   bool Ordered() const;
   uint16_t Id() const;
   uint16_t Stream() const; // deprecated
--- a/content/base/src/nsDOMFileReader.cpp
+++ b/content/base/src/nsDOMFileReader.cpp
@@ -3,28 +3,28 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsDOMFileReader.h"
 
 #include "nsContentCID.h"
 #include "nsContentUtils.h"
 #include "nsDOMClassInfoID.h"
-#include "nsDOMFile.h"
 #include "nsError.h"
 #include "nsIFile.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 
 #include "nsXPCOM.h"
 #include "nsIDOMEventListener.h"
 #include "nsJSEnvironment.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/Base64.h"
 #include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileReaderBinding.h"
 #include "xpcpublic.h"
 #include "nsDOMJSUtils.h"
 
 #include "jsfriendapi.h"
 
 #include "nsITransport.h"
 #include "nsIStreamTransportService.h"
@@ -181,48 +181,48 @@ nsDOMFileReader::GetError(nsISupports** 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMFileReader::ReadAsArrayBuffer(nsIDOMBlob* aFile, JSContext* aCx)
 {
   NS_ENSURE_TRUE(aFile, NS_ERROR_NULL_POINTER);
   ErrorResult rv;
-  nsRefPtr<DOMFile> file = static_cast<DOMFile*>(aFile);
+  nsRefPtr<File> file = static_cast<File*>(aFile);
   ReadAsArrayBuffer(aCx, *file, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 nsDOMFileReader::ReadAsBinaryString(nsIDOMBlob* aFile)
 {
   NS_ENSURE_TRUE(aFile, NS_ERROR_NULL_POINTER);
   ErrorResult rv;
-  nsRefPtr<DOMFile> file = static_cast<DOMFile*>(aFile);
+  nsRefPtr<File> file = static_cast<File*>(aFile);
   ReadAsBinaryString(*file, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 nsDOMFileReader::ReadAsText(nsIDOMBlob* aFile,
                             const nsAString &aCharset)
 {
   NS_ENSURE_TRUE(aFile, NS_ERROR_NULL_POINTER);
   ErrorResult rv;
-  nsRefPtr<DOMFile> file = static_cast<DOMFile*>(aFile);
+  nsRefPtr<File> file = static_cast<File*>(aFile);
   ReadAsText(*file, aCharset, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 nsDOMFileReader::ReadAsDataURL(nsIDOMBlob* aFile)
 {
   NS_ENSURE_TRUE(aFile, NS_ERROR_NULL_POINTER);
   ErrorResult rv;
-  nsRefPtr<DOMFile> file = static_cast<DOMFile*>(aFile);
+  nsRefPtr<File> file = static_cast<File*>(aFile);
   ReadAsDataURL(*file, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 nsDOMFileReader::Abort()
 {
   ErrorResult rv;
@@ -365,17 +365,17 @@ nsDOMFileReader::DoReadData(nsIAsyncInpu
   mDataLen += aCount;
   return NS_OK;
 }
 
 // Helper methods
 
 void
 nsDOMFileReader::ReadFileContent(JSContext* aCx,
-                                 DOMFile& aFile,
+                                 File& aFile,
                                  const nsAString &aCharset,
                                  eDataFormat aDataFormat,
                                  ErrorResult& aRv)
 {
   //Implicit abort to clear any other activity going on
   Abort();
   mError = nullptr;
   SetDOMStringToNull(mResult);
--- a/content/base/src/nsDOMFileReader.h
+++ b/content/base/src/nsDOMFileReader.h
@@ -22,28 +22,28 @@
 #include "nsIDOMFileReader.h"
 #include "nsIDOMFileList.h"
 #include "nsCOMPtr.h"
 
 #include "FileIOObject.h"
 
 namespace mozilla {
 namespace dom {
-class DOMFile;
+class File;
 }
 }
 
 class nsDOMFileReader : public mozilla::dom::FileIOObject,
                         public nsIDOMFileReader,
                         public nsIInterfaceRequestor,
                         public nsSupportsWeakReference
 {
   typedef mozilla::ErrorResult ErrorResult;
   typedef mozilla::dom::GlobalObject GlobalObject;
-  typedef mozilla::dom::DOMFile DOMFile;
+  typedef mozilla::dom::File File;
 public:
   nsDOMFileReader();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOMFILEREADER
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper)
@@ -63,27 +63,27 @@ public:
   {
     return GetOwner();
   }
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   // WebIDL
   static already_AddRefed<nsDOMFileReader>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
-  void ReadAsArrayBuffer(JSContext* aCx, DOMFile& aBlob, ErrorResult& aRv)
+  void ReadAsArrayBuffer(JSContext* aCx, File& aBlob, ErrorResult& aRv)
   {
     ReadFileContent(aCx, aBlob, EmptyString(), FILE_AS_ARRAYBUFFER, aRv);
   }
 
-  void ReadAsText(DOMFile& aBlob, const nsAString& aLabel, ErrorResult& aRv)
+  void ReadAsText(File& aBlob, const nsAString& aLabel, ErrorResult& aRv)
   {
     ReadFileContent(nullptr, aBlob, aLabel, FILE_AS_TEXT, aRv);
   }
 
-  void ReadAsDataURL(DOMFile& aBlob, ErrorResult& aRv)
+  void ReadAsDataURL(File& aBlob, ErrorResult& aRv)
   {
     ReadFileContent(nullptr, aBlob, EmptyString(), FILE_AS_DATAURL, aRv);
   }
 
   using FileIOObject::Abort;
 
   // Inherited ReadyState().
 
@@ -97,17 +97,17 @@ public:
   using FileIOObject::SetOnprogress;
   IMPL_EVENT_HANDLER(load)
   using FileIOObject::GetOnabort;
   using FileIOObject::SetOnabort;
   using FileIOObject::GetOnerror;
   using FileIOObject::SetOnerror;
   IMPL_EVENT_HANDLER(loadend)
 
-  void ReadAsBinaryString(DOMFile& aBlob, ErrorResult& aRv)
+  void ReadAsBinaryString(File& aBlob, ErrorResult& aRv)
   {
     ReadFileContent(nullptr, aBlob, EmptyString(), FILE_AS_BINARY, aRv);
   }
 
 
   nsresult Init();
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(nsDOMFileReader,
@@ -119,17 +119,17 @@ protected:
 
   enum eDataFormat {
     FILE_AS_ARRAYBUFFER,
     FILE_AS_BINARY,
     FILE_AS_TEXT,
     FILE_AS_DATAURL
   };
 
-  void ReadFileContent(JSContext* aCx, DOMFile& aBlob,
+  void ReadFileContent(JSContext* aCx, File& aBlob,
                        const nsAString &aCharset, eDataFormat aDataFormat,
                        ErrorResult& aRv);
   nsresult GetAsText(nsIDOMBlob *aFile, const nsACString &aCharset,
                      const char *aFileData, uint32_t aDataLen, nsAString &aResult);
   nsresult GetAsDataURL(nsIDOMBlob *aFile, const char *aFileData, uint32_t aDataLen, nsAString &aResult);
 
   void FreeFileData() {
     moz_free(mFileData);
--- a/content/base/src/nsFormData.cpp
+++ b/content/base/src/nsFormData.cpp
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsDOMFile.h"
 #include "nsFormData.h"
 #include "nsIVariant.h"
 #include "nsIInputStream.h"
+#include "mozilla/dom/File.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/HTMLFormElement.h"
 #include "mozilla/dom/FormDataBinding.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsFormData::nsFormData(nsISupports* aOwner)
   : nsFormSubmission(NS_LITERAL_CSTRING("UTF-8"), nullptr)
@@ -68,17 +69,17 @@ nsFormData::GetEncodedSubmission(nsIURI*
 
 void
 nsFormData::Append(const nsAString& aName, const nsAString& aValue)
 {
   AddNameValuePair(aName, aValue);
 }
 
 void
-nsFormData::Append(const nsAString& aName, DOMFile& aBlob,
+nsFormData::Append(const nsAString& aName, File& aBlob,
                    const Optional<nsAString>& aFilename)
 {
   nsString filename;
   if (aFilename.WasPassed()) {
     filename = aFilename.Value();
   } else {
     filename.SetIsVoid(true);
   }
@@ -100,17 +101,17 @@ nsFormData::Append(const nsAString& aNam
     nsCOMPtr<nsISupports> supports;
     nsID *iid;
     rv = aValue->GetAsInterface(&iid, getter_AddRefs(supports));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsMemory::Free(iid);
 
     nsCOMPtr<nsIDOMBlob> domBlob = do_QueryInterface(supports);
-    nsRefPtr<DOMFile> blob = static_cast<DOMFile*>(domBlob.get());
+    nsRefPtr<File> blob = static_cast<File*>(domBlob.get());
     if (domBlob) {
       Optional<nsAString> temp;
       Append(aName, *blob, temp);
       return NS_OK;
     }
   }
 
   char16_t* stringData = nullptr;
--- a/content/base/src/nsFormData.h
+++ b/content/base/src/nsFormData.h
@@ -13,17 +13,17 @@
 #include "nsTArray.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/BindingDeclarations.h"
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
-class DOMFile;
+class File;
 class HTMLFormElement;
 class GlobalObject;
 } // namespace dom
 } // namespace mozilla
 
 class nsFormData MOZ_FINAL : public nsIDOMFormData,
                              public nsIXHRSendable,
                              public nsFormSubmission,
@@ -50,17 +50,17 @@ public:
   {
     return mOwner;
   }
   static already_AddRefed<nsFormData>
   Constructor(const mozilla::dom::GlobalObject& aGlobal,
               const mozilla::dom::Optional<mozilla::dom::NonNull<mozilla::dom::HTMLFormElement> >& aFormElement,
               mozilla::ErrorResult& aRv);
   void Append(const nsAString& aName, const nsAString& aValue);
-  void Append(const nsAString& aName, mozilla::dom::DOMFile& aBlob,
+  void Append(const nsAString& aName, mozilla::dom::File& aBlob,
               const mozilla::dom::Optional<nsAString>& aFilename);
 
   // nsFormSubmission
   virtual nsresult GetEncodedSubmission(nsIURI* aURI,
                                         nsIInputStream** aPostDataStream) MOZ_OVERRIDE;
   virtual nsresult AddNameValuePair(const nsAString& aName,
                                     const nsAString& aValue) MOZ_OVERRIDE
   {
--- a/content/base/src/nsFrameMessageManager.cpp
+++ b/content/base/src/nsFrameMessageManager.cpp
@@ -22,20 +22,20 @@
 #include "nsIXULRuntime.h"
 #include "nsIScriptError.h"
 #include "nsIConsoleService.h"
 #include "nsIMemoryReporter.h"
 #include "nsIProtocolHandler.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIJSRuntimeService.h"
 #include "nsIDOMClassInfo.h"
-#include "nsIDOMFile.h"
 #include "xpcpublic.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/nsIContentParent.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/StructuredCloneUtils.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "JavaScriptChild.h"
 #include "JavaScriptParent.h"
@@ -199,17 +199,17 @@ template<ActorFlavorEnum Flavor>
 static bool
 BuildClonedMessageData(typename BlobTraits<Flavor>::ConcreteContentManagerType* aManager,
                        const StructuredCloneData& aData,
                        ClonedMessageData& aClonedData)
 {
   SerializedStructuredCloneBuffer& buffer = aClonedData.data();
   buffer.data = aData.mData;
   buffer.dataLength = aData.mDataLength;
-  const nsTArray<nsRefPtr<DOMFile>>& blobs = aData.mClosure.mBlobs;
+  const nsTArray<nsRefPtr<File>>& blobs = aData.mClosure.mBlobs;
   if (!blobs.IsEmpty()) {
     typedef typename BlobTraits<Flavor>::ProtocolType ProtocolType;
     InfallibleTArray<ProtocolType*>& blobList = DataBlobs<Flavor>::Blobs(aClonedData);
     uint32_t length = blobs.Length();
     blobList.SetCapacity(length);
     for (uint32_t i = 0; i < length; ++i) {
       typename BlobTraits<Flavor>::BlobType* protocolActor =
         aManager->GetOrCreateActorForBlob(blobs[i]);
@@ -251,22 +251,22 @@ UnpackClonedMessageData(const ClonedMess
   if (!blobs.IsEmpty()) {
     uint32_t length = blobs.Length();
     cloneData.mClosure.mBlobs.SetCapacity(length);
     for (uint32_t i = 0; i < length; ++i) {
       auto* blob =
         static_cast<typename BlobTraits<Flavor>::BlobType*>(blobs[i]);
       MOZ_ASSERT(blob);
 
-      nsRefPtr<DOMFileImpl> blobImpl = blob->GetBlobImpl();
+      nsRefPtr<FileImpl> blobImpl = blob->GetBlobImpl();
       MOZ_ASSERT(blobImpl);
 
       // This object will be duplicated with a correct parent before being
       // exposed to JS.
-      nsRefPtr<DOMFile> domBlob = new DOMFile(nullptr, blobImpl);
+      nsRefPtr<File> domBlob = new File(nullptr, blobImpl);
       cloneData.mClosure.mBlobs.AppendElement(domBlob);
     }
   }
   return cloneData;
 }
 
 StructuredCloneData
 mozilla::dom::ipc::UnpackClonedMessageDataForParent(const ClonedMessageData& aData)
--- a/content/base/src/nsHostObjectProtocolHandler.cpp
+++ b/content/base/src/nsHostObjectProtocolHandler.cpp
@@ -5,24 +5,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsHostObjectProtocolHandler.h"
 #include "nsHostObjectURI.h"
 #include "nsError.h"
 #include "nsClassHashtable.h"
 #include "nsNetUtil.h"
 #include "nsIPrincipal.h"
-#include "nsDOMFile.h"
 #include "DOMMediaStream.h"
 #include "mozilla/dom/MediaSource.h"
 #include "nsIMemoryReporter.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/LoadInfo.h"
 
-using mozilla::dom::DOMFileImpl;
+using mozilla::dom::FileImpl;
 using mozilla::ErrorResult;
 using mozilla::LoadInfo;
 
 // -----------------------------------------------------------------------
 // Hash table
 struct DataInfo
 {
   // mObject is expected to be an nsIDOMBlob, DOMMediaStream, or MediaSource
@@ -492,31 +492,31 @@ nsHostObjectProtocolHandler::NewChannel(
   uri->GetSpec(spec);
 
   DataInfo* info = GetDataInfo(spec);
 
   if (!info) {
     return NS_ERROR_DOM_BAD_URI;
   }
 
-  nsCOMPtr<PIDOMFileImpl> blobImpl = do_QueryInterface(info->mObject);
+  nsCOMPtr<PIFileImpl> blobImpl = do_QueryInterface(info->mObject);
   if (!blobImpl) {
     return NS_ERROR_DOM_BAD_URI;
   }
 
 #ifdef DEBUG
   {
     nsCOMPtr<nsIURIWithPrincipal> uriPrinc = do_QueryInterface(uri);
     nsCOMPtr<nsIPrincipal> principal;
     uriPrinc->GetPrincipal(getter_AddRefs(principal));
     NS_ASSERTION(info->mPrincipal == principal, "Wrong principal!");
   }
 #endif
 
-  DOMFileImpl* blob = static_cast<DOMFileImpl*>(blobImpl.get());
+  FileImpl* blob = static_cast<FileImpl*>(blobImpl.get());
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv = blob->GetInternalStream(getter_AddRefs(stream));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIChannel> channel;
   rv = NS_NewInputStreamChannel(getter_AddRefs(channel),
                                 uri,
                                 stream);
@@ -591,22 +591,22 @@ nsFontTableProtocolHandler::GetScheme(ns
 
 nsresult
 NS_GetStreamForBlobURI(nsIURI* aURI, nsIInputStream** aStream)
 {
   NS_ASSERTION(IsBlobURI(aURI), "Only call this with blob URIs");
 
   *aStream = nullptr;
 
-  nsCOMPtr<PIDOMFileImpl> blobImpl = do_QueryInterface(GetDataObject(aURI));
+  nsCOMPtr<PIFileImpl> blobImpl = do_QueryInterface(GetDataObject(aURI));
   if (!blobImpl) {
     return NS_ERROR_DOM_BAD_URI;
   }
 
-  DOMFileImpl* blob = static_cast<DOMFileImpl*>(blobImpl.get());
+  FileImpl* blob = static_cast<FileImpl*>(blobImpl.get());
   return blob->GetInternalStream(aStream);
 }
 
 nsresult
 NS_GetStreamForMediaStreamURI(nsIURI* aURI, mozilla::DOMMediaStream** aStream)
 {
   NS_ASSERTION(IsMediaStreamURI(aURI), "Only call this with mediastream URIs");
 
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsXMLHttpRequest.h"
 
 #ifndef XP_WIN
 #include <unistd.h>
 #endif
 #include "mozilla/ArrayUtils.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/XMLHttpRequestUploadBinding.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/LoadInfo.h"
 #include "mozilla/MemoryReporting.h"
 #include "nsDOMBlobBuilder.h"
 #include "nsIDOMDocument.h"
 #include "mozilla/dom/ProgressEvent.h"
@@ -51,17 +52,16 @@
 #include "nsIPromptFactory.h"
 #include "nsIWindowWatcher.h"
 #include "nsIConsoleService.h"
 #include "nsIChannelPolicy.h"
 #include "nsChannelPolicy.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsAsyncRedirectVerifyHelper.h"
 #include "nsStringBuffer.h"
-#include "nsDOMFile.h"
 #include "nsIFileChannel.h"
 #include "mozilla/Telemetry.h"
 #include "jsfriendapi.h"
 #include "GeckoProfiler.h"
 #include "mozilla/dom/EncodingUtils.h"
 #include "nsIUnicodeDecoder.h"
 #include "mozilla/dom/XMLHttpRequestBinding.h"
 #include "mozilla/Attributes.h"
@@ -1893,19 +1893,18 @@ bool nsXMLHttpRequest::CreateDOMFile(nsI
   }
 
   if (!file)
     return false;
 
   nsAutoCString contentType;
   mChannel->GetContentType(contentType);
 
-  mDOMFile =
-    DOMFile::CreateFromFile(GetOwner(), file, EmptyString(),
-                            NS_ConvertASCIItoUTF16(contentType));
+  mDOMFile = File::CreateFromFile(GetOwner(), file, EmptyString(),
+                                  NS_ConvertASCIItoUTF16(contentType));
 
   mBlobSet = nullptr;
   NS_ASSERTION(mResponseBody.IsEmpty(), "mResponseBody should be empty");
   return true;
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::OnDataAvailable(nsIRequest *request,
--- a/content/base/src/nsXMLHttpRequest.h
+++ b/content/base/src/nsXMLHttpRequest.h
@@ -37,27 +37,26 @@
 #ifdef Status
 /* Xlib headers insist on this for some reason... Nuke it because
    it'll override our member name */
 #undef Status
 #endif
 
 class AsyncVerifyRedirectCallbackForwarder;
 class BlobSet;
-class nsDOMFile;
 class nsFormData;
 class nsIJARChannel;
 class nsILoadGroup;
 class nsIUnicodeDecoder;
 class nsIJSID;
 
 namespace mozilla {
 
 namespace dom {
-class DOMFile;
+class File;
 }
 
 // A helper for building up an ArrayBuffer object's data
 // before creating the ArrayBuffer itself.  Will do doubling
 // based reallocation, up to an optional maximum growth given.
 //
 // When all the data has been appended, call getArrayBuffer,
 // passing in the JSContext* for which the ArrayBuffer object
@@ -345,17 +344,17 @@ private:
     explicit RequestBody(const mozilla::dom::ArrayBuffer* aArrayBuffer) : mType(ArrayBuffer)
     {
       mValue.mArrayBuffer = aArrayBuffer;
     }
     explicit RequestBody(const mozilla::dom::ArrayBufferView* aArrayBufferView) : mType(ArrayBufferView)
     {
       mValue.mArrayBufferView = aArrayBufferView;
     }
-    explicit RequestBody(mozilla::dom::DOMFile& aBlob) : mType(Blob)
+    explicit RequestBody(mozilla::dom::File& aBlob) : mType(Blob)
     {
       mValue.mBlob = &aBlob;
     }
     explicit RequestBody(nsIDocument* aDocument) : mType(Document)
     {
       mValue.mDocument = aDocument;
     }
     explicit RequestBody(const nsAString& aString) : mType(DOMString)
@@ -379,17 +378,17 @@ private:
       Document,
       DOMString,
       FormData,
       InputStream
     };
     union Value {
       const mozilla::dom::ArrayBuffer* mArrayBuffer;
       const mozilla::dom::ArrayBufferView* mArrayBufferView;
-      mozilla::dom::DOMFile* mBlob;
+      mozilla::dom::File* mBlob;
       nsIDocument* mDocument;
       const nsAString* mString;
       nsFormData* mFormData;
       nsIInputStream* mStream;
     };
 
     Type GetType() const
     {
@@ -435,17 +434,17 @@ public:
   {
     aRv = Send(RequestBody(&aArrayBuffer));
   }
   void Send(const mozilla::dom::ArrayBufferView& aArrayBufferView,
             ErrorResult& aRv)
   {
     aRv = Send(RequestBody(&aArrayBufferView));
   }
-  void Send(mozilla::dom::DOMFile& aBlob, ErrorResult& aRv)
+  void Send(mozilla::dom::File& aBlob, ErrorResult& aRv)
   {
     aRv = Send(RequestBody(aBlob));
   }
   void Send(nsIDocument& aDoc, ErrorResult& aRv)
   {
     aRv = Send(RequestBody(&aDoc));
   }
   void Send(const nsAString& aString, ErrorResult& aRv)
@@ -666,20 +665,20 @@ protected:
   };
 
   void SetResponseType(nsXMLHttpRequest::ResponseTypeEnum aType, ErrorResult& aRv);
 
   ResponseTypeEnum mResponseType;
 
   // It is either a cached blob-response from the last call to GetResponse,
   // but is also explicitly set in OnStopRequest.
-  nsRefPtr<mozilla::dom::DOMFile> mResponseBlob;
+  nsRefPtr<mozilla::dom::File> mResponseBlob;
   // Non-null only when we are able to get a os-file representation of the
   // response, i.e. when loading from a file.
-  nsRefPtr<mozilla::dom::DOMFile> mDOMFile;
+  nsRefPtr<mozilla::dom::File> mDOMFile;
   // We stream data to mBlobSet when response type is "blob" or "moz-blob"
   // and mDOMFile is null.
   nsAutoPtr<BlobSet> mBlobSet;
 
   nsString mOverrideMimeType;
 
   /**
    * The notification callbacks the channel had when Send() was
--- a/content/base/test/chrome/test_bug914381.html
+++ b/content/base/test/chrome/test_bug914381.html
@@ -28,17 +28,17 @@ function createFileWithData(fileData) {
   outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
                  0666, 0);
   outStream.write(fileData, fileData.length);
   outStream.close();
 
   return testFile;
 }
 
-/** Test for Bug 914381. DOMFile's created in JS using an nsIFile should allow mozGetFullPathInternal calls to succeed **/
+/** Test for Bug 914381. File's created in JS using an nsIFile should allow mozGetFullPathInternal calls to succeed **/
 var file = createFileWithData("Test bug 914381");
 var f = new File(file);
 is(f.mozFullPathInternal, undefined, "mozFullPathInternal is undefined from js");
 is(f.mozFullPath, file.path, "mozFullPath returns path if created with nsIFile");
 
 f = new File(file.path);
 is(f.mozFullPathInternal, undefined, "mozFullPathInternal is undefined from js");
 is(f.mozFullPath, "", "mozFullPath returns blank if created with a string");
--- a/content/html/content/public/HTMLCanvasElement.h
+++ b/content/html/content/public/HTMLCanvasElement.h
@@ -25,17 +25,17 @@ class CanvasLayer;
 class LayerManager;
 }
 namespace gfx {
 class SourceSurface;
 }
 
 namespace dom {
 
-class DOMFile;
+class File;
 class FileCallback;
 class HTMLCanvasPrintState;
 class PrintCallback;
 
 class HTMLCanvasElement MOZ_FINAL : public nsGenericHTMLElement,
                                     public nsIDOMHTMLCanvasElement
 {
   enum {
@@ -97,19 +97,19 @@ public:
   bool MozOpaque() const
   {
     return GetBoolAttr(nsGkAtoms::moz_opaque);
   }
   void SetMozOpaque(bool aValue, ErrorResult& aRv)
   {
     SetHTMLBoolAttr(nsGkAtoms::moz_opaque, aValue, aRv);
   }
-  already_AddRefed<DOMFile> MozGetAsFile(const nsAString& aName,
-                                         const nsAString& aType,
-                                         ErrorResult& aRv);
+  already_AddRefed<File> MozGetAsFile(const nsAString& aName,
+                                      const nsAString& aType,
+                                      ErrorResult& aRv);
   already_AddRefed<nsISupports> MozGetIPCContext(const nsAString& aContextId,
                                                  ErrorResult& aRv)
   {
     nsCOMPtr<nsISupports> context;
     aRv = MozGetIPCContext(aContextId, getter_AddRefs(context));
     return context.forget();
   }
   void MozFetchAsStream(nsIInputStreamCallback* aCallback,
--- a/content/html/content/src/HTMLCanvasElement.cpp
+++ b/content/html/content/src/HTMLCanvasElement.cpp
@@ -7,28 +7,28 @@
 
 #include "ImageEncoder.h"
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "Layers.h"
 #include "mozilla/Base64.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/dom/CanvasRenderingContext2D.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/HTMLCanvasElementBinding.h"
 #include "mozilla/dom/UnionTypes.h"
 #include "mozilla/dom/MouseEvent.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/gfx/Rect.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
 #include "nsAttrValueInlines.h"
 #include "nsContentUtils.h"
 #include "nsDisplayList.h"
-#include "nsDOMFile.h"
 #include "nsDOMJSUtils.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsITimer.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsIXPConnect.h"
 #include "nsJSUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsMathUtils.h"
@@ -544,28 +544,28 @@ HTMLCanvasElement::ToBlob(JSContext* aCx
   class EncodeCallback : public EncodeCompleteCallback
   {
   public:
     EncodeCallback(nsIGlobalObject* aGlobal, FileCallback* aCallback)
       : mGlobal(aGlobal)
       , mFileCallback(aCallback) {}
 
     // This is called on main thread.
-    nsresult ReceiveBlob(already_AddRefed<DOMFile> aBlob)
+    nsresult ReceiveBlob(already_AddRefed<File> aBlob)
     {
-      nsRefPtr<DOMFile> blob = aBlob;
+      nsRefPtr<File> blob = aBlob;
       uint64_t size;
       nsresult rv = blob->GetSize(&size);
       if (NS_SUCCEEDED(rv)) {
         AutoJSAPI jsapi;
         jsapi.Init(mGlobal);
         JS_updateMallocCounter(jsapi.cx(), size);
       }
 
-      nsRefPtr<DOMFile> newBlob = new DOMFile(mGlobal, blob->Impl());
+      nsRefPtr<File> newBlob = new File(mGlobal, blob->Impl());
 
       mozilla::ErrorResult error;
       mFileCallback->Call(*newBlob, error);
 
       mGlobal = nullptr;
       mFileCallback = nullptr;
 
       return error.ErrorCode();
@@ -582,24 +582,24 @@ HTMLCanvasElement::ToBlob(JSContext* aCx
                                        params,
                                        usingCustomParseOptions,
                                        imageBuffer,
                                        format,
                                        GetSize(),
                                        callback);
 }
 
-already_AddRefed<DOMFile>
+already_AddRefed<File>
 HTMLCanvasElement::MozGetAsFile(const nsAString& aName,
                                 const nsAString& aType,
                                 ErrorResult& aRv)
 {
   nsCOMPtr<nsIDOMFile> file;
   aRv = MozGetAsFile(aName, aType, getter_AddRefs(file));
-  nsRefPtr<DOMFile> tmp = static_cast<DOMFile*>(file.get());
+  nsRefPtr<File> tmp = static_cast<File*>(file.get());
   return tmp.forget();
 }
 
 NS_IMETHODIMP
 HTMLCanvasElement::MozGetAsFile(const nsAString& aName,
                                 const nsAString& aType,
                                 nsIDOMFile** aResult)
 {
@@ -635,20 +635,20 @@ HTMLCanvasElement::MozGetAsFileImpl(cons
 
   JSContext* cx = nsContentUtils::GetCurrentJSContext();
   if (cx) {
     JS_updateMallocCounter(cx, imgSize);
   }
 
   nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(OwnerDoc()->GetScopeObject());
 
-  // The DOMFile takes ownership of the buffer
-  nsRefPtr<DOMFile> file =
-    DOMFile::CreateMemoryFile(win, imgData, (uint32_t)imgSize, aName, type,
-                              PR_Now());
+  // The File takes ownership of the buffer
+  nsRefPtr<File> file =
+    File::CreateMemoryFile(win, imgData, (uint32_t)imgSize, aName, type,
+                           PR_Now());
 
   file.forget(aResult);
   return NS_OK;
 }
 
 nsresult
 HTMLCanvasElement::GetContextHelper(const nsAString& aContextId,
                                     nsICanvasRenderingContextInternal **aContext)
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -68,19 +68,19 @@
 
 #include "nsRuleData.h"
 #include <algorithm>
 
 // input type=radio
 #include "nsIRadioGroupContainer.h"
 
 // input type=file
+#include "mozilla/dom/File.h"
 #include "nsIFile.h"
 #include "nsNetUtil.h"
-#include "nsDOMFile.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIContentPrefService.h"
 #include "nsIMIMEService.h"
 #include "nsIObserverService.h"
 #include "nsIPopupWindowManager.h"
 #include "nsGlobalWindow.h"
 
 // input type=image
@@ -231,36 +231,36 @@ class HTMLInputElementState MOZ_FINAL : 
     const nsString& GetValue() {
       return mValue;
     }
 
     void SetValue(const nsAString& aValue) {
       mValue = aValue;
     }
 
-    const nsTArray<nsRefPtr<DOMFile>>& GetFiles() {
+    const nsTArray<nsRefPtr<File>>& GetFiles() {
       return mFiles;
     }
 
-    void SetFiles(const nsTArray<nsRefPtr<DOMFile>>& aFiles) {
+    void SetFiles(const nsTArray<nsRefPtr<File>>& aFiles) {
       mFiles.Clear();
       mFiles.AppendElements(aFiles);
     }
 
     HTMLInputElementState()
       : mValue()
       , mChecked(false)
       , mCheckedSet(false)
     {};
 
   protected:
     ~HTMLInputElementState() {}
 
     nsString mValue;
-    nsTArray<nsRefPtr<DOMFile>> mFiles;
+    nsTArray<nsRefPtr<File>> mFiles;
     bool mChecked;
     bool mCheckedSet;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(HTMLInputElementState, NS_INPUT_ELEMENT_STATE_IID)
 
 NS_IMPL_ISUPPORTS(HTMLInputElementState, HTMLInputElementState)
 
@@ -311,17 +311,17 @@ UploadLastDir::ContentPrefCallback::Hand
   // HandleCompletion is always called (even with HandleError was called),
   // so we don't need to do anything special here.
   return NS_OK;
 }
 
 namespace {
 
 /**
- * This enumerator returns DOMFile objects after wrapping a single
+ * This enumerator returns File objects after wrapping a single
  * nsIFile representing a directory. It enumerates the files under that
  * directory and its subdirectories as a flat list of files, ignoring/skipping
  * over symbolic links.
  *
  * The enumeration involves I/O, so this class must NOT be used on the main
  * thread or else the main thread could be blocked for a very long time.
  *
  * This enumerator does not walk the directory tree breadth-first, but it also
@@ -371,31 +371,30 @@ public:
                "Walking the directory tree involves I/O, so using this "
                "enumerator can block a thread for a long time!");
 
     if (!mNextFile) {
       return NS_ERROR_FAILURE;
     }
 
     // The parent for this object will be set on the main thread.
-    nsRefPtr<DOMFile> domFile = DOMFile::CreateFromFile(nullptr, mNextFile);
+    nsRefPtr<File> domFile = File::CreateFromFile(nullptr, mNextFile);
     nsCString relDescriptor;
     nsresult rv =
       mNextFile->GetRelativeDescriptor(mTopDirsParent, relDescriptor);
     NS_ENSURE_SUCCESS(rv, rv);
     NS_ConvertUTF8toUTF16 path(relDescriptor);
     nsAutoString leafName;
     mNextFile->GetLeafName(leafName);
     MOZ_ASSERT(leafName.Length() <= path.Length());
     int32_t length = path.Length() - leafName.Length();
     MOZ_ASSERT(length >= 0);
     if (length > 0) {
       // Note that we leave the trailing "/" on the path.
-      DOMFileImplFile* fileImpl =
-        static_cast<DOMFileImplFile*>(domFile->Impl());
+      FileImplFile* fileImpl = static_cast<FileImplFile*>(domFile->Impl());
       MOZ_ASSERT(fileImpl);
       fileImpl->SetPath(Substring(path, 0, uint32_t(length)));
     }
     *aResult = domFile.forget().downcast<nsIDOMFile>().take();
     LookupAndCacheNext();
     return NS_OK;
   }
 
@@ -509,26 +508,26 @@ public:
     , mInput(aInput)
     , mTopDir(aTopDir)
     , mFileListLength(0)
     , mCanceled(false)
   {}
 
   NS_IMETHOD Run() {
     if (!NS_IsMainThread()) {
-      // Build up list of DOMFile objects on this dedicated thread:
+      // Build up list of File objects on this dedicated thread:
       nsCOMPtr<nsISimpleEnumerator> iter =
         new DirPickerRecursiveFileEnumerator(mTopDir);
       bool hasMore = true;
       nsCOMPtr<nsISupports> tmp;
       while (NS_SUCCEEDED(iter->HasMoreElements(&hasMore)) && hasMore) {
         iter->GetNext(getter_AddRefs(tmp));
         nsCOMPtr<nsIDOMFile> domFile = do_QueryInterface(tmp);
         MOZ_ASSERT(domFile);
-        mFileList.AppendElement(static_cast<DOMFile*>(domFile.get()));
+        mFileList.AppendElement(static_cast<File*>(domFile.get()));
         mFileListLength = mFileList.Length();
         if (mCanceled) {
           MOZ_ASSERT(!mInput, "This is bad - how did this happen?");
           // There's no point dispatching to the main thread (that doesn't
           // guarantee that we'll be destroyed there).
           return NS_OK;
         }
       }
@@ -548,21 +547,21 @@ public:
 
     mInput->MaybeDispatchProgressEvent(true);        // Last progress event.
     mInput->mDirPickerFileListBuilderTask = nullptr; // Now null out.
 
     if (mCanceled) { // The last progress event may have canceled us
       return NS_OK;
     }
 
-    // Recreate DOMFile with the correct parent object.
+    // Recreate File with the correct parent object.
     nsCOMPtr<nsIGlobalObject> global = mInput->OwnerDoc()->GetScopeObject();
     for (uint32_t i = 0; i < mFileList.Length(); ++i) {
       MOZ_ASSERT(!mFileList[i]->GetParentObject());
-      mFileList[i] = new DOMFile(global, mFileList[i]->Impl());
+      mFileList[i] = new File(global, mFileList[i]->Impl());
     }
 
     // The text control frame (if there is one) isn't going to send a change
     // event because it will think this is done by a script.
     // So, we can safely send one by ourself.
     mInput->SetFiles(mFileList, true);
     nsresult rv =
       nsContentUtils::DispatchTrustedEvent(mInput->OwnerDoc(),
@@ -598,17 +597,17 @@ public:
    * we don't increase the size of HTMLInputElement for something that's rarely
    * used.
    */
   uint32_t mPreviousFileListLength;
 
 private:
   nsRefPtr<HTMLInputElement> mInput;
   nsCOMPtr<nsIFile> mTopDir;
-  nsTArray<nsRefPtr<DOMFile>> mFileList;
+  nsTArray<nsRefPtr<File>> mFileList;
 
   // We access the list length on both threads, so we need the indirection of
   // this atomic member to make the access thread safe:
   mozilla::Atomic<uint32_t> mFileListLength;
 
   mozilla::Atomic<bool> mCanceled;
 };
 
@@ -624,17 +623,17 @@ HTMLInputElement::nsFilePickerShownCallb
 
   mInput->CancelDirectoryPickerScanIfRunning();
 
   int16_t mode;
   mFilePicker->GetMode(&mode);
 
   if (mode == static_cast<int16_t>(nsIFilePicker::modeGetFolder)) {
     // Directory picking is different, since we still need to do more I/O to
-    // build up the list of DOMFile objects. Since this may block for a
+    // build up the list of File objects. Since this may block for a
     // long time, we need to build the list off on another dedicated thread to
     // avoid blocking any other activities that the browser is carrying out.
 
     // The user selected this directory, so we always save this dir, even if
     // no files are found under it.
     nsCOMPtr<nsIFile> pickedDir;
     mFilePicker->GetFile(getter_AddRefs(pickedDir));
 
@@ -659,42 +658,42 @@ HTMLInputElement::nsFilePickerShownCallb
     // dispatching the "change" event.
     mInput->mDirPickerFileListBuilderTask =
       new DirPickerFileListBuilderTask(mInput.get(), pickedDir.get());
     return target->Dispatch(mInput->mDirPickerFileListBuilderTask,
                             NS_DISPATCH_NORMAL);
   }
 
   // Collect new selected filenames
-  nsTArray<nsRefPtr<DOMFile>> newFiles;
+  nsTArray<nsRefPtr<File>> newFiles;
   if (mode == static_cast<int16_t>(nsIFilePicker::modeOpenMultiple)) {
     nsCOMPtr<nsISimpleEnumerator> iter;
     nsresult rv = mFilePicker->GetDomfiles(getter_AddRefs(iter));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!iter) {
       return NS_OK;
     }
 
     nsCOMPtr<nsISupports> tmp;
     bool hasMore = true;
 
     while (NS_SUCCEEDED(iter->HasMoreElements(&hasMore)) && hasMore) {
       iter->GetNext(getter_AddRefs(tmp));
       nsCOMPtr<nsIDOMFile> domFile = do_QueryInterface(tmp);
       MOZ_ASSERT(domFile);
-      newFiles.AppendElement(static_cast<DOMFile*>(domFile.get()));
+      newFiles.AppendElement(static_cast<File*>(domFile.get()));
     }
   } else {
     MOZ_ASSERT(mode == static_cast<int16_t>(nsIFilePicker::modeOpen));
     nsCOMPtr<nsIDOMFile> domFile;
     nsresult rv = mFilePicker->GetDomfile(getter_AddRefs(domFile));
     NS_ENSURE_SUCCESS(rv, rv);
     if (domFile) {
-      newFiles.AppendElement(static_cast<DOMFile*>(domFile.get()));
+      newFiles.AppendElement(static_cast<File*>(domFile.get()));
     }
   }
 
   if (newFiles.IsEmpty()) {
     return NS_OK;
   }
 
   // Store the last used directory using the content pref service:
@@ -940,17 +939,17 @@ HTMLInputElement::InitFilePicker(FilePic
     SetFilePickerFiltersFromAccept(filePicker);
   } else {
     filePicker->AppendFilters(nsIFilePicker::filterAll);
   }
 
   // Set default directry and filename
   nsAutoString defaultName;
 
-  const nsTArray<nsRefPtr<DOMFile>>& oldFiles = GetFilesInternal();
+  const nsTArray<nsRefPtr<File>>& oldFiles = GetFilesInternal();
 
   nsCOMPtr<nsIFilePickerShownCallback> callback =
     new HTMLInputElement::nsFilePickerShownCallback(this, filePicker);
 
   if (!oldFiles.IsEmpty() &&
       aType != FILE_PICKER_DIRECTORY) {
     nsString path;
 
@@ -1720,17 +1719,17 @@ HTMLInputElement::IsValueEmpty() const
   GetValueInternal(value);
 
   return value.IsEmpty();
 }
 
 void
 HTMLInputElement::ClearFiles(bool aSetValueChanged)
 {
-  nsTArray<nsRefPtr<DOMFile>> files;
+  nsTArray<nsRefPtr<File>> files;
   SetFiles(files, aSetValueChanged);
 }
 
 /* static */ Decimal
 HTMLInputElement::StringToDecimal(const nsAString& aValue)
 {
   if (!IsASCII(aValue)) {
     return Decimal::nan();
@@ -2314,17 +2313,17 @@ HTMLInputElement::MozGetFileNameArray(ui
   *aFileNames = ret;
 
   return NS_OK;
 }
 
 void
 HTMLInputElement::MozSetFileNameArray(const Sequence< nsString >& aFileNames)
 {
-  nsTArray<nsRefPtr<DOMFile>> files;
+  nsTArray<nsRefPtr<File>> files;
   for (uint32_t i = 0; i < aFileNames.Length(); ++i) {
     nsCOMPtr<nsIFile> file;
 
     if (StringBeginsWith(aFileNames[i], NS_LITERAL_STRING("file:"),
                          nsASCIICaseInsensitiveStringComparator())) {
       // Converts the URL string into the corresponding nsIFile if possible
       // A local file will be created if the URL string begins with file://
       NS_GetFileFromURLSpec(NS_ConvertUTF16toUTF8(aFileNames[i]),
@@ -2333,17 +2332,17 @@ HTMLInputElement::MozSetFileNameArray(co
 
     if (!file) {
       // this is no "file://", try as local file
       NS_NewLocalFile(aFileNames[i], false, getter_AddRefs(file));
     }
 
     if (file) {
       nsCOMPtr<nsIGlobalObject> global = OwnerDoc()->GetScopeObject();
-      nsRefPtr<DOMFile> domFile = DOMFile::CreateFromFile(global, file);
+      nsRefPtr<File> domFile = File::CreateFromFile(global, file);
       files.AppendElement(domFile);
     } else {
       continue; // Not much we can do if the file doesn't exist
     }
 
   }
 
   SetFiles(files, true);
@@ -2569,17 +2568,17 @@ HTMLInputElement::GetDisplayFileName(nsA
     nsContentUtils::FormatLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
                                           "XFilesSelected", params, value);
   }
 
   aValue = value;
 }
 
 void
-HTMLInputElement::SetFiles(const nsTArray<nsRefPtr<DOMFile>>& aFiles,
+HTMLInputElement::SetFiles(const nsTArray<nsRefPtr<File>>& aFiles,
                            bool aSetValueChanged)
 {
   mFiles.Clear();
   mFiles.AppendElements(aFiles);
 
   AfterSetFiles(aSetValueChanged);
 }
 
@@ -2589,17 +2588,17 @@ HTMLInputElement::SetFiles(nsIDOMFileLis
 {
   nsRefPtr<FileList> files = static_cast<FileList*>(aFiles);
   mFiles.Clear();
 
   if (aFiles) {
     uint32_t listLength;
     aFiles->GetLength(&listLength);
     for (uint32_t i = 0; i < listLength; i++) {
-      nsRefPtr<DOMFile> file = files->Item(i);
+      nsRefPtr<File> file = files->Item(i);
       mFiles.AppendElement(file);
     }
   }
 
   AfterSetFiles(aSetValueChanged);
 }
 
 void
@@ -2789,17 +2788,17 @@ HTMLInputElement::DispatchProgressEvent(
 }
 
 nsresult
 HTMLInputElement::UpdateFileList()
 {
   if (mFileList) {
     mFileList->Clear();
 
-    const nsTArray<nsRefPtr<DOMFile>>& files = GetFilesInternal();
+    const nsTArray<nsRefPtr<File>>& files = GetFilesInternal();
     for (uint32_t i = 0; i < files.Length(); ++i) {
       if (!mFileList->Append(files[i])) {
         return NS_ERROR_FAILURE;
       }
     }
   }
 
   return NS_OK;
@@ -5639,17 +5638,17 @@ HTMLInputElement::SubmitNamesValues(nsFo
   }
 
   //
   // Submit file if its input type=file and this encoding method accepts files
   //
   if (mType == NS_FORM_INPUT_FILE) {
     // Submit files
 
-    const nsTArray<nsRefPtr<DOMFile>>& files = GetFilesInternal();
+    const nsTArray<nsRefPtr<File>>& files = GetFilesInternal();
 
     for (uint32_t i = 0; i < files.Length(); ++i) {
       aFormSubmission->AddNameFilePair(name, files[i], NullString());
     }
 
     if (files.IsEmpty()) {
       // If no file was selected, pretend we had an empty file with an
       // empty filename.
@@ -5887,17 +5886,17 @@ HTMLInputElement::RestoreState(nsPresSta
       case VALUE_MODE_DEFAULT_ON:
         if (inputState->IsCheckedSet()) {
           restoredCheckedState = true;
           DoSetChecked(inputState->GetChecked(), true, true);
         }
         break;
       case VALUE_MODE_FILENAME:
         {
-          const nsTArray<nsRefPtr<DOMFile>>& files = inputState->GetFiles();
+          const nsTArray<nsRefPtr<File>>& files = inputState->GetFiles();
           SetFiles(files, true);
         }
         break;
       case VALUE_MODE_VALUE:
       case VALUE_MODE_DEFAULT:
         if (GetValueMode() == VALUE_MODE_DEFAULT &&
             mType != NS_FORM_INPUT_HIDDEN) {
           break;
@@ -6397,17 +6396,17 @@ HTMLInputElement::IsValueMissing() const
     return false;
   }
 
   switch (GetValueMode()) {
     case VALUE_MODE_VALUE:
       return IsValueEmpty();
     case VALUE_MODE_FILENAME:
     {
-      const nsTArray<nsRefPtr<DOMFile>>& files = GetFilesInternal();
+      const nsTArray<nsRefPtr<File>>& files = GetFilesInternal();
       return files.IsEmpty();
     }
     case VALUE_MODE_DEFAULT_ON:
       // This should not be used for type radio.
       // See the MOZ_ASSERT at the beginning of the method.
       return !mChecked;
     case VALUE_MODE_DEFAULT:
     default:
--- a/content/html/content/src/HTMLInputElement.h
+++ b/content/html/content/src/HTMLInputElement.h
@@ -32,17 +32,17 @@ namespace mozilla {
 
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 
 namespace dom {
 
 class Date;
 class DirPickerFileListBuilderTask;
-class DOMFile;
+class File;
 class FileList;
 
 class UploadLastDir MOZ_FINAL : public nsIObserver, public nsSupportsWeakReference {
 
   ~UploadLastDir() {}
 
 public:
   NS_DECL_ISUPPORTS
@@ -206,22 +206,22 @@ public:
   NS_IMETHOD_(void) UpdatePlaceholderVisibility(bool aNotify) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) GetPlaceholderVisibility() MOZ_OVERRIDE;
   NS_IMETHOD_(void) InitializeKeyboardEventListeners() MOZ_OVERRIDE;
   NS_IMETHOD_(void) OnValueChanged(bool aNotify) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) HasCachedSelection() MOZ_OVERRIDE;
 
   void GetDisplayFileName(nsAString& aFileName) const;
 
-  const nsTArray<nsRefPtr<DOMFile>>& GetFilesInternal() const
+  const nsTArray<nsRefPtr<File>>& GetFilesInternal() const
   {
     return mFiles;
   }
 
-  void SetFiles(const nsTArray<nsRefPtr<DOMFile>>& aFiles, bool aSetValueChanged);
+  void SetFiles(const nsTArray<nsRefPtr<File>>& aFiles, bool aSetValueChanged);
   void SetFiles(nsIDOMFileList* aFiles, bool aSetValueChanged);
 
   // Called when a nsIFilePicker or a nsIColorPicker terminate.
   void PickerClosed();
 
   void SetCheckedChangedInternal(bool aCheckedChanged);
   bool GetCheckedChanged() const {
     return mCheckedChanged;
@@ -1247,17 +1247,17 @@ protected:
    * used when uploading a file. It is vital that this is kept separate from
    * mValue so that it won't be possible to 'leak' the value from a text-input
    * to a file-input. Additionally, the logic for this value is kept as simple
    * as possible to avoid accidental errors where the wrong filename is used.
    * Therefor the list of filenames is always owned by this member, never by
    * the frame. Whenever the frame wants to change the filename it has to call
    * SetFileNames to update this member.
    */
-  nsTArray<nsRefPtr<DOMFile>> mFiles;
+  nsTArray<nsRefPtr<File>> mFiles;
 
   nsRefPtr<FileList>  mFileList;
 
   nsRefPtr<DirPickerFileListBuilderTask> mDirPickerFileListBuilderTask;
 
   nsString mStaticDocFileList;
   
   /** 
--- a/content/media/EncodedBufferCache.cpp
+++ b/content/media/EncodedBufferCache.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "EncodedBufferCache.h"
+#include "mozilla/dom/File.h"
 #include "nsAnonymousTemporaryFile.h"
-#include "nsDOMFile.h"
 #include "prio.h"
 
 namespace mozilla {
 
 void
 EncodedBufferCache::AppendBuffer(nsTArray<uint8_t> & aBuf)
 {
   MutexAutoLock lock(mMutex);
@@ -34,42 +34,42 @@ EncodedBufferCache::AppendBuffer(nsTArra
         NS_WARNING("Failed to write media cache block!");
       }
     }
     mEncodedBuffers.Clear();
   }
 
 }
 
-already_AddRefed<dom::DOMFile>
+already_AddRefed<dom::File>
 EncodedBufferCache::ExtractBlob(nsISupports* aParent,
                                 const nsAString &aContentType)
 {
   MutexAutoLock lock(mMutex);
-  nsRefPtr<dom::DOMFile> blob;
+  nsRefPtr<dom::File> blob;
   if (mTempFileEnabled) {
     // generate new temporary file to write
-    blob = dom::DOMFile::CreateTemporaryFileBlob(aParent, mFD, 0, mDataSize,
-                                                 aContentType);
+    blob = dom::File::CreateTemporaryFileBlob(aParent, mFD, 0, mDataSize,
+                                              aContentType);
     // fallback to memory blob
     mTempFileEnabled = false;
     mDataSize = 0;
     mFD = nullptr;
   } else {
     void* blobData = moz_malloc(mDataSize);
     NS_ASSERTION(blobData, "out of memory!!");
 
     if (blobData) {
       for (uint32_t i = 0, offset = 0; i < mEncodedBuffers.Length(); i++) {
         memcpy((uint8_t*)blobData + offset, mEncodedBuffers.ElementAt(i).Elements(),
                mEncodedBuffers.ElementAt(i).Length());
         offset += mEncodedBuffers.ElementAt(i).Length();
       }
-      blob = dom::DOMFile::CreateMemoryFile(aParent, blobData, mDataSize,
-                                            aContentType);
+      blob = dom::File::CreateMemoryFile(aParent, blobData, mDataSize,
+                                         aContentType);
       mEncodedBuffers.Clear();
     } else
       return nullptr;
   }
   mDataSize = 0;
   return blob.forget();
 }
 
--- a/content/media/EncodedBufferCache.h
+++ b/content/media/EncodedBufferCache.h
@@ -12,17 +12,17 @@
 #include "mozilla/Mutex.h"
 
 struct PRFileDesc;
 class nsIDOMBlob;
 
 namespace mozilla {
 
 namespace dom {
-class DOMFile;
+class File;
 }
 
 class ReentrantMonitor;
 /**
  * Data is moved into a temporary file when it grows beyond
  * the maximal size passed in the Init function.
  * The AppendBuffer and ExtractBlob methods are thread-safe and can be called on
  * different threads at the same time.
@@ -38,17 +38,17 @@ public:
     mTempFileEnabled(false) { }
   ~EncodedBufferCache()
   {
   }
   // Append buffers in cache, check if the queue is too large then switch to write buffer to file system
   // aBuf will append to mEncodedBuffers or temporary File, aBuf also be cleared
   void AppendBuffer(nsTArray<uint8_t> & aBuf);
   // Read all buffer from memory or file System, also Remove the temporary file or clean the buffers in memory.
-  already_AddRefed<dom::DOMFile> ExtractBlob(nsISupports* aParent, const nsAString &aContentType);
+  already_AddRefed<dom::File> ExtractBlob(nsISupports* aParent, const nsAString &aContentType);
 
 private:
   //array for storing the encoded data.
   nsTArray<nsTArray<uint8_t> > mEncodedBuffers;
   // File handle for the temporary file
   PRFileDesc* mFD;
   // Used to protect the mEncodedBuffer for avoiding AppendBuffer/Consume on different thread at the same time.
   Mutex mMutex;
--- a/content/media/MediaRecorder.cpp
+++ b/content/media/MediaRecorder.cpp
@@ -10,21 +10,21 @@
 #include "DOMMediaStream.h"
 #include "EncodedBufferCache.h"
 #include "MediaEncoder.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/AudioStreamTrack.h"
 #include "mozilla/dom/BlobEvent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/RecordErrorEvent.h"
 #include "mozilla/dom/VideoStreamTrack.h"
 #include "nsError.h"
 #include "nsIDocument.h"
-#include "nsIDOMFile.h"
 #include "nsIPrincipal.h"
 #include "nsMimeTypes.h"
 #include "nsProxyRelease.h"
 #include "nsTArray.h"
 
 #ifdef PR_LOGGING
 PRLogModuleInfo* gMediaRecorderLog;
 #define LOG(type, msg) PR_LOG(gMediaRecorderLog, type, msg)
@@ -918,17 +918,17 @@ MediaRecorder::CreateAndDispatchBlobEven
     nsRefPtr<nsIDOMBlob> blob = aBlob;
     return NS_ERROR_DOM_SECURITY_ERR;
   }
   BlobEventInit init;
   init.mBubbles = false;
   init.mCancelable = false;
 
   nsCOMPtr<nsIDOMBlob> blob = aBlob;
-  init.mData = static_cast<DOMFile*>(blob.get());
+  init.mData = static_cast<File*>(blob.get());
 
   nsRefPtr<BlobEvent> event =
     BlobEvent::Constructor(this,
                            NS_LITERAL_STRING("dataavailable"),
                            init);
   event->SetTrusted(true);
   return DispatchDOMEvent(nullptr, event, nullptr, nullptr);
 }
--- a/content/media/imagecapture/CaptureTask.cpp
+++ b/content/media/imagecapture/CaptureTask.cpp
@@ -10,28 +10,28 @@
 #include "mozilla/dom/ImageEncoder.h"
 #include "mozilla/dom/VideoStreamTrack.h"
 #include "gfxUtils.h"
 #include "nsThreadUtils.h"
 
 namespace mozilla {
 
 nsresult
-CaptureTask::TaskComplete(already_AddRefed<dom::DOMFile> aBlob, nsresult aRv)
+CaptureTask::TaskComplete(already_AddRefed<dom::File> aBlob, nsresult aRv)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   DetachStream();
 
   nsresult rv;
-  nsRefPtr<dom::DOMFile> blob(aBlob);
+  nsRefPtr<dom::File> blob(aBlob);
 
   // We have to set the parent because the blob has been generated with a valid one.
   if (blob) {
-    blob = new dom::DOMFile(mImageCapture->GetParentObject(), blob->Impl());
+    blob = new dom::File(mImageCapture->GetParentObject(), blob->Impl());
   }
 
   if (mPrincipalChanged) {
     aRv = NS_ERROR_DOM_SECURITY_ERR;
     IC_LOG("MediaStream principal should not change during TakePhoto().");
   }
 
   if (NS_SUCCEEDED(aRv)) {
@@ -99,19 +99,19 @@ CaptureTask::NotifyQueuedTrackChanges(Me
   }
 
   // Callback for encoding complete, it calls on main thread.
   class EncodeComplete : public dom::EncodeCompleteCallback
   {
   public:
     explicit EncodeComplete(CaptureTask* aTask) : mTask(aTask) {}
 
-    nsresult ReceiveBlob(already_AddRefed<dom::DOMFile> aBlob) MOZ_OVERRIDE
+    nsresult ReceiveBlob(already_AddRefed<dom::File> aBlob) MOZ_OVERRIDE
     {
-      nsRefPtr<dom::DOMFile> blob(aBlob);
+      nsRefPtr<dom::File> blob(aBlob);
       mTask->TaskComplete(blob.forget(), NS_OK);
       mTask = nullptr;
       return NS_OK;
     }
 
   protected:
     nsRefPtr<CaptureTask> mTask;
   };
--- a/content/media/imagecapture/CaptureTask.h
+++ b/content/media/imagecapture/CaptureTask.h
@@ -8,18 +8,18 @@
 #define CAPTURETASK_H
 
 #include "DOMMediaStream.h"
 #include "MediaStreamGraph.h"
 
 namespace mozilla {
 
 namespace dom {
+class File;
 class ImageCapture;
-class DOMFile;
 }
 
 /**
  * CaptureTask retrieves image from MediaStream and encodes the image to jpeg in
  * ImageEncoder. The whole procedures start at AttachStream(), it will add this
  * class into MediaStream and retrieves an image in MediaStreamGraph thread.
  * Once the image is retrieved, it will be sent to ImageEncoder and the encoded
  * blob will be sent out via encoder callback in main thread.
@@ -46,17 +46,17 @@ public:
 
   // CaptureTask methods.
 
   // It is called when aBlob is ready to post back to script in company with
   // aRv == NS_OK. If aRv is not NS_OK, it will post an error event to script.
   //
   // Note:
   //   this function should be called on main thread.
-  nsresult TaskComplete(already_AddRefed<dom::DOMFile> aBlob, nsresult aRv);
+  nsresult TaskComplete(already_AddRefed<dom::File> aBlob, nsresult aRv);
 
   // Add listeners into MediaStream and PrincipalChangeObserver. It should be on
   // main thread only.
   void AttachStream();
 
   // Remove listeners from MediaStream and PrincipalChangeObserver. It should be
   // on main thread only.
   void DetachStream();
--- a/content/media/imagecapture/ImageCapture.cpp
+++ b/content/media/imagecapture/ImageCapture.cpp
@@ -2,21 +2,21 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ImageCapture.h"
 #include "mozilla/dom/BlobEvent.h"
 #include "mozilla/dom/DOMException.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ImageCaptureError.h"
 #include "mozilla/dom/ImageCaptureErrorEvent.h"
 #include "mozilla/dom/ImageCaptureErrorEventBinding.h"
 #include "mozilla/dom/VideoStreamTrack.h"
-#include "nsDOMFile.h"
 #include "nsIDocument.h"
 #include "CaptureTask.h"
 #include "MediaEngine.h"
 
 namespace mozilla {
 
 #ifdef PR_LOGGING
 
@@ -97,19 +97,19 @@ ImageCapture::TakePhotoByMediaEngine()
       mStream->AddPrincipalChangeObserver(this);
     }
 
     void PrincipalChanged(DOMMediaStream* aMediaStream) MOZ_OVERRIDE
     {
       mPrincipalChanged = true;
     }
 
-    nsresult PhotoComplete(already_AddRefed<DOMFile> aBlob) MOZ_OVERRIDE
+    nsresult PhotoComplete(already_AddRefed<File> aBlob) MOZ_OVERRIDE
     {
-      nsRefPtr<DOMFile> blob = aBlob;
+      nsRefPtr<File> blob = aBlob;
 
       if (mPrincipalChanged) {
         return PhotoError(NS_ERROR_DOM_SECURITY_ERR);
       }
       return mImageCapture->PostBlobEvent(blob);
     }
 
     nsresult PhotoError(nsresult aRv) MOZ_OVERRIDE
@@ -167,17 +167,17 @@ ImageCapture::TakePhoto(ErrorResult& aRe
 
     // It adds itself into MediaStreamGraph, so ImageCapture doesn't need to hold
     // the reference.
     task->AttachStream();
   }
 }
 
 nsresult
-ImageCapture::PostBlobEvent(DOMFile* aBlob)
+ImageCapture::PostBlobEvent(File* aBlob)
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!CheckPrincipal()) {
     // Media is not same-origin, don't allow the data out.
     return PostErrorEvent(ImageCaptureError::PHOTO_ERROR, NS_ERROR_DOM_SECURITY_ERR);
   }
 
   BlobEventInit init;
--- a/content/media/imagecapture/ImageCapture.h
+++ b/content/media/imagecapture/ImageCapture.h
@@ -27,17 +27,17 @@ PRLogModuleInfo* GetICLog();
 #ifndef IC_LOG
 #define IC_LOG(...)
 #endif
 
 #endif // PR_LOGGING
 
 namespace dom {
 
-class DOMFile;
+class File;
 class VideoStreamTrack;
 
 /**
  *  Implementation of https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-
  *  capture/ImageCapture.html.
  *  The ImageCapture accepts a VideoStreamTrack as input source. The image will
  *  be sent back as a JPG format via Blob event.
  *
@@ -75,17 +75,17 @@ public:
 
   static already_AddRefed<ImageCapture> Constructor(const GlobalObject& aGlobal,
                                                     VideoStreamTrack& aTrack,
                                                     ErrorResult& aRv);
 
   ImageCapture(VideoStreamTrack* aVideoStreamTrack, nsPIDOMWindow* aOwnerWindow);
 
   // Post a Blob event to script.
-  nsresult PostBlobEvent(DOMFile* aBlob);
+  nsresult PostBlobEvent(File* aBlob);
 
   // Post an error event to script.
   // aErrorCode should be one of error codes defined in ImageCaptureError.h.
   // aReason is the nsresult which maps to a error string in dom/base/domerr.msg.
   nsresult PostErrorEvent(uint16_t aErrorCode, nsresult aReason = NS_OK);
 
   bool CheckPrincipal();
 
--- a/content/media/webrtc/MediaEngine.h
+++ b/content/media/webrtc/MediaEngine.h
@@ -10,17 +10,17 @@
 #include "DOMMediaStream.h"
 #include "MediaStreamGraph.h"
 #include "mozilla/dom/MediaStreamTrackBinding.h"
 #include "mozilla/dom/VideoStreamTrack.h"
 
 namespace mozilla {
 
 namespace dom {
-class DOMFile;
+class File;
 }
 
 struct VideoTrackConstraintsN;
 struct AudioTrackConstraintsN;
 
 /**
  * Abstract interface for managing audio and video devices. Each platform
  * must implement a concrete class that will map these classes and methods
@@ -145,17 +145,17 @@ public:
   // Callback interface for TakePhoto(). Either PhotoComplete() or PhotoError()
   // should be called.
   class PhotoCallback {
   public:
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PhotoCallback)
 
     // aBlob is the image captured by MediaEngineSource. It is
     // called on main thread.
-    virtual nsresult PhotoComplete(already_AddRefed<dom::DOMFile> aBlob) = 0;
+    virtual nsresult PhotoComplete(already_AddRefed<dom::File> aBlob) = 0;
 
     // It is called on main thread. aRv is the error code.
     virtual nsresult PhotoError(nsresult aRv) = 0;
 
   protected:
     virtual ~PhotoCallback() {}
   };
 
--- a/content/media/webrtc/MediaEngineDefault.cpp
+++ b/content/media/webrtc/MediaEngineDefault.cpp
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaEngineDefault.h"
 
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "nsILocalFile.h"
 #include "Layers.h"
 #include "ImageContainer.h"
 #include "ImageTypes.h"
 #include "prmem.h"
 #include "nsContentUtils.h"
 
 #include "nsIFilePicker.h"
@@ -203,17 +203,17 @@ MediaEngineDefaultVideoSource::Snapshot(
   nsCOMPtr<nsIFile> localFile;
   filePicker->GetFile(getter_AddRefs(localFile));
 
   if (!localFile) {
     *aFile = nullptr;
     return NS_OK;
   }
 
-  nsCOMPtr<nsIDOMFile> domFile = dom::DOMFile::CreateFromFile(nullptr, localFile);
+  nsCOMPtr<nsIDOMFile> domFile = dom::File::CreateFromFile(nullptr, localFile);
   domFile.forget(aFile);
   return NS_OK;
 #endif
 }
 
 NS_IMETHODIMP
 MediaEngineDefaultVideoSource::Notify(nsITimer* aTimer)
 {
--- a/content/media/webrtc/MediaEngineWebRTC.h
+++ b/content/media/webrtc/MediaEngineWebRTC.h
@@ -5,20 +5,20 @@
 #ifndef MEDIAENGINEWEBRTC_H_
 #define MEDIAENGINEWEBRTC_H_
 
 #include "prcvar.h"
 #include "prthread.h"
 #include "nsIThread.h"
 #include "nsIRunnable.h"
 
+#include "mozilla/dom/File.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/Monitor.h"
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
 #include "nsThreadUtils.h"
 #include "DOMMediaStream.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsComponentManagerUtils.h"
 #include "nsRefPtrHashtable.h"
 
 #include "VideoUtils.h"
 #include "MediaEngine.h"
--- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp
+++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ -938,21 +938,21 @@ MediaEngineWebRTCVideoSource::OnTakePict
     {
       mCallbacks.SwapElements(aCallbacks);
       mPhoto.AppendElements(aData, aLength);
       mMimeType = aMimeType;
     }
 
     NS_IMETHOD Run()
     {
-      nsRefPtr<dom::DOMFile> blob =
-        dom::DOMFile::CreateMemoryFile(nullptr, mPhoto.Elements(), mPhoto.Length(), mMimeType);
+      nsRefPtr<dom::File> blob =
+        dom::File::CreateMemoryFile(nullptr, mPhoto.Elements(), mPhoto.Length(), mMimeType);
       uint32_t callbackCounts = mCallbacks.Length();
       for (uint8_t i = 0; i < callbackCounts; i++) {
-        nsRefPtr<dom::DOMFile> tempBlob = blob;
+        nsRefPtr<dom::File> tempBlob = blob;
         mCallbacks[i]->PhotoComplete(tempBlob.forget());
       }
       // PhotoCallback needs to dereference on main thread.
       mCallbacks.Clear();
       return NS_OK;
     }
 
     nsTArray<nsRefPtr<PhotoCallback>> mCallbacks;
--- a/dom/archivereader/ArchiveEvent.cpp
+++ b/dom/archivereader/ArchiveEvent.cpp
@@ -125,17 +125,17 @@ ArchiveReaderEvent::ShareMainThread()
 
         // Just to be sure, if something goes wrong, the mimetype is an empty string:
         nsCString type;
         if (NS_SUCCEEDED(GetType(filename, type))) {
           item->SetType(type);
         }
       }
 
-      // This is a nsDOMFile:
+      // This is a File:
       nsRefPtr<nsIDOMFile> file = item->File(mArchiveReader);
       if (file) {
         fileList.AppendElement(file);
       }
     }
   }
 
   mArchiveReader->Ready(fileList, mStatus);
--- a/dom/archivereader/ArchiveEvent.h
+++ b/dom/archivereader/ArchiveEvent.h
@@ -4,19 +4,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_archivereader_domarchiveevent_h__
 #define mozilla_dom_archivereader_domarchiveevent_h__
 
 #include "ArchiveReader.h"
 
+#include "mozilla/dom/File.h"
 #include "nsISeekableStream.h"
 #include "nsIMIMEService.h"
-#include "nsDOMFile.h"
 
 #include "ArchiveReaderCommon.h"
 
 BEGIN_ARCHIVEREADER_NAMESPACE
 
 /**
  * This class contains all the info needed for a single item
  * It must contain the implementation of the File() method.
@@ -30,17 +30,17 @@ public:
 
   // Getter/Setter for the type
   nsCString GetType();
   void SetType(const nsCString& aType);
 
   // Getter for the filename
   virtual nsresult GetFilename(nsString& aFilename) = 0;
 
-  // Generate a DOMFile
+  // Generate a File
   virtual nsIDOMFile* File(ArchiveReader* aArchiveReader) = 0;
 
 protected:
   virtual ~ArchiveItem();
 
   nsCString mType;
 };
 
--- a/dom/archivereader/ArchiveReader.cpp
+++ b/dom/archivereader/ArchiveReader.cpp
@@ -4,32 +4,32 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ArchiveReader.h"
 #include "ArchiveRequest.h"
 #include "ArchiveEvent.h"
 #include "ArchiveZipEvent.h"
 
-#include "nsDOMFile.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 
 #include "mozilla/dom/ArchiveReaderBinding.h"
 #include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/File.h"
+#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/Preferences.h"
-#include "mozilla/dom/EncodingUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 USING_ARCHIVEREADER_NAMESPACE
 
 /* static */ already_AddRefed<ArchiveReader>
 ArchiveReader::Constructor(const GlobalObject& aGlobal,
-                           DOMFile& aBlob,
+                           File& aBlob,
                            const ArchiveReaderOptions& aOptions,
                            ErrorResult& aError)
 {
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
   if (!window) {
     aError.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
@@ -41,17 +41,17 @@ ArchiveReader::Constructor(const GlobalO
     return nullptr;
   }
 
   nsRefPtr<ArchiveReader> reader =
     new ArchiveReader(aBlob, window, encoding);
   return reader.forget();
 }
 
-ArchiveReader::ArchiveReader(DOMFile& aBlob, nsPIDOMWindow* aWindow,
+ArchiveReader::ArchiveReader(File& aBlob, nsPIDOMWindow* aWindow,
                              const nsACString& aEncoding)
   : mBlob(&aBlob)
   , mWindow(aWindow)
   , mStatus(NOT_STARTED)
   , mEncoding(aEncoding)
 {
   MOZ_ASSERT(aWindow);
 }
--- a/dom/archivereader/ArchiveReader.h
+++ b/dom/archivereader/ArchiveReader.h
@@ -14,17 +14,17 @@
 #include "nsCOMArray.h"
 #include "nsIChannel.h"
 #include "nsIDOMFile.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 struct ArchiveReaderOptions;
-class DOMFile;
+class File;
 class GlobalObject;
 } // namespace dom
 } // namespace mozilla
 
 BEGIN_ARCHIVEREADER_NAMESPACE
 
 class ArchiveRequest;
 
@@ -34,20 +34,20 @@ class ArchiveRequest;
 class ArchiveReader MOZ_FINAL : public nsISupports,
                                 public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ArchiveReader)
 
   static already_AddRefed<ArchiveReader>
-  Constructor(const GlobalObject& aGlobal, DOMFile& aBlob,
+  Constructor(const GlobalObject& aGlobal, File& aBlob,
               const ArchiveReaderOptions& aOptions, ErrorResult& aError);
 
-  ArchiveReader(DOMFile& aBlob, nsPIDOMWindow* aWindow,
+  ArchiveReader(File& aBlob, nsPIDOMWindow* aWindow,
                 const nsACString& aEncoding);
 
   nsIDOMWindow* GetParentObject() const
   {
     return mWindow;
   }
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
@@ -71,17 +71,17 @@ private:
   already_AddRefed<ArchiveRequest> GenerateArchiveRequest();
 
   nsresult OpenArchive();
 
   void RequestReady(ArchiveRequest* aRequest);
 
 protected:
   // The archive blob/file
-  nsRefPtr<DOMFile> mBlob;
+  nsRefPtr<File> mBlob;
 
   // The window is needed by the requests
   nsCOMPtr<nsPIDOMWindow> mWindow;
 
   // Are we ready to return data?
   enum {
     NOT_STARTED = 0,
     WORKING,
--- a/dom/archivereader/ArchiveZipEvent.cpp
+++ b/dom/archivereader/ArchiveZipEvent.cpp
@@ -69,27 +69,27 @@ ArchiveZipItem::GetFilename(nsString& aF
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }
 
   aFilename = mFilenameU;
   return NS_OK;
 }
 
-// From zipItem to DOMFile:
+// From zipItem to File:
 nsIDOMFile*
 ArchiveZipItem::File(ArchiveReader* aArchiveReader)
 {
   nsString filename;
 
   if (NS_FAILED(GetFilename(filename))) {
     return nullptr;
   }
 
-  return new DOMFile(aArchiveReader,
+  return new dom::File(aArchiveReader,
     new ArchiveZipFileImpl(filename,
                            NS_ConvertUTF8toUTF16(GetType()),
                            StrToInt32(mCentralStruct.orglen),
                            mCentralStruct, aArchiveReader));
 }
 
 uint32_t
 ArchiveZipItem::StrToInt32(const uint8_t* aStr)
--- a/dom/archivereader/ArchiveZipEvent.h
+++ b/dom/archivereader/ArchiveZipEvent.h
@@ -25,17 +25,17 @@ public:
                  const ZipCentral& aCentralStruct,
                  const nsACString& aEncoding);
 protected:
   virtual ~ArchiveZipItem();
 
 public:
   nsresult GetFilename(nsString& aFilename) MOZ_OVERRIDE;
 
-  // From zipItem to DOMFile:
+  // From zipItem to File:
   virtual nsIDOMFile* File(ArchiveReader* aArchiveReader) MOZ_OVERRIDE;
 
 public: // for the event
   static uint32_t StrToInt32(const uint8_t* aStr);
   static uint16_t StrToInt16(const uint8_t* aStr);
 
 private:
   nsresult ConvertFilename();
--- a/dom/archivereader/ArchiveZipFile.cpp
+++ b/dom/archivereader/ArchiveZipFile.cpp
@@ -2,20 +2,20 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ArchiveZipFile.h"
 #include "ArchiveZipEvent.h"
 
-#include "nsDOMFile.h"
 #include "nsIInputStream.h"
 #include "zlib.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/File.h"
 
 using namespace mozilla::dom;
 USING_ARCHIVEREADER_NAMESPACE
 
 #define ZIP_CHUNK 16384
 
 /**
  * Input stream object for zip files
@@ -393,21 +393,21 @@ ArchiveZipFileImpl::Unlink()
 
 void
 ArchiveZipFileImpl::Traverse(nsCycleCollectionTraversalCallback &cb)
 {
   ArchiveZipFileImpl* tmp = this;
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mArchiveReader);
 }
 
-already_AddRefed<mozilla::dom::DOMFileImpl>
+already_AddRefed<mozilla::dom::FileImpl>
 ArchiveZipFileImpl::CreateSlice(uint64_t aStart,
                                 uint64_t aLength,
                                 const nsAString& aContentType,
                                 ErrorResult& aRv)
 {
-  nsRefPtr<DOMFileImpl> impl =
+  nsRefPtr<FileImpl> impl =
     new ArchiveZipFileImpl(mFilename, mContentType, aStart, mLength, mCentral,
                            mArchiveReader);
   return impl.forget();
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(ArchiveZipFileImpl, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(ArchiveZipFileImpl, FileImpl)
--- a/dom/archivereader/ArchiveZipFile.h
+++ b/dom/archivereader/ArchiveZipFile.h
@@ -3,54 +3,54 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_archivereader_domarchivefile_h__
 #define mozilla_dom_archivereader_domarchivefile_h__
 
 #include "mozilla/Attributes.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 
 #include "ArchiveReader.h"
 
 #include "ArchiveReaderCommon.h"
 #include "zipstruct.h"
 
 BEGIN_ARCHIVEREADER_NAMESPACE
 
 /**
- * ArchiveZipFileImpl to DOMFileImpl
+ * ArchiveZipFileImpl to FileImpl
  */
-class ArchiveZipFileImpl : public DOMFileImplBase
+class ArchiveZipFileImpl : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   ArchiveZipFileImpl(const nsAString& aName,
                      const nsAString& aContentType,
                      uint64_t aLength,
                      ZipCentral& aCentral,
                      ArchiveReader* aReader)
-  : DOMFileImplBase(aName, aContentType, aLength),
+  : FileImplBase(aName, aContentType, aLength),
     mCentral(aCentral),
     mArchiveReader(aReader),
     mFilename(aName)
   {
     NS_ASSERTION(mArchiveReader, "must have a reader");
     MOZ_COUNT_CTOR(ArchiveZipFileImpl);
   }
 
   ArchiveZipFileImpl(const nsAString& aName,
                      const nsAString& aContentType,
                      uint64_t aStart,
                      uint64_t aLength,
                      ZipCentral& aCentral,
                      ArchiveReader* aReader)
-  : DOMFileImplBase(aContentType, aStart, aLength),
+  : FileImplBase(aContentType, aStart, aLength),
     mCentral(aCentral),
     mArchiveReader(aReader),
     mFilename(aName)
   {
     NS_ASSERTION(mArchiveReader, "must have a reader");
     MOZ_COUNT_CTOR(ArchiveZipFileImpl);
   }
 
@@ -66,17 +66,17 @@ public:
   }
 
 protected:
   virtual ~ArchiveZipFileImpl()
   {
     MOZ_COUNT_DTOR(ArchiveZipFileImpl);
   }
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength, const nsAString& aContentType,
               ErrorResult& aRv) MOZ_OVERRIDE;
 
 private: // Data
   ZipCentral mCentral;
   nsRefPtr<ArchiveReader> mArchiveReader;
 
   nsString mFilename;
--- a/dom/base/ImageEncoder.cpp
+++ b/dom/base/ImageEncoder.cpp
@@ -84,18 +84,18 @@ public:
 
   NS_IMETHOD Run()
   {
     nsresult rv = NS_OK;
     MOZ_ASSERT(NS_IsMainThread());
 
     if (!mFailed) {
       // The correct parentObject has to be set by the mEncodeCompleteCallback.
-      nsRefPtr<DOMFile> blob =
-        DOMFile::CreateMemoryFile(nullptr, mImgData, mImgSize, mType);
+      nsRefPtr<File> blob =
+        File::CreateMemoryFile(nullptr, mImgData, mImgSize, mType);
       MOZ_ASSERT(blob);
 
       rv = mEncodeCompleteCallback->ReceiveBlob(blob.forget());
     }
 
     mEncodeCompleteCallback = nullptr;
 
     mEncoderThread->Shutdown();
--- a/dom/base/ImageEncoder.h
+++ b/dom/base/ImageEncoder.h
@@ -2,18 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ImageEncoder_h
 #define ImageEncoder_h
 
 #include "imgIEncoder.h"
-#include "nsDOMFile.h"
 #include "nsError.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/HTMLCanvasElementBinding.h"
 #include "nsLayoutUtils.h"
 #include "nsNetUtil.h"
 #include "nsSize.h"
 
 class nsICanvasRenderingContextInternal;
 
 namespace mozilla {
@@ -110,17 +110,17 @@ private:
  *  The callback interface of ExtractDataAsync and ExtractDataFromLayersImageAsync.
  *  ReceiveBlob() is called on main thread when encoding is complete.
  */
 class EncodeCompleteCallback
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(EncodeCompleteCallback)
 
-  virtual nsresult ReceiveBlob(already_AddRefed<DOMFile> aBlob) = 0;
+  virtual nsresult ReceiveBlob(already_AddRefed<File> aBlob) = 0;
 
 protected:
   virtual ~EncodeCompleteCallback() {}
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/base/MessagePort.cpp
+++ b/dom/base/MessagePort.cpp
@@ -2,22 +2,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MessagePort.h"
 #include "MessageEvent.h"
 #include "mozilla/dom/BlobBinding.h"
 #include "mozilla/dom/Event.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/MessageChannel.h"
 #include "mozilla/dom/MessagePortBinding.h"
 #include "mozilla/dom/MessagePortList.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "nsContentUtils.h"
-#include "nsDOMFile.h"
 #include "nsGlobalWindow.h"
 #include "nsPresContext.h"
 #include "ScriptSettings.h"
 
 #include "nsIDocument.h"
 #include "nsIDOMFileList.h"
 #include "nsIPresShell.h"
 
@@ -105,30 +105,30 @@ PostMessageReadStructuredClone(JSContext
                                void* closure)
 {
   StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(closure);
   NS_ASSERTION(scInfo, "Must have scInfo!");
 
   if (tag == SCTAG_DOM_BLOB) {
     NS_ASSERTION(!data, "Data should be empty");
 
-    // What we get back from the reader is a DOMFileImpl.
-    // From that we create a new DOMFile.
-    DOMFileImpl* blobImpl;
+    // What we get back from the reader is a FileImpl.
+    // From that we create a new File.
+    FileImpl* blobImpl;
     if (JS_ReadBytes(reader, &blobImpl, sizeof(blobImpl))) {
       MOZ_ASSERT(blobImpl);
 
-      // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is
+      // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
       // called because the static analysis thinks dereferencing XPCOM objects
       // can GC (because in some cases it can!), and a return statement with a
       // JSObject* type means that JSObject* is on the stack as a raw pointer
       // while destructors are running.
       JS::Rooted<JS::Value> val(cx);
       {
-        nsRefPtr<DOMFile> blob = new DOMFile(scInfo->mPort->GetParentObject(),
+        nsRefPtr<File> blob = new File(scInfo->mPort->GetParentObject(),
                                              blobImpl);
         if (!WrapNewBindingObject(cx, blob, &val)) {
           return nullptr;
         }
       }
 
       return &val.toObject();
     }
@@ -162,19 +162,19 @@ PostMessageWriteStructuredClone(JSContex
                                 JS::Handle<JSObject*> obj,
                                 void *closure)
 {
   StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(closure);
   NS_ASSERTION(scInfo, "Must have scInfo!");
 
   // See if this is a File/Blob object.
   {
-    DOMFile* blob = nullptr;
+    File* blob = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, obj, blob))) {
-      DOMFileImpl* blobImpl = blob->Impl();
+      FileImpl* blobImpl = blob->Impl();
       if (JS_WriteUint32Pair(writer, SCTAG_DOM_BLOB, 0) &&
           JS_WriteBytes(writer, &blobImpl, sizeof(blobImpl))) {
         scInfo->mEvent->StoreISupports(blobImpl);
         return true;
       }
     }
   }
 
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -8,17 +8,17 @@
 #include "base/basictypes.h"
 
 #include "Navigator.h"
 #include "nsIXULAppInfo.h"
 #include "nsPluginArray.h"
 #include "nsMimeTypeArray.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/dom/DesktopNotification.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "nsGeolocation.h"
 #include "nsIHttpProtocolHandler.h"
 #include "nsIContentPolicy.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsContentPolicyUtils.h"
 #include "nsCrossSiteListenerProxy.h"
 #include "nsISupportsPriority.h"
 #include "nsICachingChannel.h"
@@ -1151,17 +1151,17 @@ Navigator::SendBeacon(const nsAString& a
       if (NS_FAILED(rv)) {
         aRv.Throw(NS_ERROR_FAILURE);
         return false;
       }
       mimeType.AssignLiteral("application/octet-stream");
       in = strStream;
 
     } else if (aData.Value().IsBlob()) {
-      DOMFile& blob = aData.Value().GetAsBlob();
+      File& blob = aData.Value().GetAsBlob();
       rv = blob.GetInternalStream(getter_AddRefs(in));
       if (NS_FAILED(rv)) {
         aRv.Throw(NS_ERROR_FAILURE);
         return false;
       }
       nsAutoString type;
       rv = blob.GetType(type);
       if (NS_FAILED(rv)) {
--- a/dom/base/URL.cpp
+++ b/dom/base/URL.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "URL.h"
 
 #include "nsGlobalWindow.h"
-#include "nsDOMFile.h"
 #include "DOMMediaStream.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/MediaSource.h"
 #include "mozilla/dom/URLBinding.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIIOService.h"
 #include "nsEscape.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
@@ -106,17 +106,17 @@ URL::Constructor(const GlobalObject& aGl
   }
 
   nsRefPtr<URL> url = new URL(uri);
   return url.forget();
 }
 
 void
 URL::CreateObjectURL(const GlobalObject& aGlobal,
-                     DOMFile& aBlob,
+                     File& aBlob,
                      const objectURLOptions& aOptions,
                      nsString& aResult,
                      ErrorResult& aError)
 {
   CreateObjectURLInternal(aGlobal, aBlob.Impl(),
                           NS_LITERAL_CSTRING(BLOBURI_SCHEME), aOptions, aResult,
                           aError);
 }
--- a/dom/base/URL.h
+++ b/dom/base/URL.h
@@ -18,17 +18,17 @@ class nsIURI;
 
 namespace mozilla {
 
 class ErrorResult;
 class DOMMediaStream;
 
 namespace dom {
 
-class DOMFile;
+class File;
 class MediaSource;
 class GlobalObject;
 struct objectURLOptions;
 
 namespace workers {
 class URLProxy;
 }
 
@@ -49,17 +49,17 @@ public:
   static already_AddRefed<URL>
   Constructor(const GlobalObject& aGlobal, const nsAString& aUrl,
               URL& aBase, ErrorResult& aRv);
   static already_AddRefed<URL>
   Constructor(const GlobalObject& aGlobal, const nsAString& aUrl,
               const nsAString& aBase, ErrorResult& aRv);
 
   static void CreateObjectURL(const GlobalObject& aGlobal,
-                              DOMFile& aBlob,
+                              File& aBlob,
                               const objectURLOptions& aOptions,
                               nsString& aResult,
                               ErrorResult& aError);
   static void CreateObjectURL(const GlobalObject& aGlobal,
                               DOMMediaStream& aStream,
                               const objectURLOptions& aOptions,
                               nsString& aResult,
                               ErrorResult& aError);
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -43,21 +43,21 @@
 
 #include "nsViewManager.h"
 
 #include "nsIDOMHTMLCanvasElement.h"
 #include "nsLayoutUtils.h"
 #include "nsComputedDOMStyle.h"
 #include "nsIPresShell.h"
 #include "nsCSSProps.h"
-#include "nsDOMFile.h"
 #include "nsTArrayHelpers.h"
 #include "nsIDocShell.h"
 #include "nsIContentViewer.h"
 #include "mozilla/StyleAnimationValue.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/DOMRect.h"
 #include <algorithm>
 
 #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #endif
 
@@ -2856,17 +2856,17 @@ nsDOMWindowUtils::WrapDOMFile(nsIFile *a
   nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
   NS_ENSURE_STATE(window);
 
   nsPIDOMWindow* innerWindow = window->GetCurrentInnerWindow();
   if (!innerWindow) {
     return NS_ERROR_FAILURE;
   }
 
-  nsRefPtr<DOMFile> file = DOMFile::CreateFromFile(innerWindow, aFile);
+  nsRefPtr<File> file = File::CreateFromFile(innerWindow, aFile);
   file.forget(aDOMFile);
   return NS_OK;
 }
 
 #ifdef DEBUG
 static bool
 CheckLeafLayers(Layer* aLayer, const nsIntPoint& aOffset, nsIntRegion* aCoveredRegion)
 {
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -117,17 +117,16 @@
 #include "nsIContentViewer.h"
 #include "nsIScriptError.h"
 #include "nsIControllers.h"
 #include "nsIControllerContext.h"
 #include "nsGlobalWindowCommands.h"
 #include "nsAutoPtr.h"
 #include "nsContentUtils.h"
 #include "nsCSSProps.h"
-#include "nsIDOMFile.h"
 #include "nsIDOMFileList.h"
 #include "nsIURIFixup.h"
 #ifndef DEBUG
 #include "nsIAppStartup.h"
 #include "nsToolkitCompsCID.h"
 #endif
 #include "nsCDefaultURIFixup.h"
 #include "mozilla/EventDispatcher.h"
@@ -7879,30 +7878,30 @@ PostMessageReadStructuredClone(JSContext
                                void* closure)
 {
   StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(closure);
   NS_ASSERTION(scInfo, "Must have scInfo!");
 
   if (tag == SCTAG_DOM_BLOB) {
     NS_ASSERTION(!data, "Data should be empty");
 
-    // What we get back from the reader is a DOMFileImpl.
-    // From that we create a new DOMFile.
-    DOMFileImpl* blobImpl;
+    // What we get back from the reader is a FileImpl.
+    // From that we create a new File.
+    FileImpl* blobImpl;
     if (JS_ReadBytes(reader, &blobImpl, sizeof(blobImpl))) {
       MOZ_ASSERT(blobImpl);
 
-      // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is
+      // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
       // called because the static analysis thinks dereferencing XPCOM objects
       // can GC (because in some cases it can!), and a return statement with a
       // JSObject* type means that JSObject* is on the stack as a raw pointer
       // while destructors are running.
       JS::Rooted<JS::Value> val(cx);
       {
-        nsRefPtr<DOMFile> blob = new DOMFile(scInfo->window, blobImpl);
+        nsRefPtr<File> blob = new File(scInfo->window, blobImpl);
         if (!WrapNewBindingObject(cx, blob, &val)) {
           return nullptr;
         }
       }
 
       return &val.toObject();
     }
   }
@@ -7935,19 +7934,19 @@ PostMessageWriteStructuredClone(JSContex
                                 JS::Handle<JSObject*> obj,
                                 void *closure)
 {
   StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(closure);
   NS_ASSERTION(scInfo, "Must have scInfo!");
 
   // See if this is a File/Blob object.
   {
-    DOMFile* blob = nullptr;
+    File* blob = nullptr;
     if (scInfo->subsumes && NS_SUCCEEDED(UNWRAP_OBJECT(Blob, obj, blob))) {
-      DOMFileImpl* blobImpl = blob->Impl();
+      FileImpl* blobImpl = blob->Impl();
       if (JS_WriteUint32Pair(writer, SCTAG_DOM_BLOB, 0) &&
           JS_WriteBytes(writer, &blobImpl, sizeof(blobImpl))) {
         scInfo->event->StoreISupports(blobImpl);
         return true;
       }
     }
   }
 
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -132,18 +132,18 @@ DOMInterfaces = {
     },
 },
 
 'BarProp': {
     'headerFile': 'mozilla/dom/BarProps.h',
 },
 
 'Blob': {
-    'nativeType': 'mozilla::dom::DOMFile',
-    'headerFile': 'nsDOMFile.h',
+    'nativeType': 'mozilla::dom::File',
+    'headerFile': 'mozilla/dom/File.h',
 },
 
 'BatteryManager': {
     'nativeType': 'mozilla::dom::battery::BatteryManager',
     'headerFile': 'BatteryManager.h'
 },
 
 'BluetoothAdapter': {
@@ -395,23 +395,18 @@ DOMInterfaces = {
 
 'Exception': {
     'headerFile': 'mozilla/dom/DOMException.h',
     'binaryNames': {
         'message': 'messageMoz',
     },
 },
 
-'File': {
-    'nativeType': 'mozilla::dom::DOMFile',
-    'headerFile': 'nsDOMFile.h',
-},
-
 'FileList': {
-    'headerFile': 'nsDOMFile.h',
+    'headerFile': 'mozilla/dom/File.h',
 },
 
 'FileReader': {
     'nativeType': 'nsDOMFileReader',
     'implicitJSContext': [ 'readAsArrayBuffer' ],
 },
 
 'FileReaderSync': {
--- a/dom/bluetooth/BluetoothAdapter.cpp
+++ b/dom/bluetooth/BluetoothAdapter.cpp
@@ -3,25 +3,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/basictypes.h"
 #include "nsDOMClassInfo.h"
 #include "nsTArrayHelpers.h"
 #include "DOMRequest.h"
-#include "nsDOMFile.h"
 #include "nsThreadUtils.h"
 
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/dom/BluetoothAdapterBinding.h"
 #include "mozilla/dom/BluetoothDeviceEvent.h"
 #include "mozilla/dom/BluetoothDiscoveryStateChangedEvent.h"
 #include "mozilla/dom/BluetoothStatusChangedEvent.h"
 #include "mozilla/dom/ContentChild.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/LazyIdleThread.h"
 
 #include "BluetoothAdapter.h"
 #include "BluetoothDevice.h"
 #include "BluetoothReplyRunnable.h"
 #include "BluetoothService.h"
 #include "BluetoothUtils.h"
@@ -766,17 +766,17 @@ BluetoothAdapter::IsConnected(const uint
   }
   bs->IsConnected(aServiceUuid, results);
 
   return request.forget();
 }
 
 already_AddRefed<DOMRequest>
 BluetoothAdapter::SendFile(const nsAString& aDeviceAddress,
-                           DOMFile& aBlob, ErrorResult& aRv)
+                           File& aBlob, ErrorResult& aRv)
 {
   nsCOMPtr<nsPIDOMWindow> win = GetOwner();
   if (!win) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsRefPtr<DOMRequest> request = new DOMRequest(win);
--- a/dom/bluetooth/BluetoothAdapter.h
+++ b/dom/bluetooth/BluetoothAdapter.h
@@ -10,17 +10,17 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "BluetoothCommon.h"
 #include "BluetoothPropertyContainer.h"
 #include "nsCOMPtr.h"
 
 namespace mozilla {
 namespace dom {
-class DOMFile;
+class File;
 class DOMRequest;
 struct MediaMetaData;
 struct MediaPlayStatus;
 }
 }
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -129,17 +129,17 @@ public:
   already_AddRefed<DOMRequest>
     IsConnected(const uint16_t aServiceUuid,
                 ErrorResult& aRv);
 
   already_AddRefed<DOMRequest>
     GetConnectedDevices(uint16_t aServiceUuid, ErrorResult& aRv);
 
   already_AddRefed<DOMRequest>
-    SendFile(const nsAString& aDeviceAddress, DOMFile& aBlob,
+    SendFile(const nsAString& aDeviceAddress, File& aBlob,
              ErrorResult& aRv);
   already_AddRefed<DOMRequest>
     StopSendingFile(const nsAString& aDeviceAddress, ErrorResult& aRv);
   already_AddRefed<DOMRequest>
     ConfirmReceivingFile(const nsAString& aDeviceAddress, bool aConfirmation,
                          ErrorResult& aRv);
 
   already_AddRefed<DOMRequest> ConnectSco(ErrorResult& aRv);
--- a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp
@@ -10,22 +10,22 @@
 #include "BluetoothService.h"
 #include "BluetoothSocket.h"
 #include "BluetoothUtils.h"
 #include "BluetoothUuid.h"
 #include "ObexBase.h"
 
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/dom/ipc/BlobParent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "nsAutoPtr.h"
 #include "nsCExternalHandlerService.h"
-#include "nsDOMFile.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIFile.h"
 #include "nsIInputStream.h"
 #include "nsIMIMEService.h"
 #include "nsIOutputStream.h"
 #include "nsIVolumeService.h"
 #include "nsNetUtil.h"
@@ -345,18 +345,18 @@ BluetoothOppManager::StartSendingNextFil
 }
 
 bool
 BluetoothOppManager::SendFile(const nsAString& aDeviceAddress,
                               BlobParent* aActor)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
-  nsRefPtr<DOMFileImpl> impl = aActor->GetBlobImpl();
-  nsCOMPtr<nsIDOMBlob> blob = new DOMFile(nullptr, impl);
+  nsRefPtr<FileImpl> impl = aActor->GetBlobImpl();
+  nsCOMPtr<nsIDOMBlob> blob = new File(nullptr, impl);
 
   return SendFile(aDeviceAddress, blob.get());
 }
 
 bool
 BluetoothOppManager::SendFile(const nsAString& aDeviceAddress,
                               nsIDOMBlob* aBlob)
 {
--- a/dom/bluetooth/bluez/BluetoothOppManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothOppManager.cpp
@@ -9,23 +9,23 @@
 
 #include "BluetoothService.h"
 #include "BluetoothSocket.h"
 #include "BluetoothUtils.h"
 #include "BluetoothUuid.h"
 #include "ObexBase.h"
 
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "nsAutoPtr.h"
 #include "nsCExternalHandlerService.h"
-#include "nsDOMFile.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIFile.h"
 #include "nsIInputStream.h"
 #include "nsIMIMEService.h"
 #include "nsIOutputStream.h"
 #include "nsIVolumeService.h"
 #include "nsNetUtil.h"
@@ -367,18 +367,18 @@ BluetoothOppManager::StartSendingNextFil
 }
 
 bool
 BluetoothOppManager::SendFile(const nsAString& aDeviceAddress,
                               BlobParent* aActor)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
-  nsRefPtr<DOMFileImpl> impl = aActor->GetBlobImpl();
-  nsCOMPtr<nsIDOMBlob> blob = new DOMFile(nullptr, impl);
+  nsRefPtr<FileImpl> impl = aActor->GetBlobImpl();
+  nsCOMPtr<nsIDOMBlob> blob = new File(nullptr, impl);
 
   return SendFile(aDeviceAddress, blob.get());
 }
 
 bool
 BluetoothOppManager::SendFile(const nsAString& aDeviceAddress,
                               nsIDOMBlob* aBlob)
 {
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -5,27 +5,27 @@
 #include "DOMCameraControl.h"
 #include "base/basictypes.h"
 #include "nsCOMPtr.h"
 #include "nsDOMClassInfo.h"
 #include "nsHashPropertyBag.h"
 #include "nsThread.h"
 #include "DeviceStorage.h"
 #include "DeviceStorageFileDescriptor.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/MediaManager.h"
 #include "mozilla/Services.h"
 #include "mozilla/unused.h"
 #include "nsIAppsService.h"
 #include "nsIObserverService.h"
 #include "nsIDOMDeviceStorage.h"
 #include "nsIDOMEventListener.h"
 #include "nsIScriptSecurityManager.h"
-#include "nsDOMFile.h"
 #include "Navigator.h"
 #include "nsXULAppAPI.h"
 #include "DOMCameraManager.h"
 #include "DOMCameraCapabilities.h"
 #include "CameraCommon.h"
 #include "nsGlobalWindow.h"
 #include "CameraPreviewMediaStream.h"
 #include "mozilla/dom/CameraUtilBinding.h"
@@ -1440,17 +1440,17 @@ nsDOMCameraControl::OnTakePictureComplet
   MOZ_ASSERT(aPicture);
 
   nsRefPtr<Promise> promise = mTakePicturePromise.forget();
   if (promise) {
     nsCOMPtr<nsIDOMBlob> picture = aPicture;
     promise->MaybeResolve(picture);
   }
 
-  nsRefPtr<DOMFile> blob = static_cast<DOMFile*>(aPicture);
+  nsRefPtr<File> blob = static_cast<File*>(aPicture);
 
   nsRefPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb.forget();
   mTakePictureOnErrorCb = nullptr;
   if (cb) {
     ErrorResult ignored;
     cb->Call(*blob, ignored);
   }
 
--- a/dom/camera/DOMCameraControlListener.cpp
+++ b/dom/camera/DOMCameraControlListener.cpp
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMCameraControlListener.h"
 #include "nsThreadUtils.h"
-#include "nsDOMFile.h"
 #include "CameraCommon.h"
 #include "DOMCameraControl.h"
 #include "CameraPreviewMediaStream.h"
 #include "mozilla/dom/CameraManagerBinding.h"
+#include "mozilla/dom/File.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 DOMCameraControlListener::DOMCameraControlListener(nsDOMCameraControl* aDOMCameraControl,
                                                    CameraPreviewMediaStream* aStream)
   : mDOMCameraControl(new nsMainThreadPtrHolder<nsDOMCameraControl>(aDOMCameraControl))
   , mStream(aStream)
@@ -343,20 +343,20 @@ DOMCameraControlListener::OnTakePictureC
       , mLength(aLength)
       , mMimeType(aMimeType)
     { }
 
     void
     RunCallback(nsDOMCameraControl* aDOMCameraControl) MOZ_OVERRIDE
     {
       nsCOMPtr<nsIDOMBlob> picture =
-        DOMFile::CreateMemoryFile(mDOMCameraControl,
-                                  static_cast<void*>(mData),
-                                  static_cast<uint64_t>(mLength),
-                                  mMimeType);
+        File::CreateMemoryFile(mDOMCameraControl,
+                               static_cast<void*>(mData),
+                               static_cast<uint64_t>(mLength),
+                               mMimeType);
       aDOMCameraControl->OnTakePictureComplete(picture);
     }
 
   protected:
     uint8_t* mData;
     uint32_t mLength;
     nsString mMimeType;
   };
--- a/dom/contacts/tests/test_contacts_blobs.html
+++ b/dom/contacts/tests/test_contacts_blobs.html
@@ -88,19 +88,19 @@ var findResult1;
 
 function verifyBlob(blob1, blob2, isLast)
 {
   is(blob1 instanceof Blob, true,
      "blob1 is an instance of DOMBlob");
   is(blob2 instanceof Blob, true,
      "blob2 is an instance of DOMBlob");
   isnot(blob1 instanceof File, true,
-     "blob1 is an instance of DOMFile");
+     "blob1 is an instance of File");
   isnot(blob2 instanceof File, true,
-     "blob2 is an instance of DOMFile");
+     "blob2 is an instance of File");
   ise(blob1.size, blob2.size, "Same size");
   ise(blob1.type, blob2.type, "Same type");
 
   var buffer1;
   var buffer2;
 
   var reader1 = new FileReader();
   reader1.readAsArrayBuffer(blob2);
--- a/dom/devicestorage/DeviceStorageRequestChild.cpp
+++ b/dom/devicestorage/DeviceStorageRequestChild.cpp
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 #include "DeviceStorageRequestChild.h"
 #include "DeviceStorageFileDescriptor.h"
 #include "nsDeviceStorage.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 
 namespace mozilla {
 namespace dom {
 namespace devicestorage {
 
 DeviceStorageRequestChild::DeviceStorageRequestChild()
   : mCallback(nullptr)
@@ -98,18 +98,18 @@ DeviceStorageRequestChild::
       mRequest->FireSuccess(result);
       break;
     }
 
     case DeviceStorageResponseValue::TBlobResponse:
     {
       BlobResponse r = aValue;
       BlobChild* actor = static_cast<BlobChild*>(r.blobChild());
-      nsRefPtr<DOMFileImpl> bloblImpl = actor->GetBlobImpl();
-      nsRefPtr<DOMFile> blob = new DOMFile(mRequest->GetParentObject(), bloblImpl);
+      nsRefPtr<FileImpl> bloblImpl = actor->GetBlobImpl();
+      nsRefPtr<File> blob = new File(mRequest->GetParentObject(), bloblImpl);
 
       AutoJSContext cx;
 
       JS::Rooted<JSObject*> obj(cx, blob->WrapObject(cx));
       MOZ_ASSERT(obj);
 
       JS::Rooted<JS::Value> result(cx, JS::ObjectValue(*obj));
       mRequest->FireSuccess(result);
--- a/dom/devicestorage/DeviceStorageRequestParent.cpp
+++ b/dom/devicestorage/DeviceStorageRequestParent.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DeviceStorageRequestParent.h"
-#include "nsDOMFile.h"
 #include "nsIMIMEService.h"
 #include "nsCExternalHandlerService.h"
 #include "mozilla/unused.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "ContentParent.h"
 #include "nsProxyRelease.h"
 #include "AppProcessChecker.h"
 #include "mozilla/Preferences.h"
 #include "nsNetCID.h"
 
 namespace mozilla {
@@ -39,17 +39,17 @@ DeviceStorageRequestParent::Dispatch()
     case DeviceStorageParams::TDeviceStorageAddParams:
     {
       DeviceStorageAddParams p = mParams;
 
       nsRefPtr<DeviceStorageFile> dsf =
         new DeviceStorageFile(p.type(), p.storageName(), p.relpath());
 
       BlobParent* bp = static_cast<BlobParent*>(p.blobParent());
-      nsRefPtr<DOMFileImpl> blobImpl = bp->GetBlobImpl();
+      nsRefPtr<FileImpl> blobImpl = bp->GetBlobImpl();
 
       nsCOMPtr<nsIInputStream> stream;
       blobImpl->GetInternalStream(getter_AddRefs(stream));
 
       nsRefPtr<CancelableRunnable> r = new WriteFileEvent(this, dsf, stream,
                                                           DEVICE_STORAGE_REQUEST_CREATE);
 
       nsCOMPtr<nsIEventTarget> target
@@ -62,17 +62,17 @@ DeviceStorageRequestParent::Dispatch()
     case DeviceStorageParams::TDeviceStorageAppendParams:
     {
       DeviceStorageAppendParams p = mParams;
 
       nsRefPtr<DeviceStorageFile> dsf =
         new DeviceStorageFile(p.type(), p.storageName(), p.relpath());
 
       BlobParent* bp = static_cast<BlobParent*>(p.blobParent());
-      nsRefPtr<DOMFileImpl> blobImpl = bp->GetBlobImpl();
+      nsRefPtr<FileImpl> blobImpl = bp->GetBlobImpl();
 
       nsCOMPtr<nsIInputStream> stream;
       blobImpl->GetInternalStream(getter_AddRefs(stream));
 
       nsRefPtr<CancelableRunnable> r = new WriteFileEvent(this, dsf, stream,
                                                           DEVICE_STORAGE_REQUEST_APPEND);
 
       nsCOMPtr<nsIEventTarget> target
@@ -517,19 +517,19 @@ nsresult
 DeviceStorageRequestParent::PostBlobSuccessEvent::CancelableRun() {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsString mime;
   CopyASCIItoUTF16(mMimeType, mime);
 
   nsString fullPath;
   mFile->GetFullPath(fullPath);
-  nsRefPtr<DOMFile> blob = new DOMFile(nullptr,
-    new DOMFileImplFile(fullPath, mime, mLength, mFile->mFile,
-                        mLastModificationDate));
+  nsRefPtr<File> blob = new File(nullptr,
+    new FileImplFile(fullPath, mime, mLength, mFile->mFile,
+                     mLastModificationDate));
 
   ContentParent* cp = static_cast<ContentParent*>(mParent->Manager());
   BlobParent* actor = cp->GetOrCreateActorForBlob(blob);
   if (!actor) {
     ErrorResponse response(NS_LITERAL_STRING(POST_ERROR_EVENT_UNKNOWN));
     unused << mParent->Send__delete__(mParent, response);
     return NS_OK;
   }
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -31,17 +31,16 @@
 #include "nsArrayUtils.h"
 #include "nsAutoPtr.h"
 #include "nsGlobalWindow.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIFile.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceDefs.h"
-#include "nsIDOMFile.h"
 #include "nsDOMBlobBuilder.h"
 #include "nsNetUtil.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIPrincipal.h"
 #include "nsJSUtils.h"
 #include "nsContentUtils.h"
 #include "nsXULAppAPI.h"
 #include "DeviceStorageFileDescriptor.h"
@@ -1800,20 +1799,20 @@ nsIFileToJsval(nsPIDOMWindow* aWindow, D
   aFile->GetFullPath(fullPath);
 
   // This check is useful to know if somewhere the DeviceStorageFile
   // has not been properly set. Mimetype is not checked because it can be
   // empty.
   MOZ_ASSERT(aFile->mLength != UINT64_MAX);
   MOZ_ASSERT(aFile->mLastModifiedDate != UINT64_MAX);
 
-  nsCOMPtr<nsIDOMBlob> blob = new DOMFile(aWindow,
-    new DOMFileImplFile(fullPath, aFile->mMimeType,
-                        aFile->mLength, aFile->mFile,
-                        aFile->mLastModifiedDate));
+  nsCOMPtr<nsIDOMBlob> blob = new File(aWindow,
+    new FileImplFile(fullPath, aFile->mMimeType,
+                     aFile->mLength, aFile->mFile,
+                     aFile->mLastModifiedDate));
   return InterfaceToJsval(aWindow, blob, &NS_GET_IID(nsIDOMBlob));
 }
 
 bool
 StringToJsval(nsPIDOMWindow* aWindow, nsAString& aString,
               JS::MutableHandle<JS::Value> result)
 {
   MOZ_ASSERT(NS_IsMainThread());
@@ -2475,17 +2474,17 @@ public:
 private:
   nsRefPtr<DeviceStorageFileDescriptor> mDSFileDescriptor;
   nsRefPtr<DOMRequest> mRequest;
 };
 
 class WriteFileEvent : public nsRunnable
 {
 public:
-  WriteFileEvent(DOMFileImpl* aBlobImpl,
+  WriteFileEvent(FileImpl* aBlobImpl,
                  DeviceStorageFile *aFile,
                  already_AddRefed<DOMRequest> aRequest,
                  int32_t aRequestType)
     : mBlobImpl(aBlobImpl)
     , mFile(aFile)
     , mRequest(aRequest)
     , mRequestType(aRequestType)
   {
@@ -2541,17 +2540,17 @@ public:
     nsString fullPath;
     mFile->GetFullPath(fullPath);
     nsCOMPtr<nsIRunnable> event =
       new PostResultEvent(mRequest.forget(), fullPath);
     return NS_DispatchToMainThread(event);
   }
 
 private:
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
   nsRefPtr<DeviceStorageFile> mFile;
   nsRefPtr<DOMRequest> mRequest;
   int32_t mRequestType;
 };
 
 
 class ReadFileEvent : public nsRunnable
 {
@@ -2910,17 +2909,17 @@ public:
           r = new PostErrorEvent(mRequest.forget(),
                                  POST_ERROR_EVENT_ILLEGAL_TYPE);
           return NS_DispatchToCurrentThread(r);
         }
 
         if (XRE_GetProcessType() != GeckoProcessType_Default) {
           BlobChild* actor
             = ContentChild::GetSingleton()->GetOrCreateActorForBlob(
-              static_cast<DOMFile*>(mBlob.get()));
+              static_cast<File*>(mBlob.get()));
           if (!actor) {
             return NS_ERROR_FAILURE;
           }
 
           DeviceStorageAddParams params;
           params.blobChild() = actor;
           params.type() = mFile->mStorageType;
           params.storageName() = mFile->mStorageName;
@@ -2928,17 +2927,17 @@ public:
 
           PDeviceStorageRequestChild* child
             = new DeviceStorageRequestChild(mRequest, mFile);
           ContentChild::GetSingleton()
             ->SendPDeviceStorageRequestConstructor(child, params);
           return NS_OK;
         }
 
-        DOMFile* blob = static_cast<DOMFile*>(mBlob.get());
+        File* blob = static_cast<File*>(mBlob.get());
         r = new WriteFileEvent(blob->Impl(), mFile, mRequest.forget(),
                                mRequestType);
         break;
       }
 
       case DEVICE_STORAGE_REQUEST_APPEND:
       {
         if (!mBlob || !mFile->mFile) {
@@ -2956,17 +2955,17 @@ public:
           r = new PostErrorEvent(mRequest.forget(),
                                  POST_ERROR_EVENT_ILLEGAL_TYPE);
           return NS_DispatchToCurrentThread(r);
         }
 
         if (XRE_GetProcessType() != GeckoProcessType_Default) {
           BlobChild* actor
             = ContentChild::GetSingleton()->GetOrCreateActorForBlob(
-              static_cast<DOMFile*>(mBlob.get()));
+              static_cast<File*>(mBlob.get()));
           if (!actor) {
             return NS_ERROR_FAILURE;
           }
 
           DeviceStorageAppendParams params;
           params.blobChild() = actor;
           params.type() = mFile->mStorageType;
           params.storageName() = mFile->mStorageName;
@@ -2974,17 +2973,17 @@ public:
 
           PDeviceStorageRequestChild* child
             = new DeviceStorageRequestChild(mRequest, mFile);
           ContentChild::GetSingleton()
             ->SendPDeviceStorageRequestConstructor(child, params);
           return NS_OK;
         }
 
-        DOMFile* blob = static_cast<DOMFile*>(mBlob.get());
+        File* blob = static_cast<File*>(mBlob.get());
         r = new WriteFileEvent(blob->Impl(), mFile, mRequest.forget(),
                                mRequestType);
         break;
       }
 
       case DEVICE_STORAGE_REQUEST_READ:
       case DEVICE_STORAGE_REQUEST_WRITE:
       {
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -298,18 +298,17 @@ DataTransfer::GetFiles(ErrorResult& aRv)
       if (NS_FAILED(rv))
         continue;
 
       nsCOMPtr<nsIFile> file = do_QueryInterface(supports);
 
       if (!file)
         continue;
 
-      nsRefPtr<DOMFile> domFile =
-        DOMFile::CreateFromFile(GetParentObject(), file);
+      nsRefPtr<File> domFile = File::CreateFromFile(GetParentObject(), file);
 
       if (!mFiles->Append(domFile)) {
         aRv.Throw(NS_ERROR_FAILURE);
         return nullptr;
       }
     }
   }
 
--- a/dom/events/DataTransfer.h
+++ b/dom/events/DataTransfer.h
@@ -11,18 +11,18 @@
 #include "nsIVariant.h"
 #include "nsIPrincipal.h"
 #include "nsIDOMDataTransfer.h"
 #include "nsIDOMElement.h"
 #include "nsIDragService.h"
 #include "nsCycleCollectionParticipant.h"
 
 #include "nsAutoPtr.h"
-#include "nsDOMFile.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/File.h"
 
 class nsINode;
 class nsITransferable;
 class nsISupportsArray;
 class nsILoadContext;
 
 namespace mozilla {
 
--- a/dom/filehandle/FileHandle.cpp
+++ b/dom/filehandle/FileHandle.cpp
@@ -8,21 +8,21 @@
 
 #include "AsyncHelper.h"
 #include "FileHelper.h"
 #include "FileRequest.h"
 #include "FileService.h"
 #include "FileStreamWrappers.h"
 #include "MemoryStreams.h"
 #include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/dom/File.h"
 #include "MutableFile.h"
 #include "nsContentUtils.h"
 #include "nsDebug.h"
 #include "nsError.h"
-#include "nsDOMFile.h"
 #include "nsIEventTarget.h"
 #include "nsISeekableStream.h"
 #include "nsNetUtil.h"
 #include "nsString.h"
 #include "nsStringStream.h"
 #include "nsThreadUtils.h"
 #include "xpcpublic.h"
 
@@ -617,20 +617,20 @@ FileHandleBase::GetInputStream(const Arr
   }
 
   *aInputLength = length;
   return stream.forget();
 }
 
 // static
 already_AddRefed<nsIInputStream>
-FileHandleBase::GetInputStream(const DOMFile& aValue, uint64_t* aInputLength,
+FileHandleBase::GetInputStream(const File& aValue, uint64_t* aInputLength,
                                ErrorResult& aRv)
 {
-  DOMFile& file = const_cast<DOMFile&>(aValue);
+  File& file = const_cast<File&>(aValue);
   uint64_t length = file.GetSize(aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIInputStream> stream;
   aRv = file.GetInternalStream(getter_AddRefs(stream));
   if (aRv.Failed()) {
--- a/dom/filehandle/FileHandle.h
+++ b/dom/filehandle/FileHandle.h
@@ -20,17 +20,17 @@
 #include "nsIRunnable.h"
 #include "nsTArray.h"
 
 class nsAString;
 
 namespace mozilla {
 namespace dom {
 
-class DOMFile;
+class File;
 class FileHelper;
 class FileRequestBase;
 class FileService;
 class FinishHelper;
 class MetadataHelper;
 class MutableFileBase;
 
 /**
@@ -235,17 +235,17 @@ protected:
   nsresult
   Finish();
 
   static already_AddRefed<nsIInputStream>
   GetInputStream(const ArrayBuffer& aValue, uint64_t* aInputLength,
                  ErrorResult& aRv);
 
   static already_AddRefed<nsIInputStream>
-  GetInputStream(const DOMFile& aValue, uint64_t* aInputLength,
+  GetInputStream(const File& aValue, uint64_t* aInputLength,
                  ErrorResult& aRv);
 
   static already_AddRefed<nsIInputStream>
   GetInputStream(const nsAString& aValue, uint64_t* aInputLength,
                  ErrorResult& aRv);
 };
 
 class FinishHelper MOZ_FINAL : public nsIRunnable
--- a/dom/filesystem/CreateFileTask.cpp
+++ b/dom/filesystem/CreateFileTask.cpp
@@ -5,34 +5,34 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "CreateFileTask.h"
 
 #include <algorithm>
 
 #include "DOMError.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileSystemBase.h"
 #include "mozilla/dom/FileSystemUtils.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
-#include "nsDOMFile.h"
 #include "nsIFile.h"
 #include "nsNetUtil.h"
 #include "nsStringGlue.h"
 
 namespace mozilla {
 namespace dom {
 
 uint32_t CreateFileTask::sOutputBufferSize = 0;
 
 CreateFileTask::CreateFileTask(FileSystemBase* aFileSystem,
                                const nsAString& aPath,
-                               DOMFile* aBlobData,
+                               File* aBlobData,
                                InfallibleTArray<uint8_t>& aArrayData,
                                bool replace,
                                ErrorResult& aRv)
   : FileSystemTaskBase(aFileSystem)
   , mTargetRealPath(aPath)
   , mReplace(replace)
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
@@ -74,17 +74,17 @@ CreateFileTask::CreateFileTask(FileSyste
   auto& data = aParam.data();
 
   if (data.type() == FileSystemFileDataValue::TArrayOfuint8_t) {
     mArrayData = data;
     return;
   }
 
   BlobParent* bp = static_cast<BlobParent*>(static_cast<PBlobParent*>(data));
-  nsRefPtr<DOMFileImpl> blobImpl = bp->GetBlobImpl();
+  nsRefPtr<FileImpl> blobImpl = bp->GetBlobImpl();
   MOZ_ASSERT(blobImpl, "blobData should not be null.");
 
   nsresult rv = blobImpl->GetInternalStream(getter_AddRefs(mBlobStream));
   NS_WARN_IF(NS_FAILED(rv));
 }
 
 CreateFileTask::~CreateFileTask()
 {
@@ -122,17 +122,17 @@ CreateFileTask::GetRequestParams(const n
   }
   return param;
 }
 
 FileSystemResponseValue
 CreateFileTask::GetSuccessRequestResult() const
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
-  nsRefPtr<DOMFile> file = new DOMFile(mFileSystem->GetWindow(),
+  nsRefPtr<File> file = new File(mFileSystem->GetWindow(),
                                        mTargetFileImpl);
   BlobParent* actor = GetBlobParent(file);
   if (!actor) {
     return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR);
   }
   FileSystemFileResponse response;
   response.blobParent() = actor;
   return response;
@@ -256,17 +256,17 @@ CreateFileTask::Work()
 
     mBlobStream->Close();
     mBlobStream = nullptr;
 
     if (mFileSystem->IsShutdown()) {
       return NS_ERROR_FAILURE;
     }
 
-    mTargetFileImpl = new DOMFileImplFile(file);
+    mTargetFileImpl = new FileImplFile(file);
     return NS_OK;
   }
 
   // Write file content from array data.
 
   uint32_t written;
   rv = bufferedOutputStream->Write(
     reinterpret_cast<char*>(mArrayData.Elements()),
@@ -275,17 +275,17 @@ CreateFileTask::Work()
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   if (mArrayData.Length() != written) {
     return NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR;
   }
 
-  mTargetFileImpl = new DOMFileImplFile(file);
+  mTargetFileImpl = new FileImplFile(file);
   return NS_OK;
 }
 
 void
 CreateFileTask::HandlerCallback()
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
   if (mFileSystem->IsShutdown()) {
@@ -298,18 +298,17 @@ CreateFileTask::HandlerCallback()
     nsRefPtr<DOMError> domError = new DOMError(mFileSystem->GetWindow(),
       mErrorValue);
     mPromise->MaybeRejectBrokenly(domError);
     mPromise = nullptr;
     mBlobData = nullptr;
     return;
   }
 
-  nsCOMPtr<nsIDOMFile> file = new DOMFile(mFileSystem->GetWindow(),
-                                          mTargetFileImpl);
+  nsCOMPtr<nsIDOMFile> file = new File(mFileSystem->GetWindow(), mTargetFileImpl);
   mPromise->MaybeResolve(file);
   mPromise = nullptr;
   mBlobData = nullptr;
 }
 
 void
 CreateFileTask::GetPermissionAccessType(nsCString& aAccess) const
 {
--- a/dom/filesystem/CreateFileTask.h
+++ b/dom/filesystem/CreateFileTask.h
@@ -11,27 +11,27 @@
 #include "nsAutoPtr.h"
 #include "mozilla/ErrorResult.h"
 
 class nsIInputStream;
 
 namespace mozilla {
 namespace dom {
 
-class DOMFile;
-class DOMFileImpl;
+class File;
+class FileImpl;
 class Promise;
 
 class CreateFileTask MOZ_FINAL
   : public FileSystemTaskBase
 {
 public:
   CreateFileTask(FileSystemBase* aFileSystem,
                  const nsAString& aPath,
-                 DOMFile* aBlobData,
+                 File* aBlobData,
                  InfallibleTArray<uint8_t>& aArrayData,
                  bool replace,
                  ErrorResult& aRv);
   CreateFileTask(FileSystemBase* aFileSystem,
                  const FileSystemCreateFileParams& aParam,
                  FileSystemRequestParent* aParent);
 
   virtual
@@ -63,23 +63,23 @@ private:
   void
   GetOutputBufferSize() const;
 
   static uint32_t sOutputBufferSize;
   nsRefPtr<Promise> mPromise;
   nsString mTargetRealPath;
 
   // Not thread-safe and should be released on main thread.
-  nsRefPtr<DOMFile> mBlobData;
+  nsRefPtr<File> mBlobData;
 
   nsCOMPtr<nsIInputStream> mBlobStream;
   InfallibleTArray<uint8_t> mArrayData;
   bool mReplace;
 
-  // This cannot be a DOMFile because this object is created on a different
-  // thread and DOMFile is not thread-safe. Let's use the DOMFileImpl instead.
-  nsRefPtr<DOMFileImpl> mTargetFileImpl;
+  // This cannot be a File because this object is created on a different
+  // thread and File is not thread-safe. Let's use the FileImpl instead.
+  nsRefPtr<FileImpl> mTargetFileImpl;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_CreateFileTask_h
--- a/dom/filesystem/DeviceStorageFileSystem.cpp
+++ b/dom/filesystem/DeviceStorageFileSystem.cpp
@@ -4,21 +4,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/DeviceStorageFileSystem.h"
 
 #include "DeviceStorage.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/Directory.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileSystemUtils.h"
 #include "nsCOMPtr.h"
 #include "nsDebug.h"
 #include "nsDeviceStorage.h"
-#include "nsDOMFile.h"
 #include "nsIFile.h"
 #include "nsPIDOMWindow.h"
 
 namespace mozilla {
 namespace dom {
 
 DeviceStorageFileSystem::DeviceStorageFileSystem(
   const nsAString& aStorageType,
@@ -109,17 +109,17 @@ DeviceStorageFileSystem::GetLocalFile(co
   nsresult rv = NS_NewLocalFile(localPath, false, getter_AddRefs(file));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return nullptr;
   }
   return file.forget();
 }
 
 bool
-DeviceStorageFileSystem::GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const
+DeviceStorageFileSystem::GetRealPath(FileImpl* aFile, nsAString& aRealPath) const
 {
   MOZ_ASSERT(FileSystemUtils::IsParentProcess(),
              "Should be on parent process!");
   MOZ_ASSERT(aFile, "aFile Should not be null.");
 
   aRealPath.Truncate();
 
   nsAutoString filePath;
--- a/dom/filesystem/DeviceStorageFileSystem.h
+++ b/dom/filesystem/DeviceStorageFileSystem.h
@@ -32,17 +32,17 @@ public:
 
   virtual nsPIDOMWindow*
   GetWindow() const MOZ_OVERRIDE;
 
   virtual already_AddRefed<nsIFile>
   GetLocalFile(const nsAString& aRealPath) const MOZ_OVERRIDE;
 
   virtual bool
-  GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const MOZ_OVERRIDE;
+  GetRealPath(FileImpl* aFile, nsAString& aRealPath) const MOZ_OVERRIDE;
 
   virtual const nsAString&
   GetRootName() const MOZ_OVERRIDE;
 
   virtual bool
   IsSafeFile(nsIFile* aFile) const MOZ_OVERRIDE;
 
   virtual bool
--- a/dom/filesystem/Directory.cpp
+++ b/dom/filesystem/Directory.cpp
@@ -96,17 +96,17 @@ Directory::GetName(nsString& aRetval) co
 }
 
 already_AddRefed<Promise>
 Directory::CreateFile(const nsAString& aPath, const CreateFileOptions& aOptions,
                       ErrorResult& aRv)
 {
   nsresult error = NS_OK;
   nsString realPath;
-  nsRefPtr<DOMFile> blobData;
+  nsRefPtr<File> blobData;
   InfallibleTArray<uint8_t> arrayData;
   bool replace = (aOptions.mIfExists == CreateIfExistsMode::Replace);
 
   // Get the file content.
   if (aOptions.mData.WasPassed()) {
     auto& data = aOptions.mData.Value();
     if (data.IsString()) {
       NS_ConvertUTF16toUTF8 str(data.GetAsString());
@@ -188,17 +188,17 @@ Directory::RemoveDeep(const StringOrFile
 }
 
 already_AddRefed<Promise>
 Directory::RemoveInternal(const StringOrFileOrDirectory& aPath, bool aRecursive,
                           ErrorResult& aRv)
 {
   nsresult error = NS_OK;
   nsString realPath;
-  nsRefPtr<DOMFileImpl> file;
+  nsRefPtr<FileImpl> file;
 
   // Check and get the target path.
 
   if (aPath.IsFile()) {
     file = aPath.GetAsFile().Impl();
     goto parameters_check_done;
   }
 
--- a/dom/filesystem/Directory.h
+++ b/dom/filesystem/Directory.h
@@ -5,19 +5,19 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_Directory_h
 #define mozilla_dom_Directory_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/File.h"
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsDOMFile.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
 // Resolve the name collision of Microsoft's API name with macros defined in
 // Windows header files. Undefine the macro of CreateDirectory to avoid
 // Directory#CreateDirectory being replaced by Directory#CreateDirectoryW.
 #ifdef CreateDirectory
 #undef CreateDirectory
--- a/dom/filesystem/FileSystemBase.h
+++ b/dom/filesystem/FileSystemBase.h
@@ -11,17 +11,17 @@
 #include "nsString.h"
 
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class Directory;
-class DOMFileImpl;
+class FileImpl;
 
 class FileSystemBase
 {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileSystemBase)
 public:
 
   // Create file system object from its string representation.
   static already_AddRefed<FileSystemBase>
@@ -68,17 +68,17 @@ public:
   IsSafeDirectory(Directory* aDir) const;
 
   /*
    * Get the real path (absolute DOM path) of the DOM file in the file system.
    * If succeeded, returns true. Otherwise, returns false and set aRealPath to
    * empty string.
    */
   virtual bool
-  GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const = 0;
+  GetRealPath(FileImpl* aFile, nsAString& aRealPath) const = 0;
 
   /*
    * Get the permission name required to access this file system.
    */
   const nsCString&
   GetPermission() const
   {
     return mPermission;
--- a/dom/filesystem/FileSystemTaskBase.cpp
+++ b/dom/filesystem/FileSystemTaskBase.cpp
@@ -3,24 +3,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/FileSystemTaskBase.h"
 
 #include "nsNetUtil.h" // Stream transport service.
 #include "mozilla/dom/ContentChild.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileSystemBase.h"
 #include "mozilla/dom/FileSystemRequestParent.h"
 #include "mozilla/dom/FileSystemUtils.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PContent.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/unused.h"
-#include "nsDOMFile.h"
 
 namespace mozilla {
 namespace dom {
 
 FileSystemTaskBase::FileSystemTaskBase(FileSystemBase* aFileSystem)
   : mErrorValue(NS_OK)
   , mFileSystem(aFileSystem)
 {
@@ -165,17 +165,17 @@ FileSystemTaskBase::GetBlobParent(nsIDOM
   nsString mimeType;
   aFile->GetType(mimeType);
   uint64_t fileSize;
   aFile->GetSize(&fileSize);
   uint64_t lastModifiedDate;
   aFile->GetMozLastModifiedDate(&lastModifiedDate);
 
   ContentParent* cp = static_cast<ContentParent*>(mRequestParent->Manager());
-  return cp->GetOrCreateActorForBlob(static_cast<DOMFile*>(aFile));
+  return cp->GetOrCreateActorForBlob(static_cast<File*>(aFile));
 }
 
 void
 FileSystemTaskBase::SetError(const nsresult& aErrorValue)
 {
   uint16_t module = NS_ERROR_GET_MODULE(aErrorValue);
   if (module == NS_ERROR_MODULE_DOM_FILESYSTEM ||
       module == NS_ERROR_MODULE_DOM_FILE ||
--- a/dom/filesystem/GetFileOrDirectoryTask.cpp
+++ b/dom/filesystem/GetFileOrDirectoryTask.cpp
@@ -4,22 +4,22 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "GetFileOrDirectoryTask.h"
 
 #include "js/Value.h"
 #include "mozilla/dom/Directory.h"
 #include "mozilla/dom/DOMError.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileSystemBase.h"
 #include "mozilla/dom/FileSystemUtils.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
-#include "nsDOMFile.h"
 #include "nsIFile.h"
 #include "nsStringGlue.h"
 
 namespace mozilla {
 namespace dom {
 
 GetFileOrDirectoryTask::GetFileOrDirectoryTask(
   FileSystemBase* aFileSystem,
@@ -77,18 +77,17 @@ GetFileOrDirectoryTask::GetRequestParams
 FileSystemResponseValue
 GetFileOrDirectoryTask::GetSuccessRequestResult() const
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
   if (mIsDirectory) {
     return FileSystemDirectoryResponse(mTargetRealPath);
   }
 
-  nsRefPtr<DOMFile> file = new DOMFile(mFileSystem->GetWindow(),
-                                       mTargetFileImpl);
+  nsRefPtr<File> file = new File(mFileSystem->GetWindow(), mTargetFileImpl);
   BlobParent* actor = GetBlobParent(file);
   if (!actor) {
     return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR);
   }
   FileSystemFileResponse response;
   response.blobParent() = actor;
   return response;
 }
@@ -181,17 +180,17 @@ GetFileOrDirectoryTask::Work()
     // Neither directory or file.
     return NS_ERROR_DOM_FILESYSTEM_TYPE_MISMATCH_ERR;
   }
 
   if (!mFileSystem->IsSafeFile(file)) {
     return NS_ERROR_DOM_SECURITY_ERR;
   }
 
-  mTargetFileImpl = new DOMFileImplFile(file);
+  mTargetFileImpl = new FileImplFile(file);
 
   return NS_OK;
 }
 
 void
 GetFileOrDirectoryTask::HandlerCallback()
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
@@ -210,18 +209,17 @@ GetFileOrDirectoryTask::HandlerCallback(
 
   if (mIsDirectory) {
     nsRefPtr<Directory> dir = new Directory(mFileSystem, mTargetRealPath);
     mPromise->MaybeResolve(dir);
     mPromise = nullptr;
     return;
   }
 
-  nsCOMPtr<nsIDOMFile> file = new DOMFile(mFileSystem->GetWindow(),
-                                          mTargetFileImpl);
+  nsRefPtr<File> file = new File(mFileSystem->GetWindow(), mTargetFileImpl);
   mPromise->MaybeResolve(file);
   mPromise = nullptr;
 }
 
 void
 GetFileOrDirectoryTask::GetPermissionAccessType(nsCString& aAccess) const
 {
   aAccess.AssignLiteral("read");
--- a/dom/filesystem/GetFileOrDirectoryTask.h
+++ b/dom/filesystem/GetFileOrDirectoryTask.h
@@ -9,17 +9,17 @@
 
 #include "mozilla/dom/FileSystemTaskBase.h"
 #include "nsAutoPtr.h"
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 namespace dom {
 
-class DOMFileImpl;
+class FileImpl;
 
 class GetFileOrDirectoryTask MOZ_FINAL
   : public FileSystemTaskBase
 {
 public:
   // If aDirectoryOnly is set, we should ensure that the target is a directory.
   GetFileOrDirectoryTask(FileSystemBase* aFileSystem,
                          const nsAString& aTargetPath,
@@ -54,17 +54,17 @@ protected:
   HandlerCallback() MOZ_OVERRIDE;
 
 private:
   nsRefPtr<Promise> mPromise;
   nsString mTargetRealPath;
   // Whether we get a directory.
   bool mIsDirectory;
 
-  // This cannot be a DOMFile bacause this object is created on a different
-  // thread and DOMFile is not thread-safe. Let's use the DOMFileImpl instead.
-  nsRefPtr<DOMFileImpl> mTargetFileImpl;
+  // This cannot be a File bacause this object is created on a different
+  // thread and File is not thread-safe. Let's use the FileImpl instead.
+  nsRefPtr<FileImpl> mTargetFileImpl;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_GetFileOrDirectory_h
--- a/dom/filesystem/RemoveTask.cpp
+++ b/dom/filesystem/RemoveTask.cpp
@@ -2,31 +2,31 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "RemoveTask.h"
 
 #include "DOMError.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/FileSystemBase.h"
 #include "mozilla/dom/FileSystemUtils.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
-#include "nsDOMFile.h"
 #include "nsIFile.h"
 #include "nsStringGlue.h"
 
 namespace mozilla {
 namespace dom {
 
 RemoveTask::RemoveTask(FileSystemBase* aFileSystem,
                        const nsAString& aDirPath,
-                       DOMFileImpl* aTargetFile,
+                       FileImpl* aTargetFile,
                        const nsAString& aTargetPath,
                        bool aRecursive,
                        ErrorResult& aRv)
   : FileSystemTaskBase(aFileSystem)
   , mDirRealPath(aDirPath)
   , mTargetFileImpl(aTargetFile)
   , mTargetRealPath(aTargetPath)
   , mRecursive(aRecursive)
@@ -87,18 +87,17 @@ FileSystemParams
 RemoveTask::GetRequestParams(const nsString& aFileSystem) const
 {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
   FileSystemRemoveParams param;
   param.filesystem() = aFileSystem;
   param.directory() = mDirRealPath;
   param.recursive() = mRecursive;
   if (mTargetFileImpl) {
-    nsRefPtr<DOMFile> file = new DOMFile(mFileSystem->GetWindow(),
-                                         mTargetFileImpl);
+    nsRefPtr<File> file = new File(mFileSystem->GetWindow(), mTargetFileImpl);
     BlobChild* actor
       = ContentChild::GetSingleton()->GetOrCreateActorForBlob(file);
     if (actor) {
       param.target() = actor;
     }
   } else {
     param.target() = mTargetRealPath;
   }
@@ -126,17 +125,17 @@ RemoveTask::Work()
   MOZ_ASSERT(FileSystemUtils::IsParentProcess(),
              "Only call from parent process!");
   MOZ_ASSERT(!NS_IsMainThread(), "Only call on worker thread!");
 
   if (mFileSystem->IsShutdown()) {
     return NS_ERROR_FAILURE;
   }
 
-  // Get the DOM path if a DOMFile is passed as the target.
+  // Get the DOM path if a File is passed as the target.
   if (mTargetFileImpl) {
     if (!mFileSystem->GetRealPath(mTargetFileImpl, mTargetRealPath)) {
       return NS_ERROR_DOM_SECURITY_ERR;
     }
     if (!FileSystemUtils::IsDescendantPath(mDirRealPath, mTargetRealPath)) {
       return NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR;
     }
   }
--- a/dom/filesystem/RemoveTask.h
+++ b/dom/filesystem/RemoveTask.h
@@ -9,26 +9,26 @@
 
 #include "mozilla/dom/FileSystemTaskBase.h"
 #include "nsAutoPtr.h"
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 namespace dom {
 
-class DOMFileImpl;
+class FileImpl;
 class Promise;
 
 class RemoveTask MOZ_FINAL
   : public FileSystemTaskBase
 {
 public:
   RemoveTask(FileSystemBase* aFileSystem,
              const nsAString& aDirPath,
-             DOMFileImpl* aTargetFile,
+             FileImpl* aTargetFile,
              const nsAString& aTargetPath,
              bool aRecursive,
              ErrorResult& aRv);
   RemoveTask(FileSystemBase* aFileSystem,
              const FileSystemRemoveParams& aParam,
              FileSystemRequestParent* aParent);
 
   virtual
@@ -54,19 +54,19 @@ protected:
   Work() MOZ_OVERRIDE;
 
   virtual void
   HandlerCallback() MOZ_OVERRIDE;
 
 private:
   nsRefPtr<Promise> mPromise;
   nsString mDirRealPath;
-  // This cannot be a DOMFile because this object will be used on a different
-  // thread and DOMFile is not thread-safe. Let's use the DOMFileImpl instead.
-  nsRefPtr<DOMFileImpl> mTargetFileImpl;
+  // This cannot be a File because this object will be used on a different
+  // thread and File is not thread-safe. Let's use the FileImpl instead.
+  nsRefPtr<FileImpl> mTargetFileImpl;
   nsString mTargetRealPath;
   bool mRecursive;
   bool mReturnValue;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -519,20 +519,20 @@ ConvertActorsToBlobs(IDBDatabase* aDatab
 
   if (!blobs.IsEmpty()) {
     const uint32_t count = blobs.Length();
     aFiles.SetCapacity(count);
 
     for (uint32_t index = 0; index < count; index++) {
       BlobChild* actor = static_cast<BlobChild*>(blobs[index]);
 
-      nsRefPtr<DOMFileImpl> blobImpl = actor->GetBlobImpl();
+      nsRefPtr<FileImpl> blobImpl = actor->GetBlobImpl();
       MOZ_ASSERT(blobImpl);
 
-      nsRefPtr<DOMFile> blob = new DOMFile(aDatabase->GetOwner(), blobImpl);
+      nsRefPtr<File> blob = new File(aDatabase->GetOwner(), blobImpl);
 
       nsRefPtr<FileInfo> fileInfo;
       if (!fileInfos.IsEmpty()) {
         fileInfo = dont_AddRef(reinterpret_cast<FileInfo*>(fileInfos[index]));
 
         MOZ_ASSERT(fileInfo);
         MOZ_ASSERT(fileInfo->Id() > 0);
 
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -24,16 +24,17 @@
 #include "mozilla/LazyIdleThread.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/storage.h"
 #include "mozilla/unused.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBCursorParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryRequestParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBRequestParent.h"
@@ -51,22 +52,20 @@
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/InputStreamParams.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "mozilla/ipc/PBackground.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsClassHashtable.h"
 #include "nsCOMPtr.h"
 #include "nsDataHashtable.h"
-#include "nsDOMFile.h"
 #include "nsEscape.h"
 #include "nsHashKeys.h"
 #include "nsNetUtil.h"
 #include "nsIAppsService.h"
-#include "nsIDOMFile.h"
 #include "nsIEventTarget.h"
 #include "nsIFile.h"
 #include "nsIFileURL.h"
 #include "nsIInputStream.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsInterfaceHashtable.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
@@ -3023,17 +3022,17 @@ private:
   RecvClose() MOZ_OVERRIDE;
 };
 
 class DatabaseFile MOZ_FINAL
   : public PBackgroundIDBDatabaseFileParent
 {
   friend class Database;
 
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
   nsRefPtr<FileInfo> mFileInfo;
 
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(mozilla::dom::indexedDB::DatabaseFile);
 
   FileInfo*
   GetFileInfo() const
   {
@@ -3070,17 +3069,17 @@ private:
   explicit DatabaseFile(FileInfo* aFileInfo)
     : mFileInfo(aFileInfo)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aFileInfo);
   }
 
   // Called when receiving from the child.
-  DatabaseFile(DOMFileImpl* aBlobImpl, FileInfo* aFileInfo)
+  DatabaseFile(FileImpl* aBlobImpl, FileInfo* aFileInfo)
     : mBlobImpl(aBlobImpl)
     , mFileInfo(aFileInfo)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aBlobImpl);
     MOZ_ASSERT(aFileInfo);
   }
 
@@ -5008,21 +5007,21 @@ private:
     MOZ_ASSERT(!mWaitingFactoryOp ||
                !mWaitingFactoryOp->HasBlockedDatabases());
 
     MOZ_COUNT_DTOR(DatabaseActorInfo);
   }
 };
 
 class NonMainThreadHackBlobImpl MOZ_FINAL
-  : public DOMFileImplFile
+  : public FileImplFile
 {
 public:
   NonMainThreadHackBlobImpl(nsIFile* aFile, FileInfo* aFileInfo)
-    : DOMFileImplFile(aFile, aFileInfo)
+    : FileImplFile(aFile, aFileInfo)
   {
     // Getting the content type is not currently supported off the main thread.
     // This isn't a problem here because:
     //
     //   1. The real content type is stored in the structured clone data and
     //      that's all that the DOM will see. This blob's data will be updated
     //      during RecvSetMysteryBlobInfo().
     //   2. The nsExternalHelperAppService guesses the content type based only
@@ -5495,17 +5494,17 @@ ConvertBlobsToActors(PBackgroundParent* 
 
     MOZ_ASSERT(NS_SUCCEEDED(nativeFile->Exists(&exists)));
     MOZ_ASSERT(exists);
 
     DebugOnly<bool> isFile;
     MOZ_ASSERT(NS_SUCCEEDED(nativeFile->IsFile(&isFile)));
     MOZ_ASSERT(isFile);
 
-    nsRefPtr<DOMFileImpl> impl =
+    nsRefPtr<FileImpl> impl =
       new NonMainThreadHackBlobImpl(nativeFile, file.mFileInfo);
 
     PBlobParent* actor =
       BackgroundParent::GetOrCreateActorForBlobImpl(aBackgroundActor, impl);
     if (!actor) {
       // This can only fail if the child has crashed.
       IDB_REPORT_INTERNAL_ERR();
       return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
@@ -6235,17 +6234,17 @@ Database::ActorDestroy(ActorDestroyReaso
 }
 
 PBackgroundIDBDatabaseFileParent*
 Database::AllocPBackgroundIDBDatabaseFileParent(PBlobParent* aBlobParent)
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aBlobParent);
 
-  nsRefPtr<DOMFileImpl> blobImpl =
+  nsRefPtr<FileImpl> blobImpl =
     static_cast<BlobParent*>(aBlobParent)->GetBlobImpl();
   MOZ_ASSERT(blobImpl);
 
   nsRefPtr<DatabaseFile> actor;
 
   if (nsRefPtr<FileInfo> fileInfo = blobImpl->GetFileInfo(mFileManager)) {
     // This blob was previously shared with the child.
     actor = new DatabaseFile(fileInfo);
--- a/dom/indexedDB/FileSnapshot.cpp
+++ b/dom/indexedDB/FileSnapshot.cpp
@@ -21,20 +21,20 @@ namespace indexedDB {
 
 // Create as a stored file
 FileImplSnapshot::FileImplSnapshot(const nsAString& aName,
                                    const nsAString& aContentType,
                                    MetadataParameters* aMetadataParams,
                                    nsIFile* aFile,
                                    IDBFileHandle* aFileHandle,
                                    FileInfo* aFileInfo)
-  : DOMFileImplBase(aName,
-                    aContentType,
-                    aMetadataParams->Size(),
-                    aMetadataParams->LastModified())
+  : FileImplBase(aName,
+                 aContentType,
+                 aMetadataParams->Size(),
+                 aMetadataParams->LastModified())
   , mFile(aFile)
   , mFileHandle(aFileHandle)
   , mWholeFile(true)
 {
   AssertSanity();
   MOZ_ASSERT(aMetadataParams);
   MOZ_ASSERT(aMetadataParams->Size() != UINT64_MAX);
   MOZ_ASSERT(aMetadataParams->LastModified() != INT64_MAX);
@@ -45,17 +45,17 @@ FileImplSnapshot::FileImplSnapshot(const
   mFileInfos.AppendElement(aFileInfo);
 }
 
 // Create slice
 FileImplSnapshot::FileImplSnapshot(const FileImplSnapshot* aOther,
                                    uint64_t aStart,
                                    uint64_t aLength,
                                    const nsAString& aContentType)
-  : DOMFileImplBase(aContentType, aOther->mStart + aStart, aLength)
+  : FileImplBase(aContentType, aOther->mStart + aStart, aLength)
   , mFile(aOther->mFile)
   , mFileHandle(aOther->mFileHandle)
   , mWholeFile(false)
 {
   AssertSanity();
   MOZ_ASSERT(aOther);
 
   FileInfo* fileInfo;
@@ -81,17 +81,17 @@ void
 FileImplSnapshot::AssertSanity()
 {
   MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
   MOZ_ASSERT(NS_IsMainThread());
 }
 
 #endif // DEBUG
 
-NS_IMPL_ISUPPORTS_INHERITED0(FileImplSnapshot, DOMFileImpl)
+NS_IMPL_ISUPPORTS_INHERITED0(FileImplSnapshot, FileImpl)
 
 void
 FileImplSnapshot::Unlink()
 {
   AssertSanity();
 
   FileImplSnapshot* tmp = this;
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mFileHandle);
@@ -123,25 +123,25 @@ FileImplSnapshot::GetInternalStream(nsII
                                              aStream);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   return NS_OK;
 }
 
-already_AddRefed<DOMFileImpl>
+already_AddRefed<FileImpl>
 FileImplSnapshot::CreateSlice(uint64_t aStart,
                               uint64_t aLength,
                               const nsAString& aContentType,
                               ErrorResult& aRv)
 {
   AssertSanity();
 
-  nsRefPtr<DOMFileImpl> impl =
+  nsRefPtr<FileImpl> impl =
     new FileImplSnapshot(this, aStart, aLength, aContentType);
 
   return impl.forget();
 }
 
 void
 FileImplSnapshot::GetMozFullPathInternal(nsAString& aFilename,
                                          ErrorResult& aRv)
--- a/dom/indexedDB/FileSnapshot.h
+++ b/dom/indexedDB/FileSnapshot.h
@@ -3,31 +3,31 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_indexeddb_filesnapshot_h__
 #define mozilla_dom_indexeddb_filesnapshot_h__
 
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/File.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
 
 namespace mozilla {
 namespace dom {
 
 class MetadataParameters;
 
 namespace indexedDB {
 
 class IDBFileHandle;
 
 class FileImplSnapshot MOZ_FINAL
-  : public DOMFileImplBase
+  : public FileImplBase
 {
   typedef mozilla::dom::MetadataParameters MetadataParameters;
 
   nsCOMPtr<nsIFile> mFile;
   nsRefPtr<IDBFileHandle> mFileHandle;
 
   bool mWholeFile;
 
@@ -69,17 +69,17 @@ private:
   Unlink() MOZ_OVERRIDE;
 
   virtual void
   Traverse(nsCycleCollectionTraversalCallback &aCb) MOZ_OVERRIDE;
 
   virtual bool
   IsCCed() const MOZ_OVERRIDE;
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart,
               uint64_t aLength,
               const nsAString& aContentType,
               ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual bool
   IsStoredFile() const MOZ_OVERRIDE;
 
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -20,32 +20,31 @@
 #include "mozilla/ErrorResult.h"
 #include "mozilla/EventDispatcher.h"
 #include "MainThreadUtils.h"
 #include "mozilla/Services.h"
 #include "mozilla/storage.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/DOMStringList.h"
 #include "mozilla/dom/DOMStringListBinding.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/IDBDatabaseBinding.h"
 #include "mozilla/dom/IDBObjectStoreBinding.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBSharedTypes.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/nsIRemoteBlob.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/ipc/FileDescriptor.h"
 #include "mozilla/ipc/InputStreamParams.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
 #include "nsIDocument.h"
-#include "nsIDOMFile.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsISupportsPrimitives.h"
 #include "nsThreadUtils.h"
 #include "ProfilerHelpers.h"
 #include "ReportInternalError.h"
 
 // Include this last to avoid path problems on Windows.
@@ -798,34 +797,34 @@ IDBDatabase::AbortTransactions()
       return PL_DHASH_NEXT;
     }
   };
 
   Helper::AbortTransactions(mTransactions);
 }
 
 PBackgroundIDBDatabaseFileChild*
-IDBDatabase::GetOrCreateFileActorForBlob(DOMFile* aBlob)
+IDBDatabase::GetOrCreateFileActorForBlob(File* aBlob)
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(aBlob);
   MOZ_ASSERT(mBackgroundActor);
 
-  // We use the DOMFile's nsIWeakReference as the key to the table because
+  // We use the File's nsIWeakReference as the key to the table because
   // a) it is unique per blob, b) it is reference-counted so that we can
-  // guarantee that it stays alive, and c) it doesn't hold the actual DOMFile
+  // guarantee that it stays alive, and c) it doesn't hold the actual File
   // alive.
   nsCOMPtr<nsIDOMBlob> blob = aBlob;
   nsCOMPtr<nsIWeakReference> weakRef = do_GetWeakReference(blob);
   MOZ_ASSERT(weakRef);
 
   PBackgroundIDBDatabaseFileChild* actor = nullptr;
 
   if (!mFileActors.Get(weakRef, &actor)) {
-    DOMFileImpl* blobImpl = aBlob->Impl();
+    FileImpl* blobImpl = aBlob->Impl();
     MOZ_ASSERT(blobImpl);
 
     if (mReceivedBlobs.GetEntry(weakRef)) {
       // This blob was previously retrieved from the database.
       nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryObject(blobImpl);
       MOZ_ASSERT(remoteBlob);
 
       BlobChild* blobChild = remoteBlob->GetBlobChild();
@@ -907,25 +906,25 @@ IDBDatabase::NoteFinishedFileActor(PBack
       return PL_DHASH_NEXT;
     }
   };
 
   mFileActors.Enumerate(&Helper::Remove, aFileActor);
 }
 
 void
-IDBDatabase::NoteReceivedBlob(DOMFile* aBlob)
+IDBDatabase::NoteReceivedBlob(File* aBlob)
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(aBlob);
   MOZ_ASSERT(mBackgroundActor);
 
 #ifdef DEBUG
   {
-    nsRefPtr<DOMFileImpl> blobImpl = aBlob->Impl();
+    nsRefPtr<FileImpl> blobImpl = aBlob->Impl();
     MOZ_ASSERT(blobImpl);
 
     nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryObject(blobImpl);
     MOZ_ASSERT(remoteBlob);
 
     BlobChild* blobChild = remoteBlob->GetBlobChild();
     MOZ_ASSERT(blobChild);
 
--- a/dom/indexedDB/IDBDatabase.h
+++ b/dom/indexedDB/IDBDatabase.h
@@ -24,17 +24,17 @@ class nsPIDOMWindow;
 
 namespace mozilla {
 
 class ErrorResult;
 class EventChainPostVisitor;
 
 namespace dom {
 
-class DOMFile;
+class File;
 class DOMStringList;
 struct IDBObjectStoreParameters;
 template <typename> class Sequence;
 
 namespace indexedDB {
 
 class BackgroundDatabaseChild;
 class DatabaseSpec;
@@ -169,23 +169,23 @@ public:
 
   void
   UnregisterTransaction(IDBTransaction* aTransaction);
 
   void
   AbortTransactions();
 
   PBackgroundIDBDatabaseFileChild*
-  GetOrCreateFileActorForBlob(DOMFile* aBlob);
+  GetOrCreateFileActorForBlob(File* aBlob);
 
   void
   NoteFinishedFileActor(PBackgroundIDBDatabaseFileChild* aFileActor);
 
   void
-  NoteReceivedBlob(DOMFile* aBlob);
+  NoteReceivedBlob(File* aBlob);
 
   void
   DelayedMaybeExpireFileActors();
 
   // XXX This doesn't really belong here... It's only needed for IDBMutableFile
   //     serialization and should be removed someday.
   nsresult
   GetQuotaInfo(nsACString& aOrigin, PersistenceType* aPersistenceType);
--- a/dom/indexedDB/IDBMutableFile.cpp
+++ b/dom/indexedDB/IDBMutableFile.cpp
@@ -338,25 +338,25 @@ IDBMutableFile::GetFileId() const
 
   return mFileInfo->Id();
 }
 
 already_AddRefed<nsIDOMFile>
 IDBMutableFile::CreateFileObject(IDBFileHandle* aFileHandle,
                                  MetadataParameters* aMetadataParams)
 {
-  nsRefPtr<DOMFileImpl> impl =
+  nsRefPtr<FileImpl> impl =
     new FileImplSnapshot(mName,
                          mType,
                          aMetadataParams,
                          mFile,
                          aFileHandle,
                          mFileInfo);
 
-  nsCOMPtr<nsIDOMFile> fileSnapshot = new DOMFile(GetOwner(), impl);
+  nsCOMPtr<nsIDOMFile> fileSnapshot = new File(GetOwner(), impl);
   return fileSnapshot.forget();
 }
 
 already_AddRefed<DOMRequest>
 IDBMutableFile::GetFile(ErrorResult& aError)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -24,29 +24,28 @@
 #include "KeyPath.h"
 #include "mozilla/Endian.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/Move.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DOMStringList.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/IDBMutableFileBinding.h"
 #include "mozilla/dom/BlobBinding.h"
 #include "mozilla/dom/IDBObjectStoreBinding.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBSharedTypes.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/dom/ipc/nsIRemoteBlob.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
-#include "nsIDOMFile.h"
 #include "ProfilerHelpers.h"
 #include "ReportInternalError.h"
 
 // Include this last to avoid path problems on Windows.
 #include "ActorsChild.h"
 
 namespace mozilla {
 namespace dom {
@@ -54,17 +53,17 @@ namespace indexedDB {
 
 using namespace mozilla::dom::quota;
 using namespace mozilla::ipc;
 
 struct IDBObjectStore::StructuredCloneWriteInfo
 {
   struct BlobOrFileInfo
   {
-    nsRefPtr<DOMFile> mBlob;
+    nsRefPtr<File> mBlob;
     nsRefPtr<FileInfo> mFileInfo;
 
     bool
     operator==(const BlobOrFileInfo& aOther) const
     {
       return this->mBlob == aOther.mBlob && this->mFileInfo == aOther.mFileInfo;
     }
   };
@@ -294,17 +293,17 @@ StructuredCloneWriteCallback(JSContext* 
     newBlobOrFileInfo->mFileInfo.swap(fileInfo);
 
     return true;
   }
 
   MOZ_ASSERT(NS_IsMainThread(), "This can't work off the main thread!");
 
   {
-    DOMFile* blob = nullptr;
+    File* blob = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob))) {
       uint64_t size;
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(blob->GetSize(&size)));
 
       size = NativeEndian::swapToLittleEndian(size);
 
       nsString type;
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(blob->GetType(type)));
@@ -396,17 +395,17 @@ GetAddInfoCallback(JSContext* aCx, void*
                                                 &data->mCloneWriteInfo)) {
     return NS_ERROR_DOM_DATA_CLONE_ERR;
   }
 
   return NS_OK;
 }
 
 BlobChild*
-ActorFromRemoteBlob(DOMFile* aBlob)
+ActorFromRemoteBlob(File* aBlob)
 {
   MOZ_ASSERT(aBlob);
 
   nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(aBlob->Impl());
   if (remoteBlob) {
     BlobChild* actor = remoteBlob->GetBlobChild();
     MOZ_ASSERT(actor);
 
@@ -422,32 +421,32 @@ ActorFromRemoteBlob(DOMFile* aBlob)
 
     return actor;
   }
 
   return nullptr;
 }
 
 bool
-ResolveMysteryFile(DOMFile* aBlob,
+ResolveMysteryFile(File* aBlob,
                    const nsString& aName,
                    const nsString& aContentType,
                    uint64_t aSize,
                    uint64_t aLastModifiedDate)
 {
   BlobChild* actor = ActorFromRemoteBlob(aBlob);
   if (actor) {
     return actor->SetMysteryBlobInfo(aName, aContentType,
                                      aSize, aLastModifiedDate);
   }
   return true;
 }
 
 bool
-ResolveMysteryBlob(DOMFile* aBlob,
+ResolveMysteryBlob(File* aBlob,
                    const nsString& aContentType,
                    uint64_t aSize)
 {
   BlobChild* actor = ActorFromRemoteBlob(aBlob);
   if (actor) {
     return actor->SetMysteryBlobInfo(aContentType, aSize);
   }
   return true;
@@ -605,26 +604,26 @@ public:
                aData.tag == SCTAG_DOM_FILE_WITHOUT_LASTMODIFIEDDATE ||
                aData.tag == SCTAG_DOM_BLOB);
     MOZ_ASSERT(aFile.mFile);
 
     MOZ_ASSERT(NS_IsMainThread(),
                "This wrapping currently only works on the main thread!");
 
     // It can happen that this IDB is chrome code, so there is no parent, but
-    // still we want to set a correct parent for the new DOMFile object.
+    // still we want to set a correct parent for the new File object.
     nsCOMPtr<nsISupports> parent;
     if (aDatabase && aDatabase->GetParentObject()) {
       parent = aDatabase->GetParentObject();
     } else {
       parent  = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
     }
 
     MOZ_ASSERT(parent);
-    nsRefPtr<DOMFile> file = new DOMFile(parent, aFile.mFile->Impl());
+    nsRefPtr<File> file = new File(parent, aFile.mFile->Impl());
 
     if (aData.tag == SCTAG_DOM_BLOB) {
       if (NS_WARN_IF(!ResolveMysteryBlob(aFile.mFile,
                                          aData.type,
                                          aData.size))) {
         return false;
       }
 
--- a/dom/indexedDB/IndexedDatabase.h
+++ b/dom/indexedDB/IndexedDatabase.h
@@ -14,29 +14,29 @@
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 
 class nsIInputStream;
 
 namespace mozilla {
 namespace dom {
 
-class DOMFile;
+class File;
 
 namespace indexedDB {
 
 class FileInfo;
 class IDBDatabase;
 class IDBTransaction;
 class SerializedStructuredCloneReadInfo;
 class SerializedStructuredCloneWriteInfo;
 
 struct StructuredCloneFile
 {
-  nsRefPtr<DOMFile> mFile;
+  nsRefPtr<File> mFile;
   nsRefPtr<FileInfo> mFileInfo;
 
   // In IndexedDatabaseInlines.h
   inline
   StructuredCloneFile();
 
   // In IndexedDatabaseInlines.h
   inline
--- a/dom/indexedDB/IndexedDatabaseInlines.h
+++ b/dom/indexedDB/IndexedDatabaseInlines.h
@@ -8,17 +8,17 @@
 #define IndexedDatabaseInlines_h
 
 #ifndef mozilla_dom_indexeddb_indexeddatabase_h__
 #error Must include IndexedDatabase.h first
 #endif
 
 #include "FileInfo.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBSharedTypes.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "nsIInputStream.h"
 
 namespace mozilla {
 namespace dom {
 namespace indexedDB {
 
 inline
 StructuredCloneFile::StructuredCloneFile()
--- a/dom/indexedDB/IndexedDatabaseManager.h
+++ b/dom/indexedDB/IndexedDatabaseManager.h
@@ -151,17 +151,17 @@ private:
   InvalidateAndRemoveFileManagers(const nsACString& aKey,
                                   nsAutoPtr<FileManagerInfo>& aValue,
                                   void* aUserArg);
 
   // Maintains a list of all file managers per origin. This list isn't
   // protected by any mutex but it is only ever touched on the IO thread.
   nsClassHashtable<nsCStringHashKey, FileManagerInfo> mFileManagerInfos;
 
-  // Lock protecting FileManager.mFileInfos and nsDOMFileBase.mFileInfos
+  // Lock protecting FileManager.mFileInfos and FileImplBase.mFileInfos
   // It's s also used to atomically update FileInfo.mRefCnt, FileInfo.mDBRefCnt
   // and FileInfo.mSliceRefCnt
   mozilla::Mutex mFileMutex;
 
   static bool sIsMainProcess;
   static mozilla::Atomic<bool> sLowDiskSpaceMode;
 };
 
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -11,30 +11,29 @@
 #include "FileDescriptorSetChild.h"
 #include "jsapi.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/unused.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/nsIContentParent.h"
 #include "mozilla/dom/nsIContentChild.h"
 #include "mozilla/dom/PBlobStreamChild.h"
 #include "mozilla/dom/PBlobStreamParent.h"
 #include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "mozilla/ipc/PBackgroundChild.h"
 #include "mozilla/ipc/PBackgroundParent.h"
 #include "mozilla/ipc/PFileDescriptorSetParent.h"
 #include "nsDataHashtable.h"
-#include "nsDOMFile.h"
 #include "nsHashKeys.h"
 #include "nsID.h"
-#include "nsIDOMFile.h"
 #include "nsIInputStream.h"
 #include "nsIIPCSerializableInputStream.h"
 #include "nsIMultiplexInputStream.h"
 #include "nsIRemoteBlob.h"
 #include "nsISeekableStream.h"
 #include "nsIUUIDGenerator.h"
 #include "nsNetCID.h"
 #include "nsServiceManagerUtils.h"
@@ -247,30 +246,30 @@ NS_DEFINE_STATIC_IID_ACCESSOR(IPrivateRe
 // This class exists to keep a blob alive at least as long as its internal
 // stream.
 class BlobInputStreamTether MOZ_FINAL
   : public nsIMultiplexInputStream
   , public nsISeekableStream
   , public nsIIPCSerializableInputStream
 {
   nsCOMPtr<nsIInputStream> mStream;
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
 
   nsIMultiplexInputStream* mWeakMultiplexStream;
   nsISeekableStream* mWeakSeekableStream;
   nsIIPCSerializableInputStream* mWeakSerializableStream;
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_FORWARD_NSIINPUTSTREAM(mStream->)
   NS_FORWARD_SAFE_NSIMULTIPLEXINPUTSTREAM(mWeakMultiplexStream)
   NS_FORWARD_SAFE_NSISEEKABLESTREAM(mWeakSeekableStream)
   NS_FORWARD_SAFE_NSIIPCSERIALIZABLEINPUTSTREAM(mWeakSerializableStream)
 
-  BlobInputStreamTether(nsIInputStream* aStream, DOMFileImpl* aBlobImpl)
+  BlobInputStreamTether(nsIInputStream* aStream, FileImpl* aBlobImpl)
     : mStream(aStream)
     , mBlobImpl(aBlobImpl)
     , mWeakMultiplexStream(nullptr)
     , mWeakSeekableStream(nullptr)
     , mWeakSerializableStream(nullptr)
   {
     MOZ_ASSERT(aStream);
     MOZ_ASSERT(aBlobImpl);
@@ -317,24 +316,24 @@ NS_INTERFACE_MAP_END
 class RemoteInputStream MOZ_FINAL
   : public nsIInputStream
   , public nsISeekableStream
   , public nsIIPCSerializableInputStream
   , public IPrivateRemoteInputStream
 {
   Monitor mMonitor;
   nsCOMPtr<nsIInputStream> mStream;
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
   nsCOMPtr<nsIEventTarget> mEventTarget;
   nsISeekableStream* mWeakSeekableStream;
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  RemoteInputStream(DOMFileImpl* aBlobImpl)
+  RemoteInputStream(FileImpl* aBlobImpl)
     : mMonitor("RemoteInputStream.mMonitor")
     , mBlobImpl(aBlobImpl)
     , mWeakSeekableStream(nullptr)
   {
     MOZ_ASSERT(IsOnOwningThread());
     MOZ_ASSERT(aBlobImpl);
 
     if (!NS_IsMainThread()) {
@@ -402,17 +401,17 @@ public:
   }
 
   NS_IMETHOD
   Close() MOZ_OVERRIDE
   {
     nsresult rv = BlockAndWaitForStream();
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsRefPtr<DOMFileImpl> blobImpl;
+    nsRefPtr<FileImpl> blobImpl;
     mBlobImpl.swap(blobImpl);
 
     rv = mStream->Close();
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
@@ -669,21 +668,21 @@ private:
 
 StaticAutoPtr<BlobParent::IDTable> BlobParent::sIDTable;
 StaticAutoPtr<Mutex> BlobParent::sIDTableMutex;
 
 class BlobParent::IDTableEntry MOZ_FINAL
 {
   const nsID mID;
   const intptr_t mProcessID;
-  const nsRefPtr<DOMFileImpl> mBlobImpl;
+  const nsRefPtr<FileImpl> mBlobImpl;
 
 public:
   static already_AddRefed<IDTableEntry>
-  Create(const nsID& aID, intptr_t aProcessID, DOMFileImpl* aBlobImpl)
+  Create(const nsID& aID, intptr_t aProcessID, FileImpl* aBlobImpl)
   {
     MOZ_ASSERT(aBlobImpl);
 
     DebugOnly<bool> isMutable;
     MOZ_ASSERT(NS_SUCCEEDED(aBlobImpl->GetMutable(&isMutable)));
     MOZ_ASSERT(!isMutable);
 
     return GetOrCreateInternal(aID,
@@ -699,17 +698,17 @@ public:
     return GetOrCreateInternal(aID,
                                aProcessID,
                                nullptr,
                                /* aMayCreate */ false,
                                /* aMayGet */ true);
   }
 
   static already_AddRefed<IDTableEntry>
-  GetOrCreate(const nsID& aID, intptr_t aProcessID, DOMFileImpl* aBlobImpl)
+  GetOrCreate(const nsID& aID, intptr_t aProcessID, FileImpl* aBlobImpl)
   {
     MOZ_ASSERT(aBlobImpl);
 
     DebugOnly<bool> isMutable;
     MOZ_ASSERT(NS_SUCCEEDED(aBlobImpl->GetMutable(&isMutable)));
     MOZ_ASSERT(!isMutable);
 
     return GetOrCreateInternal(aID,
@@ -726,32 +725,32 @@ public:
   }
 
   intptr_t
   ProcessID() const
   {
     return mProcessID;
   }
 
-  DOMFileImpl*
+  FileImpl*
   BlobImpl() const
   {
     return mBlobImpl;
   }
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(IDTableEntry)
 
 private:
-  IDTableEntry(const nsID& aID, intptr_t aProcessID, DOMFileImpl* aBlobImpl);
+  IDTableEntry(const nsID& aID, intptr_t aProcessID, FileImpl* aBlobImpl);
   ~IDTableEntry();
 
   static already_AddRefed<IDTableEntry>
   GetOrCreateInternal(const nsID& aID,
                       intptr_t aProcessID,
-                      DOMFileImpl* aBlobImpl,
+                      FileImpl* aBlobImpl,
                       bool aMayCreate,
                       bool aMayGet);
 };
 
 // Each instance of this class will be dispatched to the network stream thread
 // pool to run the first time where it will open the file input stream. It will
 // then dispatch itself back to the owning thread to send the child process its
 // response (assuming that the child has not crashed). The runnable will then
@@ -996,47 +995,47 @@ private:
 
 NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, nsRunnable)
 
 /*******************************************************************************
  * BlobChild::RemoteBlobImpl Declaration
  ******************************************************************************/
 
 class BlobChild::RemoteBlobImpl MOZ_FINAL
-  : public DOMFileImplBase
+  : public FileImplBase
   , public nsIRemoteBlob
 {
   class StreamHelper;
   class SliceHelper;
 
   BlobChild* mActor;
   nsCOMPtr<nsIEventTarget> mActorTarget;
 
 public:
   RemoteBlobImpl(BlobChild* aActor,
                  const nsAString& aName,
                  const nsAString& aContentType,
                  uint64_t aLength,
                  uint64_t aModDate)
-    : DOMFileImplBase(aName, aContentType, aLength, aModDate)
+    : FileImplBase(aName, aContentType, aLength, aModDate)
   {
     CommonInit(aActor);
   }
 
   RemoteBlobImpl(BlobChild* aActor,
                  const nsAString& aContentType,
                  uint64_t aLength)
-    : DOMFileImplBase(aContentType, aLength)
+    : FileImplBase(aContentType, aLength)
   {
     CommonInit(aActor);
   }
 
   explicit
   RemoteBlobImpl(BlobChild* aActor)
-    : DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
+    : FileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
   {
     CommonInit(aActor);
   }
 
   void
   NoteDyingActor()
   {
     MOZ_ASSERT(mActor);
@@ -1045,17 +1044,17 @@ public:
     mActor = nullptr;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual void
   GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual nsresult
   GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
 
   virtual int64_t
   GetFileId() MOZ_OVERRIDE;
@@ -1112,22 +1111,22 @@ private:
   }
 };
 
 class BlobChild::RemoteBlobImpl::StreamHelper MOZ_FINAL
   : public nsRunnable
 {
   Monitor mMonitor;
   BlobChild* mActor;
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
   nsRefPtr<RemoteInputStream> mInputStream;
   bool mDone;
 
 public:
-  StreamHelper(BlobChild* aActor, DOMFileImpl* aBlobImpl)
+  StreamHelper(BlobChild* aActor, FileImpl* aBlobImpl)
     : mMonitor("BlobChild::RemoteBlobImpl::StreamHelper::mMonitor")
     , mActor(aActor)
     , mBlobImpl(aBlobImpl)
     , mDone(false)
   {
     // This may be created on any thread.
     MOZ_ASSERT(aActor);
     MOZ_ASSERT(aBlobImpl);
@@ -1213,17 +1212,17 @@ private:
   }
 };
 
 class BlobChild::RemoteBlobImpl::SliceHelper MOZ_FINAL
   : public nsRunnable
 {
   Monitor mMonitor;
   BlobChild* mActor;
-  nsRefPtr<DOMFileImpl> mSlice;
+  nsRefPtr<FileImpl> mSlice;
   uint64_t mStart;
   uint64_t mLength;
   nsString mContentType;
   bool mDone;
 
 public:
   explicit
   SliceHelper(BlobChild* aActor)
@@ -1232,17 +1231,17 @@ public:
     , mStart(0)
     , mLength(0)
     , mDone(false)
   {
     // This may be created on any thread.
     MOZ_ASSERT(aActor);
   }
 
-  DOMFileImpl*
+  FileImpl*
   GetSlice(uint64_t aStart,
            uint64_t aLength,
            const nsAString& aContentType)
   {
     // This may be called on any thread.
     MOZ_ASSERT(mActor);
     MOZ_ASSERT(!mSlice);
     MOZ_ASSERT(!mDone);
@@ -1350,17 +1349,17 @@ private:
 
 /*******************************************************************************
  * BlobChild::RemoteBlobImpl Implementation
  ******************************************************************************/
 
 NS_IMPL_ADDREF(BlobChild::RemoteBlobImpl)
 NS_IMPL_RELEASE_WITH_DESTROY(BlobChild::RemoteBlobImpl, Destroy())
 NS_IMPL_QUERY_INTERFACE_INHERITED(BlobChild::RemoteBlobImpl,
-                                  DOMFileImpl,
+                                  FileImpl,
                                   nsIRemoteBlob)
 
 void
 BlobChild::
 RemoteBlobImpl::GetMozFullPathInternal(nsAString& aFilePath,
                                        ErrorResult& aRv)
 {
   if (!mActor) {
@@ -1372,29 +1371,29 @@ RemoteBlobImpl::GetMozFullPathInternal(n
   if (!mActor->SendGetFilePath(&filePath)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aFilePath = filePath;
 }
 
-already_AddRefed<DOMFileImpl>
+already_AddRefed<FileImpl>
 BlobChild::
 RemoteBlobImpl::CreateSlice(uint64_t aStart, uint64_t aLength,
                             const nsAString& aContentType, ErrorResult& aRv)
 {
   if (!mActor) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsRefPtr<SliceHelper> helper = new SliceHelper(mActor);
 
-  nsRefPtr<DOMFileImpl> impl = helper->GetSlice(aStart, aLength, aContentType);
+  nsRefPtr<FileImpl> impl = helper->GetSlice(aStart, aLength, aContentType);
   if (NS_WARN_IF(!impl)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return impl.forget();
 }
 
@@ -1446,27 +1445,27 @@ RemoteBlobImpl::GetBlobParent()
 {
   return nullptr;
 }
 
 /*******************************************************************************
  * BlobChild
  ******************************************************************************/
 
-BlobChild::BlobChild(nsIContentChild* aManager, DOMFileImpl* aBlobImpl)
+BlobChild::BlobChild(nsIContentChild* aManager, FileImpl* aBlobImpl)
   : mBackgroundManager(nullptr)
   , mContentManager(aManager)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   CommonInit(aBlobImpl);
 }
 
-BlobChild::BlobChild(PBackgroundChild* aManager, DOMFileImpl* aBlobImpl)
+BlobChild::BlobChild(PBackgroundChild* aManager, FileImpl* aBlobImpl)
   : mBackgroundManager(aManager)
   , mContentManager(nullptr)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   CommonInit(aBlobImpl);
 
@@ -1531,17 +1530,17 @@ BlobChild::BlobChild(PBackgroundChild* a
 BlobChild::~BlobChild()
 {
   AssertIsOnOwningThread();
 
   MOZ_COUNT_DTOR(BlobChild);
 }
 
 void
-BlobChild::CommonInit(DOMFileImpl* aBlobImpl)
+BlobChild::CommonInit(FileImpl* aBlobImpl)
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(aBlobImpl);
 
   MOZ_COUNT_CTOR(BlobChild);
 
   mBlobImpl = aBlobImpl;
   mRemoteBlobImpl = nullptr;
@@ -1557,17 +1556,17 @@ BlobChild::CommonInit(BlobChild* aOther)
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(aOther);
   MOZ_ASSERT_IF(mContentManager, aOther->GetBackgroundManager());
   MOZ_ASSERT_IF(mBackgroundManager, aOther->GetContentManager());
 
   MOZ_COUNT_CTOR(BlobChild);
 
-  nsRefPtr<DOMFileImpl> otherImpl = aOther->GetBlobImpl();
+  nsRefPtr<FileImpl> otherImpl = aOther->GetBlobImpl();
   MOZ_ASSERT(otherImpl);
 
   nsString contentType;
   otherImpl->GetType(contentType);
 
   ErrorResult rv;
   uint64_t length = otherImpl->GetSize(rv);
   MOZ_ASSERT(!rv.Failed());
@@ -1674,27 +1673,27 @@ BlobChild::Startup(const FriendKey& /* a
 {
   MOZ_ASSERT(XRE_GetProcessType() != GeckoProcessType_Default);
 
   CommonStartup();
 }
 
 // static
 BlobChild*
-BlobChild::GetOrCreate(nsIContentChild* aManager, DOMFileImpl* aBlobImpl)
+BlobChild::GetOrCreate(nsIContentChild* aManager, FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   return GetOrCreateFromImpl(aManager, aBlobImpl);
 }
 
 // static
 BlobChild*
-BlobChild::GetOrCreate(PBackgroundChild* aManager, DOMFileImpl* aBlobImpl)
+BlobChild::GetOrCreate(PBackgroundChild* aManager, FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   return GetOrCreateFromImpl(aManager, aBlobImpl);
 }
 
 // static
@@ -1718,17 +1717,17 @@ BlobChild::Create(PBackgroundChild* aMan
 
   return CreateFromParams(aManager, aParams);
 }
 
 // static
 template <class ChildManagerType>
 BlobChild*
 BlobChild::GetOrCreateFromImpl(ChildManagerType* aManager,
-                               DOMFileImpl* aBlobImpl)
+                               FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
   MOZ_ASSERT(aBlobImpl);
 
   // If the blob represents a remote blob then we can simply pass its actor back
   // here.
   if (nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(aBlobImpl)) {
@@ -1814,27 +1813,27 @@ BlobChild::CreateFromParams(ChildManager
         blobParams.get_SlicedBlobConstructorParams();
       MOZ_ASSERT(params.optionalID().type() == OptionalID::Tvoid_t);
 
       auto* actor =
         const_cast<BlobChild*>(
           static_cast<const BlobChild*>(params.sourceChild()));
       MOZ_ASSERT(actor);
 
-      nsRefPtr<DOMFileImpl> source = actor->GetBlobImpl();
+      nsRefPtr<FileImpl> source = actor->GetBlobImpl();
       MOZ_ASSERT(source);
 
       Optional<int64_t> start;
       start.Construct(params.begin());
 
       Optional<int64_t> end;
       start.Construct(params.end());
 
       ErrorResult rv;
-      nsRefPtr<DOMFileImpl> slice =
+      nsRefPtr<FileImpl> slice =
         source->Slice(start, end, params.contentType(), rv);
       if (NS_WARN_IF(rv.Failed())) {
         return nullptr;
       }
 
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(slice->SetMutable(false)));
 
       actor = new BlobChild(aManager, slice);
@@ -1944,23 +1943,23 @@ const nsID&
 BlobChild::ParentID() const
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mRemoteBlobImpl);
 
   return mParentID;
 }
 
-already_AddRefed<DOMFileImpl>
+already_AddRefed<FileImpl>
 BlobChild::GetBlobImpl()
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mBlobImpl);
 
-  nsRefPtr<DOMFileImpl> blobImpl;
+  nsRefPtr<FileImpl> blobImpl;
 
   // Remote blobs are held alive until the first call to GetBlobImpl. Thereafter
   // we only hold a weak reference. Normal blobs are held alive until the actor
   // is destroyed.
   if (mRemoteBlobImpl && mOwnsBlobImpl) {
     blobImpl = dont_AddRef(mBlobImpl);
     mOwnsBlobImpl = false;
   } else {
@@ -2149,29 +2148,29 @@ private:
     mActor->AssertIsOnOwningThread();
 
     mActor = nullptr;
   }
 };
 
 class BlobParent::RemoteBlobImpl MOZ_FINAL
   : public RemoteBlobImplBase
-  , public DOMFileImplBase
+  , public FileImplBase
   , public nsIRemoteBlob
 {
   friend class mozilla::dom::BlobParent;
 
   class SliceHelper;
 
   InputStreamParams mInputStreamParams;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength, const nsAString& aContentType,
               ErrorResult& aRv) MOZ_OVERRIDE;
 
   virtual nsresult
   GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
 
   virtual int64_t
   GetLastModified(ErrorResult& aRv) MOZ_OVERRIDE;
@@ -2185,27 +2184,27 @@ public:
 private:
   RemoteBlobImpl(BlobParent* aActor,
                  const InputStreamParams& aInputStreamParams,
                  const nsAString& aName,
                  const nsAString& aContentType,
                  uint64_t aLength,
                  uint64_t aModDate)
     : RemoteBlobImplBase(aActor, /* aForwards */ false)
-    , DOMFileImplBase(aName, aContentType, aLength, aModDate)
+    , FileImplBase(aName, aContentType, aLength, aModDate)
   {
     CommonInit(aInputStreamParams);
   }
 
   RemoteBlobImpl(BlobParent* aActor,
                  const InputStreamParams& aInputStreamParams,
                  const nsAString& aContentType,
                  uint64_t aLength)
     : RemoteBlobImplBase(aActor, /* aForwards */ false)
-    , DOMFileImplBase(aContentType, aLength)
+    , FileImplBase(aContentType, aLength)
   {
     CommonInit(aInputStreamParams);
   }
 
   ~RemoteBlobImpl()
   { }
 
   void
@@ -2219,17 +2218,17 @@ private:
   }
 };
 
 class BlobParent::RemoteBlobImpl::SliceHelper MOZ_FINAL
   : public nsRunnable
 {
   Monitor mMonitor;
   BlobParent* mActor;
-  nsRefPtr<DOMFileImpl> mSlice;
+  nsRefPtr<FileImpl> mSlice;
   uint64_t mStart;
   uint64_t mLength;
   nsString mContentType;
   bool mDone;
 
 public:
   explicit
   SliceHelper(BlobParent* aActor)
@@ -2238,17 +2237,17 @@ public:
     , mStart(0)
     , mLength(0)
     , mDone(false)
   {
     // This may be created on any thread.
     MOZ_ASSERT(aActor);
   }
 
-  DOMFileImpl*
+  FileImpl*
   GetSlice(uint64_t aStart,
            uint64_t aLength,
            const nsAString& aContentType)
   {
     // This may be called on any thread.
     MOZ_ASSERT(mActor);
     MOZ_ASSERT(!mSlice);
     MOZ_ASSERT(!mDone);
@@ -2351,25 +2350,25 @@ private:
     else {
       mDone = true;
     }
   }
 };
 
 class BlobParent::ForwardingRemoteBlobImpl MOZ_FINAL
   : public RemoteBlobImplBase
-  , public DOMFileImpl
+  , public FileImpl
   , public nsIRemoteBlob
 {
   friend class mozilla::dom::BlobParent;
 
   typedef mozilla::dom::indexedDB::FileInfo FileInfo;
   typedef mozilla::dom::indexedDB::FileManager FileManager;
 
-  nsRefPtr<DOMFileImpl> mBlobImpl;
+  nsRefPtr<FileImpl> mBlobImpl;
   nsCOMPtr<nsIRemoteBlob> mRemoteBlob;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual void
   GetName(nsAString& aName) MOZ_OVERRIDE
   {
@@ -2407,26 +2406,26 @@ public:
   }
 
   virtual void
   GetType(nsAString& aType) MOZ_OVERRIDE
   {
     mBlobImpl->GetType(aType);
   }
 
-  virtual already_AddRefed<DOMFileImpl>
+  virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart,
               uint64_t aLength,
               const nsAString& aContentType,
               ErrorResult& aRv) MOZ_OVERRIDE
   {
     return mBlobImpl->CreateSlice(aStart, aLength, aContentType, aRv);
   }
 
-  virtual const nsTArray<nsRefPtr<DOMFileImpl>>*
+  virtual const nsTArray<nsRefPtr<FileImpl>>*
   GetSubBlobImpls() const MOZ_OVERRIDE
   {
     return mBlobImpl->GetSubBlobImpls();
   }
 
   virtual nsresult
   GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE
   {
@@ -2533,17 +2532,17 @@ public:
   {
     MOZ_ASSERT(mRemoteBlob);
 
     return mRemoteBlob->GetBlobParent();
   }
 
 private:
   ForwardingRemoteBlobImpl(BlobParent* aActor,
-                           DOMFileImpl* aBlobImpl)
+                           FileImpl* aBlobImpl)
     : RemoteBlobImplBase(aActor, /* aForwards */ true)
     , mBlobImpl(aBlobImpl)
     , mRemoteBlob(do_QueryObject(aBlobImpl))
   {
     MOZ_ASSERT(aBlobImpl);
 
     DebugOnly<bool> isMutable;
     MOZ_ASSERT(NS_SUCCEEDED(aBlobImpl->GetMutable(&isMutable)));
@@ -2556,34 +2555,34 @@ private:
 
 /*******************************************************************************
  * BlobParent::RemoteBlobImpl Implementation
  ******************************************************************************/
 
 NS_IMPL_ADDREF(BlobParent::RemoteBlobImpl)
 NS_IMPL_RELEASE_WITH_DESTROY(BlobParent::RemoteBlobImpl, Destroy())
 NS_IMPL_QUERY_INTERFACE_INHERITED(BlobParent::RemoteBlobImpl,
-                                  DOMFileImplBase,
+                                  FileImplBase,
                                   nsIRemoteBlob)
 
-already_AddRefed<DOMFileImpl>
+already_AddRefed<FileImpl>
 BlobParent::
 RemoteBlobImpl::CreateSlice(uint64_t aStart,
                             uint64_t aLength,
                             const nsAString& aContentType,
                             ErrorResult& aRv)
 {
   if (!mActor) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsRefPtr<SliceHelper> helper = new SliceHelper(mActor);
 
-  nsRefPtr<DOMFileImpl> impl = helper->GetSlice(aStart, aLength, aContentType);
+  nsRefPtr<FileImpl> impl = helper->GetSlice(aStart, aLength, aContentType);
   if (NS_WARN_IF(!impl)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return impl.forget();
 }
 
@@ -2631,17 +2630,17 @@ RemoteBlobImpl::GetBlobParent()
 {
   return mActor;
 }
 
 NS_IMPL_ADDREF(BlobParent::ForwardingRemoteBlobImpl)
 NS_IMPL_RELEASE_WITH_DESTROY(BlobParent::ForwardingRemoteBlobImpl, Destroy())
 NS_INTERFACE_MAP_BEGIN(BlobParent::ForwardingRemoteBlobImpl)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIRemoteBlob, mRemoteBlob)
-NS_INTERFACE_MAP_END_INHERITING(DOMFileImpl)
+NS_INTERFACE_MAP_END_INHERITING(FileImpl)
 
 /*******************************************************************************
  * BlobParent
  ******************************************************************************/
 
 BlobParent::BlobParent(nsIContentParent* aManager, IDTableEntry* aIDTableEntry)
   : mBackgroundManager(nullptr)
   , mContentManager(aManager)
@@ -2742,17 +2741,17 @@ BlobParent::CommonInit(const ParentBlobC
                   AnyBlobConstructorParams::TKnownBlobConstructorParams,
                 aParams.optionalInputStreamParams().type() ==
                    OptionalInputStreamParams::Tvoid_t);
   MOZ_ASSERT_IF(paramsType !=
                   AnyBlobConstructorParams::TKnownBlobConstructorParams,
                 aParams.optionalInputStreamParams().type() ==
                    OptionalInputStreamParams::TInputStreamParams);
 
-  nsRefPtr<DOMFileImpl> remoteBlobImpl;
+  nsRefPtr<FileImpl> remoteBlobImpl;
   RemoteBlobImplBase* remoteBlobBase = nullptr;
 
   switch (paramsType) {
     case AnyBlobConstructorParams::TNormalBlobConstructorParams: {
       const InputStreamParams& inputStreamParams =
         aParams.optionalInputStreamParams().get_InputStreamParams();
 
       const NormalBlobConstructorParams& params =
@@ -2838,27 +2837,27 @@ BlobParent::Startup(const FriendKey& /* 
   ClearOnShutdown(&sIDTable);
 
   sIDTableMutex = new Mutex("BlobParent::sIDTableMutex");
   ClearOnShutdown(&sIDTableMutex);
 }
 
 // static
 BlobParent*
-BlobParent::GetOrCreate(nsIContentParent* aManager, DOMFileImpl* aBlobImpl)
+BlobParent::GetOrCreate(nsIContentParent* aManager, FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   return GetOrCreateFromImpl(aManager, aBlobImpl);
 }
 
 // static
 BlobParent*
-BlobParent::GetOrCreate(PBackgroundParent* aManager, DOMFileImpl* aBlobImpl)
+BlobParent::GetOrCreate(PBackgroundParent* aManager, FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
 
   return GetOrCreateFromImpl(aManager, aBlobImpl);
 }
 
 // static
@@ -2882,17 +2881,17 @@ BlobParent::Create(PBackgroundParent* aM
 
   return CreateFromParams(aManager, aParams);
 }
 
 // static
 template <class ParentManagerType>
 BlobParent*
 BlobParent::GetOrCreateFromImpl(ParentManagerType* aManager,
-                                DOMFileImpl* aBlobImpl)
+                                FileImpl* aBlobImpl)
 {
   AssertCorrectThreadForManager(aManager);
   MOZ_ASSERT(aManager);
   MOZ_ASSERT(aBlobImpl);
 
   // If the blob represents a remote blob for this manager then we can simply
   // pass its actor back here.
   if (nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(aBlobImpl)) {
@@ -2996,27 +2995,27 @@ BlobParent::CreateFromParams(ParentManag
         return nullptr;
       }
 
       auto* actor =
         const_cast<BlobParent*>(
           static_cast<const BlobParent*>(params.sourceParent()));
       MOZ_ASSERT(actor);
 
-      nsRefPtr<DOMFileImpl> source = actor->GetBlobImpl();
+      nsRefPtr<FileImpl> source = actor->GetBlobImpl();
       MOZ_ASSERT(source);
 
       Optional<int64_t> start;
       start.Construct(params.begin());
 
       Optional<int64_t> end;
       end.Construct(params.end());
 
       ErrorResult rv;
-      nsRefPtr<DOMFileImpl> slice =
+      nsRefPtr<FileImpl> slice =
         source->Slice(start, end, params.contentType(), rv);
       if (NS_WARN_IF(rv.Failed())) {
         return nullptr;
       }
 
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(slice->SetMutable(false)));
 
       nsRefPtr<IDTableEntry> idTableEntry =
@@ -3109,23 +3108,23 @@ BlobParent::MaybeGetActorFromRemoteBlob(
   BlobParent* actor = aRemoteBlob->GetBlobParent();
   if (actor && actor->GetBackgroundManager() == aManager) {
     return actor;
   }
 
   return nullptr;
 }
 
-already_AddRefed<DOMFileImpl>
+already_AddRefed<FileImpl>
 BlobParent::GetBlobImpl()
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mBlobImpl);
 
-  nsRefPtr<DOMFileImpl> blobImpl;
+  nsRefPtr<FileImpl> blobImpl;
 
   // Remote blobs are held alive until the first call to GetBlobImpl. Thereafter
   // we only hold a weak reference. Normal blobs are held alive until the actor
   // is destroyed.
   if (mRemoteBlobImpl && mOwnsBlobImpl) {
     blobImpl = dont_AddRef(mBlobImpl);
     mOwnsBlobImpl = false;
   } else {
@@ -3468,17 +3467,17 @@ InputStreamChild::Recv__delete__(const I
 
   mRemoteStream->SetStream(stream);
   return true;
 }
 
 BlobParent::
 IDTableEntry::IDTableEntry(const nsID& aID,
                            intptr_t aProcessID,
-                           DOMFileImpl* aBlobImpl)
+                           FileImpl* aBlobImpl)
   : mID(aID)
   , mProcessID(aProcessID)
   , mBlobImpl(aBlobImpl)
 {
   MOZ_ASSERT(aBlobImpl);
 }
 
 BlobParent::
@@ -3500,17 +3499,17 @@ IDTableEntry::~IDTableEntry()
   }
 }
 
 // static
 already_AddRefed<BlobParent::IDTableEntry>
 BlobParent::
 IDTableEntry::GetOrCreateInternal(const nsID& aID,
                                   intptr_t aProcessID,
-                                  DOMFileImpl* aBlobImpl,
+                                  FileImpl* aBlobImpl,
                                   bool aMayCreate,
                                   bool aMayGet)
 {
   MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
   MOZ_ASSERT(sIDTableMutex);
   sIDTableMutex->AssertNotCurrentThreadOwns();
 
   nsRefPtr<IDTableEntry> entry;
--- a/dom/ipc/BlobChild.h
+++ b/dom/ipc/BlobChild.h
@@ -20,29 +20,29 @@ namespace ipc {
 
 class PBackgroundChild;
 
 } // namespace ipc
 
 namespace dom {
 
 class ContentChild;
-class DOMFileImpl;
+class FileImpl;
 class nsIContentChild;
 class PBlobStreamChild;
 
 class BlobChild MOZ_FINAL
   : public PBlobChild
 {
   typedef mozilla::ipc::PBackgroundChild PBackgroundChild;
 
   class RemoteBlobImpl;
   friend class RemoteBlobImpl;
 
-  DOMFileImpl* mBlobImpl;
+  FileImpl* mBlobImpl;
   RemoteBlobImpl* mRemoteBlobImpl;
 
   // One of these will be null and the other non-null.
   PBackgroundChild* mBackgroundManager;
   nsCOMPtr<nsIContentChild> mContentManager;
 
   nsCOMPtr<nsIEventTarget> mEventTarget;
 
@@ -53,20 +53,20 @@ class BlobChild MOZ_FINAL
 public:
   class FriendKey;
 
   static void
   Startup(const FriendKey& aKey);
 
   // These create functions are called on the sending side.
   static BlobChild*
-  GetOrCreate(nsIContentChild* aManager, DOMFileImpl* aBlobImpl);
+  GetOrCreate(nsIContentChild* aManager, FileImpl* aBlobImpl);
 
   static BlobChild*
-  GetOrCreate(PBackgroundChild* aManager, DOMFileImpl* aBlobImpl);
+  GetOrCreate(PBackgroundChild* aManager, FileImpl* aBlobImpl);
 
   // These create functions are called on the receiving side.
   static BlobChild*
   Create(nsIContentChild* aManager, const ChildBlobConstructorParams& aParams);
 
   static BlobChild*
   Create(PBackgroundChild* aManager,
          const ChildBlobConstructorParams& aParams);
@@ -93,21 +93,21 @@ public:
   GetContentManager() const
   {
     return mContentManager;
   }
 
   const nsID&
   ParentID() const;
 
-  // Get the DOMFileImpl associated with this actor. This may always be called
+  // Get the FileImpl associated with this actor. This may always be called
   // on the sending side. It may also be called on the receiving side unless
   // this is a "mystery" blob that has not yet received a SetMysteryBlobInfo()
   // call.
-  already_AddRefed<DOMFileImpl>
+  already_AddRefed<FileImpl>
   GetBlobImpl();
 
   // Use this for files.
   bool
   SetMysteryBlobInfo(const nsString& aName,
                      const nsString& aContentType,
                      uint64_t aLength,
                      uint64_t aLastModifiedDate);
@@ -121,46 +121,46 @@ public:
 #ifdef DEBUG
   ;
 #else
   { }
 #endif
 
 private:
   // These constructors are called on the sending side.
-  BlobChild(nsIContentChild* aManager, DOMFileImpl* aBlobImpl);
+  BlobChild(nsIContentChild* aManager, FileImpl* aBlobImpl);
 
-  BlobChild(PBackgroundChild* aManager, DOMFileImpl* aBlobImpl);
+  BlobChild(PBackgroundChild* aManager, FileImpl* aBlobImpl);
 
   BlobChild(nsIContentChild* aManager, BlobChild* aOther);
 
   BlobChild(PBackgroundChild* aManager, BlobChild* aOther);
 
   // These constructors are called on the receiving side.
   BlobChild(nsIContentChild* aManager,
             const ChildBlobConstructorParams& aParams);
 
   BlobChild(PBackgroundChild* aManager,
             const ChildBlobConstructorParams& aParams);
 
   // Only called by Destroy().
   ~BlobChild();
 
   void
-  CommonInit(DOMFileImpl* aBlobImpl);
+  CommonInit(FileImpl* aBlobImpl);
 
   void
   CommonInit(BlobChild* aOther);
 
   void
   CommonInit(const ChildBlobConstructorParams& aParams);
 
   template <class ChildManagerType>
   static BlobChild*
-  GetOrCreateFromImpl(ChildManagerType* aManager, DOMFileImpl* aBlobImpl);
+  GetOrCreateFromImpl(ChildManagerType* aManager, FileImpl* aBlobImpl);
 
   template <class ChildManagerType>
   static BlobChild*
   CreateFromParams(ChildManagerType* aManager,
                    const ChildBlobConstructorParams& aParams);
 
   template <class ChildManagerType>
   static BlobChild*
--- a/dom/ipc/BlobParent.h
+++ b/dom/ipc/BlobParent.h
@@ -28,17 +28,17 @@ namespace ipc {
 
 class PBackgroundParent;
 
 } // namespace ipc
 
 namespace dom {
 
 class ContentParent;
-class DOMFileImpl;
+class FileImpl;
 class nsIContentParent;
 class PBlobStreamParent;
 
 class BlobParent MOZ_FINAL
   : public PBlobParent
 {
   typedef mozilla::ipc::PBackgroundParent PBackgroundParent;
 
@@ -52,17 +52,17 @@ class BlobParent MOZ_FINAL
   friend class RemoteBlobImplBase;
 
   class RemoteBlobImpl;
   class ForwardingRemoteBlobImpl;
 
   static StaticAutoPtr<IDTable> sIDTable;
   static StaticAutoPtr<Mutex> sIDTableMutex;
 
-  DOMFileImpl* mBlobImpl;
+  FileImpl* mBlobImpl;
   RemoteBlobImplBase* mRemoteBlobImpl;
 
   // One of these will be null and the other non-null.
   PBackgroundParent* mBackgroundManager;
   nsCOMPtr<nsIContentParent> mContentManager;
 
   nsCOMPtr<nsIEventTarget> mEventTarget;
 
@@ -82,20 +82,20 @@ class BlobParent MOZ_FINAL
 public:
   class FriendKey;
 
   static void
   Startup(const FriendKey& aKey);
 
   // These create functions are called on the sending side.
   static BlobParent*
-  GetOrCreate(nsIContentParent* aManager, DOMFileImpl* aBlobImpl);
+  GetOrCreate(nsIContentParent* aManager, FileImpl* aBlobImpl);
 
   static BlobParent*
-  GetOrCreate(PBackgroundParent* aManager, DOMFileImpl* aBlobImpl);
+  GetOrCreate(PBackgroundParent* aManager, FileImpl* aBlobImpl);
 
   // These create functions are called on the receiving side.
   static BlobParent*
   Create(nsIContentParent* aManager,
          const ParentBlobConstructorParams& aParams);
 
   static BlobParent*
   Create(PBackgroundParent* aManager,
@@ -120,18 +120,18 @@ public:
   }
 
   nsIContentParent*
   GetContentManager() const
   {
     return mContentManager;
   }
 
-  // Get the DOMFileImpl associated with this actor.
-  already_AddRefed<DOMFileImpl>
+  // Get the FileImpl associated with this actor.
+  already_AddRefed<FileImpl>
   GetBlobImpl();
 
   void
   AssertIsOnOwningThread() const
 #ifdef DEBUG
   ;
 #else
   { }
@@ -160,17 +160,17 @@ private:
 
   void
   CommonInit(const ParentBlobConstructorParams& aParams,
              IDTableEntry* aIDTableEntry);
 
   template <class ParentManagerType>
   static BlobParent*
   GetOrCreateFromImpl(ParentManagerType* aManager,
-                      DOMFileImpl* aBlobImpl);
+                      FileImpl* aBlobImpl);
 
   template <class ParentManagerType>
   static BlobParent*
   CreateFromParams(ParentManagerType* aManager,
                    const ParentBlobConstructorParams& aParams);
 
   template <class ParentManagerType>
   static BlobParent*
--- a/dom/ipc/ContentBridgeChild.cpp
+++ b/dom/ipc/ContentBridgeChild.cpp
@@ -1,21 +1,21 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/ContentBridgeChild.h"
 #include "mozilla/dom/ContentChild.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/StructuredCloneUtils.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/ipc/InputStreamUtils.h"
-#include "nsDOMFile.h"
 #include "JavaScriptChild.h"
 
 using namespace base;
 using namespace mozilla::ipc;
 using namespace mozilla::jsipc;
 
 namespace mozilla {
 namespace dom {
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -125,31 +125,31 @@
 #include "nsIAccessibilityService.h"
 #endif
 
 #ifdef MOZ_NUWA_PROCESS
 #include <setjmp.h>
 #include "ipc/Nuwa.h"
 #endif
 
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/cellbroadcast/CellBroadcastIPCService.h"
 #include "mozilla/dom/mobileconnection/MobileConnectionChild.h"
 #include "mozilla/dom/mobilemessage/SmsChild.h"
 #include "mozilla/dom/devicestorage/DeviceStorageRequestChild.h"
 #include "mozilla/dom/PFileSystemRequestChild.h"
 #include "mozilla/dom/FileSystemTaskBase.h"
 #include "mozilla/dom/bluetooth/PBluetoothChild.h"
 #include "mozilla/dom/PFMRadioChild.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 
 #ifdef MOZ_WEBSPEECH
 #include "mozilla/dom/PSpeechSynthesisChild.h"
 #endif
 
-#include "nsDOMFile.h"
 #include "ProcessUtils.h"
 #include "StructuredCloneUtils.h"
 #include "URIUtils.h"
 #include "nsContentUtils.h"
 #include "nsIPrincipal.h"
 #include "nsDeviceStorage.h"
 #include "AudioChannelService.h"
 #include "JavaScriptChild.h"
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -29,16 +29,17 @@
 #include "BlobParent.h"
 #include "CrashReporterParent.h"
 #include "IHistory.h"
 #include "mozIApplication.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/dom/DataStoreService.h"
 #include "mozilla/dom/DOMStorageIPC.h"
 #include "mozilla/dom/Element.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ExternalHelperAppParent.h"
 #include "mozilla/dom/FileSystemRequestParent.h"
 #include "mozilla/dom/GeolocationBinding.h"
 #include "mozilla/dom/PContentBridgeParent.h"
 #include "mozilla/dom/PCycleCollectWithLogsParent.h"
 #include "mozilla/dom/PFMRadioParent.h"
 #include "mozilla/dom/PMemoryReportRequestParent.h"
 #include "mozilla/dom/asmjscache/AsmJSCache.h"
@@ -73,17 +74,16 @@
 #include "nsAutoPtr.h"
 #include "nsCDefaultURIFixup.h"
 #include "nsCExternalHandlerService.h"
 #include "nsCOMPtr.h"
 #include "nsChromeRegistryChrome.h"
 #include "nsConsoleMessage.h"
 #include "nsConsoleService.h"
 #include "nsDebugImpl.h"
-#include "nsDOMFile.h"
 #include "nsFrameMessageManager.h"
 #include "nsHashPropertyBag.h"
 #include "nsIAlertsService.h"
 #include "nsIAppsService.h"
 #include "nsIClipboard.h"
 #include "nsICycleCollectorListener.h"
 #include "nsIDocument.h"
 #include "nsIDOMGeoGeolocation.h"
--- a/dom/ipc/FilePickerParent.cpp
+++ b/dom/ipc/FilePickerParent.cpp
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set sw=4 ts=8 et tw=80 :
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FilePickerParent.h"
 #include "nsComponentManagerUtils.h"
-#include "nsDOMFile.h"
 #include "nsNetCID.h"
 #include "nsIDocument.h"
 #include "nsIDOMFile.h"
 #include "nsIDOMWindow.h"
 #include "nsIFile.h"
 #include "nsISimpleEnumerator.h"
 #include "mozilla/unused.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 
 using mozilla::unused;
 using namespace mozilla::dom;
 
@@ -113,17 +113,17 @@ FilePickerParent::FileSizeAndDateRunnabl
 void
 FilePickerParent::SendFiles(const nsCOMArray<nsIDOMFile>& aDomfiles)
 {
   nsIContentParent* parent = static_cast<TabParent*>(Manager())->Manager();
   InfallibleTArray<PBlobParent*> files;
 
   for (unsigned i = 0; i < aDomfiles.Length(); i++) {
     BlobParent* blob = parent->GetOrCreateActorForBlob(
-      static_cast<DOMFile*>(aDomfiles[i]));
+      static_cast<File*>(aDomfiles[i]));
     if (blob) {
       files.AppendElement(blob);
     }
   }
 
   InputFiles infiles;
   infiles.filesParent().SwapElements(files);
   unused << Send__delete__(this, infiles, mResult);
@@ -146,29 +146,29 @@ FilePickerParent::Done(int16_t aResult)
 
     nsCOMPtr<nsISupports> supports;
     bool loop = true;
     while (NS_SUCCEEDED(iter->HasMoreElements(&loop)) && loop) {
       iter->GetNext(getter_AddRefs(supports));
       if (supports) {
         nsCOMPtr<nsIFile> file = do_QueryInterface(supports);
 
-        // A null parent is fine because DOMFile are not used in this process
+        // A null parent is fine because File are not used in this process
         // but only in the child.
-        nsCOMPtr<nsIDOMFile> domfile = DOMFile::CreateFromFile(nullptr, file);
+        nsCOMPtr<nsIDOMFile> domfile = File::CreateFromFile(nullptr, file);
         domfiles.AppendElement(domfile);
       }
     }
   } else {
     nsCOMPtr<nsIFile> file;
     mFilePicker->GetFile(getter_AddRefs(file));
     if (file) {
-      // A null parent is fine because DOMFile are not used in this process
+      // A null parent is fine because File are not used in this process
       // but only in the child.
-      nsCOMPtr<nsIDOMFile> domfile = DOMFile::CreateFromFile(nullptr, file);
+      nsCOMPtr<nsIDOMFile> domfile = File::CreateFromFile(nullptr, file);
       domfiles.AppendElement(domfile);
     }
   }
 
   MOZ_ASSERT(!mRunnable);
   mRunnable = new FileSizeAndDateRunnable(this, domfiles);
   if (!mRunnable->Dispatch()) {
     unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel);
--- a/dom/ipc/StructuredCloneUtils.cpp
+++ b/dom/ipc/StructuredCloneUtils.cpp
@@ -6,17 +6,17 @@
 
 #include "StructuredCloneUtils.h"
 
 #include "nsIDOMDOMException.h"
 #include "nsIMutable.h"
 #include "nsIXPConnect.h"
 
 #include "mozilla/dom/BlobBinding.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "nsContentUtils.h"
 #include "nsJSEnvironment.h"
 #include "MainThreadUtils.h"
 #include "StructuredCloneTags.h"
 #include "jsapi.h"
 
 using namespace mozilla::dom;
 
@@ -35,40 +35,40 @@ Read(JSContext* aCx, JSStructuredCloneRe
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aClosure);
 
   StructuredCloneClosure* closure =
     static_cast<StructuredCloneClosure*>(aClosure);
 
   if (aTag == SCTAG_DOM_BLOB) {
-    // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is
+    // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
     // called because the static analysis thinks dereferencing XPCOM objects
     // can GC (because in some cases it can!), and a return statement with a
     // JSObject* type means that JSObject* is on the stack as a raw pointer
     // while destructors are running.
     JS::Rooted<JS::Value> val(aCx);
     {
       MOZ_ASSERT(aData < closure->mBlobs.Length());
-      nsRefPtr<DOMFile> blob = closure->mBlobs[aData];
+      nsRefPtr<File> blob = closure->mBlobs[aData];
 
 #ifdef DEBUG
       {
         // File should not be mutable.
         bool isMutable;
         MOZ_ASSERT(NS_SUCCEEDED(blob->GetMutable(&isMutable)));
         MOZ_ASSERT(!isMutable);
       }
 #endif
 
       // Let's create a new blob with the correct parent.
       nsIGlobalObject *global = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
       MOZ_ASSERT(global);
 
-      nsRefPtr<DOMFile> newBlob = new DOMFile(global, blob->Impl());
+      nsRefPtr<File> newBlob = new File(global, blob->Impl());
       if (!WrapNewBindingObject(aCx, newBlob, &val)) {
         return nullptr;
       }
     }
 
     return &val.toObject();
   }
 
@@ -80,19 +80,19 @@ Write(JSContext* aCx, JSStructuredCloneW
       JS::Handle<JSObject*> aObj, void* aClosure)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aClosure);
 
   StructuredCloneClosure* closure =
     static_cast<StructuredCloneClosure*>(aClosure);
 
-  // See if the wrapped native is a DOMFile/Blob.
+  // See if the wrapped native is a File/Blob.
   {
-    DOMFile* blob = nullptr;
+    File* blob = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob)) &&
         NS_SUCCEEDED(blob->SetMutable(false)) &&
         JS_WriteUint32Pair(aWriter, SCTAG_DOM_BLOB,
                            closure->mBlobs.Length())) {
       closure->mBlobs.AppendElement(blob);
       return true;
     }
   }
--- a/dom/ipc/StructuredCloneUtils.h
+++ b/dom/ipc/StructuredCloneUtils.h
@@ -4,30 +4,30 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_StructuredCloneUtils_h
 #define mozilla_dom_StructuredCloneUtils_h
 
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 
 #include "js/StructuredClone.h"
 
 namespace mozilla {
 
 struct SerializedStructuredCloneBuffer;
 
 namespace dom {
 
 struct
 StructuredCloneClosure
 {
-  nsTArray<nsRefPtr<DOMFile>> mBlobs;
+  nsTArray<nsRefPtr<File>> mBlobs;
 };
 
 struct
 StructuredCloneData
 {
   StructuredCloneData() : mData(nullptr), mDataLength(0) {}
   uint64_t* mData;
   size_t mDataLength;
--- a/dom/ipc/nsIContentChild.cpp
+++ b/dom/ipc/nsIContentChild.cpp
@@ -3,24 +3,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIContentChild.h"
 
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/DOMTypes.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/StructuredCloneUtils.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 
 #include "JavaScriptChild.h"
-#include "nsDOMFile.h"
 #include "nsIJSRuntimeService.h"
 #include "nsPrintfCString.h"
 
 using namespace mozilla::ipc;
 using namespace mozilla::jsipc;
 
 namespace mozilla {
 namespace dom {
@@ -92,22 +92,22 @@ nsIContentChild::AllocPBlobChild(const B
 bool
 nsIContentChild::DeallocPBlobChild(PBlobChild* aActor)
 {
   BlobChild::Destroy(aActor);
   return true;
 }
 
 BlobChild*
-nsIContentChild::GetOrCreateActorForBlob(DOMFile* aBlob)
+nsIContentChild::GetOrCreateActorForBlob(File* aBlob)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aBlob);
 
-  nsRefPtr<DOMFileImpl> blobImpl = aBlob->Impl();
+  nsRefPtr<FileImpl> blobImpl = aBlob->Impl();
   MOZ_ASSERT(blobImpl);
 
   BlobChild* actor = BlobChild::GetOrCreate(this, blobImpl);
   NS_ENSURE_TRUE(actor, nullptr);
 
   return actor;
 }
 
--- a/dom/ipc/nsIContentChild.h
+++ b/dom/ipc/nsIContentChild.h
@@ -28,28 +28,28 @@ class PJavaScriptChild;
 class CpowEntry;
 } // jsipc
 
 namespace dom {
 
 class BlobChild;
 class BlobConstructorParams;
 class ClonedMessageData;
-class DOMFile;
+class File;
 class IPCTabContext;
 class PBlobChild;
 class PBrowserChild;
 
 class nsIContentChild : public nsISupports
                       , public CPOWManagerGetter
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTCHILD_IID)
 
-  BlobChild* GetOrCreateActorForBlob(DOMFile* aBlob);
+  BlobChild* GetOrCreateActorForBlob(File* aBlob);
 
   virtual PBlobChild* SendPBlobConstructor(
     PBlobChild* aActor,
     const BlobConstructorParams& aParams) = 0;
 
   virtual bool
   SendPBrowserConstructor(PBrowserChild* aActor,
                           const IPCTabContext& aContext,
--- a/dom/ipc/nsIContentParent.cpp
+++ b/dom/ipc/nsIContentParent.cpp
@@ -3,26 +3,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIContentParent.h"
 
 #include "mozilla/AppProcessChecker.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/PTabContext.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/StructuredCloneUtils.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/unused.h"
 
 #include "JavaScriptParent.h"
-#include "nsDOMFile.h"
 #include "nsFrameMessageManager.h"
 #include "nsIJSRuntimeService.h"
 #include "nsPrintfCString.h"
 
 using namespace mozilla::jsipc;
 
 namespace mozilla {
 namespace dom {
@@ -146,22 +146,22 @@ nsIContentParent::AllocPBlobParent(const
 bool
 nsIContentParent::DeallocPBlobParent(PBlobParent* aActor)
 {
   BlobParent::Destroy(aActor);
   return true;
 }
 
 BlobParent*
-nsIContentParent::GetOrCreateActorForBlob(DOMFile* aBlob)
+nsIContentParent::GetOrCreateActorForBlob(File* aBlob)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aBlob);
 
-  nsRefPtr<DOMFileImpl> blobImpl = aBlob->Impl();
+  nsRefPtr<FileImpl> blobImpl = aBlob->Impl();
   MOZ_ASSERT(blobImpl);
 
   BlobParent* actor = BlobParent::GetOrCreate(this, blobImpl);
   NS_ENSURE_TRUE(actor, nullptr);
 
   return actor;
 }
 
--- a/dom/ipc/nsIContentParent.h
+++ b/dom/ipc/nsIContentParent.h
@@ -28,31 +28,31 @@ class PJavaScriptParent;
 class CpowEntry;
 } // namespace jsipc
 
 namespace dom {
 
 class BlobConstructorParams;
 class BlobParent;
 class ContentParent;
-class DOMFile;
+class File;
 class IPCTabContext;
 class PBlobParent;
 class PBrowserParent;
 
 class nsIContentParent : public nsISupports
                        , public mozilla::dom::ipc::MessageManagerCallback
                        , public CPOWManagerGetter
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTPARENT_IID)
 
   nsIContentParent();
 
-  BlobParent* GetOrCreateActorForBlob(DOMFile* aBlob);
+  BlobParent* GetOrCreateActorForBlob(File* aBlob);
 
   virtual uint64_t ChildID() = 0;
   virtual bool IsForApp() = 0;
   virtual bool IsForBrowser() = 0;
 
   virtual PBlobParent* SendPBlobConstructor(
     PBlobParent* aActor,
     const BlobConstructorParams& aParams) NS_WARN_UNUSED_RESULT = 0;
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -8,45 +8,44 @@
 
 #include "MediaStreamGraph.h"
 #include "mozilla/dom/MediaStreamTrack.h"
 #include "GetUserMediaRequest.h"
 #include "nsHashPropertyBag.h"
 #ifdef MOZ_WIDGET_GONK
 #include "nsIAudioManager.h"
 #endif
-#include "nsIDOMFile.h"
 #include "nsIEventTarget.h"
 #include "nsIUUIDGenerator.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIPermissionManager.h"
 #include "nsIPopupWindowManager.h"
 #include "nsISupportsArray.h"
 #include "nsIDocShell.h"
 #include "nsIDocument.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIIDNService.h"
 #include "nsNetUtil.h"
 #include "mozilla/Types.h"
 #include "mozilla/PeerIdentity.h"
 #include "mozilla/dom/ContentChild.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/MediaStreamBinding.h"
 #include "mozilla/dom/MediaStreamTrackBinding.h"
 #include "mozilla/dom/GetUserMediaRequestBinding.h"
 #include "mozilla/Preferences.h"
 #include "MediaTrackConstraints.h"
 
 #include "Latency.h"
 
 // For PR_snprintf
 #include "prprf.h"
 
 #include "nsJSUtils.h"
-#include "nsDOMFile.h"
 #include "nsGlobalWindow.h"
 
 /* Using WebRTC backend on Desktops (Mac, Windows, Linux), otherwise default */
 #include "MediaEngineDefault.h"
 #if defined(MOZ_WEBRTC)
 #include "MediaEngineWebRTC.h"
 #include "browser_logging/WebRtcLog.h"
 #endif
@@ -1278,17 +1277,17 @@ public:
 
     MOZ_ASSERT(!mSuccess);
     MOZ_ASSERT(!mError);
 
     return;
   }
 
   /**
-   * Allocates a video device, takes a snapshot and returns a DOMFile via
+   * Allocates a video device, takes a snapshot and returns a File via
    * a SuccessRunnable or an error via the ErrorRunnable. Off the main thread.
    */
   void
   ProcessGetUserMediaSnapshot(MediaEngineVideoSource* aSource, int aDuration)
   {
     MOZ_ASSERT(mSuccess);
     MOZ_ASSERT(mError);
     nsresult rv = aSource->Allocate(GetInvariant(mConstraints.mVideo), mPrefs);
--- a/dom/mobilemessage/MmsMessage.cpp
+++ b/dom/mobilemessage/MmsMessage.cpp
@@ -4,26 +4,25 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MmsMessage.h"
 #include "nsIDOMClassInfo.h"
 #include "jsapi.h" // For OBJECT_TO_JSVAL and JS_NewDateObjectMsec
 #include "jsfriendapi.h" // For js_DateGetMsecSinceEpoch
 #include "nsJSUtils.h"
 #include "nsContentUtils.h"
-#include "nsIDOMFile.h"
 #include "nsTArrayHelpers.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
 #include "mozilla/dom/mobilemessage/SmsTypes.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
-#include "nsDOMFile.h"
 
 using namespace mozilla::dom::mobilemessage;
 
 DOMCI_DATA(MozMmsMessage, mozilla::dom::MmsMessage)
 
 namespace mozilla {
 namespace dom {
 
@@ -90,21 +89,21 @@ MmsMessage::MmsMessage(const mobilemessa
     MmsAttachment att;
     const MmsAttachmentData &element = aData.attachments()[i];
     att.mId = element.id();
     att.mLocation = element.location();
 
     // mContent is not going to be exposed to JS directly so we can use
     // nullptr as parent.
     if (element.contentParent()) {
-      nsRefPtr<DOMFileImpl> impl = static_cast<BlobParent*>(element.contentParent())->GetBlobImpl();
-      att.mContent = new DOMFile(nullptr, impl);
+      nsRefPtr<FileImpl> impl = static_cast<BlobParent*>(element.contentParent())->GetBlobImpl();
+      att.mContent = new File(nullptr, impl);
     } else if (element.contentChild()) {
-      nsRefPtr<DOMFileImpl> impl = static_cast<BlobChild*>(element.contentChild())->GetBlobImpl();
-      att.mContent = new DOMFile(nullptr, impl);
+      nsRefPtr<FileImpl> impl = static_cast<BlobChild*>(element.contentChild())->GetBlobImpl();
+      att.mContent = new File(nullptr, impl);
     } else {
       NS_WARNING("MmsMessage: Unable to get attachment content.");
     }
     mAttachments.AppendElement(att);
   }
 
   len = aData.deliveryInfo().Length();
   mDeliveryInfo.SetCapacity(len);
@@ -572,20 +571,20 @@ MmsMessage::GetAttachments(JSContext* aC
     NS_ENSURE_TRUE(tmpJsStr, NS_ERROR_OUT_OF_MEMORY);
 
     if (!JS_DefineProperty(aCx, attachmentObj, "location", tmpJsStr, JSPROP_ENUMERATE)) {
       return NS_ERROR_FAILURE;
     }
 
     // Get |attachment.mContent|.
 
-    // Duplicating the DOMFile with the correct parent object.
+    // Duplicating the File with the correct parent object.
     nsIGlobalObject *global = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
     MOZ_ASSERT(global);
-    nsRefPtr<DOMFile> newBlob = new DOMFile(global, attachment.content->Impl());
+    nsRefPtr<File> newBlob = new File(global, attachment.content->Impl());
 
     JS::Rooted<JS::Value> val(aCx);
     if (!WrapNewBindingObject(aCx, newBlob, &val)) {
       return NS_ERROR_FAILURE;
     }
 
     if (!JS_DefineProperty(aCx, attachmentObj, "content", val, JSPROP_ENUMERATE)) {
       return NS_ERROR_FAILURE;
--- a/dom/mobilemessage/MmsMessage.h
+++ b/dom/mobilemessage/MmsMessage.h
@@ -11,34 +11,34 @@
 #include "mozilla/dom/mobilemessage/Types.h"
 #include "mozilla/dom/MozMmsMessageBinding.h"
 #include "mozilla/dom/MozMobileMessageManagerBinding.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 
-class DOMFile;
+class File;
 
 namespace mobilemessage {
 class MmsMessageData;
 } // namespace mobilemessage
 
 class ContentParent;
 
 class MmsMessage MOZ_FINAL : public nsIDOMMozMmsMessage
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMMOZMMSMESSAGE
 
   // If this is changed, change the WebIDL dictionary as well.
   struct Attachment MOZ_FINAL
   {
-    nsRefPtr<DOMFile> content;
+    nsRefPtr<File> content;
     nsString id;
     nsString location;
 
     explicit Attachment(const MmsAttachment& aAttachment) :
       content(aAttachment.mContent),
       id(aAttachment.mId),
       location(aAttachment.mLocation)
     {}
--- a/dom/mobilemessage/ipc/SmsParent.cpp
+++ b/dom/mobilemessage/ipc/SmsParent.cpp
@@ -10,19 +10,19 @@
 #include "mozilla/Services.h"
 #include "nsIDOMMozSmsMessage.h"
 #include "nsIDOMMozMmsMessage.h"
 #include "mozilla/unused.h"
 #include "SmsMessage.h"
 #include "MmsMessage.h"
 #include "nsIMobileMessageDatabaseService.h"
 #include "MobileMessageThread.h"
-#include "nsIDOMFile.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
 #include "nsContentUtils.h"
 #include "nsTArrayHelpers.h"
 #include "xpcpublic.h"
 #include "nsServiceManagerUtils.h"
 #include "DeletedMessageInfo.h"
 
 namespace mozilla {
@@ -48,29 +48,29 @@ MmsAttachmentDataToJSObject(JSContext* a
   JS::Rooted<JSString*> locStr(aContext, JS_NewUCStringCopyN(aContext,
                                                              aAttachment.location().get(),
                                                              aAttachment.location().Length()));
   NS_ENSURE_TRUE(locStr, nullptr);
   if (!JS_DefineProperty(aContext, obj, "location", locStr, 0)) {
     return nullptr;
   }
 
-  nsRefPtr<DOMFileImpl> blobImpl = static_cast<BlobParent*>(aAttachment.contentParent())->GetBlobImpl();
+  nsRefPtr<FileImpl> blobImpl = static_cast<BlobParent*>(aAttachment.contentParent())->GetBlobImpl();
 
-  // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is
+  // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
   // called because the static analysis thinks dereferencing XPCOM objects
   // can GC (because in some cases it can!), and a return statement with a
   // JSObject* type means that JSObject* is on the stack as a raw pointer
   // while destructors are running.
   JS::Rooted<JS::Value> content(aContext);
   {
     nsIGlobalObject *global = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aContext));
     MOZ_ASSERT(global);
 
-    nsRefPtr<DOMFile> blob = new DOMFile(global, blobImpl);
+    nsRefPtr<File> blob = new File(global, blobImpl);
     if (!WrapNewBindingObject(aContext, blob, &content)) {
       return nullptr;
     }
   }
 
   if (!JS_DefineProperty(aContext, obj, "content", content, 0)) {
     return nullptr;
   }
--- a/dom/network/UDPSocket.cpp
+++ b/dom/network/UDPSocket.cpp
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "UDPSocket.h"
 #include "mozilla/AsyncEventDispatcher.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ErrorEvent.h"
 #include "mozilla/dom/UDPMessageEvent.h"
 #include "mozilla/dom/UDPSocketBinding.h"
 #include "mozilla/dom/UnionTypes.h"
 #include "mozilla/net/DNS.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
-#include "nsDOMFile.h"
 #include "nsINetAddr.h"
 #include "nsStringStream.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(UDPSocket)
 
@@ -323,17 +323,17 @@ UDPSocket::Send(const StringOrBlobOrArra
     remotePort = mRemotePort.Value();
   } else {
     aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
     return false;
   }
 
   nsCOMPtr<nsIInputStream> stream;
   if (aData.IsBlob()) {
-    DOMFile& blob = aData.GetAsBlob();
+    File& blob = aData.GetAsBlob();
 
     aRv = blob.GetInternalStream(getter_AddRefs(stream));
     if (NS_WARN_IF(aRv.Failed())) {
       return false;
     }
   } else {
     nsresult rv;
     nsCOMPtr<nsIStringInputStream> strStream = do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID, &rv);
--- a/dom/workers/FileReaderSync.cpp
+++ b/dom/workers/FileReaderSync.cpp
@@ -4,23 +4,23 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FileReaderSync.h"
 
 #include "jsfriendapi.h"
 #include "mozilla/Base64.h"
 #include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/dom/File.h"
 #include "nsContentUtils.h"
 #include "mozilla/dom/FileReaderSyncBinding.h"
 #include "nsCExternalHandlerService.h"
 #include "nsComponentManagerUtils.h"
 #include "nsCOMPtr.h"
 #include "nsDOMClassInfoID.h"
-#include "nsDOMFile.h"
 #include "nsError.h"
 #include "nsIConverterInputStream.h"
 #include "nsIInputStream.h"
 #include "nsISeekableStream.h"
 #include "nsISupportsImpl.h"
 #include "nsNetUtil.h"
 #include "nsServiceManagerUtils.h"
 
@@ -45,17 +45,17 @@ JSObject*
 FileReaderSync::WrapObject(JSContext* aCx)
 {
   return FileReaderSyncBinding_workers::Wrap(aCx, this);
 }
 
 void
 FileReaderSync::ReadAsArrayBuffer(JSContext* aCx,
                                   JS::Handle<JSObject*> aScopeObj,
-                                  DOMFile& aBlob,
+                                  File& aBlob,
                                   JS::MutableHandle<JSObject*> aRetval,
                                   ErrorResult& aRv)
 {
   uint64_t blobSize;
   nsresult rv = aBlob.GetSize(&blobSize);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
@@ -90,17 +90,17 @@ FileReaderSync::ReadAsArrayBuffer(JSCont
     return;
   }
   NS_ASSERTION(numRead == bufferLength, "failed to read data");
 
   aRetval.set(jsArrayBuffer);
 }
 
 void
-FileReaderSync::ReadAsBinaryString(DOMFile& aBlob,
+FileReaderSync::ReadAsBinaryString(File& aBlob,
                                    nsAString& aResult,
                                    ErrorResult& aRv)
 {
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv = aBlob.GetInternalStream(getter_AddRefs(stream));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
@@ -120,17 +120,17 @@ FileReaderSync::ReadAsBinaryString(DOMFi
     if (aResult.Length() - oldLength != numRead) {
       aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
       return;
     }
   } while (numRead > 0);
 }
 
 void
-FileReaderSync::ReadAsText(DOMFile& aBlob,
+FileReaderSync::ReadAsText(File& aBlob,
                            const Optional<nsAString>& aEncoding,
                            nsAString& aResult,
                            ErrorResult& aRv)
 {
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv = aBlob.GetInternalStream(getter_AddRefs(stream));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
@@ -190,17 +190,17 @@ FileReaderSync::ReadAsText(DOMFile& aBlo
   rv = ConvertStream(stream, encoding.get(), aResult);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 }
 
 void
-FileReaderSync::ReadAsDataURL(DOMFile& aBlob, nsAString& aResult,
+FileReaderSync::ReadAsDataURL(File& aBlob, nsAString& aResult,
                               ErrorResult& aRv)
 {
   nsAutoString scratchResult;
   scratchResult.AssignLiteral("data:");
 
   nsString contentType;
   aBlob.GetType(contentType);
 
--- a/dom/workers/FileReaderSync.h
+++ b/dom/workers/FileReaderSync.h
@@ -11,17 +11,17 @@
 
 class nsIInputStream;
 class nsIDOMBlob;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
-class DOMFile;
+class File;
 class GlobalObject;
 template<typename> class Optional;
 }
 }
 
 BEGIN_WORKERS_NAMESPACE
 
 class FileReaderSync MOZ_FINAL
@@ -39,19 +39,19 @@ private:
 
 public:
   static already_AddRefed<FileReaderSync>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
 
   JSObject* WrapObject(JSContext* aCx);
 
   void ReadAsArrayBuffer(JSContext* aCx, JS::Handle<JSObject*> aScopeObj,
-                         DOMFile& aBlob, JS::MutableHandle<JSObject*> aRetval,
+                         File& aBlob, JS::MutableHandle<JSObject*> aRetval,
                          ErrorResult& aRv);
-  void ReadAsBinaryString(DOMFile& aBlob, nsAString& aResult, ErrorResult& aRv);
-  void ReadAsText(DOMFile& aBlob, const Optional<nsAString>& aEncoding,
+  void ReadAsBinaryString(File& aBlob, nsAString& aResult, ErrorResult& aRv);
+  void ReadAsText(File& aBlob, const Optional<nsAString>& aEncoding,
                   nsAString& aResult, ErrorResult& aRv);
-  void ReadAsDataURL(DOMFile& aBlob, nsAString& aResult, ErrorResult& aRv);
+  void ReadAsDataURL(File& aBlob, nsAString& aResult, ErrorResult& aRv);
 };
 
 END_WORKERS_NAMESPACE
 
 #endif // mozilla_dom_workers_filereadersync_h__
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -1,20 +1,20 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "URL.h"
 
-#include "nsDOMFile.h"
 #include "nsIDocument.h"
 #include "nsIIOService.h"
 #include "nsPIDOMWindow.h"
 
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/URL.h"
 #include "mozilla/dom/URLBinding.h"
 #include "mozilla/dom/URLSearchParams.h"
 #include "nsGlobalWindow.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "nsNetCID.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
@@ -61,21 +61,21 @@ private:
 
   nsRefPtr<mozilla::dom::URL> mURL;
 };
 
 // This class creates an URL from a DOM Blob on the main thread.
 class CreateURLRunnable : public WorkerMainThreadRunnable
 {
 private:
-  DOMFileImpl* mBlobImpl;
+  FileImpl* mBlobImpl;
   nsString& mURL;
 
 public:
-  CreateURLRunnable(WorkerPrivate* aWorkerPrivate, DOMFileImpl* aBlobImpl,
+  CreateURLRunnable(WorkerPrivate* aWorkerPrivate, FileImpl* aBlobImpl,
                     const mozilla::dom::objectURLOptions& aOptions,
                     nsString& aURL)
   : WorkerMainThreadRunnable(aWorkerPrivate),
     mBlobImpl(aBlobImpl),
     mURL(aURL)
   {
     MOZ_ASSERT(aBlobImpl);
   }
@@ -851,17 +851,17 @@ URL::CreateObjectURL(const GlobalObject&
 
   NS_NAMED_LITERAL_STRING(argStr, "Argument 1 of URL.createObjectURL");
   NS_NAMED_LITERAL_STRING(blobStr, "MediaStream");
   aRv.ThrowTypeError(MSG_DOES_NOT_IMPLEMENT_INTERFACE, &argStr, &blobStr);
 }
 
 // static
 void
-URL::CreateObjectURL(const GlobalObject& aGlobal, DOMFile& aBlob,
+URL::CreateObjectURL(const GlobalObject& aGlobal, File& aBlob,
                      const mozilla::dom::objectURLOptions& aOptions,
                      nsString& aResult, mozilla::ErrorResult& aRv)
 {
   JSContext* cx = aGlobal.Context();
   WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(cx);
 
   nsRefPtr<CreateURLRunnable> runnable =
     new CreateURLRunnable(workerPrivate, aBlob.Impl(), aOptions, aResult);
--- a/dom/workers/URL.h
+++ b/dom/workers/URL.h
@@ -12,17 +12,17 @@
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/URLSearchParams.h"
 
 class nsIPrincipal;
 
 namespace mozilla {
 namespace dom {
-class DOMFile;
+class File;
 struct objectURLOptions;
 }
 }
 
 BEGIN_WORKERS_NAMESPACE
 
 class URLProxy;
 
@@ -59,17 +59,17 @@ public:
 
   static void
   CreateObjectURL(const GlobalObject& aGlobal,
                   JSObject* aArg, const objectURLOptions& aOptions,
                   nsString& aResult, ErrorResult& aRv);
 
   static void
   CreateObjectURL(const GlobalObject& aGlobal,
-                  DOMFile& aArg, const objectURLOptions& aOptions,
+                  File& aArg, const objectURLOptions& aOptions,
                   nsString& aResult, ErrorResult& aRv);
 
   static void
   RevokeObjectURL(const GlobalObject& aGlobal, const nsAString& aUrl);
 
   void GetHref(nsString& aHref, ErrorResult& aRv) const;
 
   void SetHref(const nsAString& aHref, ErrorResult& aRv);
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -7,17 +7,16 @@
 #include "WorkerPrivate.h"
 
 #include "amIAddonManager.h"
 #include "nsIClassInfo.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsIConsoleService.h"
 #include "nsIDOMDOMException.h"
 #include "nsIDOMEvent.h"
-#include "nsIDOMFile.h"
 #include "nsIDOMMessageEvent.h"
 #include "nsIDocument.h"
 #include "nsIDocShell.h"
 #include "nsIMemoryReporter.h"
 #include "nsIPermissionManager.h"
 #include "nsIScriptError.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptSecurityManager.h"
@@ -298,33 +297,33 @@ struct WorkerStructuredCloneCallbacks
        uint32_t aData, void* aClosure)
   {
     JS::Rooted<JSObject*> result(aCx);
 
     // See if object is a nsIDOMBlob pointer.
     if (aTag == DOMWORKER_SCTAG_BLOB) {
       MOZ_ASSERT(!aData);
 
-      DOMFileImpl* blobImpl;
+      FileImpl* blobImpl;
       if (JS_ReadBytes(aReader, &blobImpl, sizeof(blobImpl))) {
         MOZ_ASSERT(blobImpl);
 
 #ifdef DEBUG
         {
           // Blob should not be mutable.
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(blobImpl->GetMutable(&isMutable)) &&
                        !isMutable,
                        "Only immutable blob should be passed to worker");
         }
 #endif
 
         {
           // New scope to protect |result| from a moving GC during ~nsRefPtr.
-          nsRefPtr<DOMFile> blob = new DOMFile(nullptr, blobImpl);
+          nsRefPtr<File> blob = new File(nullptr, blobImpl);
           JS::Rooted<JS::Value> val(aCx);
           if (WrapNewBindingObject(aCx, blob, &val)) {
             result = val.toObjectOrNull();
           }
         }
 
         return result;
       }
@@ -346,19 +345,19 @@ struct WorkerStructuredCloneCallbacks
     NS_ASSERTION(aClosure, "Null pointer!");
 
     // We'll stash any nsISupports pointers that need to be AddRef'd here.
     nsTArray<nsCOMPtr<nsISupports> >* clonedObjects =
       static_cast<nsTArray<nsCOMPtr<nsISupports> >*>(aClosure);
 
     // See if this is a Blob/File object.
     {
-      DOMFile* blob = nullptr;
+      File* blob = nullptr;
       if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob))) {
-        DOMFileImpl* blobImpl = blob->Impl();
+        FileImpl* blobImpl = blob->Impl();
         if (blobImpl && NS_SUCCEEDED(blobImpl->SetMutable(false)) &&
             JS_WriteUint32Pair(aWriter, DOMWORKER_SCTAG_BLOB, 0) &&
             JS_WriteBytes(aWriter, &blobImpl, sizeof(blobImpl))) {
           clonedObjects->AppendElement(blobImpl);
           return true;
         }
       }
     }
@@ -398,38 +397,38 @@ struct MainThreadWorkerStructuredCloneCa
        uint32_t aData, void* aClosure)
   {
     AssertIsOnMainThread();
 
     // See if object is a Blob/File pointer.
     if (aTag == DOMWORKER_SCTAG_BLOB) {
       MOZ_ASSERT(!aData);
 
-      DOMFileImpl* blobImpl;
+      FileImpl* blobImpl;
       if (JS_ReadBytes(aReader, &blobImpl, sizeof(blobImpl))) {
         MOZ_ASSERT(blobImpl);
 
 #ifdef DEBUG
         {
           // Blob should not be mutable.
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(blobImpl->GetMutable(&isMutable)) &&
                        !isMutable,
                        "Only immutable blob should be passed to worker");
         }
 #endif
 
-        // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is
+        // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
         // called because the static analysis thinks dereferencing XPCOM objects
         // can GC (because in some cases it can!), and a return statement with a
         // JSObject* type means that JSObject* is on the stack as a raw pointer
         // while destructors are running.
         JS::Rooted<JS::Value> val(aCx);
         {
-          nsRefPtr<DOMFile> blob = new DOMFile(nullptr, blobImpl);
+          nsRefPtr<File> blob = new File(nullptr, blobImpl);
           if (!WrapNewBindingObject(aCx, blob, &val)) {
             return nullptr;
           }
         }
 
         return &val.toObject();
       }
     }
@@ -447,19 +446,19 @@ struct MainThreadWorkerStructuredCloneCa
     NS_ASSERTION(aClosure, "Null pointer!");
 
     // We'll stash any nsISupports pointers that need to be AddRef'd here.
     nsTArray<nsCOMPtr<nsISupports> >* clonedObjects =
       static_cast<nsTArray<nsCOMPtr<nsISupports> >*>(aClosure);
 
     // See if this is a Blob/File object.
     {
-      DOMFile* blob = nullptr;
+      File* blob = nullptr;
       if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob))) {
-        DOMFileImpl* blobImpl = blob->Impl();
+        FileImpl* blobImpl = blob->Impl();
         if (blobImpl->IsCCed()) {
           NS_WARNING("Cycle collected blob objects are not supported!");
         } else if (NS_SUCCEEDED(blobImpl->SetMutable(false)) &&
                    JS_WriteUint32Pair(aWriter, DOMWORKER_SCTAG_BLOB, 0) &&
                    JS_WriteBytes(aWriter, &blobImpl, sizeof(blobImpl))) {
           clonedObjects->AppendElement(blobImpl);
           return true;
         }
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -10,20 +10,20 @@
 #include "nsIRunnable.h"
 #include "nsIVariant.h"
 #include "nsIXMLHttpRequest.h"
 #include "nsIXPConnect.h"
 
 #include "jsfriendapi.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/dom/Exceptions.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ProgressEvent.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
-#include "nsDOMFile.h"
 #include "nsJSUtils.h"
 #include "nsThreadUtils.h"
 
 #include "RuntimeService.h"
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
 #include "XMLHttpRequestUpload.h"
 
@@ -2154,17 +2154,17 @@ XMLHttpRequest::Send(JS::Handle<JSObject
     aRv.Throw(NS_ERROR_DOM_DATA_CLONE_ERR);
     return;
   }
 
   SendInternal(EmptyString(), Move(buffer), clonedObjects, aRv);
 }
 
 void
-XMLHttpRequest::Send(DOMFile& aBody, ErrorResult& aRv)
+XMLHttpRequest::Send(File& aBody, ErrorResult& aRv)
 {
   mWorkerPrivate->AssertIsOnWorkerThread();
   JSContext* cx = mWorkerPrivate->GetJSContext();
 
   if (mCanceled) {
     aRv.Throw(UNCATCHABLE_EXCEPTION);
     return;
   }
--- a/dom/workers/XMLHttpRequest.h
+++ b/dom/workers/XMLHttpRequest.h
@@ -13,17 +13,17 @@
 
 #include "mozilla/dom/TypedArray.h"
 
 #include "js/StructuredClone.h"
 #include "nsXMLHttpRequest.h"
 
 namespace mozilla {
 namespace dom {
-class DOMFile;
+class File;
 }
 }
 
 BEGIN_WORKERS_NAMESPACE
 
 class Proxy;
 class XMLHttpRequestUpload;
 class WorkerPrivate;
@@ -165,17 +165,17 @@ public:
 
   void
   Send(const nsAString& aBody, ErrorResult& aRv);
 
   void
   Send(JS::Handle<JSObject*> aBody, ErrorResult& aRv);
 
   void
-  Send(DOMFile& aBody, ErrorResult& aRv);
+  Send(File& aBody, ErrorResult& aRv);
 
   void
   Send(const ArrayBuffer& aBody, ErrorResult& aRv);
 
   void
   Send(const ArrayBufferView& aBody, ErrorResult& aRv);
 
   void
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -15,24 +15,23 @@
 #include "mozilla/Atomics.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/unused.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/dom/ipc/nsIRemoteBlob.h"
 #include "mozilla/ipc/ProtocolTypes.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
-#include "nsDOMFile.h"
-#include "nsIDOMFile.h"
 #include "nsIEventTarget.h"
 #include "nsIIPCBackgroundChildCreateCallback.h"
 #include "nsIMutable.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIRunnable.h"
 #include "nsISupportsImpl.h"
 #include "nsIThread.h"
@@ -842,17 +841,17 @@ BackgroundParent::GetContentParent(PBack
 {
   return ParentImpl::GetContentParent(aBackgroundActor);
 }
 
 // static
 PBlobParent*
 BackgroundParent::GetOrCreateActorForBlobImpl(
                                             PBackgroundParent* aBackgroundActor,
-                                            DOMFileImpl* aBlobImpl)
+                                            FileImpl* aBlobImpl)
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aBackgroundActor);
   MOZ_ASSERT(aBlobImpl);
 
   BlobParent* actor = BlobParent::GetOrCreate(aBackgroundActor, aBlobImpl);
   if (NS_WARN_IF(!actor)) {
     return nullptr;
@@ -918,17 +917,17 @@ BackgroundChild::GetOrCreateActorForBlob
 {
   MOZ_ASSERT(aBackgroundActor);
   MOZ_ASSERT(aBlob);
   MOZ_ASSERT(GetForCurrentThread(),
              "BackgroundChild not created on this thread yet!");
   MOZ_ASSERT(aBackgroundActor == GetForCurrentThread(),
              "BackgroundChild is bound to a different thread!");
 
-  nsRefPtr<DOMFileImpl> blobImpl = static_cast<DOMFile*>(aBlob)->Impl();
+  nsRefPtr<FileImpl> blobImpl = static_cast<File*>(aBlob)->Impl();
   MOZ_ASSERT(blobImpl);
 
   BlobChild* actor = BlobChild::GetOrCreate(aBackgroundActor, blobImpl);
   if (NS_WARN_IF(!actor)) {
     return nullptr;
   }
 
   return actor;
--- a/ipc/glue/BackgroundParent.h
+++ b/ipc/glue/BackgroundParent.h
@@ -10,34 +10,34 @@
 #include "mozilla/ipc/Transport.h"
 
 template <class> struct already_AddRefed;
 
 namespace mozilla {
 namespace dom {
 
 class ContentParent;
-class DOMFileImpl;
+class FileImpl;
 class PBlobParent;
 
 } // namespace dom
 
 namespace ipc {
 
 class PBackgroundParent;
 
 // This class is not designed for public consumption beyond the few static
 // member functions.
 class BackgroundParent MOZ_FINAL
 {
   friend class mozilla::dom::ContentParent;
 
   typedef base::ProcessId ProcessId;
   typedef mozilla::dom::ContentParent ContentParent;
-  typedef mozilla::dom::DOMFileImpl DOMFileImpl;
+  typedef mozilla::dom::FileImpl FileImpl;
   typedef mozilla::ipc::Transport Transport;
 
 public:
   // This function allows the caller to determine if the given parent actor
   // corresponds to a child actor from another process or a child actor from a
   // different thread in the same process.
   // This function may only be called on the background thread.
   static bool
@@ -51,17 +51,17 @@ public:
   // ContentParent is not threadsafe and the returned pointer may not be used on
   // any thread other than the main thread. Callers must take care to use (and
   // release) the returned pointer appropriately.
   static already_AddRefed<ContentParent>
   GetContentParent(PBackgroundParent* aBackgroundActor);
 
   static mozilla::dom::PBlobParent*
   GetOrCreateActorForBlobImpl(PBackgroundParent* aBackgroundActor,
-                              DOMFileImpl* aBlobImpl);
+                              FileImpl* aBlobImpl);
 
   // Get a value that represents the ContentParent associated with the parent
   // actor for comparison. The value is not guaranteed to uniquely identify the
   // ContentParent after the ContentParent has died. This function may only be
   // called on the background thread.
   static intptr_t
   GetRawContentParentForComparison(PBackgroundParent* aBackgroundActor);
 
--- a/ipc/glue/InputStreamUtils.cpp
+++ b/ipc/glue/InputStreamUtils.cpp
@@ -2,21 +2,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "InputStreamUtils.h"
 
 #include "nsIIPCSerializableInputStream.h"
 
 #include "mozilla/Assertions.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "nsComponentManagerUtils.h"
 #include "nsDebug.h"
-#include "nsDOMFile.h"
 #include "nsID.h"
 #include "nsIXULRuntime.h"
 #include "nsMIMEInputStream.h"
 #include "nsMultiplexInputStream.h"
 #include "nsNetCID.h"
 #include "nsStringStream.h"
 #include "nsXULAppAPI.h"
 
@@ -104,17 +104,17 @@ DeserializeInputStream(const InputStream
       break;
 
     // When the input stream already exists in this process, all we need to do
     // is retrieve the original instead of sending any data over the wire.
     case InputStreamParams::TRemoteInputStreamParams: {
       const RemoteInputStreamParams& params =
           aParams.get_RemoteInputStreamParams();
 
-      nsRefPtr<DOMFileImpl> blobImpl;
+      nsRefPtr<FileImpl> blobImpl;
       if (params.remoteBlobParent()) {
         blobImpl =
           static_cast<BlobParent*>(params.remoteBlobParent())->GetBlobImpl();
       } else {
         blobImpl =
           static_cast<BlobChild*>(params.remoteBlobChild())->GetBlobImpl();
       }
 
--- a/js/xpconnect/src/ExportHelpers.cpp
+++ b/js/xpconnect/src/ExportHelpers.cpp
@@ -8,19 +8,19 @@
 #include "WrapperFactory.h"
 #include "AccessCheck.h"
 #include "jsfriendapi.h"
 #include "jsproxy.h"
 #include "jswrapper.h"
 #include "js/StructuredClone.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/BlobBinding.h"
+#include "mozilla/dom/File.h"
 #include "nsGlobalWindow.h"
 #include "nsJSUtils.h"
-#include "nsDOMFile.h"
 #include "nsIDOMFileList.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace JS;
 using namespace js;
 
 namespace xpc {
@@ -47,17 +47,17 @@ public:
         : mOptions(aOptions)
         , mReflectors(aCx)
         , mFunctions(aCx)
     {}
 
     StackScopedCloneOptions *mOptions;
     AutoObjectVector mReflectors;
     AutoObjectVector mFunctions;
-    nsTArray<nsRefPtr<DOMFileImpl>> mBlobImpls;
+    nsTArray<nsRefPtr<FileImpl>> mBlobImpls;
 };
 
 static JSObject *
 StackScopedCloneRead(JSContext *cx, JSStructuredCloneReader *reader, uint32_t tag,
                      uint32_t data, void *closure)
 {
     MOZ_ASSERT(closure, "Null pointer!");
     StackScopedCloneData *cloneData = static_cast<StackScopedCloneData *>(closure);
@@ -103,21 +103,21 @@ StackScopedCloneRead(JSContext *cx, JSSt
         size_t idx;
         if (!JS_ReadBytes(reader, &idx, sizeof(size_t))) {
             return nullptr;
         }
 
         nsIGlobalObject *global = xpc::NativeGlobal(JS::CurrentGlobalOrNull(cx));
         MOZ_ASSERT(global);
 
-        // nsRefPtr<DOMFile> needs to go out of scope before toObjectOrNull() is called because
+        // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is called because
         // otherwise the static analysis thinks it can gc the JSObject via the stack.
         JS::Rooted<JS::Value> val(cx);
         {
-            nsRefPtr<DOMFile> blob = new DOMFile(global, cloneData->mBlobImpls[idx]);
+            nsRefPtr<File> blob = new File(global, cloneData->mBlobImpls[idx]);
             if (!WrapNewBindingObject(cx, blob, &val)) {
                 return nullptr;
             }
         }
 
         return val.toObjectOrNull();
     }
 
@@ -149,19 +149,19 @@ bool IsFileList(JSObject *obj)
 static bool
 StackScopedCloneWrite(JSContext *cx, JSStructuredCloneWriter *writer,
                       Handle<JSObject *> obj, void *closure)
 {
     MOZ_ASSERT(closure, "Null pointer!");
     StackScopedCloneData *cloneData = static_cast<StackScopedCloneData *>(closure);
 
     {
-        DOMFile* blob = nullptr;
+        File* blob = nullptr;
         if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, obj, blob))) {
-            DOMFileImpl* blobImpl = blob->Impl();
+            FileImpl* blobImpl = blob->Impl();
             MOZ_ASSERT(blobImpl);
 
             if (!cloneData->mBlobImpls.AppendElement(blobImpl))
                 return false;
 
             size_t idx = cloneData->mBlobImpls.Length() - 1;
             return JS_WriteUint32Pair(writer, SCTAG_BLOB, 0) &&
                    JS_WriteBytes(writer, &idx, sizeof(size_t));
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -176,17 +176,17 @@ nsHtml5StreamParser::nsHtml5StreamParser
 
   if (aMode == VIEW_SOURCE_HTML || aMode == VIEW_SOURCE_XML) {
     nsHtml5Highlighter* highlighter =
       new nsHtml5Highlighter(mExecutor->GetStage());
     mTokenizer->EnableViewSource(highlighter); // takes ownership
     mTreeBuilder->EnableViewSource(highlighter); // doesn't own
   }
 
-  // Chardet instantiation adapted from nsDOMFile.
+  // Chardet instantiation adapted from File.
   // Chardet is initialized here even if it turns out to be useless
   // to make the chardet refcount its observer (nsHtml5StreamParser)
   // on the main thread.
   const nsAdoptingCString& detectorName =
     Preferences::GetLocalizedCString("intl.charset.detector");
   if (!detectorName.IsEmpty()) {
     nsAutoCString detectorContractID;
     detectorContractID.AssignLiteral(NS_CHARSET_DETECTOR_CONTRACTID_BASE);
--- a/widget/nsIFilePicker.idl
+++ b/widget/nsIFilePicker.idl
@@ -140,25 +140,25 @@ interface nsIFilePicker : nsISupports
   *
   * @return Returns the files currently selected
   */
   readonly attribute nsISimpleEnumerator files;
 
  /**
   * Get the nsIDOMFile for the file.
   *
-  * @return Returns the file currently selected as DOMFile
+  * @return Returns the file currently selected as File
   */
   readonly attribute nsIDOMFile domfile;
 
  /**
   * Get the enumerator for the selected files
   * only works in the modeOpenMultiple mode
   *
-  * @return Returns the files currently selected as DOMFiles
+  * @return Returns the files currently selected as Files
   */
   readonly attribute nsISimpleEnumerator domfiles;
 
  /**
   * Controls whether the chosen file(s) should be added to the system's recent
   * documents list. This attribute will be ignored if the system has no "Recent
   * Docs" concept, or if the application is in private browsing mode (in which
   * case the file will not be added). Defaults to true.
--- a/widget/xpwidgets/nsBaseFilePicker.cpp
+++ b/widget/xpwidgets/nsBaseFilePicker.cpp
@@ -11,18 +11,18 @@
 #include "nsIBaseWindow.h"
 #include "nsIWidget.h"
 
 #include "nsIStringBundle.h"
 #include "nsXPIDLString.h"
 #include "nsIServiceManager.h"
 #include "nsCOMArray.h"
 #include "nsIFile.h"
-#include "nsDOMFile.h"
 #include "nsEnumeratorUtils.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/Services.h"
 #include "WidgetUtils.h"
 #include "nsThreadUtils.h"
 
 #include "nsBaseFilePicker.h"
 
 using namespace mozilla::widget;
 using namespace mozilla::dom;
@@ -91,17 +91,17 @@ public:
       return NS_OK;
     }
 
     nsCOMPtr<nsIFile> localFile = do_QueryInterface(tmp);
     if (!localFile) {
       return NS_ERROR_FAILURE;
     }
 
-    nsCOMPtr<nsIDOMFile> domFile = DOMFile::CreateFromFile(mParent, localFile);
+    nsCOMPtr<nsIDOMFile> domFile = File::CreateFromFile(mParent, localFile);
     domFile.forget(aResult);
     return NS_OK;
   }
 
   NS_IMETHOD
   HasMoreElements(bool* aResult)
   {
     return mIterator->HasMoreElements(aResult);
@@ -313,17 +313,17 @@ nsBaseFilePicker::GetDomfile(nsIDOMFile*
   nsresult rv = GetFile(getter_AddRefs(localFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!localFile) {
     *aDomfile = nullptr;
     return NS_OK;
   }
 
-  nsRefPtr<DOMFile> domFile = DOMFile::CreateFromFile(mParent, localFile);
+  nsRefPtr<File> domFile = File::CreateFromFile(mParent, localFile);
   domFile.forget(aDomfile);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsBaseFilePicker::GetDomfiles(nsISimpleEnumerator** aDomfiles)
 {
   nsCOMPtr<nsISimpleEnumerator> iter;
--- a/widget/xpwidgets/nsFilePickerProxy.cpp
+++ b/widget/xpwidgets/nsFilePickerProxy.cpp
@@ -3,17 +3,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsFilePickerProxy.h"
 #include "nsComponentManagerUtils.h"
 #include "nsNetUtil.h"
 #include "nsIFile.h"
-#include "nsDOMFile.h"
+#include "mozilla/dom/File.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 
 using namespace mozilla::dom;
 
 NS_IMPL_ISUPPORTS(nsFilePickerProxy, nsIFilePicker)
 
 nsFilePickerProxy::nsFilePickerProxy()
@@ -141,20 +141,20 @@ nsFilePickerProxy::Open(nsIFilePickerSho
 bool
 nsFilePickerProxy::Recv__delete__(const MaybeInputFiles& aFiles,
                                   const int16_t& aResult)
 {
   if (aFiles.type() == MaybeInputFiles::TInputFiles) {
     const InfallibleTArray<PBlobChild*>& files = aFiles.get_InputFiles().filesChild();
     for (uint32_t i = 0; i < files.Length(); ++i) {
       BlobChild* actor = static_cast<BlobChild*>(files[i]);
-      nsRefPtr<DOMFileImpl> blobImpl = actor->GetBlobImpl();
+      nsRefPtr<FileImpl> blobImpl = actor->GetBlobImpl();
       NS_ENSURE_TRUE(blobImpl, true);
 
-      nsCOMPtr<nsIDOMBlob> blob = new DOMFile(mParent, blobImpl);
+      nsCOMPtr<nsIDOMBlob> blob = new File(mParent, blobImpl);
       nsCOMPtr<nsIDOMFile> file(do_QueryInterface(blob));
       NS_ENSURE_TRUE(file, true);
 
       mDomfiles.AppendObject(file);
     }
   }
 
   if (mCallback) {