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:
Marco Bonardo 2010-04-26 21:04:17 +02:00
parent f06e20312c
commit 4fb284fec0
28 changed files with 2028 additions and 2035 deletions

View File

@ -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

View File

@ -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();

View File

@ -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"

View File

@ -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;
});

View File

@ -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;
});

View File

@ -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

View File

@ -36,8 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
const bmsvc = PlacesUtils.bookmarks;
const testFolderId = PlacesUtils.bookmarksMenuFolderId;

View File

@ -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);

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
/*

View File

@ -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;

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
/*

View File

@ -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() {

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
/*

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
// Get database connection

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
// Get database connection

View File

@ -36,8 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
const NUMBER_OF_BACKUPS = 1;
function run_test() {

View File

@ -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.

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];

View File

@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
var tests = [];
/*

View File

@ -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;
});

View File

@ -37,8 +37,6 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
/*
- add a folder

View File

@ -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;

View File

@ -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-";

View File

@ -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;

View File

@ -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;