Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 860110 - Mirror mozprofile changes from m-c to github, r=ahal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Griffin committed Apr 10, 2013
1 parent 41c9a1d commit 260721f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mozprofile/mozprofile/permissions.py
Expand Up @@ -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 (
Expand All @@ -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
Expand All @@ -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))

Expand Down

0 comments on commit 260721f

Please sign in to comment.