diff options
author | Moonchild <moonchild@palemoon.org> | 2020-02-07 10:57:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 10:57:04 +0100 |
commit | 6c82d043a1fbcda650057467ae2858025290ed25 (patch) | |
tree | 0e6ed8ca0a0d12653351c67d8de62a372c954f29 /toolkit/components/satchel/nsFormHistory.js | |
parent | a6ef90b1830e263fefda7bcb6e7b74464044a678 (diff) | |
parent | fa52fa60b70c5883acd4a8edd8e1f89c3d5f3920 (diff) | |
download | UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.gz UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.lz UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.xz UXP-6c82d043a1fbcda650057467ae2858025290ed25.zip |
Merge pull request #1394 from MoonchildProductions/appconst-work
The rest of removing AppConstants for Platform
Diffstat (limited to 'toolkit/components/satchel/nsFormHistory.js')
-rw-r--r-- | toolkit/components/satchel/nsFormHistory.js | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/toolkit/components/satchel/nsFormHistory.js b/toolkit/components/satchel/nsFormHistory.js index d68be2d58..9d67f0729 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() { |