зеркало из https://github.com/mozilla/gecko-dev.git
Bug 560104 - rename toolkit places utils.js to PlacesUtils.jsm r=dietrich
--HG-- rename : toolkit/components/places/src/utils.js => toolkit/components/places/src/PlacesUtils.jsm
This commit is contained in:
Родитель
f06e20312c
Коммит
4fb284fec0
|
@ -78,7 +78,7 @@
|
|||
<script type="application/javascript"
|
||||
src="chrome://browser/content/places/treeView.js"/>
|
||||
<script type="application/javascript"><![CDATA[
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
|
||||
]]></script>
|
||||
#endif
|
||||
|
|
|
@ -764,7 +764,7 @@ BrowserGlue.prototype = {
|
|||
// from bookmarks.html, we will try to restore from JSON
|
||||
if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) {
|
||||
// get latest JSON backup
|
||||
Cu.import("resource://gre/modules/utils.js");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
var bookmarksBackupFile = PlacesUtils.backups.getMostRecent("json");
|
||||
if (bookmarksBackupFile) {
|
||||
// restore from JSON backup
|
||||
|
@ -894,7 +894,7 @@ BrowserGlue.prototype = {
|
|||
* Backup bookmarks if needed.
|
||||
*/
|
||||
_backupBookmarks: function BG__backupBookmarks() {
|
||||
Cu.import("resource://gre/modules/utils.js");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
|
||||
let lastBackupFile = PlacesUtils.backups.getMostRecent();
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
var Ci = Components.interfaces;
|
||||
var Cr = Components.results;
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
|
||||
]]></script>
|
||||
<script type="application/javascript"
|
||||
|
|
|
@ -55,7 +55,7 @@ XPCOMUtils.defineLazyGetter(this, "Services", function() {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
|
||||
Cu.import("resource://gre/modules/utils.js");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
return PlacesUtils;
|
||||
});
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ XPCOMUtils.defineLazyGetter(this, "Services", function() {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
|
||||
Cu.import("resource://gre/modules/utils.js");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
return PlacesUtils;
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
|
|||
const DESCRIPTION_ANNO = "bookmarkProperties/description";
|
||||
const POST_DATA_ANNO = "bookmarkProperties/POSTData";
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
do_check_eq(typeof PlacesUtils, "object");
|
||||
|
||||
// main
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
const bmsvc = PlacesUtils.bookmarks;
|
||||
const testFolderId = PlacesUtils.bookmarksMenuFolderId;
|
||||
|
||||
|
|
|
@ -353,9 +353,6 @@ var successAndFailedObserver = {
|
|||
// Index of the currently running test. See doNextTest().
|
||||
var currTestIndex = -1;
|
||||
|
||||
// Need JSON import/export in toolkit/components/places/src/utils.js
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
||||
getService(Ci.nsINavBookmarksService);
|
||||
|
||||
|
|
|
@ -91,10 +91,11 @@ endif
|
|||
|
||||
EXTRA_JS_MODULES = \
|
||||
PlacesDBUtils.jsm \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_JS_MODULES = \
|
||||
utils.js \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_JS_MODULES = \
|
||||
PlacesUtils.jsm \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
const EXCLUDE_FROM_BACKUP_ANNO = "places/excludeFromBackup";
|
||||
// Menu, Toolbar, Unsorted, Tags
|
||||
const PLACES_ROOTS_COUNT = 4;
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
/*
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
const DEFAULT_INDEX = PlacesUtils.bookmarks.DEFAULT_INDEX;
|
||||
|
||||
function run_test() {
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
/*
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
// Get database connection
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
// Get database connection
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
const NUMBER_OF_BACKUPS = 1;
|
||||
|
||||
function run_test() {
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
function run_test() {
|
||||
let bookmarksBackupDir = PlacesUtils.backups.folder;
|
||||
// Remove all files from backups folder.
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var tests = [];
|
||||
|
||||
/*
|
||||
|
|
|
@ -66,7 +66,7 @@ XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
|
||||
Cu.import("resource://gre/modules/utils.js");
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
return PlacesUtils;
|
||||
});
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
/*
|
||||
|
||||
- add a folder
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
const LMANNO_FEEDURI = "livemark/feedURI";
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var PU = PlacesUtils;
|
||||
var bs = PU.bookmarks;
|
||||
var as = PU.annotations;
|
||||
|
|
|
@ -41,8 +41,6 @@
|
|||
* Check for correct functionality of PlacesUtils.archiveBookmarksFile
|
||||
*/
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
const PREFIX = "bookmarks-";
|
||||
// The localized prefix must be "bigger" and associated to older backups.
|
||||
const LOCALIZED_PREFIX = "segnalibri-";
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
* PlacesUtils.hasChildURIs (those helpers share almost all of their code)
|
||||
*/
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
var PU = PlacesUtils;
|
||||
var hs = PU.history;
|
||||
var bs = PU.bookmarks;
|
||||
|
|
|
@ -41,8 +41,6 @@
|
|||
* Check for correct functionality of PlacesUtils.setAnnotationsForItem/URI
|
||||
*/
|
||||
|
||||
Components.utils.import("resource://gre/modules/utils.js");
|
||||
|
||||
var hs = PlacesUtils.history;
|
||||
var bs = PlacesUtils.bookmarks;
|
||||
var as = PlacesUtils.annotations;
|
||||
|
|
Загрузка…
Ссылка в новой задаче