Bug 1116880 - Pass in the referrer policy to the savePrivacyAwareURI() call in openInExternalEditor(). r=geekboy, a=sledru
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 02 Jan 2015 15:29:27 -0500
changeset 234585 b0609810ff1ecd279d4b2557b42478a281ac0c1f
parent 234584 f96aef87f4018a563e0163d3407d0dcc4bb12463
child 234586 4b0a66e14c00e595d607c70534385184c6fda947
push id7432
push userryanvm@gmail.com
push dateMon, 05 Jan 2015 16:09:18 +0000
treeherdermozilla-aurora@5e0e3796c76f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeekboy, sledru
bugs1116880
milestone36.0a2
Bug 1116880 - Pass in the referrer policy to the savePrivacyAwareURI() call in openInExternalEditor(). r=geekboy, a=sledru
toolkit/components/viewsource/content/viewSourceUtils.js
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -125,17 +125,18 @@ var gViewSourceUtils = {
           }
 
           var webBrowserPersist = Components
                                   .classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
                                   .createInstance(this.mnsIWebBrowserPersist);
           // the default setting is to not decode. we need to decode.
           webBrowserPersist.persistFlags = this.mnsIWebBrowserPersist.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
           webBrowserPersist.progressListener = this.viewSourceProgressListener;
-          webBrowserPersist.savePrivacyAwareURI(uri, null, null, null, null, file, fromPrivateWindow);
+          let referrerPolicy = Components.interfaces.nsIHttpChannel.REFERRER_POLICY_NO_REFERRER;
+          webBrowserPersist.savePrivacyAwareURI(uri, null, null, referrerPolicy, null, null, file, fromPrivateWindow);
 
           let helperService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"]
                                         .getService(Components.interfaces.nsPIExternalAppLauncher);
           if (fromPrivateWindow) {
             // register the file to be deleted when possible
             helperService.deleteTemporaryPrivateFileWhenPossible(file);
           } else {
             // register the file to be deleted on app exit