From 260721f9ffcdd845b7a293f3d8132270395b7a9e Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Wed, 10 Apr 2013 10:32:10 -0700 Subject: [PATCH] Bug 860110 - Mirror mozprofile changes from m-c to github, r=ahal --- mozprofile/mozprofile/permissions.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozprofile/mozprofile/permissions.py b/mozprofile/mozprofile/permissions.py index 70d0f2d..b93c756 100644 --- a/mozprofile/mozprofile/permissions.py +++ b/mozprofile/mozprofile/permissions.py @@ -233,7 +233,9 @@ def write_db(self, locations): # Open database and create table permDB = sqlite3.connect(os.path.join(self._profileDir, "permissions.sqlite")) cursor = permDB.cursor(); - cursor.execute("PRAGMA schema_version = 3;") + + cursor.execute("PRAGMA user_version=3;") + # SQL copied from # http://mxr.mozilla.org/mozilla-central/source/extensions/cookie/nsPermissionManager.cpp cursor.execute("""CREATE TABLE IF NOT EXISTS moz_hosts ( @@ -242,7 +244,9 @@ def write_db(self, locations): type TEXT, permission INTEGER, expireType INTEGER, - expireTime INTEGER)""") + expireTime INTEGER, + appId INTEGER, + isInBrowserElement INTEGER)""") for location in locations: # set the permissions @@ -253,7 +257,7 @@ def write_db(self, locations): permission_type = 1 else: permission_type = 2 - cursor.execute("INSERT INTO moz_hosts values(?, ?, ?, ?, 0, 0)", + cursor.execute("INSERT INTO moz_hosts values(?, ?, ?, ?, 0, 0, 0, 0)", (self._num_permissions, location.host, perm, permission_type))