diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp b/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp index b60584c22..369fabfaf 100644 --- a/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp +++ b/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp @@ -93,7 +93,7 @@ static void webkitSoupCookieJarSqliteLoad(WebKitSoupCookieJarSqlite* sqliteJar) WebKitSoupCookieJarSqlitePrivate* priv = sqliteJar->priv; priv->isLoading = true; SQLiteStatement query(priv->database, "SELECT id, name, value, host, path, expiry, lastAccessed, isSecure, isHttpOnly FROM moz_cookies;"); - if (query.prepare() != SQLResultOk) { + if (query.prepare() != SQLITE_OK) { g_warning("Failed to prepare all cookies query"); priv->isLoading = false; return; @@ -102,7 +102,7 @@ static void webkitSoupCookieJarSqliteLoad(WebKitSoupCookieJarSqlite* sqliteJar) SoupCookieJar* jar = SOUP_COOKIE_JAR(sqliteJar); time_t now = floorf(currentTime()); int result; - while ((result = query.step()) == SQLResultRow) { + while ((result = query.step()) == SQLITE_ROW) { int expireTime = query.getColumnInt(ColumnExpiry); if (now >= expireTime) continue; @@ -118,7 +118,7 @@ static void webkitSoupCookieJarSqliteLoad(WebKitSoupCookieJarSqlite* sqliteJar) soup_cookie_jar_add_cookie(jar, cookie); } - if (result != SQLResultDone) + if (result != SQLITE_DONE) g_warning("Error reading cookies from database"); priv->isLoading = false; } @@ -127,7 +127,7 @@ static bool webkitSoupCookieJarSqliteInsertCookie(WebKitSoupCookieJarSqlite* sql { WebKitSoupCookieJarSqlitePrivate* priv = sqliteJar->priv; SQLiteStatement query(priv->database, "INSERT INTO moz_cookies VALUES(NULL, ?, ?, ?, ?, ?, NULL, ?, ?);"); - if (query.prepare() != SQLResultOk) { + if (query.prepare() != SQLITE_OK) { g_warning("Failed to prepare insert cookies query"); return false; } @@ -139,7 +139,7 @@ static bool webkitSoupCookieJarSqliteInsertCookie(WebKitSoupCookieJarSqlite* sql query.bindInt(5, static_cast<int64_t>(soup_date_to_time_t(cookie->expires))); query.bindInt(6, cookie->secure); query.bindInt(7, cookie->http_only); - if (query.step() != SQLResultDone) { + if (query.step() != SQLITE_DONE) { g_warning("Error adding cookie (name=%s, domain=%s) to database", cookie->name, cookie->name); return false; } @@ -151,14 +151,14 @@ static bool webkitSoupCookieJarSqliteDeleteCookie(WebKitSoupCookieJarSqlite* sql { WebKitSoupCookieJarSqlitePrivate* priv = sqliteJar->priv; SQLiteStatement query(priv->database, "DELETE FROM moz_cookies WHERE name = (?) AND host = (?);"); - if (query.prepare() != SQLResultOk) { + if (query.prepare() != SQLITE_OK) { g_warning("Failed to prepare delete cookies query"); return false; } query.bindText(1, String::fromUTF8(cookie->name)); query.bindText(2, String::fromUTF8(cookie->domain)); - if (query.step() != SQLResultDone) { + if (query.step() != SQLITE_DONE) { g_warning("Error deleting cookie (name=%s, domain=%s) from database", cookie->name, cookie->name); return false; } |