Security/Reviews/Gaia/DownloadManager: Difference between revisions

Jump to navigation Jump to search
Line 26: Line 26:


Notes from Aus about how activities open file after it is downloaded:
Notes from Aus about how activities open file after it is downloaded:
By default with B2G we will always Save To Disk *first*. After the file is downloaded and saved to disk we will then route it to the appropriate application when it's "pressed" (either from the notifications or the downloads list in the Settings).
  By default with B2G we will always Save To Disk *first*. After the file is downloaded and saved to disk we will then route it to the appropriate application when it's "pressed" (either from the notifications or the downloads list in the Settings).
 
  You can see where we default to save to disk here:
  https://mxr.mozilla.org/mozilla-central/source/b2g/components/HelperAppDialog.js
 
  Once the content is downloaded and the user opts to open it, it will go through this:
  https://mxr.mozilla.org/mozilla-central/source/b2g/components/ContentHandler.js


You can see where we default to save to disk here:
  Which in turn, will call this:
https://mxr.mozilla.org/mozilla-central/source/b2g/components/HelperAppDialog.js
  https://github.com/mozilla-b2g/gaia/blob/5ffb0c1dbe1d4af68713c681baff6698665bbf5a/shared/js/mime_mapper.js
 
 
Once the content is downloaded and the user opts to open it, it will go through this:
  Which will actually help launch the right activity (based on the applications registered types, in the application web manifest.)
https://mxr.mozilla.org/mozilla-central/source/b2g/components/ContentHandler.js
 
Which in turn, will call this:
https://github.com/mozilla-b2g/gaia/blob/5ffb0c1dbe1d4af68713c681baff6698665bbf5a/shared/js/mime_mapper.js
 
Which will actually help launch the right activity (based on the applications registered types, in the application web manifest.)


== Gaia ==
== Gaia ==
Confirmed users
353

edits

Navigation menu