dom/activities/src/ActivityMessageConfigurator.js

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 "use strict";
michael@0 6
michael@0 7 const Ci = Components.interfaces;
michael@0 8 const Cu = Components.utils;
michael@0 9
michael@0 10 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
michael@0 11
michael@0 12 function debug(aMsg) {
michael@0 13 // dump("-- ActivityMessageConfigurator.js " + Date.now() + " : " + aMsg + "\n");
michael@0 14 }
michael@0 15
michael@0 16 /**
michael@0 17 * nsISystemMessagesConfigurator implementation.
michael@0 18 */
michael@0 19 function ActivityMessageConfigurator() {
michael@0 20 debug("ActivityMessageConfigurator");
michael@0 21 }
michael@0 22
michael@0 23 ActivityMessageConfigurator.prototype = {
michael@0 24 get mustShowRunningApp() {
michael@0 25 debug("mustShowRunningApp returning true");
michael@0 26 return true;
michael@0 27 },
michael@0 28
michael@0 29 classID: Components.ID("{d2296daa-c406-4c5e-b698-e5f2c1715798}"),
michael@0 30 QueryInterface: XPCOMUtils.generateQI([Ci.nsISystemMessagesConfigurator])
michael@0 31 }
michael@0 32
michael@0 33 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ActivityMessageConfigurator]);

mercurial