browser/modules/NewTabURL.jsm
author Nihanth Subramanya <nhnt11@.gmail.com>
Wed, 27 May 2015 17:35:03 -0700
changeset 250359 a03993fdddd8
parent 247741 3f9e71094c02
child 250673 9d48630bf4b8
permissions -rw-r--r--
Bug 1118285 - The browser.newtab.url preference is abused and should be removed.

/* 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/. */

"use strict";

let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;

this.EXPORTED_SYMBOLS = [ "NewTabURL" ];

this.NewTabURL = {
  _url: "about:newtab",
  _overridden: false,

  get: function() {
    return this._url;
  },

  get overridden() {
    return this._overridden;
  },

  override: function(newURL) {
    this._url = newURL;
    this._overridden = true;
  },

  reset: function() {
    this._url = "about:newtab";
    this._overridden = false;
  }
};