summaryrefslogtreecommitdiff
path: root/toolkit/components/satchel/nsFormHistory.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 09:11:39 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-06 09:11:39 -0500
commitc09eca89e42978ebaacb7b618ba2994bce062502 (patch)
tree7d999a220440b161b8211bf256aa085a56aa3978 /toolkit/components/satchel/nsFormHistory.js
parent180543f6c37887cdb19c07cf47491b52154f1157 (diff)
downloaduxp-c09eca89e42978ebaacb7b618ba2994bce062502.tar.gz
Issue #65 - Remove AppConstants from toolkit/components/satchel
Diffstat (limited to 'toolkit/components/satchel/nsFormHistory.js')
-rw-r--r--toolkit/components/satchel/nsFormHistory.js42
1 files changed, 20 insertions, 22 deletions
diff --git a/toolkit/components/satchel/nsFormHistory.js b/toolkit/components/satchel/nsFormHistory.js
index d68be2d587..9d67f0729f 100644
--- a/toolkit/components/satchel/nsFormHistory.js
+++ b/toolkit/components/satchel/nsFormHistory.js
@@ -12,8 +12,6 @@ Components.utils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
"resource://gre/modules/Deprecated.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
- "resource://gre/modules/AppConstants.jsm");
const DB_VERSION = 4;
const DAY_IN_MS = 86400000; // 1 day in milliseconds
@@ -351,26 +349,26 @@ FormHistory.prototype = {
},
moveToDeletedTable : function moveToDeletedTable(values, params) {
- if (AppConstants.platform == "android") {
- this.log("Moving entries to deleted table.");
-
- let stmt;
-
- try {
- // Move the entries to the deleted items table.
- let query = "INSERT INTO moz_deleted_formhistory (guid, timeDeleted) ";
- if (values) query += values;
- stmt = this.dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("Moving deleted entries failed: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- }
+#ifdef MOZ_WIDGET_ANDROID
+ this.log("Moving entries to deleted table.");
+
+ let stmt;
+
+ try {
+ // Move the entries to the deleted items table.
+ let query = "INSERT INTO moz_deleted_formhistory (guid, timeDeleted) ";
+ if (values) query += values;
+ stmt = this.dbCreateStatement(query, params);
+ stmt.execute();
+ } catch (e) {
+ this.log("Moving deleted entries failed: " + e);
+ throw e;
+ } finally {
+ if (stmt) {
+ stmt.reset();
+ }
+ }
+#endif
},
get dbConnection() {